var Ae=Object.defineProperty,Re=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var qe=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var Le=(r,u,e)=>u in r?Ae(r,u,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[u]=e,xe=(r,u)=>{for(var e in u||(u={}))Ne.call(u,e)&&Le(r,e,u[e]);if(qe)for(var e of qe(u))Ie.call(u,e)&&Le(r,e,u[e]);return r},ke=(r,u)=>Re(r,Fe(u));(function(r,u){typeof exports=="object"&&typeof module!="undefined"?module.exports=u(require("vue")):typeof define=="function"&&define.amd?define(["vue"],u):(r=typeof globalThis!="undefined"?globalThis:r||self,r.VFormDesigner=u(r.Vue))})(this,function(require$$0$1){"use strict";function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}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(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var axios$2={exports:{}},bind$2=function(u,e){return function(){for(var p=new Array(arguments.length),g=0;g
=0)return;h==="set-cookie"?e[h]=(e[h]?e[h]:[]).concat([p]):e[h]=e[h]?e[h]+", "+p:p}}),e},utils$7=utils$d,isURLSameOrigin$1=utils$7.isStandardBrowserEnv()?function(){var u=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a"),h;function p(g){var s=g;return u&&(e.setAttribute("href",s),s=e.href),e.setAttribute("href",s),{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=p(window.location.href),function(s){var c=utils$7.isString(s)?p(s):s;return c.protocol===h.protocol&&c.host===h.host}}():function(){return function(){return!0}}();function Cancel$3(r){this.message=r}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(u){return new Promise(function(h,p){var g=u.data,s=u.headers,c=u.responseType,o;function a(){u.cancelToken&&u.cancelToken.unsubscribe(o),u.signal&&u.signal.removeEventListener("abort",o)}utils$6.isFormData(g)&&delete s["Content-Type"];var t=new XMLHttpRequest;if(u.auth){var i=u.auth.username||"",n=u.auth.password?unescape(encodeURIComponent(u.auth.password)):"";s.Authorization="Basic "+btoa(i+":"+n)}var l=buildFullPath(u.baseURL,u.url);t.open(u.method.toUpperCase(),buildURL$1(l,u.params,u.paramsSerializer),!0),t.timeout=u.timeout;function d(){if(!!t){var m="getAllResponseHeaders"in t?parseHeaders(t.getAllResponseHeaders()):null,$=!c||c==="text"||c==="json"?t.responseText:t.response,v={data:$,status:t.status,statusText:t.statusText,headers:m,config:u,request:t};settle(function(_){h(_),a()},function(_){p(_),a()},v),t=null}}if("onloadend"in t?t.onloadend=d:t.onreadystatechange=function(){!t||t.readyState!==4||t.status===0&&!(t.responseURL&&t.responseURL.indexOf("file:")===0)||setTimeout(d)},t.onabort=function(){!t||(p(createError("Request aborted",u,"ECONNABORTED",t)),t=null)},t.onerror=function(){p(createError("Network Error",u,null,t)),t=null},t.ontimeout=function(){var $=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",v=u.transitional||defaults$5.transitional;u.timeoutErrorMessage&&($=u.timeoutErrorMessage),p(createError($,u,v.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",t)),t=null},utils$6.isStandardBrowserEnv()){var f=(u.withCredentials||isURLSameOrigin(l))&&u.xsrfCookieName?cookies.read(u.xsrfCookieName):void 0;f&&(s[u.xsrfHeaderName]=f)}"setRequestHeader"in t&&utils$6.forEach(s,function($,v){typeof g=="undefined"&&v.toLowerCase()==="content-type"?delete s[v]:t.setRequestHeader(v,$)}),utils$6.isUndefined(u.withCredentials)||(t.withCredentials=!!u.withCredentials),c&&c!=="json"&&(t.responseType=u.responseType),typeof u.onDownloadProgress=="function"&&t.addEventListener("progress",u.onDownloadProgress),typeof u.onUploadProgress=="function"&&t.upload&&t.upload.addEventListener("progress",u.onUploadProgress),(u.cancelToken||u.signal)&&(o=function(m){!t||(p(!m||m&&m.type?new Cancel$2("canceled"):m),t.abort(),t=null)},u.cancelToken&&u.cancelToken.subscribe(o),u.signal&&(u.signal.aborted?o():u.signal.addEventListener("abort",o))),g||(g=null),t.send(g)})},utils$5=utils$d,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$2,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(r,u){!utils$5.isUndefined(r)&&utils$5.isUndefined(r["Content-Type"])&&(r["Content-Type"]=u)}function getDefaultAdapter(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=xhr),r}function stringifySafely(r,u,e){if(utils$5.isString(r))try{return(u||JSON.parse)(r),utils$5.trim(r)}catch(h){if(h.name!=="SyntaxError")throw h}return(e||JSON.stringify)(r)}var defaults$4={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:getDefaultAdapter(),transformRequest:[function(u,e){return normalizeHeaderName(e,"Accept"),normalizeHeaderName(e,"Content-Type"),utils$5.isFormData(u)||utils$5.isArrayBuffer(u)||utils$5.isBuffer(u)||utils$5.isStream(u)||utils$5.isFile(u)||utils$5.isBlob(u)?u:utils$5.isArrayBufferView(u)?u.buffer:utils$5.isURLSearchParams(u)?(setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8"),u.toString()):utils$5.isObject(u)||e&&e["Content-Type"]==="application/json"?(setContentTypeIfUnset(e,"application/json"),stringifySafely(u)):u}],transformResponse:[function(u){var e=this.transitional||defaults$4.transitional,h=e&&e.silentJSONParsing,p=e&&e.forcedJSONParsing,g=!h&&this.responseType==="json";if(g||p&&utils$5.isString(u)&&u.length)try{return JSON.parse(u)}catch(s){if(g)throw s.name==="SyntaxError"?enhanceError(s,this,"E_JSON_PARSE"):s}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$5.forEach(["delete","get","head"],function(u){defaults$4.headers[u]={}}),utils$5.forEach(["post","put","patch"],function(u){defaults$4.headers[u]=utils$5.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults$4,utils$4=utils$d,defaults$3=defaults_1,transformData$1=function(u,e,h){var p=this||defaults$3;return utils$4.forEach(h,function(s){u=s.call(p,u,e)}),u},isCancel$1=function(u){return!!(u&&u.__CANCEL__)},utils$3=utils$d,transformData=transformData$1,isCancel=isCancel$1,defaults$2=defaults_1,Cancel$1=Cancel_1;function throwIfCancellationRequested(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Cancel$1("canceled")}var dispatchRequest$1=function(u){throwIfCancellationRequested(u),u.headers=u.headers||{},u.data=transformData.call(u,u.data,u.headers,u.transformRequest),u.headers=utils$3.merge(u.headers.common||{},u.headers[u.method]||{},u.headers),utils$3.forEach(["delete","get","head","post","put","patch","common"],function(p){delete u.headers[p]});var e=u.adapter||defaults$2.adapter;return e(u).then(function(p){return throwIfCancellationRequested(u),p.data=transformData.call(u,p.data,p.headers,u.transformResponse),p},function(p){return isCancel(p)||(throwIfCancellationRequested(u),p&&p.response&&(p.response.data=transformData.call(u,p.response.data,p.response.headers,u.transformResponse))),Promise.reject(p)})},utils$2=utils$d,mergeConfig$2=function(u,e){e=e||{};var h={};function p(t,i){return utils$2.isPlainObject(t)&&utils$2.isPlainObject(i)?utils$2.merge(t,i):utils$2.isPlainObject(i)?utils$2.merge({},i):utils$2.isArray(i)?i.slice():i}function g(t){if(utils$2.isUndefined(e[t])){if(!utils$2.isUndefined(u[t]))return p(void 0,u[t])}else return p(u[t],e[t])}function s(t){if(!utils$2.isUndefined(e[t]))return p(void 0,e[t])}function c(t){if(utils$2.isUndefined(e[t])){if(!utils$2.isUndefined(u[t]))return p(void 0,u[t])}else return p(void 0,e[t])}function o(t){if(t in e)return p(u[t],e[t]);if(t in u)return p(void 0,u[t])}var a={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:o};return utils$2.forEach(Object.keys(u).concat(Object.keys(e)),function(i){var n=a[i]||g,l=n(i);utils$2.isUndefined(l)&&n!==o||(h[i]=l)}),h},data={version:"0.24.0"},VERSION=data.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach(function(r,u){validators$1[r]=function(h){return typeof h===r||"a"+(u<1?"n ":" ")+r}});var deprecatedWarnings={};validators$1.transitional=function(u,e,h){function p(g,s){return"[Axios v"+VERSION+"] Transitional option '"+g+"'"+s+(h?". "+h:"")}return function(g,s,c){if(u===!1)throw new Error(p(s," has been removed"+(e?" in "+e:"")));return e&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(p(s," has been deprecated since v"+e+" and will be removed in the near future"))),u?u(g,s,c):!0}};function assertOptions(r,u,e){if(typeof r!="object")throw new TypeError("options must be an object");for(var h=Object.keys(r),p=h.length;p-- >0;){var g=h[p],s=u[g];if(s){var c=r[g],o=c===void 0||s(c,g,r);if(o!==!0)throw new TypeError("option "+g+" must be "+o);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(r){this.defaults=r,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(u){typeof u=="string"?(u=arguments[1]||{},u.url=arguments[0]):u=u||{},u=mergeConfig$1(this.defaults,u),u.method?u.method=u.method.toLowerCase():this.defaults.method?u.method=this.defaults.method.toLowerCase():u.method="get";var e=u.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=[],p=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(u)===!1||(p=p&&n.synchronous,h.unshift(n.fulfilled,n.rejected))});var g=[];this.interceptors.response.forEach(function(n){g.push(n.fulfilled,n.rejected)});var s;if(!p){var c=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(c,h),c=c.concat(g),s=Promise.resolve(u);c.length;)s=s.then(c.shift(),c.shift());return s}for(var o=u;h.length;){var a=h.shift(),t=h.shift();try{o=a(o)}catch(i){t(i);break}}try{s=dispatchRequest(o)}catch(i){return Promise.reject(i)}for(;g.length;)s=s.then(g.shift(),g.shift());return s},Axios$1.prototype.getUri=function(u){return u=mergeConfig$1(this.defaults,u),buildURL(u.url,u.params,u.paramsSerializer).replace(/^\?/,"")},utils$1.forEach(["delete","get","head","options"],function(u){Axios$1.prototype[u]=function(e,h){return this.request(mergeConfig$1(h||{},{method:u,url:e,data:(h||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(u){Axios$1.prototype[u]=function(e,h,p){return this.request(mergeConfig$1(p||{},{method:u,url:e,data:h}))}});var Axios_1=Axios$1,Cancel=Cancel_1;function CancelToken(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var u;this.promise=new Promise(function(p){u=p});var e=this;this.promise.then(function(h){if(!!e._listeners){var p,g=e._listeners.length;for(p=0;phtml 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(r){containers.push(r)}function addCustomWidgetSchema(r){customFields.push(r)}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(r,u){(function(h,p){r.exports=p()})(commonjsGlobal,function(){return function(){var e={686:function(g,s,c){c.d(s,{default:function(){return A}});var o=c(279),a=c.n(o),t=c(370),i=c.n(t),n=c(817),l=c.n(n);function d(I){try{return document.execCommand(I)}catch{return!1}}var f=function(F){var P=l()(F);return d("cut"),P},m=f;function $(I){var F=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[F?"right":"left"]="-9999px";var W=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(W,"px"),P.setAttribute("readonly",""),P.value=I,P}var v=function(F,P){var W=$(F);P.container.appendChild(W);var N=l()(W);return d("copy"),W.remove(),N},x=function(F){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},W="";return typeof F=="string"?W=v(F,P):F instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(F==null?void 0:F.type)?W=v(F.value,P):(W=l()(F),d("copy")),W},_=x;function y(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(P){return typeof P}:y=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},y(I)}var w=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=F.action,W=P===void 0?"copy":P,N=F.container,j=F.target,z=F.text;if(W!=="copy"&&W!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(j!==void 0)if(j&&y(j)==="object"&&j.nodeType===1){if(W==="copy"&&j.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(W==="cut"&&(j.hasAttribute("readonly")||j.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(z)return _(z,{container:N});if(j)return W==="cut"?m(j):_(j,{container:N})},q=w;function T(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(P){return typeof P}:T=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},T(I)}function k(I,F){if(!(I instanceof F))throw new TypeError("Cannot call a class as a function")}function S(I,F){for(var P=0;P0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof N.action=="function"?N.action:this.defaultAction,this.target=typeof N.target=="function"?N.target:this.defaultTarget,this.text=typeof N.text=="function"?N.text:this.defaultText,this.container=T(N.container)==="object"?N.container:document.body}},{key:"listenClick",value:function(N){var j=this;this.listener=i()(N,"click",function(z){return j.onClick(z)})}},{key:"onClick",value:function(N){var j=N.delegateTarget||N.currentTarget,z=this.action(j)||"copy",H=q({action:z,container:this.container,target:this.target(j),text:this.text(j)});this.emit(H?"success":"error",{action:z,text:H,trigger:j,clearSelection:function(){j&&j.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(N){return V("action",N)}},{key:"defaultTarget",value:function(N){var j=V("target",N);if(j)return document.querySelector(j)}},{key:"defaultText",value:function(N){return V("text",N)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(N){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return _(N,j)}},{key:"cut",value:function(N){return m(N)}},{key:"isSupported",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],j=typeof N=="string"?[N]:N,z=!!document.queryCommandSupported;return j.forEach(function(H){z=z&&!!document.queryCommandSupported(H)}),z}}]),P}(a()),A=B},828:function(g){var s=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function o(a,t){for(;a&&a.nodeType!==s;){if(typeof a.matches=="function"&&a.matches(t))return a;a=a.parentNode}}g.exports=o},438:function(g,s,c){var o=c(828);function a(n,l,d,f,m){var $=i.apply(this,arguments);return n.addEventListener(d,$,m),{destroy:function(){n.removeEventListener(d,$,m)}}}function t(n,l,d,f,m){return typeof n.addEventListener=="function"?a.apply(null,arguments):typeof d=="function"?a.bind(null,document).apply(null,arguments):(typeof n=="string"&&(n=document.querySelectorAll(n)),Array.prototype.map.call(n,function($){return a($,l,d,f,m)}))}function i(n,l,d,f){return function(m){m.delegateTarget=o(m.target,l),m.delegateTarget&&f.call(n,m)}}g.exports=t},879:function(g,s){s.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},s.nodeList=function(c){var o=Object.prototype.toString.call(c);return c!==void 0&&(o==="[object NodeList]"||o==="[object HTMLCollection]")&&"length"in c&&(c.length===0||s.node(c[0]))},s.string=function(c){return typeof c=="string"||c instanceof String},s.fn=function(c){var o=Object.prototype.toString.call(c);return o==="[object Function]"}},370:function(g,s,c){var o=c(879),a=c(438);function t(d,f,m){if(!d&&!f&&!m)throw new Error("Missing required arguments");if(!o.string(f))throw new TypeError("Second argument must be a String");if(!o.fn(m))throw new TypeError("Third argument must be a Function");if(o.node(d))return i(d,f,m);if(o.nodeList(d))return n(d,f,m);if(o.string(d))return l(d,f,m);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(d,f,m){return d.addEventListener(f,m),{destroy:function(){d.removeEventListener(f,m)}}}function n(d,f,m){return Array.prototype.forEach.call(d,function($){$.addEventListener(f,m)}),{destroy:function(){Array.prototype.forEach.call(d,function($){$.removeEventListener(f,m)})}}}function l(d,f,m){return a(document.body,d,f,m)}g.exports=t},817:function(g){function s(c){var o;if(c.nodeName==="SELECT")c.focus(),o=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var a=c.hasAttribute("readonly");a||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),a||c.removeAttribute("readonly"),o=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var t=window.getSelection(),i=document.createRange();i.selectNodeContents(c),t.removeAllRanges(),t.addRange(i),o=t.toString()}return o}g.exports=s},279:function(g){function s(){}s.prototype={on:function(c,o,a){var t=this.e||(this.e={});return(t[c]||(t[c]=[])).push({fn:o,ctx:a}),this},once:function(c,o,a){var t=this;function i(){t.off(c,i),o.apply(a,arguments)}return i._=o,this.on(c,i,a)},emit:function(c){var o=[].slice.call(arguments,1),a=((this.e||(this.e={}))[c]||[]).slice(),t=0,i=a.length;for(t;t{r[e]=u[e]})},addWindowResizeHandler=function(r){let u=window.onresize;typeof window.onresize!="function"?window.onresize=r:window.onresize=function(){u(),r()}},insertCustomCssToHead=function(r,u=""){let e=document.getElementsByTagName("head")[0],h=document.getElementById("vform-custom-css");h&&e.removeChild(h),u&&(h=document.getElementById("vform-custom-css-"+u),!!h&&e.removeChild(h));let p=document.createElement("style");p.type="text/css",p.rel="stylesheet",p.id=u?"vform-custom-css-"+u:"vform-custom-css";try{p.appendChild(document.createTextNode(r))}catch{p.styleSheet.cssText=r}e.appendChild(p)},insertGlobalFunctionsToHtml=function(r,u=""){let e=document.getElementsByTagName("body")[0],h=document.getElementById("v_form_global_functions");!!h&&e.removeChild(h),u&&(h=document.getElementById("v_form_global_functions-"+u),!!h&&e.removeChild(h));let p=document.createElement("script");p.id=u?"v_form_global_functions-"+u:"v_form_global_functions",p.type="text/javascript",p.innerHTML=r,e.appendChild(p)},loadRemoteScript=function(r,u){let e=encodeURIComponent(r);if(!document.getElementById(e)){let p=document.createElement("script");p.src=r,p.id=e,document.body.appendChild(p),p.onload=p.onreadystatechange=function(g,s){(s||!p.readyState||p.readyState==="loaded"||p.readyState==="complete")&&(p=p.onload=p.onreadystatechange=null,s||u())}}};function traverseFieldWidgets(r,u,e=null){!r||r.map(h=>{h.formItemFlag?u(h,e):h.type==="grid"?h.cols.map(p=>{traverseFieldWidgets(p.widgetList,u,h)}):h.type==="table"?h.rows.map(p=>{p.cols.map(g=>{traverseFieldWidgets(g.widgetList,u,h)})}):h.type==="tab"?h.tabs.map(p=>{traverseFieldWidgets(p.widgetList,u,h)}):(h.type==="sub-form"||h.category==="container")&&traverseFieldWidgets(h.widgetList,u,h)})}function traverseContainerWidgets(r,u){!r||r.map(e=>{e.category==="container"&&u(e),e.type==="grid"?e.cols.map(h=>{traverseContainerWidgets(h.widgetList,u)}):e.type==="table"?e.rows.map(h=>{h.cols.map(p=>{traverseContainerWidgets(p.widgetList,u)})}):e.type==="tab"?e.tabs.map(h=>{traverseContainerWidgets(h.widgetList,u)}):(e.type==="sub-form"||e.category==="container")&&traverseContainerWidgets(e.widgetList,u)})}function traverseAllWidgets(r,u){!r||r.map(e=>{u(e),e.type==="grid"?e.cols.map(h=>{u(h),traverseAllWidgets(h.widgetList,u)}):e.type==="table"?e.rows.map(h=>{h.cols.map(p=>{u(p),traverseAllWidgets(p.widgetList,u)})}):e.type==="tab"?e.tabs.map(h=>{traverseAllWidgets(h.widgetList,u)}):(e.type==="sub-form"||e.category==="container")&&traverseAllWidgets(e.widgetList,u)})}function handleWidgetForTraverse(r,u){r.category?traverseFieldWidgetsOfContainer(r,u):r.formItemFlag&&u(r)}function traverseFieldWidgetsOfContainer(r,u){r.type==="grid"?r.cols.forEach(e=>{e.widgetList.forEach(h=>{handleWidgetForTraverse(h,u)})}):r.type==="table"?r.rows.forEach(e=>{e.cols.forEach(h=>{h.widgetList.forEach(p=>{handleWidgetForTraverse(p,u)})})}):r.type==="tab"?r.tabs.forEach(e=>{e.widgetList.forEach(h=>{handleWidgetForTraverse(h,u)})}):r.type==="sub-form"?r.widgetList.forEach(e=>{handleWidgetForTraverse(e,u)}):r.category==="container"&&r.widgetList.forEach(e=>{handleWidgetForTraverse(e,u)})}function getAllFieldWidgets(r){if(!r)return[];let u=[];return traverseFieldWidgets(r,h=>{u.push({type:h.type,name:h.options.name,field:h})}),u}function getAllContainerWidgets(r){if(!r)return[];let u=[];return traverseContainerWidgets(r,h=>{u.push({type:h.type,name:h.options.name,container:h})}),u}function copyToClipboard(r,u,e,h,p){const g=new Clipboard(u.target,{text:()=>r});g.on("success",()=>{e.success(h),g.destroy()}),g.on("error",()=>{e.error(p),g.destroy()}),g.onClick(u)}function getQueryParam(r){let e=window.location.search.substring(1).split("&");for(let h=0;h{h=isDef(h)&&isDef(h[p])?h[p]:null}),h}let locale=require$$0$1.reactive({lang:localStorage.getItem("v_form_locale")||"zh-CN"});function createI18n(r){return{messages:r.messages,$st(u,...e){const h=get(this.messages[locale.lang],u);return typeof h=="function"?h(...e):h!==null?h:u},$st2(u,e){let h=this.messages[locale.lang];const p=get(h,u);return p!==null?p:get(h,e)},setLang(u){locale.lang=u}}}var en={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var u={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};r.default=u})(en);var enLocaleElement=getDefaultExportFromCjs(en),zhCn={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var u={name:"zh-cn",el:{colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}}};r.default=u})(zhCn);var zhLocaleElement=getDefaultExportFromCjs(zhCn),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":xe(xe(xe(xe({something:{}},enLocaleElement),enLocale),enLocale_render),enLocale_extension),"zh-CN":xe(xe(xe(xe({something:{}},zhLocaleElement),zhLocale),zhLocale_render),zhLocale_extension)},i18n=createI18n({locale:localStorage.getItem("v_form_locale")||"zh-CN",messages:langResources}),changeLocale=function(r){i18n.setLang(r),localStorage.setItem("v_form_locale",r)},translate=function(r){return i18n.$st(r)};var i18n$1={methods:{i18nt(r){return i18n.$st(r)},i18n2t(r,u){return i18n.$st2(r,u)}}},index_vue_vue_type_style_index_0_scoped_true_lang$7="",_export_sfc$1=(r,u)=>{const e=r.__vccOpts||r;for(const[h,p]of u)e[h]=p;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(r,u,e,h,p,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-1ccd726c"]]),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(){this.scrollerHeight=window.innerHeight-56+"px",addWindowResizeHandler(()=>{this.$nextTick(()=>{this.scrollerHeight=window.innerHeight-56+"px"})})},methods:{isBanned(r){return this.getBannedWidgets().indexOf(r)>-1},showFormTemplates(){return this.designerConfig.formTemplates===void 0?!0:!!this.designerConfig.formTemplates},loadWidgets(){this.containers=containers.map(r=>ke(xe({key:generateId()},r),{displayName:this.i18n2t(`designer.widgetLabel.${r.type}`,`extension.widgetLabel.${r.type}`)})).filter(r=>!r.internal&&!this.isBanned(r.type)),this.basicFields=basicFields.map(r=>ke(xe({key:generateId()},r),{displayName:this.i18n2t(`designer.widgetLabel.${r.type}`,`extension.widgetLabel.${r.type}`)})).filter(r=>!this.isBanned(r.type)),this.advancedFields=advancedFields.map(r=>ke(xe({key:generateId()},r),{displayName:this.i18n2t(`designer.widgetLabel.${r.type}`,`extension.widgetLabel.${r.type}`)})).filter(r=>!this.isBanned(r.type)),this.customFields=customFields.map(r=>ke(xe({key:generateId()},r),{displayName:this.i18n2t(`designer.widgetLabel.${r.type}`,`extension.widgetLabel.${r.type}`)})).filter(r=>!this.isBanned(r.type))},handleContainerWidgetClone(r){return this.designer.copyNewContainerWidget(r)},handleFieldWidgetClone(r){return this.designer.copyNewFieldWidget(r)},checkContainerMove(r){return this.designer.checkWidgetMove(r)},checkFieldMove(r){return this.designer.checkFieldMove(r)},onContainerDragEnd(r){},addContainerByDbClick(r){this.designer.addContainerByDbClick(r)},addFieldByDbClick(r){this.designer.addFieldByDbClick(r)},loadFormTemplate(r){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(r).then(u=>{let e=!1;typeof u.data=="string"?e=this.designer.loadFormJson(JSON.parse(u.data)):u.data.constructor===Object&&(e=this.designer.loadFormJson(u.data)),e&&this.designer.emitHistoryChange(),this.$message.success(this.i18nt("designer.hint.loadFormTemplateSuccess"))}).catch(u=>{this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed")+":"+u)})}).catch(u=>{console.error(u)})}}},_hoisted_1$E={class:"panel-container"},_hoisted_2$r=["title","onDblclick"],_hoisted_3$l=["title","onDblclick"],_hoisted_4$e=["title","onDblclick"],_hoisted_5$c=["title","onDblclick"],_hoisted_6$b=["src"],_hoisted_7$9=["src"],_hoisted_8$6={class:"bottom clear-fix"},_hoisted_9$4={class:"ft-title"};function _sfc_render$38(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("draggable"),o=require$$0$1.resolveComponent("el-collapse-item"),a=require$$0$1.resolveComponent("el-collapse"),t=require$$0$1.resolveComponent("el-tab-pane"),i=require$$0$1.resolveComponent("el-popover"),n=require$$0$1.resolveComponent("el-button"),l=require$$0$1.resolveComponent("el-card"),d=require$$0$1.resolveComponent("el-tabs"),f=require$$0$1.resolveComponent("el-scrollbar");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{class:"side-scroll-bar",style:require$$0$1.normalizeStyle({height:p.scrollerHeight})},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$E,[require$$0$1.createVNode(d,{modelValue:p.firstTab,"onUpdate:modelValue":u[1]||(u[1]=m=>p.firstTab=m),class:"no-bottom-margin indent-left-margin"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(t,{name:"componentLib"},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":"el-set-up"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(r.i18nt("designer.componentLib")),1)])]),default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{modelValue:p.activeNames,"onUpdate:modelValue":u[0]||(u[0]=m=>p.activeNames=m),class:"widget-collapse"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(o,{name:"1",title:r.i18nt("designer.containerTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:p.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:m})=>[require$$0$1.createElementVNode("li",{class:"container-widget-item",title:m.displayName,onDblclick:$=>g.addContainerByDbClick(m)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":m.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.i18n2t(`designer.widgetLabel.${m.type}`,`extension.widgetLabel.${m.type}`)),1)])],40,_hoisted_2$r)]),_:1},8,["list","clone","move","onEnd"])]),_:1},8,["title"]),require$$0$1.createVNode(o,{name:"2",title:r.i18nt("designer.basicFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:p.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:m})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:m.displayName,onDblclick:$=>g.addFieldByDbClick(m)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":m.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.i18n2t(`designer.widgetLabel.${m.type}`,`extension.widgetLabel.${m.type}`)),1)])],40,_hoisted_3$l)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(o,{name:"3",title:r.i18nt("designer.advancedFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:p.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:m})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:m.displayName,onDblclick:$=>g.addFieldByDbClick(m)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":m.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.i18n2t(`designer.widgetLabel.${m.type}`,`extension.widgetLabel.${m.type}`)),1)])],40,_hoisted_4$e)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(o,{name:"4",title:r.i18nt("designer.customFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:p.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:m})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:m.displayName,onDblclick:$=>g.addFieldByDbClick(m)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":m.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.i18n2t(`designer.widgetLabel.${m.type}`,`extension.widgetLabel.${m.type}`)),1)])],40,_hoisted_5$c)]),_:1},8,["list","move","clone"])]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),g.showFormTemplates()?(require$$0$1.openBlock(),require$$0$1.createBlock(t,{key:0,name:"formLib",style:{padding:"8px"}},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"icon-class":"el-form-template"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(r.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(p.formTemplates,(m,$)=>(require$$0$1.openBlock(),require$$0$1.createBlock(l,{"bord-style":{padding:"0"},shadow:"hover",class:"ft-card"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{placement:"right",trigger:"hover"},{reference:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:m.imgUrl,style:{width:"200px"}},null,8,_hoisted_6$b)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:m.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(m.title),1),require$$0$1.createVNode(n,{link:"",type:"primary",class:"right-button",onClick:v=>g.loadFormTemplate(m.jsonUrl)},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.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-31f181e6"]]),emitter={data(){return{vfEvents:{}}},methods:{emit$(r,u){this.vfEvents[r]&&this.vfEvents[r].forEach(e=>{e(u)})},on$(r,u){this.vfEvents[r]=this.vfEvents[r]||[],this.vfEvents[r].push(u)},off$(r,u){if(this.vfEvents[r]){if(u==null){this.vfEvents[r].length=0;return}for(let e=0;e{if(this.widgetRefList[p].$options.componentName===u){let s=this.widgetRefList[p];s.emit$.call(s,e,h)}}),this.refList&&Object.keys(this.refList).forEach(p=>{if(this.refList[p].$options.componentName===u){let s=this.refList[p];s.emit$.call(s,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(r,u,e,h,p,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["container-wrapper",[g.customClass]])},[require$$0$1.renderSlot(r.$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(r,u){let e=this.refList[r];return!e&&!!u&&this.$message.error(this.i18nt("render.hint.refNotFound")+r),e},getFormRef(){return this.refList.v_form_ref},getComponentByContainer(r){return r.type==="grid"?"vf-grid-item":r.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(r){this.designer&&(this.designer.setSelected(r),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 r=this.designer.selectedWidgetName;let u=null;this.parentList.length===1?this.parentWidget&&(u=this.parentWidget):this.parentList.length===1+this.indexOfParentList?u=this.parentList[this.indexOfParentList-1]:u=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(u),this.designer.formWidget.deleteWidgetRef(r),this.designer.emitHistoryChange()})}}}},_hoisted_1$D={key:0,class:"field-action"},_hoisted_2$q=["title"],_hoisted_3$k=["title"],_hoisted_4$d=["title"],_hoisted_5$b=["title"],_hoisted_6$a={key:1,class:"drag-handler background-opacity"},_hoisted_7$8=["title"],_hoisted_8$5={key:0};function _sfc_render$36(r,u,e,h,p,g){const s=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:u[0]||(u[0]=require$$0$1.withModifiers(c=>g.selectField(e.field),["stop"]))},[require$$0$1.renderSlot(r.$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:r.i18nt("designer.hint.selectParentWidget"),onClick:u[1]||(u[1]=require$$0$1.withModifiers(c=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"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:r.i18nt("designer.hint.moveUpWidget"),onClick:u[2]||(u[2]=require$$0$1.withModifiers(c=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-move-up"})],8,_hoisted_3$k)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:r.i18nt("designer.hint.moveDownWidget"),onClick:u[3]||(u[3]=require$$0$1.withModifiers(c=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-move-down"})],8,_hoisted_4$d)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:r.i18nt("designer.hint.remove"),onClick:u[4]||(u[4]=require$$0$1.withModifiers((...c)=>g.removeFieldWidget&&g.removeFieldWidget(...c),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-delete"})],8,_hoisted_5$b)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$a,[require$$0$1.createElementVNode("i",{title:r.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(s,{"icon-class":"el-drag-move"})],8,_hoisted_7$8),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(r.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(s,{"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(r){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-~\\/])+$/"}[r]},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 r=rule.errorMsg||defaultErrorMsg;callback(new Error(r))}},FormValidators={number(r,u,e){validateFn("number",r,u,e,"["+r.label+"]\u5305\u542B\u975E\u6570\u5B57\u5B57\u7B26")},letter(r,u,e){validateFn("letter",r,u,e,"["+r.label+"]\u5305\u542B\u975E\u5B57\u6BCD\u5B57\u7B26")},letterAndNumber(r,u,e){validateFn("letterAndNumber",r,u,e,"["+r.label+"]\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57")},mobilePhone(r,u,e){validateFn("mobilePhone",r,u,e,"["+r.label+"]\u624B\u673A\u53F7\u7801\u683C\u5F0F\u6709\u8BEF")},noBlankStart(r,u,e){},noBlankEnd(r,u,e){},letterStartNumberIncluded(r,u,e){validateFn("letterStartNumberIncluded",r,u,e,"["+r.label+"]\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u53EF\u5305\u542B\u6570\u5B57")},noChinese(r,u,e){validateFn("noChinese",r,u,e,"["+r.label+"]\u4E0D\u53EF\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},chinese(r,u,e){validateFn("chinese",r,u,e,"["+r.label+"]\u53EA\u80FD\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},email(r,u,e){validateFn("email",r,u,e,"["+r.label+"]\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF")},url(r,u,e){validateFn("url",r,u,e,"["+r.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 r=rule.errorMsg||"["+rule.label+"]invalid value";callback(new Error(r))}}};function mitt(r){return{all:r=r||new Map,on:function(u,e){var h=r.get(u);h?h.push(e):r.set(u,[e])},off:function(u,e){var h=r.get(u);h&&(e?h.splice(h.indexOf(e)>>>0,1):r.set(u,[]))},emit:function(u,e){var h=r.get(u);h&&h.slice().map(function(p){p(e)}),(h=r.get("*"))&&h.slice().map(function(p){p(u,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 r=this.formModel[this.subFormName];(r===void 0||r[this.subFormRowIndex]===void 0||r[this.subFormRowIndex][this.field.options.name]===void 0)&&this.field.options.defaultValue!==void 0?(this.fieldModel=this.field.options.defaultValue,r[this.subFormRowIndex][this.field.options.name]=this.field.options.defaultValue):r[this.subFormRowIndex][this.field.options.name]===void 0?(this.fieldModel=null,r[this.subFormRowIndex][this.field.options.name]=null):this.fieldModel=r[this.subFormRowIndex][this.field.options.name],setTimeout(()=>{this.handleOnChangeForSubForm(this.fieldModel,this.oldFieldValue,r,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",r=>{console.log("formModel of globalModel----------",this.globalModel.formModel),this.subFormItemFlag||this.setValue(r[this.field.options.name])}),this.on$("field-value-changed",r=>{if(this.subFormItemFlag){let u=this.formModel[this.subFormName];this.handleOnChangeForSubForm(r[0],r[1],u,this.subFormRowId)}else this.handleOnChange(r[0],r[1])}),this.on$("reloadOptionItems",r=>{(r.length===0||r.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(r){this.refList!==null&&!!this.field.options.name&&(this.subFormItemFlag&&!this.designState?(r&&delete this.refList[r+"@row"+this.subFormRowId],this.refList[this.field.options.name+"@row"+this.subFormRowId]=this):(r&&delete this.refList[r],this.refList[this.field.options.name]=this))},unregisterFromRefList(){if(this.refList!==null&&!!this.field.options.name){let r=this.field.options.name;this.subFormItemFlag&&!this.designState?delete this.refList[r+"@row"+this.subFormRowId]:delete this.refList[r]}},initOptionItems(r){if(!this.designState&&(this.field.type==="radio"||this.field.type==="checkbox"||this.field.type==="select"||this.field.type==="cascader")){const u=this.getOptionData();!!u&&u.hasOwnProperty(this.field.options.name)&&(r?this.reloadOptions(u[this.field.options.name]):this.loadOptions(u[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 r=this.field.options.validation;FormValidators[r]?this.rules.push({validator:FormValidators[r],trigger:["blur","change"],label:this.field.options.label,errorMsg:this.field.options.validationHint}):this.rules.push({validator:FormValidators.regExp,trigger:["blur","change"],regExp:r,label:this.field.options.label,errorMsg:this.field.options.validationHint})}if(this.field.options.onValidate){let r=(u,e,h)=>new Function("rule","value","callback",this.field.options.onValidate).call(this,u,e,h);this.rules.push({validator:r,trigger:["blur","change"],label:this.field.options.label})}}},disableChangeValidate(){!this.rules||this.rules.forEach(r=>{r.trigger&&r.trigger.splice(0,r.trigger.length)})},enableChangeValidate(){!this.rules||this.rules.forEach(r=>{r.trigger&&(r.trigger.push("blur"),r.trigger.push("change"))})},disableOptionOfList(r,u){!!r&&r.length>0&&r.forEach(e=>{e.value===u&&(e.disabled=!0)})},enableOptionOfList(r,u){!!r&&r.length>0&&r.forEach(e=>{e.value===u&&(e.disabled=!1)})},emitFieldDataChange(r,u){this.emit$("field-value-changed",[r,u]),this.dispatch("VFormRender","fieldChange",[this.field.options.name,r,u,this.subFormName,this.subFormRowIndex])},syncUpdateFormModel(r){if(!this.designState)if(this.subFormItemFlag){let e=(this.formModel[this.subFormName]||[{}])[this.subFormRowIndex];e&&(e[this.field.options.name]=r)}else this.formModel[this.field.options.name]=r},handleChangeEvent(r){this.syncUpdateFormModel(r),this.emitFieldDataChange(r,this.oldFieldValue),this.oldFieldValue=deepClone(r),this.dispatch("VFormRender","fieldValidation",[this.getPropName()])},handleFocusCustomEvent(r){this.oldFieldValue=deepClone(this.fieldModel),this.field.options.onFocus&&new Function("event",this.field.options.onFocus).call(this,r)},handleBlurCustomEvent(r){this.field.options.onBlur&&new Function("event",this.field.options.onBlur).call(this,r)},handleInputCustomEvent(r){this.syncUpdateFormModel(r),this.dispatch("VFormRender","fieldValidation",[this.getPropName()]),this.field.options.onInput&&new Function("value",this.field.options.onInput).call(this,r)},emitAppendButtonClick(){this.designState||(this.field.options.onAppendButtonClick?new Function(this.field.options.onAppendButtonClick).call(this):this.dispatch("VFormRender","appendButtonClick",[this]))},handleOnChange(r,u){this.field.options.onChange&&new Function("value","oldValue",this.field.options.onChange).call(this,r,u)},handleOnChangeForSubForm(r,u,e,h){this.field.options.onChange&&new Function("value","oldValue","subFormData","rowId",this.field.options.onChange).call(this,r,u,e,h)},handleButtonWidgetClick(){this.designState||(this.field.options.onClick?new Function(this.field.options.onClick).call(this):this.dispatch("VFormRender","buttonClick",[this]))},remoteQuery(r){this.field.options.onRemoteQuery&&new Function("keyword",this.field.options.onRemoteQuery).call(this,r)},getFormRef(){return this.refList.v_form_ref},getWidgetRef(r,u){let e=this.refList[r];return!e&&!!u&&this.$message.error(this.i18nt("render.hint.refNotFound")+r),e},getFieldEditor(){return this.$refs.fieldEditor},setValue(r){if(this.field.formItemFlag){let u=deepClone(this.fieldModel);this.fieldModel=r,this.initFileList(),this.syncUpdateFormModel(r),this.emitFieldDataChange(r,u)}},getValue(){return this.fieldModel},resetField(){let r=this.field.options.defaultValue;this.setValue(r),this.$nextTick(()=>{}),(this.field.type==="picture-upload"||this.field.type==="file-upload")&&(this.$refs.fieldEditor.clearFiles(),this.fileList.splice(0,this.fileList.length))},setWidgetOption(r,u){this.field.options.hasOwnProperty(r)&&(this.field.options[r]=u)},setReadonly(r){this.field.options.readonly=r},setDisabled(r){this.field.options.disabled=r},setAppendButtonVisible(r){this.field.options.appendButton=r},setAppendButtonDisabled(r){this.field.options.appendButtonDisabled=r},setHidden(r){this.field.options.hidden=r,r?this.clearFieldRules():this.buildFieldRules()},setRequired(r){this.field.options.required=r,this.buildFieldRules()},setLabel(r){this.field.options.label=r},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(r){this.field.options.optionItems=deepClone(r)},reloadOptions(r){this.field.options.optionItems=deepClone(r)},disableOption(r){this.disableOptionOfList(this.field.options.optionItems,r)},enableOption(r){this.enableOptionOfList(this.field.options.optionItems,r)},getOptionItems(){return this.field.options.optionItems},setUploadHeader(r,u){this.uploadHeaders[r]=u},setUploadData(r,u){this.uploadData[r]=u},setToolbar(r){this.customToolbar=r},isSubFormItem(){return this.parentWidget?this.parentWidget.type==="sub-form":!1},addCssClass(r){this.field.options.customClass?this.field.options.customClass.push(r):this.field.options.customClass=[r]},removeCssClass(r){if(!this.field.options.customClass)return;let u=-1;this.field.options.customClass.map((e,h)=>{e===r&&(u=h)}),u>-1&&this.field.options.customClass.splice(u,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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-button"),c=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{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(s,{ref:"fieldEditor",type:e.field.options.type,size:r.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:r.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(r){this.designer&&(this.designer.setSelected(r),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 r=this.designer.selectedWidgetName;let u=null;this.parentList.length===1?this.parentWidget&&(u=this.parentWidget):this.parentList.length===1+this.indexOfParentList?u=this.parentList[this.indexOfParentList-1]:u=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(u),this.designer.formWidget.deleteWidgetRef(r),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$j=["title"],_hoisted_4$c=["title"],_hoisted_5$a=["title"],_hoisted_6$9=["title"],_hoisted_7$7={key:1,class:"drag-handler background-opacity"},_hoisted_8$4=["title"],_hoisted_9$3={key:0};function _sfc_render$34(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-tooltip"),o=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(o,{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:u[0]||(u[0]=require$$0$1.withModifiers(a=>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(c,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(s,{"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(c,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(s,{"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(r.$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:r.i18nt("designer.hint.selectParentWidget"),onClick:u[1]||(u[1]=require$$0$1.withModifiers(a=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-back"})],8,_hoisted_3$j),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:r.i18nt("designer.hint.moveUpWidget"),onClick:u[2]||(u[2]=require$$0$1.withModifiers(a=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-move-up"})],8,_hoisted_4$c)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:r.i18nt("designer.hint.moveDownWidget"),onClick:u[3]||(u[3]=require$$0$1.withModifiers(a=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-move-down"})],8,_hoisted_5$a)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:r.i18nt("designer.hint.remove"),onClick:u[4]||(u[4]=require$$0$1.withModifiers((...a)=>g.removeFieldWidget&&g.removeFieldWidget(...a),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-delete"})],8,_hoisted_6$9)])):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:r.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(s,{"icon-class":"el-drag-move"})],8,_hoisted_8$4),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(r.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(s,{"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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-cascader"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",options:e.field.options.optionItems,modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),disabled:e.field.options.disabled,size:r.widgetSize,clearable:e.field.options.clearable,filterable:e.field.options.filterable,placeholder:e.field.options.placeholder||r.i18nt("render.hint.selectPlaceholder"),"show-all-levels":g.showFullPath,props:{checkStrictly:e.field.options.checkStrictly,multiple:e.field.options.multiple,expandTrigger:"hover"},onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-checkbox-button"),c=require$$0$1.resolveComponent("el-checkbox"),o=require$$0$1.resolveComponent("el-checkbox-group"),a=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,rules:p.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(o,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=t=>p.fieldModel=t),disabled:e.field.options.disabled,size:r.widgetSize,onChange:r.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,(t,i)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:i,label:t.value,disabled:t.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(t.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,(t,i)=>(require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:i,label:t.value,disabled:t.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(t.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-color-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),size:r.widgetSize,disabled:e.field.options.disabled,onChange:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-date-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",type:e.field.options.type,modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:r.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||r.i18nt("render.hint.startDatePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||r.i18nt("render.hint.endDatePlaceholder"),onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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$(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-date-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",type:e.field.options.type,modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),readonly:e.field.options.readonly,disabled:e.field.options.disabled,size:r.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||r.i18nt("render.hint.datePlaceholder"),onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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_(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-divider"),c=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{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(s,{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:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handleFileExceed(){let r=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",r))},beforeFileUpload(r){let u=!1,e=r.name.substring(r.name.lastIndexOf(".")+1);if(!!this.field.options&&!!this.field.options.fileTypes){let g=this.field.options.fileTypes;g.length>0&&(u=g.some(s=>e.toLowerCase()===s.toLowerCase()))}if(!u)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+e),!1;let h=!1,p=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(p=this.field.options.fileMaxSize),h=r.size/1024/1024<=p,h?(this.uploadData.key=r.name,this.handleOnBeforeUpload(r)):(this.$message.error(this.i18nt("render.hint.fileSizeExceed")+p+"MB"),!1)},handleOnBeforeUpload(r){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,r);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(r,u,e){let h=deepClone(this.fieldModel);!!u&&!!u.name&&!!u.url?this.fieldModel.push({name:u.name,url:u.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(r),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,h)},handleFileUpload(r,u,e){if(u.status==="success"){let h=null;this.field.options.onUploadSuccess&&(h=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,r,u,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,h,r),!!h&&!!h.name?u.name=h.name:u.name=u.name||r.name||r.fileName||r.filename,!!h&&!!h.url?u.url=h.url:u.url=u.url||r.url,this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(r,u){let e=deepClone(this.fieldModel);this.fieldModel.splice(r,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,e)},removeUploadFile(r,u,e){let h=-1,p=null;this.fileList.forEach((g,s)=>{g.name===r&&(g.url===u||!!e&&g.uid===e)&&(h=s,p=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,p,this.fileList))},handleUploadError(r,u,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,r,u,e):this.$message({message:this.i18nt("render.hint.uploadError")+r,duration:3e3,type:"error"})}}},_withScopeId$4=r=>(require$$0$1.pushScopeId("data-v-197df518"),r=r(),require$$0$1.popScopeId(),r),_hoisted_1$A={key:0,class:"el-upload__tip"},_hoisted_2$o=_withScopeId$4(()=>require$$0$1.createElementVNode("i",{class:"el-icon-plus avatar-uploader-icon"},null,-1)),_hoisted_3$i={class:"upload-file-list"},_hoisted_4$b=["title"],_hoisted_5$9=["href"],_hoisted_6$8=["title"],_hoisted_7$6=["title","onClick"];function _sfc_render$2Z(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-upload"),o=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(o,{designer:e.designer,field:e.field,rules:p.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(c,{ref:"fieldEditor",disabled:e.field.options.disabled,style:require$$0$1.normalizeStyle(p.styleVariables),class:require$$0$1.normalizeClass(["dynamicPseudoAfter",{hideUploadDiv:p.uploadBtnHidden}]),action:e.field.options.uploadURL,headers:p.uploadHeaders,data:p.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":p.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(s,{"icon-class":"el-plus"}),_hoisted_2$o]),file:require$$0$1.withCtx(({file:a})=>[require$$0$1.createElementVNode("div",_hoisted_3$i,[require$$0$1.createElementVNode("span",{class:"upload-file-name",title:a.name},require$$0$1.toDisplayString(a.name),9,_hoisted_4$b),require$$0$1.createElementVNode("a",{href:a.url,download:"",target:"_blank"},[require$$0$1.createElementVNode("span",{class:"el-icon-download file-action",title:r.i18nt("render.hint.downloadFile")},[require$$0$1.createVNode(s,{"icon-class":"el-download"})],8,_hoisted_6$8)],8,_hoisted_5$9),e.field.options.disabled?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",{key:0,class:"file-action",title:r.i18nt("render.hint.removeFile"),onClick:t=>g.removeUploadFile(a.name,a.url,a.uid)},[require$$0$1.createVNode(s,{"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-197df518"]]),__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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-button"),o=require$$0$1.resolveComponent("el-input"),a=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,rules:p.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(o,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=t=>p.fieldModel=t),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:r.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:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onInput:r.handleInputCustomEvent,onChange:r.handleChangeEvent},require$$0$1.createSlots({_:2},[e.field.options.appendButton?{name:"append",fn:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{disabled:e.field.options.disabled||e.field.options.appendButtonDisabled,onClick:r.emitAppendButtonClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-input-number"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),class:"full-width-input",disabled:e.field.options.disabled,size:r.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:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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(r=>r.url)}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handlePictureExceed(){let r=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",r))},beforePictureUpload(r){let u=!1;if(!!this.field.options&&!!this.field.options.fileTypes){let p=this.field.options.fileTypes;p.length>0&&(u=p.some(g=>r.type==="image/"+g))}if(!u)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+r.type),!1;let e=!1,h=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(h=this.field.options.fileMaxSize),e=r.size/1024/1024<=h,e?(this.uploadData.key=r.name,this.handleOnBeforeUpload(r)):(this.$message.error(this.$("render.hint.fileSizeExceed")+h+"MB"),!1)},handleOnBeforeUpload(r){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,r);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(r,u,e){let h=deepClone(this.fieldModel);!!u&&!!u.name&&!!u.url?this.fieldModel.push({name:u.name,url:u.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(r),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,h)},handlePictureUpload(r,u,e){if(u.status==="success"){let h=null;this.field.options.onUploadSuccess&&(h=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,r,u,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,h,r),this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(r){let u=deepClone(this.fieldModel),e=-1;this.fileListBeforeRemove.map((h,p)=>{h.name===r.name&&(h.url===r.url||!!h.uid&&h.uid===r.uid)&&(e=p)}),e>-1&&this.fieldModel.splice(e,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,u)},handleBeforeRemove(r){this.fileListBeforeRemove=deepClone(r)},handlePictureRemove(r){this.handleBeforeRemove(this.fileList),this.fileList.splice(this.fileList.indexOf(r),1),this.updateFieldModelAndEmitDataChangeForRemove(r);let u=deepClone(this.fileList);this.uploadBtnHidden=u.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,r,u)},handleUploadError(r,u,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,r,u,e):this.$message({message:this.i18nt("render.hint.uploadError")+r,duration:3e3,type:"error"})},handlePictureCardPreview({url:r}){this.previewIndex=this.previewList.indexOf(r),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$h={class:"el-upload-list__item-actions"},_hoisted_4$a=["onClick"],_hoisted_5$8=["onClick"],_hoisted_6$7={key:0,class:"el-upload__tip"},_hoisted_7$5={class:"uploader-icon"};function _sfc_render$2V(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-image"),c=require$$0$1.resolveComponent("svg-icon"),o=require$$0$1.resolveComponent("el-upload"),a=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,rules:p.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(o,{ref:"fieldEditor",disabled:e.field.options.disabled,action:e.field.options.uploadURL,headers:p.uploadHeaders,data:p.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":p.fileList,"show-file-list":e.field.options.showFileList,"list-type":"picture-card",class:require$$0$1.normalizeClass({hideUploadDiv:p.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:t})=>[require$$0$1.createVNode(s,{ref:"imageRef",style:{width:"100%",height:"100%"},src:t.url,"preview-src-list":g.previewList,"initial-index":p.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(c,{class:"","icon-class":"el-check"})])]),require$$0$1.createElementVNode("span",_hoisted_3$h,[require$$0$1.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:i=>g.handlePictureCardPreview(t)},[require$$0$1.createVNode(c,{"icon-class":"el-zoom-in"})],8,_hoisted_4$a),require$$0$1.createElementVNode("span",{class:"el-upload-list__item-delete",onClick:i=>g.handlePictureRemove(t)},[require$$0$1.createVNode(c,{"icon-class":"el-delete"})],8,_hoisted_5$8)])]),tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$7,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(c,{"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-75e0f29a"]]),__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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-radio-button"),c=require$$0$1.resolveComponent("el-radio"),o=require$$0$1.resolveComponent("el-radio-group"),a=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,rules:p.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(o,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=t=>p.fieldModel=t),class:require$$0$1.normalizeClass({"radio-group-block":e.field.options.displayStyle==="block"}),disabled:e.field.options.disabled,size:r.widgetSize,onChange:r.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,(t,i)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:i,label:t.value,disabled:t.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(t.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,(t,i)=>(require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:i,label:t.value,disabled:t.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(t.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-rate"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),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:r.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(r,u){(function(h,p){r.exports=p()})(typeof self!="undefined"?self:commonjsGlobal,function(){return function(e){var h={};function p(g){if(h[g])return h[g].exports;var s=h[g]={i:g,l:!1,exports:{}};return e[g].call(s.exports,s,s.exports,p),s.l=!0,s.exports}return p.m=e,p.c=h,p.d=function(g,s,c){p.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:c})},p.n=function(g){var s=g&&g.__esModule?function(){return g.default}:function(){return g};return p.d(s,"a",s),s},p.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},p.p="",p(p.s=109)}([function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(17),s=p(18),c=p(19),o=p(45),a=p(46),t=p(47),i=p(48),n=p(49),l=p(12),d=p(32),f=p(33),m=p(31),$=p(1),v={Scope:$.Scope,create:$.create,find:$.find,query:$.query,register:$.register,Container:g.default,Format:s.default,Leaf:c.default,Embed:i.default,Scroll:o.default,Block:t.default,Inline:a.default,Text:n.default,Attributor:{Attribute:l.default,Class:d.default,Style:f.default,Store:m.default}};h.default=v},function(e,h,p){var g=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var x in v)v.hasOwnProperty(x)&&($[x]=v[x])};return function($,v){m($,v);function x(){this.constructor=$}$.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=function(m){g($,m);function $(v){var x=this;return v="[Parchment] "+v,x=m.call(this,v)||this,x.message=v,x.name=x.constructor.name,x}return $}(Error);h.ParchmentError=s;var c={},o={},a={},t={};h.DATA_KEY="__blot";var i;(function(m){m[m.TYPE=3]="TYPE",m[m.LEVEL=12]="LEVEL",m[m.ATTRIBUTE=13]="ATTRIBUTE",m[m.BLOT=14]="BLOT",m[m.INLINE=7]="INLINE",m[m.BLOCK=11]="BLOCK",m[m.BLOCK_BLOT=10]="BLOCK_BLOT",m[m.INLINE_BLOT=6]="INLINE_BLOT",m[m.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",m[m.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",m[m.ANY=15]="ANY"})(i=h.Scope||(h.Scope={}));function n(m,$){var v=d(m);if(v==null)throw new s("Unable to create "+m+" blot");var x=v,_=m instanceof Node||m.nodeType===Node.TEXT_NODE?m:x.create($);return new x(_,$)}h.create=n;function l(m,$){return $===void 0&&($=!1),m==null?null:m[h.DATA_KEY]!=null?m[h.DATA_KEY].blot:$?l(m.parentNode,$):null}h.find=l;function d(m,$){$===void 0&&($=i.ANY);var v;if(typeof m=="string")v=t[m]||c[m];else if(m instanceof Text||m.nodeType===Node.TEXT_NODE)v=t.text;else if(typeof m=="number")m&i.LEVEL&i.BLOCK?v=t.block:m&i.LEVEL&i.INLINE&&(v=t.inline);else if(m instanceof HTMLElement){var x=(m.getAttribute("class")||"").split(/\s+/);for(var _ in x)if(v=o[x[_]],v)break;v=v||a[m.tagName]}return v==null?null:$&i.LEVEL&v.scope&&$&i.TYPE&v.scope?v:null}h.query=d;function f(){for(var m=[],$=0;$1)return m.map(function(_){return f(_)});var v=m[0];if(typeof v.blotName!="string"&&typeof v.attrName!="string")throw new s("Invalid definition");if(v.blotName==="abstract")throw new s("Cannot register abstract class");if(t[v.blotName||v.attrName]=v,typeof v.keyName=="string")c[v.keyName]=v;else if(v.className!=null&&(o[v.className]=v),v.tagName!=null){Array.isArray(v.tagName)?v.tagName=v.tagName.map(function(_){return _.toUpperCase()}):v.tagName=v.tagName.toUpperCase();var x=Array.isArray(v.tagName)?v.tagName:[v.tagName];x.forEach(function(_){(a[_]==null||v.className==null)&&(a[_]=v)})}return v}h.register=f},function(e,h,p){var g=p(51),s=p(11),c=p(3),o=p(20),a=String.fromCharCode(0),t=function(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]};t.prototype.insert=function(i,n){var l={};return i.length===0?this:(l.insert=i,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(l.attributes=n),this.push(l))},t.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},t.prototype.retain=function(i,n){if(i<=0)return this;var l={retain:i};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(l.attributes=n),this.push(l)},t.prototype.push=function(i){var n=this.ops.length,l=this.ops[n-1];if(i=c(!0,{},i),typeof l=="object"){if(typeof i.delete=="number"&&typeof l.delete=="number")return this.ops[n-1]={delete:l.delete+i.delete},this;if(typeof l.delete=="number"&&i.insert!=null&&(n-=1,l=this.ops[n-1],typeof l!="object"))return this.ops.unshift(i),this;if(s(i.attributes,l.attributes)){if(typeof i.insert=="string"&&typeof l.insert=="string")return this.ops[n-1]={insert:l.insert+i.insert},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof l.retain=="number")return this.ops[n-1]={retain:l.retain+i.retain},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this}}return n===this.ops.length?this.ops.push(i):this.ops.splice(n,0,i),this},t.prototype.chop=function(){var i=this.ops[this.ops.length-1];return i&&i.retain&&!i.attributes&&this.ops.pop(),this},t.prototype.filter=function(i){return this.ops.filter(i)},t.prototype.forEach=function(i){this.ops.forEach(i)},t.prototype.map=function(i){return this.ops.map(i)},t.prototype.partition=function(i){var n=[],l=[];return this.forEach(function(d){var f=i(d)?n:l;f.push(d)}),[n,l]},t.prototype.reduce=function(i,n){return this.ops.reduce(i,n)},t.prototype.changeLength=function(){return this.reduce(function(i,n){return n.insert?i+o.length(n):n.delete?i-n.delete:i},0)},t.prototype.length=function(){return this.reduce(function(i,n){return i+o.length(n)},0)},t.prototype.slice=function(i,n){i=i||0,typeof n!="number"&&(n=1/0);for(var l=[],d=o.iterator(this.ops),f=0;f0&&l.next(f.retain-m)}for(var $=new t(d);n.hasNext()||l.hasNext();)if(l.peekType()==="insert")$.push(l.next());else if(n.peekType()==="delete")$.push(n.next());else{var v=Math.min(n.peekLength(),l.peekLength()),x=n.next(v),_=l.next(v);if(typeof _.retain=="number"){var y={};typeof x.retain=="number"?y.retain=v:y.insert=x.insert;var w=o.attributes.compose(x.attributes,_.attributes,typeof x.retain=="number");if(w&&(y.attributes=w),$.push(y),!l.hasNext()&&s($.ops[$.ops.length-1],y)){var q=new t(n.rest());return $.concat(q).chop()}}else typeof _.delete=="number"&&typeof x.retain=="number"&&$.push(_)}return $.chop()},t.prototype.concat=function(i){var n=new t(this.ops.slice());return i.ops.length>0&&(n.push(i.ops[0]),n.ops=n.ops.concat(i.ops.slice(1))),n},t.prototype.diff=function(i,n){if(this.ops===i.ops)return new t;var l=[this,i].map(function(v){return v.map(function(x){if(x.insert!=null)return typeof x.insert=="string"?x.insert:a;var _=v===i?"on":"with";throw new Error("diff() called "+_+" non-document")}).join("")}),d=new t,f=g(l[0],l[1],n),m=o.iterator(this.ops),$=o.iterator(i.ops);return f.forEach(function(v){for(var x=v[1].length;x>0;){var _=0;switch(v[0]){case g.INSERT:_=Math.min($.peekLength(),x),d.push($.next(_));break;case g.DELETE:_=Math.min(x,m.peekLength()),m.next(_),d.delete(_);break;case g.EQUAL:_=Math.min(m.peekLength(),$.peekLength(),x);var y=m.next(_),w=$.next(_);s(y.insert,w.insert)?d.retain(_,o.attributes.diff(y.attributes,w.attributes)):d.push(w).delete(_);break}x-=_}}),d.chop()},t.prototype.eachLine=function(i,n){n=n||`
`;for(var l=o.iterator(this.ops),d=new t,f=0;l.hasNext();){if(l.peekType()!=="insert")return;var m=l.peek(),$=o.length(m)-l.peekLength(),v=typeof m.insert=="string"?m.insert.indexOf(n,$)-$:-1;if(v<0)d.push(l.next());else if(v>0)d.push(l.next(v));else{if(i(d,l.next(1).attributes||{},f)===!1)return;f+=1,d=new t}}d.length()>0&&i(d,{},f)},t.prototype.transform=function(i,n){if(n=!!n,typeof i=="number")return this.transformPosition(i,n);for(var l=o.iterator(this.ops),d=o.iterator(i.ops),f=new t;l.hasNext()||d.hasNext();)if(l.peekType()==="insert"&&(n||d.peekType()!=="insert"))f.retain(o.length(l.next()));else if(d.peekType()==="insert")f.push(d.next());else{var m=Math.min(l.peekLength(),d.peekLength()),$=l.next(m),v=d.next(m);if($.delete)continue;v.delete?f.push(v):f.retain(m,o.attributes.transform($.attributes,v.attributes,n))}return f.chop()},t.prototype.transformPosition=function(i,n){n=!!n;for(var l=o.iterator(this.ops),d=0;l.hasNext()&&d<=i;){var f=l.peekLength(),m=l.peekType();if(l.next(),m==="delete"){i-=Math.min(f,i-d);continue}else m==="insert"&&(d0&&(O1&&arguments[1]!==void 0?arguments[1]:!1;if(L&&(O===0||O>=this.length()-q)){var M=this.clone();return O===0?(this.parent.insertBefore(M,this),this):(this.parent.insertBefore(M,this.next),M)}else{var R=s(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"split",this).call(this,O,L);return this.cache={},R}}}]),C}(n.default.Block);k.blotName="block",k.tagName="P",k.defaultChild="break",k.allowedChildren=[m.default,n.default.Embed,v.default];function S(b){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(C=(0,o.default)(C,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?C:S(b.parent,C)}h.bubbleFormats=S,h.BlockEmbed=T,h.default=k},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.overload=h.expandConfig=void 0;var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},s=function(){function V(B,A){var I=[],F=!0,P=!1,W=void 0;try{for(var N=B[Symbol.iterator](),j;!(F=(j=N.next()).done)&&(I.push(j.value),!(A&&I.length===A));F=!0);}catch(z){P=!0,W=z}finally{try{!F&&N.return&&N.return()}finally{if(P)throw W}}return I}return function(B,A){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return V(B,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function V(B,A){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof A!="string"){var W=A.attrName||A.blotName;typeof W=="string"?this.register("formats/"+W,A,I):Object.keys(A).forEach(function(N){F.register(N,A[N],I)})}else this.imports[A]!=null&&!P&&E.warn("Overwriting "+A+" with",I),this.imports[A]=I,(A.startsWith("blots/")||A.startsWith("formats/"))&&I.blotName!=="abstract"?$.default.register(I):A.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function V(B){var A=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(C(this,V),this.options=L(B,I),this.container=this.options.container,this.container==null)return E.error("Invalid Quill container",B);this.options.debug&&V.debug(this.options.debug);var F=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 l.default,this.scroll=$.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new i.default(this.scroll),this.selection=new x.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(l.default.events.EDITOR_CHANGE,function(W){W===l.default.events.TEXT_CHANGE&&A.root.classList.toggle("ql-blank",A.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(W,N){var j=A.selection.lastRange,z=j&&j.length===0?j.index:void 0;M.call(A,function(){return A.editor.update(null,N,z)},W)});var P=this.clipboard.convert(`");this.setContents(P),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(V,[{key:"addContainer",value:function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof A=="string"){var F=A;A=document.createElement("div"),A.classList.add(F)}return this.container.insertBefore(A,I),A}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(A,I,F){var P=this,W=R(A,I,F),N=s(W,4);return A=N[0],I=N[1],F=N[3],M.call(this,function(){return P.editor.deleteText(A,I)},F,A,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(A),this.container.classList.toggle("ql-disabled",!A)}},{key:"focus",value:function(){var A=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=A,this.scrollIntoView()}},{key:"format",value:function(A,I){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l.default.sources.API;return M.call(this,function(){var W=F.getSelection(!0),N=new a.default;if(W==null)return N;if($.default.query(A,$.default.Scope.BLOCK))N=F.editor.formatLine(W.index,W.length,b({},A,I));else{if(W.length===0)return F.selection.format(A,I),N;N=F.editor.formatText(W.index,W.length,b({},A,I))}return F.setSelection(W,l.default.sources.SILENT),N},P)}},{key:"formatLine",value:function(A,I,F,P,W){var N=this,j=void 0,z=R(A,I,F,P,W),H=s(z,4);return A=H[0],I=H[1],j=H[2],W=H[3],M.call(this,function(){return N.editor.formatLine(A,I,j)},W,A,0)}},{key:"formatText",value:function(A,I,F,P,W){var N=this,j=void 0,z=R(A,I,F,P,W),H=s(z,4);return A=H[0],I=H[1],j=H[2],W=H[3],M.call(this,function(){return N.editor.formatText(A,I,j)},W,A,0)}},{key:"getBounds",value:function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=void 0;typeof A=="number"?F=this.selection.getBounds(A,I):F=this.selection.getBounds(A.index,A.length);var P=this.container.getBoundingClientRect();return{bottom:F.bottom-P.top,height:F.height,left:F.left-P.left,right:F.right-P.left,top:F.top-P.top,width:F.width}}},{key:"getContents",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,F=R(A,I),P=s(F,2);return A=P[0],I=P[1],this.editor.getContents(A,I)}},{key:"getFormat",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof A=="number"?this.editor.getFormat(A,I):this.editor.getFormat(A.index,A.length)}},{key:"getIndex",value:function(A){return A.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(A){return this.scroll.leaf(A)}},{key:"getLine",value:function(A){return this.scroll.line(A)}},{key:"getLines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof A!="number"?this.scroll.lines(A.index,A.length):this.scroll.lines(A,I)}},{key:"getModule",value:function(A){return this.theme.modules[A]}},{key:"getSelection",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return A&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,F=R(A,I),P=s(F,2);return A=P[0],I=P[1],this.editor.getText(A,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(A,I,F){var P=this,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:V.sources.API;return M.call(this,function(){return P.editor.insertEmbed(A,I,F)},W,A)}},{key:"insertText",value:function(A,I,F,P,W){var N=this,j=void 0,z=R(A,0,F,P,W),H=s(z,4);return A=H[0],j=H[2],W=H[3],M.call(this,function(){return N.editor.insertText(A,I,j)},W,A,I.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(A,I,F){this.clipboard.dangerouslyPasteHTML(A,I,F)}},{key:"removeFormat",value:function(A,I,F){var P=this,W=R(A,I,F),N=s(W,4);return A=N[0],I=N[1],F=N[3],M.call(this,function(){return P.editor.removeFormat(A,I)},F,A)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(A){var I=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.default.sources.API;return M.call(this,function(){A=new a.default(A);var P=I.getLength(),W=I.editor.deleteText(0,P),N=I.editor.applyDelta(A),j=N.ops[N.ops.length-1];j!=null&&typeof j.insert=="string"&&j.insert[j.insert.length-1]===`
`&&(I.editor.deleteText(I.getLength()-1,1),N.delete(1));var z=W.compose(N);return z},F)}},{key:"setSelection",value:function(A,I,F){if(A==null)this.selection.setRange(null,I||V.sources.API);else{var P=R(A,I,F),W=s(P,4);A=W[0],I=W[1],F=W[3],this.selection.setRange(new v.Range(A,I),F),F!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.default.sources.API,F=new a.default().insert(A);return this.setContents(F,I)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l.default.sources.USER,I=this.scroll.update(A);return this.selection.update(A),I}},{key:"updateContents",value:function(A){var I=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.default.sources.API;return M.call(this,function(){return A=new a.default(A),I.editor.applyDelta(A,F)},F,!0)}}]),V}();O.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},O.events=l.default.events,O.sources=l.default.sources,O.version="1.3.7",O.imports={delta:a.default,parchment:$.default,"core/module":f.default,"core/theme":k.default};function L(V,B){if(B=(0,y.default)(!0,{container:V,modules:{clipboard:!0,keyboard:!0,history:!0}},B),!B.theme||B.theme===O.DEFAULTS.theme)B.theme=k.default;else if(B.theme=O.import("themes/"+B.theme),B.theme==null)throw new Error("Invalid theme "+B.theme+". Did you register it?");var A=(0,y.default)(!0,{},B.theme.DEFAULTS);[A,B].forEach(function(P){P.modules=P.modules||{},Object.keys(P.modules).forEach(function(W){P.modules[W]===!0&&(P.modules[W]={})})});var I=Object.keys(A.modules).concat(Object.keys(B.modules)),F=I.reduce(function(P,W){var N=O.import("modules/"+W);return N==null?E.error("Cannot load "+W+" module. Are you sure you registered it?"):P[W]=N.DEFAULTS||{},P},{});return B.modules!=null&&B.modules.toolbar&&B.modules.toolbar.constructor!==Object&&(B.modules.toolbar={container:B.modules.toolbar}),B=(0,y.default)(!0,{},O.DEFAULTS,{modules:F},A,B),["bounds","container","scrollingContainer"].forEach(function(P){typeof B[P]=="string"&&(B[P]=document.querySelector(B[P]))}),B.modules=Object.keys(B.modules).reduce(function(P,W){return B.modules[W]&&(P[W]=B.modules[W]),P},{}),B}function M(V,B,A,I){if(this.options.strict&&!this.isEnabled()&&B===l.default.sources.USER)return new a.default;var F=A==null?null:this.getSelection(),P=this.editor.delta,W=V();if(F!=null&&(A===!0&&(A=F.index),I==null?F=D(F,W,B):I!==0&&(F=D(F,A,I,B)),this.setSelection(F,l.default.sources.SILENT)),W.length()>0){var N,j=[l.default.events.TEXT_CHANGE,W,P,B];if((N=this.emitter).emit.apply(N,[l.default.events.EDITOR_CHANGE].concat(j)),B!==l.default.sources.SILENT){var z;(z=this.emitter).emit.apply(z,j)}}return W}function R(V,B,A,I,F){var P={};return typeof V.index=="number"&&typeof V.length=="number"?typeof B!="number"?(F=I,I=A,A=B,B=V.length,V=V.index):(B=V.length,V=V.index):typeof B!="number"&&(F=I,I=A,A=B,B=0),(typeof A=="undefined"?"undefined":g(A))==="object"?(P=A,F=I):typeof A=="string"&&(I!=null?P[A]=I:F=A),F=F||l.default.sources.API,[V,B,P,F]}function D(V,B,A,I){if(V==null)return null;var F=void 0,P=void 0;if(B instanceof a.default){var W=[V.index,V.index+V.length].map(function(H){return B.transformPosition(H,I!==l.default.sources.USER)}),N=s(W,2);F=N[0],P=N[1]}else{var j=[V.index,V.index+V.length].map(function(H){return H=0?H+A:Math.max(B,H+A)}),z=s(j,2);F=z[0],P=z[1]}return new v.Range(F,P-F)}h.expandConfig=L,h.overload=R,h.default=O},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function m($,v){for(var x=0;x0){var _=this.parent.isolate(this.offset(),this.length());this.moveChildren(_),_.wrap(this)}}}],[{key:"compare",value:function(x,_){var y=$.order.indexOf(x),w=$.order.indexOf(_);return y>=0||w>=0?y-w:x===_?0:x<_?-1:1}}]),$}(t.default.Inline);f.allowedChildren=[f,t.default.Embed,o.default],f.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],h.default=f},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(0),s=c(g);function c(n){return n&&n.__esModule?n:{default:n}}function o(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function a(n,l){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:n}function t(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(n,l):n.__proto__=l)}var i=function(n){t(l,n);function l(){return o(this,l),a(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return l}(s.default.Text);h.default=i},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function v(x,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,y){return _&&v(x.prototype,_),y&&v(x,y),x}}(),s=function v(x,_,y){x===null&&(x=Function.prototype);var w=Object.getOwnPropertyDescriptor(x,_);if(w===void 0){var q=Object.getPrototypeOf(x);return q===null?void 0:v(q,_,y)}else{if("value"in w)return w.value;var T=w.get;return T===void 0?void 0:T.call(y)}},c=p(54),o=i(c),a=p(10),t=i(a);function i(v){return v&&v.__esModule?v:{default:v}}function n(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function l(v,x){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:v}function d(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(v,x):v.__proto__=x)}var f=(0,t.default)("quill:events"),m=["selectionchange","mousedown","mouseup","click"];m.forEach(function(v){document.addEventListener(v,function(){for(var x=arguments.length,_=Array(x),y=0;y1?w-1:0),T=1;T1&&arguments[1]!==void 0?arguments[1]:{};g(this,c),this.quill=o,this.options=a};s.DEFAULTS={},h.default=s},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=["error","warn","log","info"],s="warn";function c(a){if(g.indexOf(a)<=g.indexOf(s)){for(var t,i=arguments.length,n=Array(i>1?i-1:0),l=1;l0&&typeof n[0]!="number")}function i(n,l,d){var f,m;if(a(n)||a(l)||n.prototype!==l.prototype)return!1;if(c(n))return c(l)?(n=g.call(n),l=g.call(l),o(n,l,d)):!1;if(t(n)){if(!t(l)||n.length!==l.length)return!1;for(f=0;f=0;f--)if($[f]!=v[f])return!1;for(f=$.length-1;f>=0;f--)if(m=$[f],!o(n[m],l[m],d))return!1;return typeof n==typeof l}},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(1),s=function(){function c(o,a,t){t===void 0&&(t={}),this.attrName=o,this.keyName=a;var i=g.Scope.TYPE&g.Scope.ATTRIBUTE;t.scope!=null?this.scope=t.scope&g.Scope.LEVEL|i:this.scope=g.Scope.ATTRIBUTE,t.whitelist!=null&&(this.whitelist=t.whitelist)}return c.keys=function(o){return[].map.call(o.attributes,function(a){return a.name})},c.prototype.add=function(o,a){return this.canAdd(o,a)?(o.setAttribute(this.keyName,a),!0):!1},c.prototype.canAdd=function(o,a){var t=g.query(o,g.Scope.BLOT&(this.scope|g.Scope.TYPE));return t==null?!1:this.whitelist==null?!0:typeof a=="string"?this.whitelist.indexOf(a.replace(/["']/g,""))>-1:this.whitelist.indexOf(a)>-1},c.prototype.remove=function(o){o.removeAttribute(this.keyName)},c.prototype.value=function(o){var a=o.getAttribute(this.keyName);return this.canAdd(o,a)&&a?a:""},c}();h.default=s},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.Code=void 0;var g=function(){function T(k,S){var b=[],C=!0,E=!1,O=void 0;try{for(var L=k[Symbol.iterator](),M;!(C=(M=L.next()).done)&&(b.push(M.value),!(S&&b.length===S));C=!0);}catch(R){E=!0,O=R}finally{try{!C&&L.return&&L.return()}finally{if(E)throw O}}return b}return function(k,S){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return T(k,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(k,S){for(var b=0;b=b+C)){var M=this.newlineIndex(b,!0)+1,R=L-M+1,D=this.isolate(M,R),V=D.next;D.format(E,O),V instanceof k&&V.formatAt(0,b-M+C-R,E,O)}}}},{key:"insertAt",value:function(b,C,E){if(E==null){var O=this.descendant($.default,b),L=g(O,2),M=L[0],R=L[1];M.insertAt(R,C)}}},{key:"length",value:function(){var b=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
`)?b:b+1}},{key:"newlineIndex",value:function(b){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(C)return this.domNode.textContent.slice(0,b).lastIndexOf(`
`);var E=this.domNode.textContent.slice(b).indexOf(`
`);return E>-1?b+E:-1}},{key:"optimize",value:function(b){this.domNode.textContent.endsWith(`
`)||this.appendChild(i.default.create("text",`
`)),c(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,b);var C=this.next;C!=null&&C.prev===this&&C.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===C.statics.formats(C.domNode)&&(C.optimize(b),C.moveChildren(this),C.remove())}},{key:"replace",value:function(b){c(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"replace",this).call(this,b),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(C){var E=i.default.find(C);E==null?C.parentNode.removeChild(C):E instanceof i.default.Embed?E.remove():E.unwrap()})}}],[{key:"create",value:function(b){var C=c(k.__proto__||Object.getPrototypeOf(k),"create",this).call(this,b);return C.setAttribute("spellcheck",!1),C}},{key:"formats",value:function(){return!0}}]),k}(l.default);q.blotName="code-block",q.tagName="PRE",q.TAB=" ",h.Code=w,h.default=q},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},s=function(){function V(B,A){var I=[],F=!0,P=!1,W=void 0;try{for(var N=B[Symbol.iterator](),j;!(F=(j=N.next()).done)&&(I.push(j.value),!(A&&I.length===A));F=!0);}catch(z){P=!0,W=z}finally{try{!F&&N.return&&N.return()}finally{if(P)throw W}}return I}return function(B,A){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return V(B,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function V(B,A){for(var I=0;I=P&&!H.endsWith(`
`)&&(F=!0),I.scroll.insertAt(W,H);var K=I.scroll.line(W),Q=s(K,2),le=Q[0],re=Q[1],ae=(0,b.default)({},(0,v.bubbleFormats)(le));if(le instanceof x.default){var de=le.descendant(l.default.Leaf,re),ve=s(de,1),ye=ve[0];ae=(0,b.default)(ae,(0,v.bubbleFormats)(ye))}z=i.default.attributes.diff(ae,z)||{}}else if(g(N.insert)==="object"){var X=Object.keys(N.insert)[0];if(X==null)return W;I.scroll.insertAt(W,X,N.insert[X])}P+=j}return Object.keys(z).forEach(function(Z){I.scroll.formatAt(W,j,Z,z[Z])}),W+j},0),A.reduce(function(W,N){return typeof N.delete=="number"?(I.scroll.deleteAt(W,N.delete),W):W+(N.retain||N.insert.length||1)},0),this.scroll.batchEnd(),this.update(A)}},{key:"deleteText",value:function(A,I){return this.scroll.deleteAt(A,I),this.update(new a.default().retain(A).delete(I))}},{key:"formatLine",value:function(A,I){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(P).forEach(function(W){if(!(F.scroll.whitelist!=null&&!F.scroll.whitelist[W])){var N=F.scroll.lines(A,Math.max(I,1)),j=I;N.forEach(function(z){var H=z.length();if(!(z instanceof f.default))z.format(W,P[W]);else{var K=A-z.offset(F.scroll),Q=z.newlineIndex(K+j)-K+1;z.formatAt(K,Q,W,P[W])}j-=H})}}),this.scroll.optimize(),this.update(new a.default().retain(A).retain(I,(0,q.default)(P)))}},{key:"formatText",value:function(A,I){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(P).forEach(function(W){F.scroll.formatAt(A,I,W,P[W])}),this.update(new a.default().retain(A).retain(I,(0,q.default)(P)))}},{key:"getContents",value:function(A,I){return this.delta.slice(A,A+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(A,I){return A.concat(I.delta())},new a.default)}},{key:"getFormat",value:function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=[],P=[];I===0?this.scroll.path(A).forEach(function(N){var j=s(N,1),z=j[0];z instanceof x.default?F.push(z):z instanceof l.default.Leaf&&P.push(z)}):(F=this.scroll.lines(A,I),P=this.scroll.descendants(l.default.Leaf,A,I));var W=[F,P].map(function(N){if(N.length===0)return{};for(var j=(0,v.bubbleFormats)(N.shift());Object.keys(j).length>0;){var z=N.shift();if(z==null)return j;j=R((0,v.bubbleFormats)(z),j)}return j});return b.default.apply(b.default,W)}},{key:"getText",value:function(A,I){return this.getContents(A,I).filter(function(F){return typeof F.insert=="string"}).map(function(F){return F.insert}).join("")}},{key:"insertEmbed",value:function(A,I,F){return this.scroll.insertAt(A,I,F),this.update(new a.default().retain(A).insert(E({},I,F)))}},{key:"insertText",value:function(A,I){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(A,I),Object.keys(P).forEach(function(W){F.scroll.formatAt(A,I.length,W,P[W])}),this.update(new a.default().retain(A).insert(I,(0,q.default)(P)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var A=this.scroll.children.head;return A.statics.blotName!==x.default.blotName||A.children.length>1?!1:A.children.head instanceof y.default}},{key:"removeFormat",value:function(A,I){var F=this.getText(A,I),P=this.scroll.line(A+I),W=s(P,2),N=W[0],j=W[1],z=0,H=new a.default;N!=null&&(N instanceof f.default?z=N.newlineIndex(j)-j+1:z=N.length()-j,H=N.delta().slice(j,j+z-1).insert(`
`));var K=this.getContents(A,I+z),Q=K.diff(new a.default().insert(F).concat(H)),le=new a.default().retain(A).concat(Q);return this.applyDelta(le)}},{key:"update",value:function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,P=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(L)&&l.default.find(I[0].target)){var W=l.default.find(I[0].target),N=(0,v.bubbleFormats)(W),j=W.offset(this.scroll),z=I[0].oldValue.replace($.default.CONTENTS,""),H=new a.default().insert(z),K=new a.default().insert(W.value()),Q=new a.default().retain(j).concat(H.diff(K,F));A=Q.reduce(function(le,re){return re.insert?le.insert(re.insert,N):le.push(re)},new a.default),this.delta=P.compose(A)}else this.delta=this.getDelta(),(!A||!(0,k.default)(P.compose(A),this.delta))&&(A=P.diff(this.delta,F));return A}}]),V}();function R(V,B){return Object.keys(B).reduce(function(A,I){return V[I]==null||(B[I]===V[I]?A[I]=B[I]:Array.isArray(B[I])?B[I].indexOf(V[I])<0&&(A[I]=B[I].concat([V[I]])):A[I]=[B[I],V[I]]),A},{})}function D(V){return V.reduce(function(B,A){if(A.insert===1){var I=(0,q.default)(A.attributes);return delete I.image,B.insert({image:A.attributes.image},I)}if(A.attributes!=null&&(A.attributes.list===!0||A.attributes.bullet===!0)&&(A=(0,q.default)(A),A.attributes.list?A.attributes.list="ordered":(A.attributes.list="bullet",delete A.attributes.bullet)),typeof A.insert=="string"){var F=A.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return B.insert(F,A.attributes)}return B.push(A)},new a.default)}h.default=M},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.Range=void 0;var g=function(){function T(k,S){var b=[],C=!0,E=!1,O=void 0;try{for(var L=k[Symbol.iterator](),M;!(C=(M=L.next()).done)&&(b.push(M.value),!(S&&b.length===S));C=!0);}catch(R){E=!0,O=R}finally{try{!C&&L.return&&L.return()}finally{if(E)throw O}}return b}return function(k,S){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return T(k,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(k,S){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;x(this,T),this.index=k,this.length=S},w=function(){function T(k,S){var b=this;x(this,T),this.emitter=S,this.scroll=k,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new y(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,d.default.sources.USER),1)}),this.emitter.on(d.default.events.EDITOR_CHANGE,function(C,E){C===d.default.events.TEXT_CHANGE&&E.length()>0&&b.update(d.default.sources.SILENT)}),this.emitter.on(d.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!b.hasFocus()){var C=b.getNativeRange();C!=null&&C.start.node!==b.cursor.textNode&&b.emitter.once(d.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(C.start.node,C.start.offset,C.end.node,C.end.offset)}catch{}})}}),this.emitter.on(d.default.events.SCROLL_OPTIMIZE,function(C,E){if(E.range){var O=E.range,L=O.startNode,M=O.startOffset,R=O.endNode,D=O.endOffset;b.setNativeRange(L,M,R,D)}}),this.update(d.default.sources.SILENT)}return s(T,[{key:"handleComposition",value:function(){var S=this;this.root.addEventListener("compositionstart",function(){S.composing=!0}),this.root.addEventListener("compositionend",function(){if(S.composing=!1,S.cursor.parent){var b=S.cursor.restore();if(!b)return;setTimeout(function(){S.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var S=this;this.emitter.listenDOM("mousedown",document.body,function(){S.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){S.mouseDown=!1,S.update(d.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(S,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[S])){this.scroll.update();var C=this.getNativeRange();if(!(C==null||!C.native.collapsed||o.default.query(S,o.default.Scope.BLOCK))){if(C.start.node!==this.cursor.textNode){var E=o.default.find(C.start.node,!1);if(E==null)return;if(E instanceof o.default.Leaf){var O=E.split(C.start.offset);E.parent.insertBefore(this.cursor,O)}else E.insertBefore(this.cursor,C.start.node);this.cursor.attach()}this.cursor.format(S,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(S){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=this.scroll.length();S=Math.min(S,C-1),b=Math.min(S+b,C-1)-S;var E=void 0,O=this.scroll.leaf(S),L=g(O,2),M=L[0],R=L[1];if(M==null)return null;var D=M.position(R,!0),V=g(D,2);E=V[0],R=V[1];var B=document.createRange();if(b>0){B.setStart(E,R);var A=this.scroll.leaf(S+b),I=g(A,2);if(M=I[0],R=I[1],M==null)return null;var F=M.position(R,!0),P=g(F,2);return E=P[0],R=P[1],B.setEnd(E,R),B.getBoundingClientRect()}else{var W="left",N=void 0;return E instanceof Text?(R0&&(W="right")),{bottom:N.top+N.height,height:N.height,left:N[W],right:N[W],top:N.top,width:0}}}},{key:"getNativeRange",value:function(){var S=document.getSelection();if(S==null||S.rangeCount<=0)return null;var b=S.getRangeAt(0);if(b==null)return null;var C=this.normalizeNative(b);return _.info("getNativeRange",C),C}},{key:"getRange",value:function(){var S=this.getNativeRange();if(S==null)return[null,null];var b=this.normalizedToRange(S);return[b,S]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(S){var b=this,C=[[S.start.node,S.start.offset]];S.native.collapsed||C.push([S.end.node,S.end.offset]);var E=C.map(function(M){var R=g(M,2),D=R[0],V=R[1],B=o.default.find(D,!0),A=B.offset(b.scroll);return V===0?A:B instanceof o.default.Container?A+B.length():A+B.index(D,V)}),O=Math.min(Math.max.apply(Math,v(E)),this.scroll.length()-1),L=Math.min.apply(Math,[O].concat(v(E)));return new y(L,O-L)}},{key:"normalizeNative",value:function(S){if(!q(this.root,S.startContainer)||!S.collapsed&&!q(this.root,S.endContainer))return null;var b={start:{node:S.startContainer,offset:S.startOffset},end:{node:S.endContainer,offset:S.endOffset},native:S};return[b.start,b.end].forEach(function(C){for(var E=C.node,O=C.offset;!(E instanceof Text)&&E.childNodes.length>0;)if(E.childNodes.length>O)E=E.childNodes[O],O=0;else if(E.childNodes.length===O)E=E.lastChild,O=E instanceof Text?E.data.length:E.childNodes.length+1;else break;C.node=E,C.offset=O}),b}},{key:"rangeToNative",value:function(S){var b=this,C=S.collapsed?[S.index]:[S.index,S.index+S.length],E=[],O=this.scroll.length();return C.forEach(function(L,M){L=Math.min(O-1,L);var R=void 0,D=b.scroll.leaf(L),V=g(D,2),B=V[0],A=V[1],I=B.position(A,M!==0),F=g(I,2);R=F[0],A=F[1],E.push(R,A)}),E.length<2&&(E=E.concat(E)),E}},{key:"scrollIntoView",value:function(S){var b=this.lastRange;if(b!=null){var C=this.getBounds(b.index,b.length);if(C!=null){var E=this.scroll.length()-1,O=this.scroll.line(Math.min(b.index,E)),L=g(O,1),M=L[0],R=M;if(b.length>0){var D=this.scroll.line(Math.min(b.index+b.length,E)),V=g(D,1);R=V[0]}if(!(M==null||R==null)){var B=S.getBoundingClientRect();C.topB.bottom&&(S.scrollTop+=C.bottom-B.bottom)}}}}},{key:"setNativeRange",value:function(S,b){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S,E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,O=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(_.info("setNativeRange",S,b,C,E),!(S!=null&&(this.root.parentNode==null||S.parentNode==null||C.parentNode==null))){var L=document.getSelection();if(L!=null)if(S!=null){this.hasFocus()||this.root.focus();var M=(this.getNativeRange()||{}).native;if(M==null||O||S!==M.startContainer||b!==M.startOffset||C!==M.endContainer||E!==M.endOffset){S.tagName=="BR"&&(b=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode),C.tagName=="BR"&&(E=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode);var R=document.createRange();R.setStart(S,b),R.setEnd(C,E),L.removeAllRanges(),L.addRange(R)}}else L.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(S){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;if(typeof b=="string"&&(C=b,b=!1),_.info("setRange",S),S!=null){var E=this.rangeToNative(S);this.setNativeRange.apply(this,v(E).concat([b]))}else this.setNativeRange(null);this.update(C)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,b=this.lastRange,C=this.getRange(),E=g(C,2),O=E[0],L=E[1];if(this.lastRange=O,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,n.default)(b,this.lastRange)){var M;!this.composing&&L!=null&&L.native.collapsed&&L.start.node!==this.cursor.textNode&&this.cursor.restore();var R=[d.default.events.SELECTION_CHANGE,(0,t.default)(this.lastRange),(0,t.default)(b),S];if((M=this.emitter).emit.apply(M,[d.default.events.EDITOR_CHANGE].concat(R)),S!==d.default.sources.SILENT){var D;(D=this.emitter).emit.apply(D,R)}}}}]),T}();function q(T,k){try{k.parentNode}catch{return!1}return k instanceof Text&&(k=k.parentNode),T.contains(k)}h.Range=y,h.default=w},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function d(f,m){for(var $=0;$0&&(l+=1),[this.parent.domNode,l]},t.prototype.value=function(){var i;return i={},i[this.statics.blotName]=this.statics.value(this.domNode)||!0,i},t.scope=c.Scope.INLINE_BLOT,t}(s.default);h.default=o},function(e,h,p){var g=p(11),s=p(3),c={attributes:{compose:function(a,t,i){typeof a!="object"&&(a={}),typeof t!="object"&&(t={});var n=s(!0,{},t);i||(n=Object.keys(n).reduce(function(d,f){return n[f]!=null&&(d[f]=n[f]),d},{}));for(var l in a)a[l]!==void 0&&t[l]===void 0&&(n[l]=a[l]);return Object.keys(n).length>0?n:void 0},diff:function(a,t){typeof a!="object"&&(a={}),typeof t!="object"&&(t={});var i=Object.keys(a).concat(Object.keys(t)).reduce(function(n,l){return g(a[l],t[l])||(n[l]=t[l]===void 0?null:t[l]),n},{});return Object.keys(i).length>0?i:void 0},transform:function(a,t,i){if(typeof a!="object")return t;if(typeof t=="object"){if(!i)return t;var n=Object.keys(t).reduce(function(l,d){return a[d]===void 0&&(l[d]=t[d]),l},{});return Object.keys(n).length>0?n:void 0}}},iterator:function(a){return new o(a)},length:function(a){return typeof a.delete=="number"?a.delete:typeof a.retain=="number"?a.retain:typeof a.insert=="string"?a.insert.length:1}};function o(a){this.ops=a,this.index=0,this.offset=0}o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(a){a||(a=1/0);var t=this.ops[this.index];if(t){var i=this.offset,n=c.length(t);if(a>=n-i?(a=n-i,this.index+=1,this.offset=0):this.offset+=a,typeof t.delete=="number")return{delete:a};var l={};return t.attributes&&(l.attributes=t.attributes),typeof t.retain=="number"?l.retain=a:typeof t.insert=="string"?l.insert=t.insert.substr(i,a):l.insert=t.insert,l}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},o.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"},o.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var a=this.offset,t=this.index,i=this.next(),n=this.ops.slice(this.index);return this.offset=a,this.index=t,[i].concat(n)}else return[]},e.exports=c},function(e,h){var p=function(){function g(f,m){return m!=null&&f instanceof m}var s;try{s=Map}catch{s=function(){}}var c;try{c=Set}catch{c=function(){}}var o;try{o=Promise}catch{o=function(){}}function a(f,m,$,v,x){typeof m=="object"&&($=m.depth,v=m.prototype,x=m.includeNonEnumerable,m=m.circular);var _=[],y=[],w=typeof Buffer!="undefined";typeof m=="undefined"&&(m=!0),typeof $=="undefined"&&($=1/0);function q(T,k){if(T===null)return null;if(k===0)return T;var S,b;if(typeof T!="object")return T;if(g(T,s))S=new s;else if(g(T,c))S=new c;else if(g(T,o))S=new o(function(B,A){T.then(function(I){B(q(I,k-1))},function(I){A(q(I,k-1))})});else if(a.__isArray(T))S=[];else if(a.__isRegExp(T))S=new RegExp(T.source,d(T)),T.lastIndex&&(S.lastIndex=T.lastIndex);else if(a.__isDate(T))S=new Date(T.getTime());else{if(w&&Buffer.isBuffer(T))return Buffer.allocUnsafe?S=Buffer.allocUnsafe(T.length):S=new Buffer(T.length),T.copy(S),S;g(T,Error)?S=Object.create(T):typeof v=="undefined"?(b=Object.getPrototypeOf(T),S=Object.create(b)):(S=Object.create(v),b=v)}if(m){var C=_.indexOf(T);if(C!=-1)return y[C];_.push(T),y.push(S)}g(T,s)&&T.forEach(function(B,A){var I=q(A,k-1),F=q(B,k-1);S.set(I,F)}),g(T,c)&&T.forEach(function(B){var A=q(B,k-1);S.add(A)});for(var E in T){var O;b&&(O=Object.getOwnPropertyDescriptor(b,E)),!(O&&O.set==null)&&(S[E]=q(T[E],k-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(T),E=0;E0){if(R instanceof n.BlockEmbed||A instanceof n.BlockEmbed){this.optimize();return}if(R instanceof $.default){var I=R.newlineIndex(R.length(),!0);if(I>-1&&(R=R.split(I+1),R===A)){this.optimize();return}}else if(A instanceof $.default){var F=A.newlineIndex(0);F>-1&&A.split(F+1)}var P=A.children.head instanceof f.default?null:A.children.head;R.moveChildren(A,P),R.remove()}this.optimize()}},{key:"enable",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",E)}},{key:"formatAt",value:function(E,O,L,M){this.whitelist!=null&&!this.whitelist[L]||(c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,E,O,L,M),this.optimize())}},{key:"insertAt",value:function(E,O,L){if(!(L!=null&&this.whitelist!=null&&!this.whitelist[O])){if(E>=this.length())if(L==null||a.default.query(O,a.default.Scope.BLOCK)==null){var M=a.default.create(this.statics.defaultChild);this.appendChild(M),L==null&&O.endsWith(`
`)&&(O=O.slice(0,-1)),M.insertAt(0,O,L)}else{var R=a.default.create(O,L);this.appendChild(R)}else c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,E,O,L);this.optimize()}}},{key:"insertBefore",value:function(E,O){if(E.statics.scope===a.default.Scope.INLINE_BLOT){var L=a.default.create(this.statics.defaultChild);L.appendChild(E),E=L}c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,E,O)}},{key:"leaf",value:function(E){return this.path(E).pop()||[null,-1]}},{key:"line",value:function(E){return E===this.length()?this.line(E-1):this.descendant(T,E)}},{key:"lines",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,L=function M(R,D,V){var B=[],A=V;return R.children.forEachAt(D,V,function(I,F,P){T(I)?B.push(I):I instanceof a.default.Container&&(B=B.concat(M(I,F,A))),A-=P}),B};return L(this,E,O)}},{key:"optimize",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,E,O),E.length>0&&this.emitter.emit(i.default.events.SCROLL_OPTIMIZE,E,O))}},{key:"path",value:function(E){return c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,E).slice(1)}},{key:"update",value:function(E){if(this.batch!==!0){var O=i.default.sources.USER;typeof E=="string"&&(O=E),Array.isArray(E)||(E=this.observer.takeRecords()),E.length>0&&this.emitter.emit(i.default.events.SCROLL_BEFORE_UPDATE,O,E),c(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,E.concat([])),E.length>0&&this.emitter.emit(i.default.events.SCROLL_UPDATE,O,E)}}}]),b}(a.default.Scroll);k.blotName="scroll",k.className="ql-editor",k.tagName="DIV",k.defaultChild="block",k.allowedChildren=[l.default,n.BlockEmbed,x.default],h.default=k},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.SHORTKEY=h.default=void 0;var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},s=function(){function N(j,z){var H=[],K=!0,Q=!1,le=void 0;try{for(var re=j[Symbol.iterator](),ae;!(K=(ae=re.next()).done)&&(H.push(ae.value),!(z&&H.length===z));K=!0);}catch(de){Q=!0,le=de}finally{try{!K&&re.return&&re.return()}finally{if(Q)throw le}}return H}return function(j,z){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return N(j,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function N(j,z){for(var H=0;H1&&arguments[1]!==void 0?arguments[1]:{},Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=W(H);if(le==null||le.key==null)return L.warn("Attempted to add invalid keyboard binding",le);typeof K=="function"&&(K={handler:K}),typeof Q=="function"&&(Q={handler:Q}),le=(0,l.default)(le,K,Q),this.bindings[le.key]=this.bindings[le.key]||[],this.bindings[le.key].push(le)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(K){if(!K.defaultPrevented){var Q=K.which||K.keyCode,le=(H.bindings[Q]||[]).filter(function(G){return j.match(K,G)});if(le.length!==0){var re=H.quill.getSelection();if(!(re==null||!H.quill.hasFocus())){var ae=H.quill.getLine(re.index),de=s(ae,2),ve=de[0],ye=de[1],X=H.quill.getLeaf(re.index),Z=s(X,2),ie=Z[0],oe=Z[1],U=re.length===0?[ie,oe]:H.quill.getLeaf(re.index+re.length),ee=s(U,2),ne=ee[0],se=ee[1],me=ie instanceof x.default.Text?ie.value().slice(0,oe):"",be=ne instanceof x.default.Text?ne.value().slice(se):"",fe={collapsed:re.length===0,empty:re.length===0&&ve.length()<=1,format:H.quill.getFormat(re),offset:ye,prefix:me,suffix:be},Y=le.some(function(G){if(G.collapsed!=null&&G.collapsed!==fe.collapsed||G.empty!=null&&G.empty!==fe.empty||G.offset!=null&&G.offset!==fe.offset)return!1;if(Array.isArray(G.format)){if(G.format.every(function(J){return fe.format[J]==null}))return!1}else if(g(G.format)==="object"&&!Object.keys(G.format).every(function(J){return G.format[J]===!0?fe.format[J]!=null:G.format[J]===!1?fe.format[J]==null:(0,i.default)(G.format[J],fe.format[J])}))return!1;return G.prefix!=null&&!G.prefix.test(fe.prefix)||G.suffix!=null&&!G.suffix.test(fe.suffix)?!1:G.handler.call(H,re,fe)!==!0});Y&&K.preventDefault()}}}})}}]),j}(k.default);R.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},R.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:R.keys.TAB,format:["blockquote","indent","list"],handler:function(j,z){if(z.collapsed&&z.offset!==0)return!0;this.quill.format("indent","+1",y.default.sources.USER)}},outdent:{key:R.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(j,z){if(z.collapsed&&z.offset!==0)return!0;this.quill.format("indent","-1",y.default.sources.USER)}},"outdent backspace":{key:R.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(j,z){z.format.indent!=null?this.quill.format("indent","-1",y.default.sources.USER):z.format.list!=null&&this.quill.format("list",!1,y.default.sources.USER)}},"indent code-block":F(!0),"outdent code-block":F(!1),"remove tab":{key:R.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(j){this.quill.deleteText(j.index-1,1,y.default.sources.USER)}},tab:{key:R.keys.TAB,handler:function(j){this.quill.history.cutoff();var z=new f.default().retain(j.index).delete(j.length).insert(" ");this.quill.updateContents(z,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(j.index+1,y.default.sources.SILENT)}},"list empty enter":{key:R.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(j,z){this.quill.format("list",!1,y.default.sources.USER),z.format.indent&&this.quill.format("indent",!1,y.default.sources.USER)}},"checklist enter":{key:R.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(j){var z=this.quill.getLine(j.index),H=s(z,2),K=H[0],Q=H[1],le=(0,l.default)({},K.formats(),{list:"checked"}),re=new f.default().retain(j.index).insert(`
`,le).retain(K.length()-Q-1).retain(1,{list:"unchecked"});this.quill.updateContents(re,y.default.sources.USER),this.quill.setSelection(j.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:R.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(j,z){var H=this.quill.getLine(j.index),K=s(H,2),Q=K[0],le=K[1],re=new f.default().retain(j.index).insert(`
`,z.format).retain(Q.length()-le-1).retain(1,{header:null});this.quill.updateContents(re,y.default.sources.USER),this.quill.setSelection(j.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(j,z){var H=z.prefix.length,K=this.quill.getLine(j.index),Q=s(K,2),le=Q[0],re=Q[1];if(re>H)return!0;var ae=void 0;switch(z.prefix.trim()){case"[]":case"[ ]":ae="unchecked";break;case"[x]":ae="checked";break;case"-":case"*":ae="bullet";break;default:ae="ordered"}this.quill.insertText(j.index," ",y.default.sources.USER),this.quill.history.cutoff();var de=new f.default().retain(j.index-re).delete(H+1).retain(le.length()-2-re).retain(1,{list:ae});this.quill.updateContents(de,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(j.index-H,y.default.sources.SILENT)}},"code exit":{key:R.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(j){var z=this.quill.getLine(j.index),H=s(z,2),K=H[0],Q=H[1],le=new f.default().retain(j.index+K.length()-Q-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(le,y.default.sources.USER)}},"embed left":D(R.keys.LEFT,!1),"embed left shift":D(R.keys.LEFT,!0),"embed right":D(R.keys.RIGHT,!1),"embed right shift":D(R.keys.RIGHT,!0)}};function D(N,j){var z,H=N===R.keys.LEFT?"prefix":"suffix";return z={key:N,shiftKey:j,altKey:null},b(z,H,/^$/),b(z,"handler",function(Q){var le=Q.index;N===R.keys.RIGHT&&(le+=Q.length+1);var re=this.quill.getLeaf(le),ae=s(re,1),de=ae[0];return de instanceof x.default.Embed?(N===R.keys.LEFT?j?this.quill.setSelection(Q.index-1,Q.length+1,y.default.sources.USER):this.quill.setSelection(Q.index-1,y.default.sources.USER):j?this.quill.setSelection(Q.index,Q.length+1,y.default.sources.USER):this.quill.setSelection(Q.index+Q.length+1,y.default.sources.USER),!1):!0}),z}function V(N,j){if(!(N.index===0||this.quill.getLength()<=1)){var z=this.quill.getLine(N.index),H=s(z,1),K=H[0],Q={};if(j.offset===0){var le=this.quill.getLine(N.index-1),re=s(le,1),ae=re[0];if(ae!=null&&ae.length()>1){var de=K.formats(),ve=this.quill.getFormat(N.index-1,1);Q=$.default.attributes.diff(de,ve)||{}}}var ye=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(j.prefix)?2:1;this.quill.deleteText(N.index-ye,ye,y.default.sources.USER),Object.keys(Q).length>0&&this.quill.formatLine(N.index-ye,ye,Q,y.default.sources.USER),this.quill.focus()}}function B(N,j){var z=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(j.suffix)?2:1;if(!(N.index>=this.quill.getLength()-z)){var H={},K=0,Q=this.quill.getLine(N.index),le=s(Q,1),re=le[0];if(j.offset>=re.length()-1){var ae=this.quill.getLine(N.index+1),de=s(ae,1),ve=de[0];if(ve){var ye=re.formats(),X=this.quill.getFormat(N.index,1);H=$.default.attributes.diff(ye,X)||{},K=ve.length()}}this.quill.deleteText(N.index,z,y.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(N.index+K-1,z,H,y.default.sources.USER)}}function A(N){var j=this.quill.getLines(N),z={};if(j.length>1){var H=j[0].formats(),K=j[j.length-1].formats();z=$.default.attributes.diff(K,H)||{}}this.quill.deleteText(N,y.default.sources.USER),Object.keys(z).length>0&&this.quill.formatLine(N.index,1,z,y.default.sources.USER),this.quill.setSelection(N.index,y.default.sources.SILENT),this.quill.focus()}function I(N,j){var z=this;N.length>0&&this.quill.scroll.deleteAt(N.index,N.length);var H=Object.keys(j.format).reduce(function(K,Q){return x.default.query(Q,x.default.Scope.BLOCK)&&!Array.isArray(j.format[Q])&&(K[Q]=j.format[Q]),K},{});this.quill.insertText(N.index,`
`,H,y.default.sources.USER),this.quill.setSelection(N.index+1,y.default.sources.SILENT),this.quill.focus(),Object.keys(j.format).forEach(function(K){H[K]==null&&(Array.isArray(j.format[K])||K!=="link"&&z.quill.format(K,j.format[K],y.default.sources.USER))})}function F(N){return{key:R.keys.TAB,shiftKey:!N,format:{"code-block":!0},handler:function(z){var H=x.default.query("code-block"),K=z.index,Q=z.length,le=this.quill.scroll.descendant(H,K),re=s(le,2),ae=re[0],de=re[1];if(ae!=null){var ve=this.quill.getIndex(ae),ye=ae.newlineIndex(de,!0)+1,X=ae.newlineIndex(ve+de+Q),Z=ae.domNode.textContent.slice(ye,X).split(`
`);de=0,Z.forEach(function(ie,oe){N?(ae.insertAt(ye+de,H.TAB),de+=H.TAB.length,oe===0?K+=H.TAB.length:Q+=H.TAB.length):ie.startsWith(H.TAB)&&(ae.deleteAt(ye+de,H.TAB.length),de-=H.TAB.length,oe===0?K-=H.TAB.length:Q-=H.TAB.length),de+=ie.length+1}),this.quill.update(y.default.sources.USER),this.quill.setSelection(K,Q,y.default.sources.SILENT)}}}}function P(N){return{key:N[0].toUpperCase(),shortKey:!0,handler:function(z,H){this.quill.format(N,!H.format[N],y.default.sources.USER)}}}function W(N){if(typeof N=="string"||typeof N=="number")return W({key:N});if((typeof N=="undefined"?"undefined":g(N))==="object"&&(N=(0,a.default)(N,!1)),typeof N.key=="string")if(R.keys[N.key.toUpperCase()]!=null)N.key=R.keys[N.key.toUpperCase()];else if(N.key.length===1)N.key=N.key.toUpperCase().charCodeAt(0);else return null;return N.shortKey&&(N[M]=N.shortKey,delete N.shortKey),N}h.default=R,h.SHORTKEY=M},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function $(v,x){var _=[],y=!0,w=!1,q=void 0;try{for(var T=v[Symbol.iterator](),k;!(y=(k=T.next()).done)&&(_.push(k.value),!(x&&_.length===x));y=!0);}catch(S){w=!0,q=S}finally{try{!y&&T.return&&T.return()}finally{if(w)throw q}}return _}return function(v,x){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return $(v,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function $(v,x,_){v===null&&(v=Function.prototype);var y=Object.getOwnPropertyDescriptor(v,x);if(y===void 0){var w=Object.getPrototypeOf(v);return w===null?void 0:$(w,x,_)}else{if("value"in y)return y.value;var q=y.get;return q===void 0?void 0:q.call(_)}},c=function(){function $(v,x){for(var _=0;_-1}h.default=l,h.sanitize=d},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},s=function(){function m($,v){for(var x=0;x1&&arguments[1]!==void 0?arguments[1]:!1,_=this.container.querySelector(".ql-selected");if(v!==_&&(_!=null&&_.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"),x))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":g(Event))==="object"){var y=document.createEvent("Event");y.initEvent("change",!0,!0),this.select.dispatchEvent(y)}this.close()}}},{key:"update",value:function(){var v=void 0;if(this.select.selectedIndex>-1){var x=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];v=this.select.options[this.select.selectedIndex],this.selectItem(x)}else this.selectItem(null);var _=v!=null&&v!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",_)}}]),m}();h.default=f},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(0),s=L(g),c=p(5),o=L(c),a=p(4),t=L(a),i=p(16),n=L(i),l=p(25),d=L(l),f=p(24),m=L(f),$=p(35),v=L($),x=p(6),_=L(x),y=p(22),w=L(y),q=p(7),T=L(q),k=p(55),S=L(k),b=p(42),C=L(b),E=p(23),O=L(E);function L(M){return M&&M.__esModule?M:{default:M}}o.default.register({"blots/block":t.default,"blots/block/embed":a.BlockEmbed,"blots/break":n.default,"blots/container":d.default,"blots/cursor":m.default,"blots/embed":v.default,"blots/inline":_.default,"blots/scroll":w.default,"blots/text":T.default,"modules/clipboard":S.default,"modules/history":C.default,"modules/keyboard":O.default}),s.default.register(t.default,n.default,m.default,_.default,w.default,T.default),h.default=o.default},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(1),s=function(){function c(o){this.domNode=o,this.domNode[g.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(o){if(this.tagName==null)throw new g.ParchmentError("Blot definition missing tagName");var a;return Array.isArray(this.tagName)?(typeof o=="string"&&(o=o.toUpperCase(),parseInt(o).toString()===o&&(o=parseInt(o))),typeof o=="number"?a=document.createElement(this.tagName[o-1]):this.tagName.indexOf(o)>-1?a=document.createElement(o):a=document.createElement(this.tagName[0])):a=document.createElement(this.tagName),this.className&&a.classList.add(this.className),a},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var o=this.domNode.cloneNode(!1);return g.create(o)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[g.DATA_KEY]},c.prototype.deleteAt=function(o,a){var t=this.isolate(o,a);t.remove()},c.prototype.formatAt=function(o,a,t,i){var n=this.isolate(o,a);if(g.query(t,g.Scope.BLOT)!=null&&i)n.wrap(t,i);else if(g.query(t,g.Scope.ATTRIBUTE)!=null){var l=g.create(this.statics.scope);n.wrap(l),l.format(t,i)}},c.prototype.insertAt=function(o,a,t){var i=t==null?g.create("text",a):g.create(a,t),n=this.split(o);this.parent.insertBefore(i,n)},c.prototype.insertInto=function(o,a){a===void 0&&(a=null),this.parent!=null&&this.parent.children.remove(this);var t=null;o.children.insertBefore(this,a),a!=null&&(t=a.domNode),(this.domNode.parentNode!=o.domNode||this.domNode.nextSibling!=t)&&o.domNode.insertBefore(this.domNode,t),this.parent=o,this.attach()},c.prototype.isolate=function(o,a){var t=this.split(o);return t.split(a),t},c.prototype.length=function(){return 1},c.prototype.offset=function(o){return o===void 0&&(o=this.parent),this.parent==null||this==o?0:this.parent.children.offset(this)+this.parent.offset(o)},c.prototype.optimize=function(o){this.domNode[g.DATA_KEY]!=null&&delete this.domNode[g.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(o){o.parent!=null&&(o.parent.insertBefore(this,o.next),o.remove())},c.prototype.replaceWith=function(o,a){var t=typeof o=="string"?g.create(o,a):o;return t.replace(this),t},c.prototype.split=function(o,a){return o===0?this:this.next},c.prototype.update=function(o,a){},c.prototype.wrap=function(o,a){var t=typeof o=="string"?g.create(o,a):o;return this.parent!=null&&this.parent.insertBefore(t,this.next),t.appendChild(this),t},c.blotName="abstract",c}();h.default=s},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(12),s=p(32),c=p(33),o=p(1),a=function(){function t(i){this.attributes={},this.domNode=i,this.build()}return t.prototype.attribute=function(i,n){n?i.add(this.domNode,n)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])},t.prototype.build=function(){var i=this;this.attributes={};var n=g.default.keys(this.domNode),l=s.default.keys(this.domNode),d=c.default.keys(this.domNode);n.concat(l).concat(d).forEach(function(f){var m=o.query(f,o.Scope.ATTRIBUTE);m instanceof g.default&&(i.attributes[m.attrName]=m)})},t.prototype.copy=function(i){var n=this;Object.keys(this.attributes).forEach(function(l){var d=n.attributes[l].value(n.domNode);i.format(l,d)})},t.prototype.move=function(i){var n=this;this.copy(i),Object.keys(this.attributes).forEach(function(l){n.attributes[l].remove(n.domNode)}),this.attributes={}},t.prototype.values=function(){var i=this;return Object.keys(this.attributes).reduce(function(n,l){return n[l]=i.attributes[l].value(i.domNode),n},{})},t}();h.default=a},function(e,h,p){var g=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])};return function(t,i){a(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(12);function c(a,t){var i=a.getAttribute("class")||"";return i.split(/\s+/).filter(function(n){return n.indexOf(t+"-")===0})}var o=function(a){g(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.keys=function(i){return(i.getAttribute("class")||"").split(/\s+/).map(function(n){return n.split("-").slice(0,-1).join("-")})},t.prototype.add=function(i,n){return this.canAdd(i,n)?(this.remove(i),i.classList.add(this.keyName+"-"+n),!0):!1},t.prototype.remove=function(i){var n=c(i,this.keyName);n.forEach(function(l){i.classList.remove(l)}),i.classList.length===0&&i.removeAttribute("class")},t.prototype.value=function(i){var n=c(i,this.keyName)[0]||"",l=n.slice(this.keyName.length+1);return this.canAdd(i,l)?l:""},t}(s.default);h.default=o},function(e,h,p){var g=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])};return function(t,i){a(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(12);function c(a){var t=a.split("-"),i=t.slice(1).map(function(n){return n[0].toUpperCase()+n.slice(1)}).join("");return t[0]+i}var o=function(a){g(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.keys=function(i){return(i.getAttribute("style")||"").split(";").map(function(n){var l=n.split(":");return l[0].trim()})},t.prototype.add=function(i,n){return this.canAdd(i,n)?(i.style[c(this.keyName)]=n,!0):!1},t.prototype.remove=function(i){i.style[c(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")},t.prototype.value=function(i){var n=i.style[c(this.keyName)];return this.canAdd(i,n)?n:""},t}(s.default);h.default=o},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function o(a,t){for(var i=0;ik&&this.stack.undo.length>0){var S=this.stack.undo.pop();T=T.compose(S.undo),w=S.redo.compose(w)}else this.lastRecorded=k;this.stack.undo.push({redo:w,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(w){this.stack.undo.forEach(function(q){q.undo=w.transform(q.undo,!0),q.redo=w.transform(q.redo,!0)}),this.stack.redo.forEach(function(q){q.undo=w.transform(q.undo,!0),q.redo=w.transform(q.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),_}(i.default);m.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function $(x){var _=x.ops[x.ops.length-1];return _==null?!1:_.insert!=null?typeof _.insert=="string"&&_.insert.endsWith(`
`):_.attributes!=null?Object.keys(_.attributes).some(function(y){return c.default.query(y,c.default.Scope.BLOCK)!=null}):!1}function v(x){var _=x.reduce(function(w,q){return w+=q.delete||0,w},0),y=x.length()-_;return $(x)&&(y-=1),y}h.default=m,h.getLastChangeIndex=v},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.BaseTooltip=void 0;var g=function(){function I(F,P){for(var W=0;W0&&arguments[0]!==void 0?arguments[0]:"link",N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),N!=null?this.textbox.value=N:W!==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-"+W)||""),this.root.setAttribute("data-mode",W)}},{key:"restoreFocus",value:function(){var W=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=W}},{key:"save",value:function(){var W=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var N=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",W,n.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",W,n.default.sources.USER)),this.quill.root.scrollTop=N;break}case"video":W=B(W);case"formula":{if(!W)break;var j=this.quill.getSelection(!0);if(j!=null){var z=j.index+j.length;this.quill.insertEmbed(z,this.root.getAttribute("data-mode"),W,n.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(z+1," ",n.default.sources.USER),this.quill.setSelection(z+2,n.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),F}(T.default);function B(I){var F=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return F?(F[1]||"https")+"://www.youtube.com/embed/"+F[2]+"?showinfo=0":(F=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(F[1]||"https")+"://player.vimeo.com/video/"+F[2]+"/":I}function A(I,F){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;F.forEach(function(W){var N=document.createElement("option");W===P?N.setAttribute("selected","selected"):N.setAttribute("value",W),I.appendChild(N)})}h.BaseTooltip=V,h.default=D},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function s(){this.head=this.tail=null,this.length=0}return s.prototype.append=function(){for(var c=[],o=0;o1&&this.append.apply(this,c.slice(1))},s.prototype.contains=function(c){for(var o,a=this.iterator();o=a();)if(o===c)return!0;return!1},s.prototype.insertBefore=function(c,o){!c||(c.next=o,o!=null?(c.prev=o.prev,o.prev!=null&&(o.prev.next=c),o.prev=c,o===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},s.prototype.offset=function(c){for(var o=0,a=this.head;a!=null;){if(a===c)return o;o+=a.length(),a=a.next}return-1},s.prototype.remove=function(c){!this.contains(c)||(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},s.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var o=c;return c!=null&&(c=c.next),o}},s.prototype.find=function(c,o){o===void 0&&(o=!1);for(var a,t=this.iterator();a=t();){var i=a.length();if(cd?a(l,c-d,Math.min(o,d+m-c)):a(l,0,Math.min(m,c+o-d)),d+=m}},s.prototype.map=function(c){return this.reduce(function(o,a){return o.push(c(a)),o},[])},s.prototype.reduce=function(c,o){for(var a,t=this.iterator();a=t();)o=c(o,a);return o},s}();h.default=g},function(e,h,p){var g=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var d in l)l.hasOwnProperty(d)&&(n[d]=l[d])};return function(n,l){i(n,l);function d(){this.constructor=n}n.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(17),c=p(1),o={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=100,t=function(i){g(n,i);function n(l){var d=i.call(this,l)||this;return d.scroll=d,d.observer=new MutationObserver(function(f){d.update(f)}),d.observer.observe(d.domNode,o),d.attach(),d}return n.prototype.detach=function(){i.prototype.detach.call(this),this.observer.disconnect()},n.prototype.deleteAt=function(l,d){this.update(),l===0&&d===this.length()?this.children.forEach(function(f){f.remove()}):i.prototype.deleteAt.call(this,l,d)},n.prototype.formatAt=function(l,d,f,m){this.update(),i.prototype.formatAt.call(this,l,d,f,m)},n.prototype.insertAt=function(l,d,f){this.update(),i.prototype.insertAt.call(this,l,d,f)},n.prototype.optimize=function(l,d){var f=this;l===void 0&&(l=[]),d===void 0&&(d={}),i.prototype.optimize.call(this,d);for(var m=[].slice.call(this.observer.takeRecords());m.length>0;)l.push(m.pop());for(var $=function(y,w){w===void 0&&(w=!0),!(y==null||y===f)&&y.domNode.parentNode!=null&&(y.domNode[c.DATA_KEY].mutations==null&&(y.domNode[c.DATA_KEY].mutations=[]),w&&$(y.parent))},v=function(y){y.domNode[c.DATA_KEY]==null||y.domNode[c.DATA_KEY].mutations==null||(y instanceof s.default&&y.children.forEach(v),y.optimize(d))},x=l,_=0;x.length>0;_+=1){if(_>=a)throw new Error("[Parchment] Maximum optimize iterations reached");for(x.forEach(function(y){var w=c.find(y.target,!0);w!=null&&(w.domNode===y.target&&(y.type==="childList"?($(c.find(y.previousSibling,!1)),[].forEach.call(y.addedNodes,function(q){var T=c.find(q,!1);$(T,!1),T instanceof s.default&&T.children.forEach(function(k){$(k,!1)})})):y.type==="attributes"&&$(w.prev)),$(w))}),this.children.forEach(v),x=[].slice.call(this.observer.takeRecords()),m=x.slice();m.length>0;)l.push(m.pop())}},n.prototype.update=function(l,d){var f=this;d===void 0&&(d={}),l=l||this.observer.takeRecords(),l.map(function(m){var $=c.find(m.target,!0);return $==null?null:$.domNode[c.DATA_KEY].mutations==null?($.domNode[c.DATA_KEY].mutations=[m],$):($.domNode[c.DATA_KEY].mutations.push(m),null)}).forEach(function(m){m==null||m===f||m.domNode[c.DATA_KEY]==null||m.update(m.domNode[c.DATA_KEY].mutations||[],d)}),this.domNode[c.DATA_KEY].mutations!=null&&i.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,d),this.optimize(l,d)},n.blotName="scroll",n.defaultChild="block",n.scope=c.Scope.BLOCK_BLOT,n.tagName="DIV",n}(s.default);h.default=t},function(e,h,p){var g=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l])};return function(i,n){t(i,n);function l(){this.constructor=i}i.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(18),c=p(1);function o(t,i){if(Object.keys(t).length!==Object.keys(i).length)return!1;for(var n in t)if(t[n]!==i[n])return!1;return!0}var a=function(t){g(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}return i.formats=function(n){if(n.tagName!==i.tagName)return t.formats.call(this,n)},i.prototype.format=function(n,l){var d=this;n===this.statics.blotName&&!l?(this.children.forEach(function(f){f instanceof s.default||(f=f.wrap(i.blotName,!0)),d.attributes.copy(f)}),this.unwrap()):t.prototype.format.call(this,n,l)},i.prototype.formatAt=function(n,l,d,f){if(this.formats()[d]!=null||c.query(d,c.Scope.ATTRIBUTE)){var m=this.isolate(n,l);m.format(d,f)}else t.prototype.formatAt.call(this,n,l,d,f)},i.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var l=this.formats();if(Object.keys(l).length===0)return this.unwrap();var d=this.next;d instanceof i&&d.prev===this&&o(l,d.formats())&&(d.moveChildren(this),d.remove())},i.blotName="inline",i.scope=c.Scope.INLINE_BLOT,i.tagName="SPAN",i}(s.default);h.default=a},function(e,h,p){var g=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])};return function(t,i){a(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(18),c=p(1),o=function(a){g(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.formats=function(i){var n=c.query(t.blotName).tagName;if(i.tagName!==n)return a.formats.call(this,i)},t.prototype.format=function(i,n){c.query(i,c.Scope.BLOCK)!=null&&(i===this.statics.blotName&&!n?this.replaceWith(t.blotName):a.prototype.format.call(this,i,n))},t.prototype.formatAt=function(i,n,l,d){c.query(l,c.Scope.BLOCK)!=null?this.format(l,d):a.prototype.formatAt.call(this,i,n,l,d)},t.prototype.insertAt=function(i,n,l){if(l==null||c.query(n,c.Scope.INLINE)!=null)a.prototype.insertAt.call(this,i,n,l);else{var d=this.split(i),f=c.create(n,l);d.parent.insertBefore(f,d)}},t.prototype.update=function(i,n){navigator.userAgent.match(/Trident/)?this.build():a.prototype.update.call(this,i,n)},t.blotName="block",t.scope=c.Scope.BLOCK_BLOT,t.tagName="P",t}(s.default);h.default=o},function(e,h,p){var g=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var i in t)t.hasOwnProperty(i)&&(a[i]=t[i])};return function(a,t){o(a,t);function i(){this.constructor=a}a.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(19),c=function(o){g(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.formats=function(t){},a.prototype.format=function(t,i){o.prototype.formatAt.call(this,0,this.length(),t,i)},a.prototype.formatAt=function(t,i,n,l){t===0&&i===this.length()?this.format(n,l):o.prototype.formatAt.call(this,t,i,n,l)},a.prototype.formats=function(){return this.statics.formats(this.domNode)},a}(s.default);h.default=c},function(e,h,p){var g=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])};return function(t,i){a(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=p(19),c=p(1),o=function(a){g(t,a);function t(i){var n=a.call(this,i)||this;return n.text=n.statics.value(n.domNode),n}return t.create=function(i){return document.createTextNode(i)},t.value=function(i){var n=i.data;return n.normalize&&(n=n.normalize()),n},t.prototype.deleteAt=function(i,n){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+n)},t.prototype.index=function(i,n){return this.domNode===i?n:-1},t.prototype.insertAt=function(i,n,l){l==null?(this.text=this.text.slice(0,i)+n+this.text.slice(i),this.domNode.data=this.text):a.prototype.insertAt.call(this,i,n,l)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(i){a.prototype.optimize.call(this,i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(i,n){return[this.domNode,i]},t.prototype.split=function(i,n){if(n===void 0&&(n=!1),!n){if(i===0)return this;if(i===this.length())return this.next}var l=c.create(this.domNode.splitText(i));return this.parent.insertBefore(l,this.next),this.text=this.statics.value(this.domNode),l},t.prototype.update=function(i,n){var l=this;i.some(function(d){return d.type==="characterData"&&d.target===l.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=c.Scope.INLINE_BLOT,t}(s.default);h.default=o},function(e,h,p){var g=document.createElement("div");if(g.classList.toggle("test-class",!1),g.classList.contains("test-class")){var s=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,o){return arguments.length>1&&!this.contains(c)==!o?o:s.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,o){return o=o||0,this.substr(o,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,o){var a=this.toString();(typeof o!="number"||!isFinite(o)||Math.floor(o)!==o||o>a.length)&&(o=a.length),o-=c.length;var t=a.indexOf(c,o);return t!==-1&&t===o}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(o){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof o!="function")throw new TypeError("predicate must be a function");for(var a=Object(this),t=a.length>>>0,i=arguments[1],n,l=0;ly.length?_:y,T=_.length>y.length?y:_,k=q.indexOf(T);if(k!=-1)return w=[[g,q.substring(0,k)],[s,T],[g,q.substring(k+T.length)]],_.length>y.length&&(w[0][0]=w[2][0]=p),w;if(T.length==1)return[[p,_],[g,y]];var S=l(_,y);if(S){var b=S[0],C=S[1],E=S[2],O=S[3],L=S[4],M=c(b,E),R=c(C,O);return M.concat([[s,L]],R)}return a(_,y)}function a(_,y){for(var w=_.length,q=y.length,T=Math.ceil((w+q)/2),k=T,S=2*T,b=new Array(S),C=new Array(S),E=0;Ew)R+=2;else if(P>q)M+=2;else if(L){var W=k+O-A;if(W>=0&&W=N)return t(_,y,F,P)}}}for(var j=-B+D;j<=B-V;j+=2){var W=k+j,N;j==-B||j!=B&&C[W-1]w)V+=2;else if(z>q)D+=2;else if(!L){var I=k+O-j;if(I>=0&&I=N)return t(_,y,F,P)}}}}return[[p,_],[g,y]]}function t(_,y,w,q){var T=_.substring(0,w),k=y.substring(0,q),S=_.substring(w),b=y.substring(q),C=c(T,k),E=c(S,b);return C.concat(E)}function i(_,y){if(!_||!y||_.charAt(0)!=y.charAt(0))return 0;for(var w=0,q=Math.min(_.length,y.length),T=q,k=0;wy.length?_:y,q=_.length>y.length?y:_;if(w.length<4||q.length*2=R.length?[F,P,W,N,I]:null}var k=T(w,q,Math.ceil(w.length/4)),S=T(w,q,Math.ceil(w.length/2)),b;if(!k&&!S)return null;S?k?b=k[4].length>S[4].length?k:S:b=S:b=k;var C,E,O,L;_.length>y.length?(C=b[0],E=b[1],O=b[2],L=b[3]):(O=b[0],L=b[1],C=b[2],E=b[3]);var M=b[4];return[C,E,O,L,M]}function d(_){_.push([s,""]);for(var y=0,w=0,q=0,T="",k="",S;y<_.length;)switch(_[y][0]){case g:q++,k+=_[y][1],y++;break;case p:w++,T+=_[y][1],y++;break;case s:w+q>1?(w!==0&&q!==0&&(S=i(k,T),S!==0&&(y-w-q>0&&_[y-w-q-1][0]==s?_[y-w-q-1][1]+=k.substring(0,S):(_.splice(0,0,[s,k.substring(0,S)]),y++),k=k.substring(S),T=T.substring(S)),S=n(k,T),S!==0&&(_[y][1]=k.substring(k.length-S)+_[y][1],k=k.substring(0,k.length-S),T=T.substring(0,T.length-S))),w===0?_.splice(y-q,w+q,[g,k]):q===0?_.splice(y-w,w+q,[p,T]):_.splice(y-w-q,w+q,[p,T],[g,k]),y=y-w-q+(w?1:0)+(q?1:0)+1):y!==0&&_[y-1][0]==s?(_[y-1][1]+=_[y][1],_.splice(y,1)):y++,q=0,w=0,T="",k="";break}_[_.length-1][1]===""&&_.pop();var b=!1;for(y=1;y<_.length-1;)_[y-1][0]==s&&_[y+1][0]==s&&(_[y][1].substring(_[y][1].length-_[y-1][1].length)==_[y-1][1]?(_[y][1]=_[y-1][1]+_[y][1].substring(0,_[y][1].length-_[y-1][1].length),_[y+1][1]=_[y-1][1]+_[y+1][1],_.splice(y-1,1),b=!0):_[y][1].substring(0,_[y+1][1].length)==_[y+1][1]&&(_[y-1][1]+=_[y+1][1],_[y][1]=_[y][1].substring(_[y+1][1].length)+_[y+1][1],_.splice(y+1,1),b=!0)),y++;b&&d(_)}var f=c;f.INSERT=g,f.DELETE=p,f.EQUAL=s,e.exports=f;function m(_,y){if(y===0)return[s,_];for(var w=0,q=0;q<_.length;q++){var T=_[q];if(T[0]===p||T[0]===s){var k=w+T[1].length;if(y===k)return[q+1,_];if(y0&&q.splice(T+2,0,[S[0],b]),x(q,T,3)}else return _}function v(_){for(var y=!1,w=function(S){return S.charCodeAt(0)>=56320&&S.charCodeAt(0)<=57343},q=function(S){return S.charCodeAt(S.length-1)>=55296&&S.charCodeAt(S.length-1)<=56319},T=2;T<_.length;T+=1)_[T-2][0]===s&&q(_[T-2][1])&&_[T-1][0]===p&&w(_[T-1][1])&&_[T][0]===g&&w(_[T][1])&&(y=!0,_[T-1][1]=_[T-2][1].slice(-1)+_[T-1][1],_[T][1]=_[T-2][1].slice(-1)+_[T][1],_[T-2][1]=_[T-2][1].slice(0,-1));if(!y)return _;for(var k=[],T=0;T<_.length;T+=1)_[T][1].length>0&&k.push(_[T]);return k}function x(_,y,w){for(var q=y+w-1;q>=0&&q>=y-1;q--)if(q+1<_.length){var T=_[q],k=_[q+1];T[0]===k[1]&&_.splice(q,2,[T[0],T[1]+k[1]])}return _}},function(e,h){h=e.exports=typeof Object.keys=="function"?Object.keys:p,h.shim=p;function p(g){var s=[];for(var c in g)s.push(c);return s}},function(e,h){var p=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";h=e.exports=p?g:s,h.supported=g;function g(c){return Object.prototype.toString.call(c)=="[object Arguments]"}h.unsupported=s;function s(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}},function(e,h){var p=Object.prototype.hasOwnProperty,g="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(g=!1));function c(a,t,i){this.fn=a,this.context=t,this.once=i||!1}function o(){this._events=new s,this._eventsCount=0}o.prototype.eventNames=function(){var t=[],i,n;if(this._eventsCount===0)return t;for(n in i=this._events)p.call(i,n)&&t.push(g?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(i)):t},o.prototype.listeners=function(t,i){var n=g?g+t:t,l=this._events[n];if(i)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var d=0,f=l.length,m=new Array(f);d\r?\n +\<"),this.convert();var U=this.quill.getFormat(this.quill.selection.savedRange.index);if(U[q.default.blotName]){var ee=this.container.innerText;return this.container.innerHTML="",new i.default().insert(ee,E({},q.default.blotName,U[q.default.blotName]))}var ne=this.prepareMatching(),se=s(ne,2),me=se[0],be=se[1],fe=j(this.container,me,be);return W(fe,`
`)&&fe.ops[fe.ops.length-1].attributes==null&&(fe=fe.compose(new i.default().retain(fe.length()-1).delete(1))),R.log("convert",this.container.innerHTML,fe),this.container.innerHTML="",fe}},{key:"dangerouslyPasteHTML",value:function(oe,U){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof oe=="string")this.quill.setContents(this.convert(oe),U),this.quill.setSelection(0,f.default.sources.SILENT);else{var ne=this.convert(U);this.quill.updateContents(new i.default().retain(oe).concat(ne),ee),this.quill.setSelection(oe+ne.length(),f.default.sources.SILENT)}}},{key:"onPaste",value:function(oe){var U=this;if(!(oe.defaultPrevented||!this.quill.isEnabled())){var ee=this.quill.getSelection(),ne=new i.default().retain(ee.index),se=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(f.default.sources.SILENT),setTimeout(function(){ne=ne.concat(U.convert()).delete(ee.length),U.quill.updateContents(ne,f.default.sources.USER),U.quill.setSelection(ne.length()-ee.length,f.default.sources.SILENT),U.quill.scrollingContainer.scrollTop=se,U.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var oe=this,U=[],ee=[];return this.matchers.forEach(function(ne){var se=s(ne,2),me=se[0],be=se[1];switch(me){case Node.TEXT_NODE:ee.push(be);break;case Node.ELEMENT_NODE:U.push(be);break;default:[].forEach.call(oe.container.querySelectorAll(me),function(fe){fe[D]=fe[D]||[],fe[D].push(be)});break}}),[U,ee]}}]),Z}(x.default);I.DEFAULTS={matchers:[],matchVisual:!0};function F(X,Z,ie){return(typeof Z=="undefined"?"undefined":g(Z))==="object"?Object.keys(Z).reduce(function(oe,U){return F(oe,U,Z[U])},X):X.reduce(function(oe,U){return U.attributes&&U.attributes[Z]?oe.push(U):oe.insert(U.insert,(0,a.default)({},E({},Z,ie),U.attributes))},new i.default)}function P(X){if(X.nodeType!==Node.ELEMENT_NODE)return{};var Z="__ql-computed-style";return X[Z]||(X[Z]=window.getComputedStyle(X))}function W(X,Z){for(var ie="",oe=X.ops.length-1;oe>=0&&ie.length-1}function j(X,Z,ie){return X.nodeType===X.TEXT_NODE?ie.reduce(function(oe,U){return U(X,oe)},new i.default):X.nodeType===X.ELEMENT_NODE?[].reduce.call(X.childNodes||[],function(oe,U){var ee=j(U,Z,ie);return U.nodeType===X.ELEMENT_NODE&&(ee=Z.reduce(function(ne,se){return se(U,ne)},ee),ee=(U[D]||[]).reduce(function(ne,se){return se(U,ne)},ee)),oe.concat(ee)},new i.default):new i.default}function z(X,Z,ie){return F(ie,X,!0)}function H(X,Z){var ie=l.default.Attributor.Attribute.keys(X),oe=l.default.Attributor.Class.keys(X),U=l.default.Attributor.Style.keys(X),ee={};return ie.concat(oe).concat(U).forEach(function(ne){var se=l.default.query(ne,l.default.Scope.ATTRIBUTE);se!=null&&(ee[se.attrName]=se.value(X),ee[se.attrName])||(se=B[ne],se!=null&&(se.attrName===ne||se.keyName===ne)&&(ee[se.attrName]=se.value(X)||void 0),se=A[ne],se!=null&&(se.attrName===ne||se.keyName===ne)&&(se=A[ne],ee[se.attrName]=se.value(X)||void 0))}),Object.keys(ee).length>0&&(Z=F(Z,ee)),Z}function K(X,Z){var ie=l.default.query(X);if(ie==null)return Z;if(ie.prototype instanceof l.default.Embed){var oe={},U=ie.value(X);U!=null&&(oe[ie.blotName]=U,Z=new i.default().insert(oe,ie.formats(X)))}else typeof ie.formats=="function"&&(Z=F(Z,ie.blotName,ie.formats(X)));return Z}function Q(X,Z){return W(Z,`
`)||Z.insert(`
`),Z}function le(){return new i.default}function re(X,Z){var ie=l.default.query(X);if(ie==null||ie.blotName!=="list-item"||!W(Z,`
`))return Z;for(var oe=-1,U=X.parentNode;!U.classList.contains("ql-clipboard");)(l.default.query(U)||{}).blotName==="list"&&(oe+=1),U=U.parentNode;return oe<=0?Z:Z.compose(new i.default().retain(Z.length()-1).retain(1,{indent:oe}))}function ae(X,Z){return W(Z,`
`)||(N(X)||Z.length()>0&&X.nextSibling&&N(X.nextSibling))&&Z.insert(`
`),Z}function de(X,Z){if(N(X)&&X.nextElementSibling!=null&&!W(Z,`
`)){var ie=X.offsetHeight+parseFloat(P(X).marginTop)+parseFloat(P(X).marginBottom);X.nextElementSibling.offsetTop>X.offsetTop+ie*1.5&&Z.insert(`
`)}return Z}function ve(X,Z){var ie={},oe=X.style||{};return oe.fontStyle&&P(X).fontStyle==="italic"&&(ie.italic=!0),oe.fontWeight&&(P(X).fontWeight.startsWith("bold")||parseInt(P(X).fontWeight)>=700)&&(ie.bold=!0),Object.keys(ie).length>0&&(Z=F(Z,ie)),parseFloat(oe.textIndent||0)>0&&(Z=new i.default().insert(" ").concat(Z)),Z}function ye(X,Z){var ie=X.data;if(X.parentNode.tagName==="O:P")return Z.insert(ie.trim());if(ie.trim().length===0&&X.parentNode.classList.contains("ql-clipboard"))return Z;if(!P(X.parentNode).whiteSpace.startsWith("pre")){var oe=function(ee,ne){return ne=ne.replace(/[^\u00a0]/g,""),ne.length<1&&ee?" ":ne};ie=ie.replace(/\r\n/g," ").replace(/\n/g," "),ie=ie.replace(/\s\s+/g,oe.bind(oe,!0)),(X.previousSibling==null&&N(X.parentNode)||X.previousSibling!=null&&N(X.previousSibling))&&(ie=ie.replace(/^\s+/,oe.bind(oe,!1))),(X.nextSibling==null&&N(X.parentNode)||X.nextSibling!=null&&N(X.nextSibling))&&(ie=ie.replace(/\s+$/,oe.bind(oe,!1)))}return Z.insert(ie)}h.default=I,h.matchAttributor=H,h.matchBlot=K,h.matchNewline=ae,h.matchSpacing=de,h.matchText=ye},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function d(f,m){for(var $=0;$ '},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function d(f,m){for(var $=0;$l.right&&(f=l.right-d.right,this.root.style.left=i+f+"px"),d.leftl.bottom){var m=d.bottom-d.top,$=t.bottom-t.top+m;this.root.style.top=n-$+"px",this.root.classList.add("ql-flip")}return f}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),o}();h.default=c},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function S(b,C){var E=[],O=!0,L=!1,M=void 0;try{for(var R=b[Symbol.iterator](),D;!(O=(D=R.next()).done)&&(E.push(D.value),!(C&&E.length===C));O=!0);}catch(V){L=!0,M=V}finally{try{!O&&R.return&&R.return()}finally{if(L)throw M}}return E}return function(b,C){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return S(b,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function S(b,C,E){b===null&&(b=Function.prototype);var O=Object.getOwnPropertyDescriptor(b,C);if(O===void 0){var L=Object.getPrototypeOf(b);return L===null?void 0:S(L,C,E)}else{if("value"in O)return O.value;var M=O.get;return M===void 0?void 0:M.call(E)}},c=function(){function S(b,C){for(var E=0;E','','',''].join(""),h.default=T},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(29),s=U(g),c=p(36),o=p(38),a=p(64),t=p(65),i=U(t),n=p(66),l=U(n),d=p(67),f=U(d),m=p(37),$=p(26),v=p(39),x=p(40),_=p(56),y=U(_),w=p(68),q=U(w),T=p(27),k=U(T),S=p(69),b=U(S),C=p(70),E=U(C),O=p(71),L=U(O),M=p(72),R=U(M),D=p(73),V=U(D),B=p(13),A=U(B),I=p(74),F=U(I),P=p(75),W=U(P),N=p(57),j=U(N),z=p(41),H=U(z),K=p(28),Q=U(K),le=p(59),re=U(le),ae=p(60),de=U(ae),ve=p(61),ye=U(ve),X=p(108),Z=U(X),ie=p(62),oe=U(ie);function U(ee){return ee&&ee.__esModule?ee:{default:ee}}s.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":m.BackgroundClass,"attributors/class/color":$.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":x.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":m.BackgroundStyle,"attributors/style/color":$.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":x.SizeStyle},!0),s.default.register({"formats/align":c.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":m.BackgroundStyle,"formats/color":$.ColorStyle,"formats/font":v.FontClass,"formats/size":x.SizeClass,"formats/blockquote":i.default,"formats/code-block":A.default,"formats/header":l.default,"formats/list":f.default,"formats/bold":y.default,"formats/code":B.Code,"formats/italic":q.default,"formats/link":k.default,"formats/script":b.default,"formats/strike":E.default,"formats/underline":L.default,"formats/image":R.default,"formats/video":V.default,"formats/list/item":d.ListItem,"modules/formula":F.default,"modules/syntax":W.default,"modules/toolbar":j.default,"themes/bubble":Z.default,"themes/snow":oe.default,"ui/icons":H.default,"ui/picker":Q.default,"ui/icon-picker":de.default,"ui/color-picker":re.default,"ui/tooltip":ye.default},!0),h.default=s.default},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.IndentClass=void 0;var g=function(){function f(m,$){for(var v=0;v<$.length;v++){var x=$[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,$,v){return $&&f(m.prototype,$),v&&f(m,v),m}}(),s=function f(m,$,v){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,$);if(x===void 0){var _=Object.getPrototypeOf(m);return _===null?void 0:f(_,$,v)}else{if("value"in x)return x.value;var y=x.get;return y===void 0?void 0:y.call(v)}},c=p(0),o=a(c);function a(f){return f&&f.__esModule?f:{default:f}}function t(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function i(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function n(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var l=function(f){n(m,f);function m(){return t(this,m),i(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return g(m,[{key:"add",value:function(v,x){if(x==="+1"||x==="-1"){var _=this.value(v)||0;x=x==="+1"?_+1:_-1}return x===0?(this.remove(v),!0):s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"add",this).call(this,v,x)}},{key:"canAdd",value:function(v,x){return s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"canAdd",this).call(this,v,x)||s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"canAdd",this).call(this,v,parseInt(x))}},{key:"value",value:function(v){return parseInt(s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,v))||void 0}}]),m}(o.default.Attributor.Class),d=new l("indent","ql-indent",{scope:o.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});h.IndentClass=d},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(4),s=c(g);function c(n){return n&&n.__esModule?n:{default:n}}function o(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function a(n,l){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:n}function t(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(n,l):n.__proto__=l)}var i=function(n){t(l,n);function l(){return o(this,l),a(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return l}(s.default);i.blotName="blockquote",i.tagName="blockquote",h.default=i},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function l(d,f){for(var m=0;m0&&this.children.tail.format(q,T)}},{key:"formats",value:function(){return d({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(q,T){if(q instanceof v)s(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"insertBefore",this).call(this,q,T);else{var k=T==null?this.length():T.offset(this),S=this.split(k);S.parent.insertBefore(q,S)}}},{key:"optimize",value:function(q){s(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,q);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(q){if(q.statics.blotName!==this.statics.blotName){var T=o.default.create(this.statics.defaultChild);q.moveChildren(T),this.appendChild(T)}s(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"replace",this).call(this,q)}}]),y}(n.default);x.blotName="list",x.scope=o.default.Scope.BLOCK_BLOT,x.tagName=["OL","UL"],x.defaultChild="list-item",x.allowedChildren=[v],h.ListItem=v,h.default=x},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=p(56),s=c(g);function c(n){return n&&n.__esModule?n:{default:n}}function o(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function a(n,l){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:n}function t(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(n,l):n.__proto__=l)}var i=function(n){t(l,n);function l(){return o(this,l),a(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return l}(s.default);i.blotName="italic",i.tagName=["EM","I"],h.default=i},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function d(f,m){for(var $=0;$-1?_?this.domNode.setAttribute(x,_):this.domNode.removeAttribute(x):s($.prototype.__proto__||Object.getPrototypeOf($.prototype),"format",this).call(this,x,_)}}],[{key:"create",value:function(x){var _=s($.__proto__||Object.getPrototypeOf($),"create",this).call(this,x);return typeof x=="string"&&_.setAttribute("src",this.sanitize(x)),_}},{key:"formats",value:function(x){return d.reduce(function(_,y){return x.hasAttribute(y)&&(_[y]=x.getAttribute(y)),_},{})}},{key:"match",value:function(x){return/\.(jpe?g|gif|png)$/.test(x)||/^data:image\/.+;base64/.test(x)}},{key:"sanitize",value:function(x){return(0,a.sanitize)(x,["http","https","data"])?x:"//:0"}},{key:"value",value:function(x){return x.getAttribute("src")}}]),$}(o.default.Embed);f.blotName="image",f.tagName="IMG",h.default=f},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function m($,v){for(var x=0;x-1?_?this.domNode.setAttribute(x,_):this.domNode.removeAttribute(x):s($.prototype.__proto__||Object.getPrototypeOf($.prototype),"format",this).call(this,x,_)}}],[{key:"create",value:function(x){var _=s($.__proto__||Object.getPrototypeOf($),"create",this).call(this,x);return _.setAttribute("frameborder","0"),_.setAttribute("allowfullscreen",!0),_.setAttribute("src",this.sanitize(x)),_}},{key:"formats",value:function(x){return d.reduce(function(_,y){return x.hasAttribute(y)&&(_[y]=x.getAttribute(y)),_},{})}},{key:"sanitize",value:function(x){return a.default.sanitize(x)}},{key:"value",value:function(x){return x.getAttribute("src")}}]),$}(c.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",h.default=f},function(e,h,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.FormulaBlot=void 0;var g=function(){function x(_,y){for(var w=0;w0||this.cachedText==null)&&(this.domNode.innerHTML=k(S),this.domNode.normalize(),this.attach()),this.cachedText=S)}}]),q}(d.default);x.className="ql-syntax";var _=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),y=function(w){v(q,w),g(q,null,[{key:"register",value:function(){t.default.register(_,!0),t.default.register(x,!0)}}]);function q(T,k){m(this,q);var S=$(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,T,k));if(typeof S.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var b=null;return S.quill.on(t.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(b),b=setTimeout(function(){S.highlight(),b=null},S.options.interval)}),S.highlight(),S}return g(q,[{key:"highlight",value:function(){var k=this;if(!this.quill.selection.composing){this.quill.update(t.default.sources.USER);var S=this.quill.getSelection();this.quill.scroll.descendants(x).forEach(function(b){b.highlight(k.options.highlight)}),this.quill.update(t.default.sources.SILENT),S!=null&&this.quill.setSelection(S,t.default.sources.SILENT)}}}]),q}(n.default);y.DEFAULTS={highlight:function(){return window.hljs==null?null:function(w){var q=window.hljs.highlightAuto(w);return q.value}}(),interval:1e3},h.CodeBlock=x,h.CodeToken=_,h.default=y},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,p){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.BubbleTooltip=void 0;var g=function q(T,k,S){T===null&&(T=Function.prototype);var b=Object.getOwnPropertyDescriptor(T,k);if(b===void 0){var C=Object.getPrototypeOf(T);return C===null?void 0:q(C,k,S)}else{if("value"in b)return b.value;var E=b.get;return E===void 0?void 0:E.call(S)}},s=function(){function q(T,k){for(var S=0;S0&&L===t.default.sources.USER){b.show(),b.root.style.left="0px",b.root.style.width="",b.root.style.width=b.root.offsetWidth+"px";var M=b.quill.getLines(E.index,E.length);if(M.length===1)b.position(b.quill.getBounds(E));else{var R=M[M.length-1],D=b.quill.getIndex(R),V=Math.min(R.length()-1,E.index+E.length-D),B=b.quill.getBounds(new l.Range(D,V));b.position(B)}}else document.activeElement!==b.textbox&&b.quill.hasFocus()&&b.hide()}),b}return s(T,[{key:"listen",value:function(){var S=this;g(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){S.root.classList.remove("ql-editing")}),this.quill.on(t.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!S.root.classList.contains("ql-hidden")){var b=S.quill.getSelection();b!=null&&S.position(S.quill.getBounds(b))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(S){var b=g(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,S),C=this.root.querySelector(".ql-tooltip-arrow");if(C.style.marginLeft="",b===0)return b;C.style.marginLeft=-1*b-C.offsetWidth/2+"px"}}]),T}(i.BaseTooltip);w.TEMPLATE=['','"].join(""),h.BubbleTooltip=w,h.default=y},function(e,h,p){e.exports=p(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(r,u){const e={editorOption:{},quill:null};let h="";require$$0$1.watch(()=>r.value,c=>{e.quill&&(c&&c!==h?(h=c,e.quill.pasteHTML(c)):c||e.quill.setText(""))}),require$$0$1.watch(()=>r.content,c=>{e.quill&&(c&&c!==h?(h=c,e.quill.pasteHTML(c)):c||e.quill.setText(""))}),require$$0$1.watch(()=>r.disabled,c=>{e.quill&&e.quill.enable(!c)});const p=require$$0$1.ref(null),g=(c,o)=>{for(const a in o)!c[a]||a!=="modules"?c[a]=o[a]:g(c[a],o[a]);return c},s=()=>{p.value&&(e.editorOption=g(defaultOptions,r.options),e.editorOption.readOnly=!!r.disabled,e.quill=new Quill(p.value,e.editorOption),r.value&&e.quill.pasteHTML(r.value),e.quill.on("selection-change",c=>{c?u.emit("focus",e.quill):u.emit("blur",e.quill)}),e.quill.on("text-change",()=>{r.disabled&&e.quill.enable(!1);let c=p.value.children[0].innerHTML;const o=e.quill,a=e.quill.getText();c==="
"&&(c=""),h=c,u.emit("update:value",h),u.emit("change",{html:c,text:a,quill:o})}),u.emit("ready",e.quill))};return require$$0$1.onBeforeUnmount(()=>{const c=p.value.previousSibling;c&&c.className.indexOf("ql-toolbar")>-1&&c.parentNode.removeChild(c)}),require$$0$1.onMounted(()=>{s()}),require$$0$1.onUnmounted(()=>{e.quill=null}),{editor:p}}},_hoisted_1$x={ref:"editor"};function _sfc_render$2S(r,u,e,h,p,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(r){r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("quill-editor"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{value:p.fieldModel,"onUpdate:value":u[0]||(u[0]=o=>p.fieldModel=o),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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-option"),c=require$$0$1.resolveComponent("el-select"),o=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(o,{designer:e.designer,field:e.field,rules:p.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(c,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=a=>p.fieldModel=a),class:"full-width-input",disabled:e.field.options.disabled,size:r.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||r.i18nt("render.hint.selectPlaceholder"),remote:e.field.options.remote,"remote-method":g.remoteMethod,onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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,a=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:a.value,label:a.label,value:a.value,disabled:a.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-slider"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),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:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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(r.$slots,e.field.options.name,{formModel:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-switch"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),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:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-input"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{type:"textarea",ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:r.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:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onInput:r.handleInputCustomEvent,onChange:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-time-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor","is-range":"",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"full-width-input":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:r.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||r.i18nt("render.hint.startTimePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||r.i18nt("render.hint.endTimePlaceholder"),onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-time-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:p.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(s,{ref:"fieldEditor",modelValue:p.fieldModel,"onUpdate:modelValue":u[0]||(u[0]=o=>p.fieldModel=o),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:r.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||r.i18nt("render.hint.timePlaceholder"),onFocus:r.handleFocusCustomEvent,onBlur:r.handleBlurCustomEvent,onChange:r.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 r in modules$3){let u=modules$3[r].default.name;comps$1[u]=modules$3[r].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:xe({},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 r=this.formConfig.layoutType;r==="H5"?this.layoutProps.span=this.widget.options.xs||12:r==="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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-col");return require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(s,require$$0$1.mergeProps({class:["grid-cell",[g.customClass]]},p.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,(c,o)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[c.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(r.getComponentByContainer(c)),{widget:c,key:o,"parent-list":e.widget.widgetList,"index-of-parent-list":o,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),a=>({name:a,fn:require$$0$1.withCtx(t=>[require$$0$1.renderSlot(r.$slots,a,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(t)),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(c.type+"-widget"),{field:c,designer:null,key:o,"parent-list":e.widget.widgetList,"index-of-parent-list":o,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),a=>({name:a,fn:require$$0$1.withCtx(t=>[require$$0$1.renderSlot(r.$slots,a,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(t)),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256)):(require$$0$1.openBlock(),require$$0$1.createBlock(s,{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(r.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 r=this.widget.options.name;delete this.refList[r]}},callSetHidden(){this.widget.options.hidden===!0&&this.setHidden(!0)},setHidden(r){this.widget.options.hidden=r;let u=e=>{let h=e.options.name,p=this.getWidgetRef(h);r&&!!p&&!!p.clearFieldRules&&p.clearFieldRules(),!r&&!!p&&!!p.buildFieldRules&&p.buildFieldRules()};traverseFieldWidgetsOfContainer(this.widget,u)},activeTab(r){r>=0&&r{u.options.active=e===r,e===r&&(this.activeTabName=u.options.name)})},disableTab(r){r>=0&&r=0&&r=0&&r=0&&r{let e=u.options.name+"@row"+this.rowIdData[r],h=this.getWidgetRef(e);h&&h.setDisabled(!0)})},enableSubFormRow(r){this.widget.widgetList.forEach(u=>{let e=u.options.name+"@row"+this.rowIdData[r],h=this.getWidgetRef(e);h&&h.setDisabled(!1)})},disableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((r,u)=>{this.disableSubFormRow(u)}),this.actionDisabled=!0},enableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((r,u)=>{this.enableSubFormRow(u)}),this.actionDisabled=!1},resetSubForm(){if(this.widget.type==="sub-form"){let r=this.formModel[this.widget.options.name];r&&(r.splice(0,r.length),this.rowIdData.splice(0,this.rowIdData.length)),this.widget.options.showBlankRow&&this.addSubFormRow()}},getSubFormValues(r=!0){if(this.widget.type==="sub-form")return this.formModel[this.widget.options.name];this.$message.error(this.i18nt("render.hint.nonSubFormType"))},addCssClass(r){this.widget.options.customClass?this.widget.options.customClass.push(r):this.widget.options.customClass=[r]},removeCssClass(r){if(!this.widget.options.customClass)return;let u=-1;this.widget.options.customClass.map((e,h)=>{e===r&&(u=h)}),u>-1&&this.widget.options.customClass.splice(u,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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("grid-col-item"),c=require$$0$1.resolveComponent("el-row"),o=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(o,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:e.widget.id,gutter:e.widget.options.gutter,class:require$$0$1.normalizeClass(["grid-container",[r.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,(a,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:t,widget:a,"parent-list":e.widget.cols,"index-of-parent-list":t,"parent-widget":e.widget,"col-height":e.widget.options.colHeight},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),i=>({name:i,fn:require$$0$1.withCtx(n=>[require$$0$1.renderSlot(r.$slots,i,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(n)))])}))]),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(xe({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(r,u){return u.options.labelAlign||r.options.labelAlign},registerSubFormToRefList(){this.widget.type==="sub-form"&&(this.sfRefList[this.widget.options.name]=this)},initRowIdData(r){if(this.widget.type==="sub-form"){this.rowIdData.splice(0,this.rowIdData.length);let u=this.formModel[this.widget.options.name];!!u&&u.length>0&&(u.forEach(()=>{this.rowIdData.push("id"+generateId())}),r&&setTimeout(()=>{this.handleSubFormRowChange(u)},800))}},addToRowIdData(){this.rowIdData.push("id"+generateId())},insertToRowIdData(r){this.rowIdData.splice(r,0,"id"+generateId())},deleteFromRowIdData(r){this.rowIdData.splice(r,1)},getRowIdData(){return this.rowIdData},getWidgetRefOfSubForm(r,u){let e=r+"@row"+this.rowIdData[u];return this.getWidgetRef(e)},initFieldSchemaData(){if(this.widget.type!=="sub-form")return;let r=this.rowIdData.length;if(this.fieldSchemaData.splice(0,this.fieldSchemaData.length),r>0)for(let u=0;u{e.push(this.cloneFieldSchema(h))}),this.fieldSchemaData.push(e)}},addToFieldSchemaData(r){let u=[];this.widget.widgetList.forEach(e=>{u.push(this.cloneFieldSchema(e))}),r===void 0?this.fieldSchemaData.push(u):this.fieldSchemaData.splice(r,0,u)},deleteFromFieldSchemaData(r){this.fieldSchemaData.splice(r,1)},cloneFieldSchema(r){let u=deepClone(r);return u.id=r.type+generateId(),u},initEventHandler(){this.widget.type==="sub-form"&&this.on$("setFormData",r=>{this.initRowIdData(!1),this.initFieldSchemaData();let u=r[this.widget.options.name]||[];setTimeout(()=>{this.handleSubFormRowChange(u)},800)})},handleSubFormFirstRowAdd(){if(this.widget.type==="sub-form"&&!!this.widget.options.showBlankRow&&this.rowIdData.length===1){let r=this.formModel[this.widget.options.name]||[];this.handleSubFormRowAdd(r,this.rowIdData[0]),this.handleSubFormRowChange(r)}},addSubFormRow(){let r={};this.widget.widgetList.forEach(e=>{e.formItemFlag&&(r[e.options.name]=e.options.defaultValue)});let u=this.formModel[this.widget.options.name]||[];u.push(r),this.addToRowIdData(),this.addToFieldSchemaData(),this.handleSubFormRowAdd(u,this.rowIdData[u.length-1]),this.handleSubFormRowChange(u)},insertSubFormRow(r){let u={};this.widget.widgetList.forEach(h=>{h.formItemFlag&&(u[h.options.name]=h.options.defaultValue)});let e=this.formModel[this.widget.options.name]||[];e.splice(r,0,u),this.insertToRowIdData(r),this.addToFieldSchemaData(r),this.handleSubFormRowInsert(e,this.rowIdData[r]),this.handleSubFormRowChange(e)},deleteSubFormRow(r){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 u=this.formModel[this.widget.options.name]||[],e=deepClone(u[r]);u.splice(r,1),this.deleteFromRowIdData(r),this.deleteFromFieldSchemaData(r),this.handleSubFormRowDelete(u,e),this.handleSubFormRowChange(u)}).catch(()=>{})},handleSubFormRowChange(r){this.widget.options.onSubFormRowChange&&new Function("subFormData",this.widget.options.onSubFormRowChange).call(this,r)},handleSubFormRowAdd(r,u){this.widget.options.onSubFormRowAdd&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowAdd).call(this,r,u)},handleSubFormRowInsert(r,u){this.widget.options.onSubFormRowInsert&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowInsert).call(this,r,u)},handleSubFormRowDelete(r,u){this.widget.options.onSubFormRowDelete&&new Function("subFormData","deletedDataRow",this.widget.options.onSubFormRowDelete).call(this,r,u)}}},_hoisted_1$u={class:"action-header-column"},_hoisted_2$l={class:"action-label"},_hoisted_3$g={key:0,class:"custom-label"},_hoisted_4$9=["title"],_hoisted_5$7={class:"sub-form-action-column hide-label"},_hoisted_6$6={class:"action-button-column"},_hoisted_7$4={key:0,class:"row-number-span"};function _sfc_render$2G(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-button"),o=require$$0$1.resolveComponent("el-tooltip"),a=require$$0$1.resolveComponent("el-row"),t=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(t,{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(a,{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(r.i18nt("render.hint.subFormAction")),1),require$$0$1.createVNode(c,{disabled:p.actionDisabled,round:"",type:"primary",size:"small",class:"action-button",onClick:g.addSubFormRow,title:r.i18nt("render.hint.subFormAddActionHint")},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.i18nt("render.hint.subFormAddAction")),1),require$$0$1.createVNode(s,{"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,i=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:i.id+"thc",class:require$$0$1.normalizeClass(["field-header-column",[g.getLabelAlign(e.widget,i),i.options.required?"is-required":""]]),style:require$$0$1.normalizeStyle({width:i.options.columnWidth})},[i.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_3$g,[i.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[i.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(o,{content:i.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":i.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(i.options.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(s,{"icon-class":i.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(i.options.label),1)],64))],64)):i.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[i.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(i.options.label),1),require$$0$1.createVNode(o,{content:i.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":i.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(i.options.label),1),require$$0$1.createVNode(s,{"icon-class":i.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:i.options.labelTooltip},require$$0$1.toDisplayString(i.options.label),9,_hoisted_4$9))],6))),128))]),_:1}),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(p.rowIdData,(i,n)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{class:"sub-form-row",key:i},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_5$7,[require$$0$1.createElementVNode("div",_hoisted_6$6,[require$$0$1.createVNode(c,{disabled:p.actionDisabled,circle:"",onClick:l=>g.insertSubFormRow(n),title:r.i18nt("render.hint.insertSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":"el-plus"})]),_:2},1032,["disabled","onClick","title"]),require$$0$1.createVNode(c,{disabled:p.actionDisabled,circle:"",onClick:l=>g.deleteSubFormRow(n),title:r.i18nt("render.hint.deleteSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(n+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,(l,d)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:l.id+"tc"+i,class:"sub-form-table-column hide-label",style:require$$0$1.normalizeStyle({width:l.options.columnWidth})},[(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(l.type+"-widget"),{field:p.fieldSchemaData[n][d],key:p.fieldSchemaData[n][d].id,"parent-list":e.widget.widgetList,"index-of-parent-list":d,"parent-widget":e.widget,"sub-form-row-id":i,"sub-form-row-index":n,"sub-form-col-index":d},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:xe({ContainerItemWrapper},comps$1),props:{widget:Object},inject:["refList","sfRefList","globalModel"],data(){return{activeTabName:""}},computed:{visibleTabs(){return this.widget.tabs.filter(r=>!r.options.hidden)}},created(){this.initRefList()},mounted(){this.initActiveTab()},beforeUnmount(){this.unregisterFromRefList()},methods:{initActiveTab(){if(this.widget.type==="tab"&&this.widget.tabs.length>0){let r=this.widget.tabs.filter(u=>u.options.active===!0);r.length>0?this.activeTabName=r[0].options.name:this.activeTabName=this.widget.tabs[0].options.name}}}};function _sfc_render$2F(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-tab-pane"),c=require$$0$1.resolveComponent("el-tabs"),o=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(o,{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(c,{modelValue:p.activeTabName,"onUpdate:modelValue":u[0]||(u[0]=a=>p.activeTabName=a),type:e.widget.displayType,ref:e.widget.id,class:require$$0$1.normalizeClass([r.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,(a,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:t,label:a.options.label,disabled:a.options.disabled,name:a.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(a.widgetList,(i,n)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[i.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(r.getComponentByContainer(i)),{widget:i,key:n,"parent-list":a.widgetList,"index-of-parent-list":n,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),l=>({name:l,fn:require$$0$1.withCtx(d=>[require$$0$1.renderSlot(r.$slots,l,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(d)))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(i.type+"-widget"),{field:i,key:n,"parent-list":a.widgetList,"index-of-parent-list":n,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),l=>({name:l,fn:require$$0$1.withCtx(d=>[require$$0$1.renderSlot(r.$slots,l,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(d)))])}))]),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:xe({},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(r,u,e,h,p,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,(s,c)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[s.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(r.getComponentByContainer(s)),{widget:s,key:c,"parent-list":e.widget.widgetList,"index-of-parent-list":c,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),o=>({name:o,fn:require$$0$1.withCtx(a=>[require$$0$1.renderSlot(r.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(a)),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(s.type+"-widget"),{field:s,key:c,"parent-list":e.widget.widgetList,"index-of-parent-list":c,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),o=>({name:o,fn:require$$0$1.withCtx(a=>[require$$0$1.renderSlot(r.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(a)),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(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("table-cell-item"),c=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{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",[r.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,(o,a)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("tr",{key:o.id},[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(o.cols,(t,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[t.merged?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createBlock(s,{widget:t,key:i,"parent-list":e.widget.cols,"row-index":a,"col-index":i,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),n=>({name:n,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(r.$slots,n,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)),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(r){for(const u in modules$2){let e=modules$2[u].default.name;r.component(e,modules$2[u].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:xe({},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(r=!0){this.formId="vfRender"+generateId(),r&&this.insertCustomStyleAndScriptNode(),this.addFieldChangeEventHandler(),this.addFieldValidateEventHandler(),this.registerFormToRefList(),this.handleOnCreated()},getContainerWidgetName(r){return r.type==="grid"?"vf-grid-item":r.type+"-item"},getWidgetName(r){return r.type+"-widget"},initLocale(){let r=localStorage.getItem("v_form_locale")||"zh-CN";this.changeLanguage(r)},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(r){!!r&&r.length>0&&r.forEach(u=>{this.buildDataFromWidget(u)})},buildDataFromWidget(r){if(r.category==="container")if(r.type==="grid")!!r.cols&&r.cols.length>0&&r.cols.forEach(u=>{this.buildDataFromWidget(u)});else if(r.type==="table")!!r.rows&&r.rows.length>0&&r.rows.forEach(u=>{!!u.cols&&u.cols.length>0&&u.cols.forEach(e=>{this.buildDataFromWidget(e)})});else if(r.type==="tab")!!r.tabs&&r.tabs.length>0&&r.tabs.forEach(u=>{!!u.widgetList&&u.widgetList.length>0&&u.widgetList.forEach(e=>{this.buildDataFromWidget(e)})});else if(r.type==="sub-form"){let u=r.options.name;if(this.formData.hasOwnProperty(u)){let e=this.formData[u];this.formDataModel[u]=deepClone(e)}else{let e={};r.options.showBlankRow?(r.widgetList.forEach(h=>{h.formItemFlag&&(e[h.options.name]=h.options.defaultValue)}),this.formDataModel[u]=[e]):this.formDataModel[u]=[]}}else r.type==="grid-col"||r.type==="table-cell"?!!r.widgetList&&r.widgetList.length>0&&r.widgetList.forEach(u=>{this.buildDataFromWidget(u)}):!!r.widgetList&&r.widgetList.length>0&&r.widgetList.forEach(u=>{this.buildDataFromWidget(u)});else if(r.formItemFlag)if(!this.formData.hasOwnProperty(r.options.name))this.formDataModel[r.options.name]=r.options.defaultValue;else{let u=this.formData[r.options.name];this.formDataModel[r.options.name]=deepClone(u)}},addFieldChangeEventHandler(){this.off$("fieldChange"),this.on$("fieldChange",(r,u,e,h,p)=>{this.handleFieldDataChange(r,u,e,h,p),this.$emit("formChange",r,u,e,this.formDataModel,h,p)})},addFieldValidateEventHandler(){this.off$("fieldValidation"),this.on$("fieldValidation",r=>{this.$refs.renderForm.validateField(r)})},registerFormToRefList(){this.widgetRefList.v_form_ref=this},handleFieldDataChange(r,u,e,h,p){!!this.formConfig&&!!this.formConfig.onFormDataChange&&new Function("fieldName","newValue","oldValue","formModel","subFormName","subFormRowIndex",this.formConfig.onFormDataChange).call(this,r,u,e,this.formDataModel,h,p)},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(r,u){let e=this.getWidgetRef(r);e?e.setDisabled(u):this.findWidgetOfSubFormAndSetDisabled(r,u)},findWidgetOfSubFormAndSetDisabled(r,u){this.findWidgetNameInSubForm(r).forEach(e=>{let h=this.getWidgetRef(e);h&&h.setDisabled(u)})},findWidgetAndSetHidden(r,u){let e=this.getWidgetRef(r);e?e.setHidden(u):this.findWidgetOfSubFormAndSetHidden(r,u)},findWidgetOfSubFormAndSetHidden(r,u){this.findWidgetNameInSubForm(r).forEach(e=>{let h=this.getWidgetRef(e);h&&h.setHidden(u)})},findWidgetNameInSubForm(r){let u=[],e=null,h=(p,g)=>{!!p.options&&p.options.name===r&&(e=g.options.name)};if(traverseFieldWidgets(this.widgetList,h),e){let p=this.getWidgetRef(e);if(p){let g=p.getRowIdData();!!g&&g.length>0&&g.forEach(s=>{u.push(r+"@row"+s)})}}return u},changeLanguage(r){changeLocale(r)},getNativeForm(){return this.$refs.renderForm},getFormRef(){return this},getWidgetRef(r,u=!1){let e=this.widgetRefList[r];return!e&&!!u&&this.$message.error(this.i18nt("render.hint.refNotFound")+r),e},clearFormDataModel(){for(let r in this.formDataModel)delete this.formDataModel[r]},setFormJson(r){if(r)if(typeof r=="string"||r.constructor===Object){let u=null;if(typeof r=="string"?u=JSON.parse(r):u=r,!u.formConfig||!u.widgetList){this.$message.error("Invalid format of form json.");return}this.clearFormDataModel(),this.buildFormModel(u.widgetList),this.formJsonObj.formConfig=u.formConfig,this.formJsonObj.widgetList=u.widgetList,this.insertCustomStyleAndScriptNode(),this.$nextTick(()=>{this.initFormObject(!1),this.handleOnMounted()})}else this.$message.error("Set form json failed.")},reloadOptionData(r){let u=[];!!r&&typeof r=="string"?u=[r]:!!r&&Array.isArray(r)&&(u=[...r]),this.broadcast("FieldWidget","reloadOptionItems",u)},getFormData(r=!0){if(!r)return this.formDataModel;let u=function(){},e=new window.Promise(function(h,p){u=function(g,s){s?p(s):h(g)}});return this.$refs.renderForm.validate(h=>{h?u(this.formDataModel):u(this.formDataModel,this.i18nt("render.hint.validationFailed"))}),e},setFormData(r){Object.keys(this.formDataModel).forEach(u=>{!!r&&r.hasOwnProperty(u)&&(this.formDataModel[u]=deepClone(r[u]))}),this.broadcast("ContainerItem","setFormData",this.formDataModel),this.broadcast("FieldWidget","setFormData",this.formDataModel)},getFieldValue(r){let u=this.getWidgetRef(r);if(!!u&&!!u.getValue)return u.getValue();if(!u){let e=[];return this.findWidgetNameInSubForm(r).forEach(h=>{let p=this.getWidgetRef(h);!!p&&!!p.getValue&&e.push(p.getValue())}),e}},setFieldValue(r,u){let e=this.getWidgetRef(r);!!e&&!!e.setValue&&e.setValue(u),e||this.findWidgetNameInSubForm(r).forEach(h=>{let p=this.getWidgetRef(h);!!p&&!!p.setValue&&p.setValue(u)})},getSubFormValues(r,u=!0){return this.subFormRefList[r].getSubFormValues(u)},disableForm(){Object.keys(this.widgetRefList).forEach(u=>{let e=this.getWidgetRef(u);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(u=>{let e=this.getWidgetRef(u);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(r){this.$refs.renderForm.clearValidate(r)},validateForm(r){this.$refs.renderForm.validate(u=>{r(u)})},validateFields(){},disableWidgets(r){r&&(typeof r=="string"?this.findWidgetAndSetDisabled(r,!0):Array.isArray(r)&&r.forEach(u=>{this.findWidgetAndSetDisabled(u,!0)}))},enableWidgets(r){r&&(typeof r=="string"?this.findWidgetAndSetDisabled(r,!1):Array.isArray(r)&&r.forEach(u=>{this.findWidgetAndSetDisabled(u,!1)}))},hideWidgets(r){r&&(typeof r=="string"?this.findWidgetAndSetHidden(r,!0):Array.isArray(r)&&r.forEach(u=>{this.findWidgetAndSetHidden(u,!0)}))},showWidgets(r){r&&(typeof r=="string"?this.findWidgetAndSetHidden(r,!1):Array.isArray(r)&&r.forEach(u=>{this.findWidgetAndSetHidden(u,!1)}))},getFieldWidgets(){return getAllFieldWidgets(this.formJsonObj.widgetList)},getContainerWidgets(){return getAllContainerWidgets(this.formJsonObj.widgetList)},addEC(r,u){this.externalComponents[r]=u},hasEC(r){return this.externalComponents.hasOwnProperty(r)},getEC(r){return this.externalComponents[r]},getGlobalDsv(){return this.globalDsv}}};function _sfc_render$2C(r,u,e,h,p,g){const s=require$$0$1.resolveComponent("el-form");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{"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:p.formDataModel,ref:"renderForm",onSubmit:u[0]||(u[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,(c,o)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[c.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(g.getContainerWidgetName(c)),{widget:c,key:c.id,"parent-list":g.widgetList,"index-of-parent-list":o,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),a=>({name:a,fn:require$$0$1.withCtx(t=>[require$$0$1.renderSlot(r.$slots,a,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(t)),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(c)),{field:c,"form-model":p.formDataModel,designer:null,key:c.id,"parent-list":g.widgetList,"index-of-parent-list":o,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(r.$slots),a=>({name:a,fn:require$$0$1.withCtx(t=>[require$$0$1.renderSlot(r.$slots,a,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(t)),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(r,u){(function(){var e="ace",h=function(){return this}();!h&&typeof window!="undefined"&&(h=window);var p=function(t,i,n){if(typeof t!="string"){p.original?p.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),p.modules[t]||(p.payloads[t]=n,p.modules[t]=null)};p.modules={},p.payloads={};var g=function(t,i,n){if(typeof i=="string"){var l=o(t,i);if(l!=null)return n&&n(),l}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var d=[],f=0,m=i.length;fo.length)&&(c=o.length),c-=s.length;var a=o.indexOf(s,c);return a!==-1&&a===c}),String.prototype.repeat||g(String.prototype,"repeat",function(s){for(var c="",o=this;s>0;)s&1&&(c+=o),(s>>=1)&&(o+=o);return c}),String.prototype.includes||g(String.prototype,"includes",function(s,c){return this.indexOf(s,c)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(s),o=1;o>>0,a=arguments[1],t=a>>0,i=t<0?Math.max(o+t,0):Math.min(t,o),n=arguments[2],l=n===void 0?o:n>>0,d=l<0?Math.max(o+l,0):Math.min(l,o);i0;)o&1&&(a+=c),(o>>=1)&&(c+=c);return a};var g=/^\s\s*/,s=/\s\s*$/;h.stringTrimLeft=function(c){return c.replace(g,"")},h.stringTrimRight=function(c){return c.replace(s,"")},h.copyObject=function(c){var o={};for(var a in c)o[a]=c[a];return o},h.copyArray=function(c){for(var o=[],a=0,t=c.length;a=0?parseFloat((c.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((c.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),h.isOldIE=h.isIE&&h.isIE<9,h.isGecko=h.isMozilla=c.match(/ Gecko\/\d+/),h.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",h.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0,h.isChrome=parseFloat(c.split(" Chrome/")[1])||void 0,h.isEdge=parseFloat(c.split(" Edge/")[1])||void 0,h.isAIR=c.indexOf("AdobeAIR")>=0,h.isAndroid=c.indexOf("Android")>=0,h.isChromeOS=c.indexOf(" CrOS ")>=0,h.isIOS=/iPad|iPhone|iPod/.test(c)&&!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,p){var g=e("./useragent"),s="http://www.w3.org/1999/xhtml";h.buildDom=function n(l,d,f){if(typeof l=="string"&&l){var m=document.createTextNode(l);return d&&d.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&d&&d.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var $=[],v=0;v=1.5:!0,g.isChromeOS&&(h.HI_DPI=!1),typeof document!="undefined"){var i=document.createElement("div");h.HI_DPI&&i.style.transform!==void 0&&(h.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof i.style.animationName!="undefined"&&(h.HAS_CSS_ANIMATION=!0),i=null}h.HAS_CSS_TRANSFORMS?h.translate=function(n,l,d){n.style.transform="translate("+Math.round(l)+"px, "+Math.round(d)+"px)"}:h.translate=function(n,l,d){n.style.top=Math.round(d)+"px",n.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,h,p){/*
* 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(s,c){var o=new XMLHttpRequest;o.open("GET",s,!0),o.onreadystatechange=function(){o.readyState===4&&c(o.responseText)},o.send(null)},h.loadScript=function(s,c){var o=g.getDocumentHead(),a=document.createElement("script");a.src=s,o.appendChild(a),a.onload=a.onreadystatechange=function(t,i){(i||!a.readyState||a.readyState=="loaded"||a.readyState=="complete")&&(a=a.onload=a.onreadystatechange=null,i||c())}},h.qualifyURL=function(s){var c=document.createElement("a");return c.href=s,c.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,h,p){h.inherits=function(g,s){g.super_=s,g.prototype=Object.create(s.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},h.mixin=function(g,s){for(var c in s)g[c]=s[c];return g},h.implement=function(g,s){h.mixin(g,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,h,p){var g={},s=function(){this.propagationStopped=!0},c=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(o,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[o]||[],i=this._defaultHandlers[o];if(!(!t.length&&!i)){(typeof a!="object"||!a)&&(a={}),a.type||(a.type=o),a.stopPropagation||(a.stopPropagation=s),a.preventDefault||(a.preventDefault=c),t=t.slice();for(var n=0;n1&&(m=d[d.length-2]);var v=a[l+"Path"];return v==null?v=a.basePath:f=="/"&&(l=f=""),v&&v.slice(-1)!="/"&&(v+="/"),v+l+f+m+this.get("suffix")},h.setModuleUrl=function(n,l){return a.$moduleUrls[n]=l};var t=function(n,l){return n==="ace/theme/textmate"||n==="./theme/textmate"?l(null,e("./theme/textmate")):console.error("loader is not configured")};h.setLoader=function(n){t=n},h.dynamicModules=Object.create(null),h.$loading={},h.loadModule=function(n,l){var d,f;Array.isArray(n)&&(f=n[0],n=n[1]);var m=function($){if($&&!h.$loading[n])return l&&l($);if(h.$loading[n]||(h.$loading[n]=[]),h.$loading[n].push(l),!(h.$loading[n].length>1)){var v=function(){t(n,function(x,_){h._emit("load.module",{name:n,module:_});var y=h.$loading[n];h.$loading[n]=null,y.forEach(function(w){w&&w(_)})})};if(!h.get("packaged"))return v();s.loadScript(h.moduleUrl(n,f),v),i()}};if(h.dynamicModules[n])h.dynamicModules[n]().then(function($){$.default?m($.default):m($)});else{try{d=e(n)}catch{}m(d)}},h.setModuleLoader=function(n,l){h.dynamicModules[n]=l};var i=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$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.17.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,h,p){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(a,t){e([a],function(i){t(null,i)})});var s=function(){return this||typeof window!="undefined"&&window}();p.exports=function(a){g.init=c,a.require=e},c(!0);function c(a){if(!(!s||!s.document)){g.set("packaged",a||e.packaged||p.packaged||s.define&&(void 0).packaged);var t={},i="",n=document.currentScript||document._currentScript,l=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d=l.getElementsByTagName("script"),f=0;f ["+this.end.row+"/"+this.end.column+"]"},c.prototype.contains=function(o,a){return this.compare(o,a)==0},c.prototype.compareRange=function(o){var a,t=o.end,i=o.start;return a=this.compare(t.row,t.column),a==1?(a=this.compare(i.row,i.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(i.row,i.column),a==-1?-1:a==1?42:0)},c.prototype.comparePoint=function(o){return this.compare(o.row,o.column)},c.prototype.containsRange=function(o){return this.comparePoint(o.start)==0&&this.comparePoint(o.end)==0},c.prototype.intersects=function(o){var a=this.compareRange(o);return a==-1||a==0||a==1},c.prototype.isEnd=function(o,a){return this.end.row==o&&this.end.column==a},c.prototype.isStart=function(o,a){return this.start.row==o&&this.start.column==a},c.prototype.setStart=function(o,a){typeof o=="object"?(this.start.column=o.column,this.start.row=o.row):(this.start.row=o,this.start.column=a)},c.prototype.setEnd=function(o,a){typeof o=="object"?(this.end.column=o.column,this.end.row=o.row):(this.end.row=o,this.end.column=a)},c.prototype.inside=function(o,a){return this.compare(o,a)==0?!(this.isEnd(o,a)||this.isStart(o,a)):!1},c.prototype.insideStart=function(o,a){return this.compare(o,a)==0?!this.isEnd(o,a):!1},c.prototype.insideEnd=function(o,a){return this.compare(o,a)==0?!this.isStart(o,a):!1},c.prototype.compare=function(o,a){return!this.isMultiLine()&&o===this.start.row?athis.end.column?1:0:othis.end.row?1:this.start.row===o?a>=this.start.column?0:-1:this.end.row===o?a<=this.end.column?0:1:0},c.prototype.compareStart=function(o,a){return this.start.row==o&&this.start.column==a?-1:this.compare(o,a)},c.prototype.compareEnd=function(o,a){return this.end.row==o&&this.end.column==a?1:this.compare(o,a)},c.prototype.compareInside=function(o,a){return this.end.row==o&&this.end.column==a?1:this.start.row==o&&this.start.column==a?-1:this.compare(o,a)},c.prototype.clipRows=function(o,a){if(this.end.row>a)var t={row:a+1,column:0};else if(this.end.rowa)var i={row:a+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,s.isIE){var L=Math.abs(O.clientX-k)>5||Math.abs(O.clientY-S)>5;(!b||L)&&(T=1),b&&clearTimeout(b),b=setTimeout(function(){b=null},_[T-1]||600),T==1&&(k=O.clientX,S=O.clientY)}if(O._clicks=T,y[w]("mousedown",O),T>4)T=0;else if(T>1)return y[w](C[T],O)}Array.isArray(x)||(x=[x]),x.forEach(function(O){l(O,"mousedown",E,q)})};var f=function(x){return 0|(x.ctrlKey?1:0)|(x.altKey?2:0)|(x.shiftKey?4:0)|(x.metaKey?8:0)};h.getModifierString=function(x){return g.KEY_MODS[f(x)]};function m(x,_,y){var w=f(_);if(!s.isMac&&c){if(_.getModifierState&&(_.getModifierState("OS")||_.getModifierState("Win"))&&(w|=8),c.altGr)if((3&w)!=3)c.altGr=0;else return;if(y===18||y===17){var q="location"in _?_.location:_.keyLocation;if(y===17&&q===1)c[y]==1&&(o=_.timeStamp);else if(y===18&&w===3&&q===2){var T=_.timeStamp-o;T<50&&(c.altGr=!0)}}}if(y in g.MODIFIER_KEYS&&(y=-1),!w&&y===13){var q="location"in _?_.location:_.keyLocation;if(q===3&&(x(_,w,-y),_.defaultPrevented))return}if(s.isChromeOS&&w&8){if(x(_,w,y),_.defaultPrevented)return;w&=~8}return!w&&!(y in g.FUNCTION_KEYS)&&!(y in g.PRINTABLE_KEYS)?!1:x(_,w,y)}h.addCommandKeyListener=function(x,_,y){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var w=null;l(x,"keydown",function(T){w=T.keyCode},y),l(x,"keypress",function(T){return m(_,T,w)},y)}else{var q=null;l(x,"keydown",function(T){c[T.keyCode]=(c[T.keyCode]||0)+1;var k=m(_,T,T.keyCode);return q=T.defaultPrevented,k},y),l(x,"keypress",function(T){q&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(h.stopEvent(T),q=null)},y),l(x,"keyup",function(T){c[T.keyCode]=null},y),c||($(),l(window,"focus",$))}};function $(){c=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var v=1;h.nextTick=function(x,_){_=_||window;var y="zero-timeout-message-"+v++,w=function(q){q.data==y&&(h.stopPropagation(q),d(_,"message",w),x())};l(_,"message",w),_.postMessage(y,"*")}}h.$idleBlocked=!1,h.onIdle=function(x,_){return setTimeout(function y(){h.$idleBlocked?setTimeout(y,100):x()},_)},h.$idleBlockId=null,h.blockIdle=function(x){h.$idleBlockId&&clearTimeout(h.$idleBlockId),h.$idleBlocked=!0,h.$idleBlockId=setTimeout(function(){h.$idleBlocked=!1},x||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(x){setTimeout(x,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,h,p){var g;p.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/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,h,p){var g=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/dom"),o=e("../lib/lang"),a=e("../clipboard"),t=s.isChrome<18,i=s.isIE,n=s.isChrome>63,l=400,d=e("../lib/keys"),f=d.KEY_MODS,m=s.isIOS,$=m?/\s/:/\n/,v=s.isMobile,x=function(_,y){var w=c.createElement("textarea");w.className="ace_text-input",w.setAttribute("wrap","off"),w.setAttribute("autocorrect","off"),w.setAttribute("autocapitalize","off"),w.setAttribute("spellcheck",!1),w.style.opacity="0",_.insertBefore(w,_.firstChild);var q=!1,T=!1,k=!1,S=!1,b="";v||(w.style.fontSize="1px");var C=!1,E=!1,O="",L=0,M=0,R=0;try{var D=document.activeElement===w}catch{}this.setAriaOptions=function(U){U.activeDescendant?(w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-autocomplete",U.inline?"both":"list"),w.setAttribute("aria-activedescendant",U.activeDescendant)):(w.setAttribute("aria-haspopup","false"),w.setAttribute("aria-autocomplete","both"),w.removeAttribute("aria-activedescendant")),U.role&&w.setAttribute("role",U.role)},this.setAriaOptions({role:"textbox"}),g.addListener(w,"blur",function(U){E||(y.onBlur(U),D=!1,v&&!m&&document.removeEventListener("selectionchange",I))},y),g.addListener(w,"focus",function(U){if(!E){if(D=!0,s.isEdge)try{if(!document.hasFocus())return}catch{}y.onFocus(U),s.isEdge?setTimeout(V):V(),v&&!m&&document.addEventListener("selectionchange",I)}},y),this.$focusScroll=!1,this.focus=function(){if(b||n||this.$focusScroll=="browser")return w.focus({preventScroll:!0});var U=w.style.top;w.style.position="fixed",w.style.top="0px";try{var ee=w.getBoundingClientRect().top!=0}catch{return}var ne=[];if(ee)for(var se=w.parentElement;se&&se.nodeType==1;)ne.push(se),se.setAttribute("ace_nocontext",!0),!se.parentElement&&se.getRootNode?se=se.getRootNode().host:se=se.parentElement;w.focus({preventScroll:!0}),ee&&ne.forEach(function(me){me.removeAttribute("ace_nocontext")}),setTimeout(function(){w.style.position="",w.style.top=="0px"&&(w.style.top=U)},0)},this.blur=function(){w.blur()},this.isFocused=function(){return D},y.on("beforeEndOperation",function(){var U=y.curOp,ee=U&&U.command&&U.command.name;if(ee!="insertstring"){var ne=ee&&(U.docChanged||U.selectionChanged);k&&ne&&(O=w.value="",ae()),V()}});var V=m?function(U){if(!(!D||q&&!U||S)){U||(U="");var ee=`
ab`+U+`cde fg
`;ee!=w.value&&(w.value=O=ee);var ne=4,se=4+(U.length||(y.selection.isEmpty()?0:1));(L!=ne||M!=se)&&w.setSelectionRange(ne,se),L=ne,M=se}}:function(){if(!(k||S)&&!(!D&&!P)){k=!0;var U=0,ee=0,ne="";if(y.session){var se=y.selection,me=se.getRange(),be=se.cursor.row;if(U=me.start.column,ee=me.end.column,ne=y.session.getLine(be),me.start.row!=be){var fe=y.session.getLine(be-1);U=me.start.rowbe+1?Y.length:ee,ee+=ne.length+1,ne=ne+`
`+Y}else v&&be>0&&(ne=`
`+ne,ee+=1,U+=1);ne.length>l&&(U=O.length&&U.value===O&&O&&U.selectionEnd!==M},A=function(U){k||(q?q=!1:B(w)?(y.selectAll(),V()):v&&w.selectionStart!=L&&V())};function I(U){if((!w||!w.parentNode)&&document.removeEventListener("selectionchange",I),!k&&w.selectionStart===w.selectionEnd){var ee=w.selectionStart-L,ne=M-L;ee>0?ee=Math.max(ee-ne,1):ee===0&&ne&&(ee=-1);for(var se=Math.abs(ee),me=ee>0?d.right:d.left,be=0;be0&&O[J]==U[J];)J++,me--;for(fe=fe.slice(J),J=1;be>0&&O.length-J>L-1&&O[O.length-J]==U[U.length-J];)J++,be--;Y-=J-1,G-=J-1;var te=fe.length-J+1;if(te<0&&(me=-te,te=0),fe=fe.slice(0,te),!ee&&!fe&&!Y&&!me&&!be&&!G)return"";S=!0;var ue=!1;return s.isAndroid&&fe==". "&&(fe=" ",ue=!0),fe&&!me&&!be&&!Y&&!G||C?y.onTextInput(fe):y.onTextInput(fe,{extendLeft:me,extendRight:be,restoreStart:Y,restoreEnd:G}),S=!1,O=U,L=ne,M=se,R=G,ue?`
`:fe},N=function(U){if(k)return re();if(U&&U.inputType){if(U.inputType=="historyUndo")return y.execCommand("undo");if(U.inputType=="historyRedo")return y.execCommand("redo")}var ee=w.value,ne=W(ee,!0);(ee.length>l+100||$.test(ne)||v&&L<1&&L==M)&&V()},j=function(U,ee,ne){var se=U.clipboardData||window.clipboardData;if(!(!se||t)){var me=i||ne?"Text":"text/plain";try{return ee?se.setData(me,ee)!==!1:se.getData(me)}catch(be){if(!ne)return j(be,ee,!0)}}},z=function(U,ee){var ne=y.getCopyText();if(!ne)return g.preventDefault(U);j(U,ne)?(m&&(V(ne),q=ne,setTimeout(function(){q=!1},10)),ee?y.onCut():y.onCopy(),g.preventDefault(U)):(q=!0,w.value=ne,w.select(),setTimeout(function(){q=!1,V(),ee?y.onCut():y.onCopy()}))},H=function(U){z(U,!0)},K=function(U){z(U,!1)},Q=function(U){var ee=j(U);a.pasteCancelled()||(typeof ee=="string"?(ee&&y.onPaste(ee,U),s.isIE&&setTimeout(V),g.preventDefault(U)):(w.value="",T=!0))};g.addCommandKeyListener(w,y.onCommandKey.bind(y),y),g.addListener(w,"select",A,y),g.addListener(w,"input",N,y),g.addListener(w,"cut",H,y),g.addListener(w,"copy",K,y),g.addListener(w,"paste",Q,y),(!("oncut"in w)||!("oncopy"in w)||!("onpaste"in w))&&g.addListener(_,"keydown",function(U){if(!(s.isMac&&!U.metaKey||!U.ctrlKey))switch(U.keyCode){case 67:K(U);break;case 86:Q(U);break;case 88:H(U);break}},y);var le=function(U){if(!(k||!y.onCompositionStart||y.$readOnly)&&(k={},!C)){U.data&&(k.useTextareaForIME=!1),setTimeout(re,0),y._signal("compositionStart"),y.on("mousedown",de);var ee=y.getSelectionRange();ee.end.row=ee.start.row,ee.end.column=ee.start.column,k.markerRange=ee,k.selectionStart=L,y.onCompositionStart(k),k.useTextareaForIME?(O=w.value="",L=0,M=0):(w.msGetInputContext&&(k.context=w.msGetInputContext()),w.getInputContext&&(k.context=w.getInputContext()))}},re=function(){if(!(!k||!y.onCompositionUpdate||y.$readOnly)){if(C)return de();if(k.useTextareaForIME)y.onCompositionUpdate(w.value);else{var U=w.value;W(U),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+M-k.selectionStart+R)}}},ae=function(U){!y.onCompositionEnd||y.$readOnly||(k=!1,y.onCompositionEnd(),y.off("mousedown",de),U&&N())};function de(){E=!0,w.blur(),w.focus(),E=!1}var ve=o.delayedCall(re,50).schedule.bind(null,null);function ye(U){U.keyCode==27&&w.value.lengthM&&O[G]==`
`?J=d.end:YM&&O.slice(0,G).split(`
`).length>2?J=d.down:G>M&&O[G-1]==" "?(J=d.right,te=f.option):(G>M||G==M&&M!=L&&Y==G)&&(J=d.right),Y!==G&&(te|=f.shift),J){var ue=ee.onCommandKey({},te,J);if(!ue&&ee.commands){J=d.keyCodeToString(J);var he=ee.commands.findKeyCommand(te,J);he&&ee.execCommand(he)}L=Y,M=G,V("")}}};document.addEventListener("selectionchange",be),ee.on("destroy",function(){document.removeEventListener("selectionchange",be)})}this.destroy=function(){w.parentElement&&w.parentElement.removeChild(w)}};h.TextInput=x,h.$setUserAgentForTests=function(_,y){v=_,m=y}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,h,p){var g=e("../lib/useragent"),s=0,c=550,o=function(){function i(n){n.$clickSelection=null;var l=n.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var d=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];d.forEach(function(f){n[f]=this[f]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var l=n.inSelection(),d=n.getDocumentPosition();this.mousedownEvent=n;var f=this.editor,m=n.getButton();if(m!==0){var $=f.getSelectionRange(),v=$.isEmpty();(v||m==1)&&f.selection.moveToPosition(d),m==2&&(f.textInput.onContextMenu(n.domEvent),g.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!f.isFocused()&&(f.focus(),this.$focusTimeout&&!this.$clickSelection&&!f.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(d,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,l){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var d=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?d.selection.selectToPosition(n):l||d.selection.moveToPosition(n),l||this.select(),d.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,l=this.editor,d=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(d);if(f==-1)n=this.$clickSelection.end;else if(f==1)n=this.$clickSelection.start;else{var m=t(this.$clickSelection,d);d=m.cursor,n=m.anchor}l.selection.setSelectionAnchor(n.row,n.column)}l.selection.selectToPosition(d),l.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var l,d=this.editor,f=d.renderer.screenToTextCoordinates(this.x,this.y),m=d.selection[n](f.row,f.column);if(this.$clickSelection){var $=this.$clickSelection.comparePoint(m.start),v=this.$clickSelection.comparePoint(m.end);if($==-1&&v<=0)l=this.$clickSelection.end,(m.end.row!=f.row||m.end.column!=f.column)&&(f=m.start);else if(v==1&&$>=0)l=this.$clickSelection.start,(m.start.row!=f.row||m.start.column!=f.column)&&(f=m.end);else if($==-1&&v==1)f=m.end,l=m.start;else{var x=t(this.$clickSelection,f);f=x.cursor,l=x.anchor}d.selection.setSelectionAnchor(l.row,l.column)}d.selection.selectToPosition(f),d.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(n>s||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var l=n.getDocumentPosition(),d=this.editor,f=d.session,m=f.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=d.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},i.prototype.onTripleClick=function(n){var l=n.getDocumentPosition(),d=this.editor;this.setState("selectByLines");var f=d.getSelectionRange();f.isMultiLine()&&f.contains(l.row,l.column)?(this.$clickSelection=d.selection.getLineRange(f.start.row),this.$clickSelection.end=d.selection.getLineRange(f.end.row).end):this.$clickSelection=d.selection.getLineRange(l.row),this.select()},i.prototype.onQuadClick=function(n){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var d=this.$lastScroll,f=n.domEvent.timeStamp,m=f-d.t,$=m?n.wheelX/m:d.vx,v=m?n.wheelY/m:d.vy;m=1&&l.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(_=!0),x<=1&&l.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(_=!0),_)d.allowed=f;else if(f-d.allowedn.session.documentToScreenRow(k.row,k.column))return x()}for(var S={error:[],warning:[],info:[]},b={error:{singular:"error",plural:"errors"},warning:{singular:"warning",plural:"warnings"},info:{singular:"information message",plural:"information messages"}},C=l.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E ").concat(w.text[E]);S[w.type[E]].push(O)}var L="";L+=[].concat(S.error,S.warning,S.info).join("
"),L+="
";for(var M=!1,R="",$=R+L,d.setHtml($),d.setClassName("ace_gutter-tooltip"),d.$element.setAttribute("aria-live","polite"),d.show(),n._signal("showGutterTooltip",d),n.on("mousewheel",x),i.$tooltipFollowsMouse)_(m);else{var B=m.domEvent.target,A=B.getBoundingClientRect(),I=d.getElement().style;I.left=A.right+"px",I.top=A.bottom+"px"}}function x(){f&&(f=clearTimeout(f)),$&&(d.hide(),$=null,n._signal("hideGutterTooltip",d),n.off("mousewheel",x))}function _(y){d.setPosition(y.x,y.y)}i.editor.setDefaultHandler("guttermousemove",function(y){var w=y.domEvent.target||y.domEvent.srcElement;if(s.hasCssClass(w,"ace_fold-widget"))return x();$&&i.$tooltipFollowsMouse&&_(y),m=y,!f&&(f=setTimeout(function(){f=null,m&&!i.isMousePressed?v():x()},50))}),c.addListener(n.renderer.$gutter,"mouseout",function(y){m=null,!(!$||f)&&(f=setTimeout(function(){f=null,x()},50))},n),n.on("changeSession",x)}var t=function(i){g(n,i);function n(){return i!==null&&i.apply(this,arguments)||this}return n.prototype.setPosition=function(l,d){var f=window.innerWidth||document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight,$=this.getWidth(),v=this.getHeight();l+=15,d+=15,l+$>f&&(l-=l+$-f),d+v>m&&(d-=20+v),o.prototype.setPosition.call(this,l,d)},n}(o);h.GutterHandler=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,h,p){var g=e("../lib/event"),s=e("../lib/useragent"),c=function(){function o(a,t){this.domEvent=a,this.editor=t,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1,this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}return o.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},o.prototype.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},o.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},o.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},o.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var a=this.editor,t=a.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},o.prototype.getButton=function(){return g.getButton(this.domEvent)},o.prototype.getShiftKey=function(){return this.domEvent.shiftKey},o}();h.MouseEvent=c}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,h,p){var g=e("../lib/dom"),s=e("../lib/event"),c=e("../lib/useragent"),o=200,a=200,t=5;function i(l){var d=l.editor,f=g.createElement("div");f.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",f.textContent="\xA0";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(F){l[F]=this[F]},this),d.on("mousedown",this.onMouseDown.bind(l));var $=d.container,v,x,_,y,w,q,T=0,k,S,b,C,E;this.onDragStart=function(F){if(this.cancelDrag||!$.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(F)},0),F.preventDefault()}w=d.getSelectionRange();var W=F.dataTransfer;W.effectAllowed=d.getReadOnly()?"copy":"copyMove",d.container.appendChild(f),W.setDragImage&&W.setDragImage(f,0,0),setTimeout(function(){d.container.removeChild(f)}),W.clearData(),W.setData("Text",d.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(F){if($.draggable=!1,S=!1,this.setState(null),!d.getReadOnly()){var P=F.dataTransfer.dropEffect;!k&&P=="move"&&d.session.remove(d.getSelectionRange()),d.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(d.getReadOnly()||!A(F.dataTransfer)))return x=F.clientX,_=F.clientY,v||R(),T++,F.dataTransfer.dropEffect=k=I(F),s.preventDefault(F)},this.onDragOver=function(F){if(!(d.getReadOnly()||!A(F.dataTransfer)))return x=F.clientX,_=F.clientY,v||(R(),T++),V!==null&&(V=null),F.dataTransfer.dropEffect=k=I(F),s.preventDefault(F)},this.onDragLeave=function(F){if(T--,T<=0&&v)return D(),k=null,s.preventDefault(F)},this.onDrop=function(F){if(!!q){var P=F.dataTransfer;if(S)switch(k){case"move":w.contains(q.row,q.column)?w={start:q,end:q}:w=d.moveText(w,q);break;case"copy":w=d.moveText(w,q,!0);break}else{var W=P.getData("Text");w={start:q,end:d.session.insert(q,W)},d.focus(),k=null}return D(),s.preventDefault(F)}},s.addListener($,"dragstart",this.onDragStart.bind(l),d),s.addListener($,"dragend",this.onDragEnd.bind(l),d),s.addListener($,"dragenter",this.onDragEnter.bind(l),d),s.addListener($,"dragover",this.onDragOver.bind(l),d),s.addListener($,"dragleave",this.onDragLeave.bind(l),d),s.addListener($,"drop",this.onDrop.bind(l),d);function O(F,P){var W=Date.now(),N=!P||F.row!=P.row,j=!P||F.column!=P.column;if(!C||N||j)d.moveCursorToPosition(F),C=W,E={x,y:_};else{var z=n(E.x,E.y,x,_);z>t?C=null:W-C>=a&&(d.renderer.scrollCursorIntoView(),C=null)}}function L(F,P){var W=Date.now(),N=d.renderer.layerConfig.lineHeight,j=d.renderer.layerConfig.characterWidth,z=d.renderer.scroller.getBoundingClientRect(),H={x:{left:x-z.left,right:z.right-x},y:{top:_-z.top,bottom:z.bottom-_}},K=Math.min(H.x.left,H.x.right),Q=Math.min(H.y.top,H.y.bottom),le={row:F.row,column:F.column};K/j<=2&&(le.column+=H.x.left=o&&d.renderer.scrollCursorIntoView(le):b=W:b=null}function M(){var F=q;q=d.renderer.screenToTextCoordinates(x,_),O(q,F),L(q,F)}function R(){w=d.selection.toOrientedRange(),v=d.session.addMarker(w,"ace_selection",d.getSelectionStyle()),d.clearSelection(),d.isFocused()&&d.renderer.$cursorLayer.setBlinking(!1),clearInterval(y),M(),y=setInterval(M,20),T=0,s.addListener(document,"mousemove",B)}function D(){clearInterval(y),d.session.removeMarker(v),v=null,d.selection.fromOrientedRange(w),d.isFocused()&&!S&&d.$resetCursorStyle(),w=null,q=null,T=0,b=null,C=null,s.removeListener(document,"mousemove",B)}var V=null;function B(){V==null&&(V=setTimeout(function(){V!=null&&v&&D()},20))}function A(F){var P=F.types;return!P||Array.prototype.some.call(P,function(W){return W=="text/plain"||W=="Text"})}function I(F){var P=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],N=c.isMac?F.altKey:F.ctrlKey,j="uninitialized";try{j=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var z="none";return N&&P.indexOf(j)>=0?z="copy":W.indexOf(j)>=0?z="move":P.indexOf(j)>=0&&(z="copy"),z}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,d=l.container;d.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var f=c.isWin?"default":"move";l.renderer.setCursorStyle(f),this.setState("dragReady")},this.onMouseDrag=function(l){var d=this.editor.container;if(c.isIE&&this.state=="dragReady"){var f=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>3&&d.dragDrop()}if(this.state==="dragWait"){var f=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>0&&(d.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(!!this.$dragEnabled){this.mousedownEvent=l;var d=this.editor,f=l.inSelection(),m=l.getButton(),$=l.domEvent.detail||1;if($===1&&m===0&&f){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),d.getDragDelay()){if(c.isWebKit){this.cancelDrag=!0;var x=d.container;x.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(i.prototype);function n(l,d,f,m){return Math.sqrt(Math.pow(f-l,2)+Math.pow(m-d,2))}h.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,h,p){var g=e("./mouse_event").MouseEvent,s=e("../lib/event"),c=e("../lib/dom");h.addTouchListeners=function(o,a){var t="scroll",i,n,l,d,f,m,$=0,v,x=0,_=0,y=0,w,q;function T(){var O=window.navigator&&window.navigator.clipboard,L=!1,M=function(){var D=a.getCopyText(),V=a.session.getUndoManager().hasUndo();q.replaceChild(c.buildDom(L?["span",!D&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],D&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],D&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],O&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],V&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),q.firstChild)},R=function(D){var V=D.target.getAttribute("action");if(V=="more"||!L)return L=!L,M();V=="paste"?O.readText().then(function(B){a.execCommand(V,B)}):V&&((V=="cut"||V=="copy")&&(O?O.writeText(a.getCopyText()):document.execCommand("copy")),a.execCommand(V)),q.firstChild.style.display="none",L=!1,V!="openCommandPallete"&&a.focus()};q=c.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(D){t="menu",D.stopPropagation(),D.preventDefault(),a.textInput.focus()},ontouchend:function(D){D.stopPropagation(),D.preventDefault(),R(D)},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],a.container)}function k(){q||T();var O=a.selection.cursor,L=a.renderer.textToScreenCoordinates(O.row,O.column),M=a.renderer.textToScreenCoordinates(0,0).pageX,R=a.renderer.scrollLeft,D=a.container.getBoundingClientRect();q.style.top=L.pageY-D.top-3+"px",L.pageX-D.left=2?a.selection.getLineRange(v.row):a.session.getBracketRange(v);O&&!O.isEmpty()?a.selection.setRange(O):a.selection.selectWord(),t="wait"}s.addListener(o,"contextmenu",function(O){if(!!w){var L=a.textInput.getElement();L.focus()}},a),s.addListener(o,"touchstart",function(O){var L=O.touches;if(f||L.length>1){clearTimeout(f),f=null,l=-1,t="zoom";return}w=a.$mouseHandler.isMousePressed=!0;var M=a.renderer.layerConfig.lineHeight,R=a.renderer.layerConfig.lineHeight,D=O.timeStamp;d=D;var V=L[0],B=V.clientX,A=V.clientY;Math.abs(i-B)+Math.abs(n-A)>M&&(l=-1),i=O.clientX=B,n=O.clientY=A,_=y=0;var I=new g(O,a);if(v=I.getDocumentPosition(),D-l<500&&L.length==1&&!$)x++,O.preventDefault(),O.button=0,C();else{x=0;var F=a.selection.cursor,P=a.selection.isEmpty()?F:a.selection.anchor,W=a.renderer.$cursorLayer.getPixelPosition(F,!0),N=a.renderer.$cursorLayer.getPixelPosition(P,!0),j=a.renderer.scroller.getBoundingClientRect(),z=a.renderer.layerConfig.offset,H=a.renderer.scrollLeft,K=function(re,ae){return re=re/R,ae=ae/M-.75,re*re+ae*ae};if(O.clientXle?"cursor":"anchor"),le<3.5?t="anchor":Q<3.5?t="cursor":t="scroll",f=setTimeout(b,450)}l=D},a),s.addListener(o,"touchend",function(O){w=a.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),t=="zoom"?(t="",$=0):f?(a.selection.moveToPosition(v),$=0,k()):t=="scroll"?(E(),S()):k(),clearTimeout(f),f=null},a),s.addListener(o,"touchmove",function(O){f&&(clearTimeout(f),f=null);var L=O.touches;if(!(L.length>1||t=="zoom")){var M=L[0],R=i-M.clientX,D=n-M.clientY;if(t=="wait")if(R*R+D*D>4)t="cursor";else return O.preventDefault();i=M.clientX,n=M.clientY,O.clientX=M.clientX,O.clientY=M.clientY;var V=O.timeStamp,B=V-d;if(d=V,t=="scroll"){var A=new g(O,a);A.speed=1,A.wheelX=R,A.wheelY=D,10*Math.abs(R)0)if(le==16){for(de=ae;de-1){for(de=ae;de=0&&N[X]==w;X--)P[X]=g}}}function B(F,P,W){if(!(s=F){for(z=j+1;z=F;)z++;for(H=j,K=z-1;H=P.length||(z=W[N-1])!=m&&z!=$||(H=P[N+1])!=m&&H!=$?v:(c&&(H=$),H==z?H:v);case T:return z=N>0?W[N-1]:x,z==m&&N+10&&W[N-1]==m)return m;if(c)return v;for(Q=N+1,K=P.length;Q=1425&&le<=2303||le==64286;if(z=P[Q],re&&(z==f||z==y))return f}return N<1||(z=P[N-1])==x?v:W[N-1];case x:return c=!1,o=!0,g;case _:return a=!0,v;case b:case C:case O:case L:case E:c=!1;case M:return v}}function I(F){var P=F.charCodeAt(0),W=P>>8;return W==0?P>191?d:R[P]:W==5?/[\u0591-\u05f4]/.test(F)?f:d:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(F)?S:/[\u0660-\u0669\u066b-\u066c]/.test(F)?$:P==1642?k:/[\u06f0-\u06f9]/.test(F)?m:y:W==32&&P<=8287?D[P&255]:W==254&&P>=65136?y:v}h.L=d,h.R=f,h.EN=m,h.ON_R=3,h.AN=4,h.R_H=5,h.B=6,h.RLE=7,h.DOT="\xB7",h.doBidiReorder=function(F,P,W){if(F.length<2)return{};var N=F.split(""),j=new Array(N.length),z=new Array(N.length),H=[];g=W?l:n,V(N,H,N.length,P);for(var K=0;Ky&&P[K]0&&N[K-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(N[K])&&(H[K-1]=H[K]=h.R_H,K++);N[N.length-1]===h.DOT&&(H[N.length-1]=h.B),N[0]==="\u202B"&&(H[0]=h.RLE);for(var K=0;K=0&&(t=this.session.$docRowCache[n])}return t},a.prototype.getSplitIndex=function(){var t=0,i=this.session.$screenRowCache;if(i.length)for(var n,l=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-t-1),n===l);)l=n,t++;else t=this.currentRow;return t},a.prototype.updateRowLine=function(t,i){t===void 0&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1,l=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var d=this.session.$wrapData[t];d&&(i===void 0&&(i=this.getSplitIndex()),i>0&&d.length?(this.wrapIndent=d.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=ii?this.session.getOverwrite()?t:t-1:i,l=g.getVisualFromLogicalIdx(n,this.bidiMap),d=this.bidiMap.bidiLevels,f=0;!this.session.getOverwrite()&&t<=i&&d[l]%2!=0&&l++;for(var m=0;mi&&d[l]%2==0&&(f+=this.charWidths[d[l]]),this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(f+=this.rtlLineOffset),f},a.prototype.getSelections=function(t,i){var n=this.bidiMap,l=n.bidiLevels,d,f=[],m=0,$=Math.min(t,i)-this.wrapIndent,v=Math.max(t,i)-this.wrapIndent,x=!1,_=!1,y=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,q=0;q=$&&wn+f/2;){if(n+=f,l===d.length-1){f=0;break}f=this.charWidths[d[++l]]}return l>0&&d[l-1]%2!=0&&d[l]%2==0?(t0&&d[l-1]%2==0&&d[l]%2!=0?i=1+(t>n?this.bidiMap.logicalFromVisual[l]:this.bidiMap.logicalFromVisual[l-1]):this.isRtlDir&&l===d.length-1&&f===0&&d[l-1]%2==0||!this.isRtlDir&&l===0&&d[l]%2!=0?i=1+this.bidiMap.logicalFromVisual[l]:(l>0&&d[l-1]%2!=0&&f!==0&&l--,i=this.bidiMap.logicalFromVisual[l]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},a}();h.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,h,p){var g=e("./lib/oop"),s=e("./lib/lang"),c=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(n){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&n.old.column!=n.value.column&&(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection")})};(function(){g.implement(this,c),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(t,i){this.$isEmpty=!1,this.anchor.setPosition(t,i)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,i=this.lead;return t.row>i.row||t.row==i.row&&t.column>i.column},this.getRange=function(){var t=this.anchor,i=this.lead;return this.$isEmpty?o.fromPoints(i,i):this.isBackwards()?o.fromPoints(i,t):o.fromPoints(t,i)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,i){var n=i?t.end:t.start,l=i?t.start:t.end;this.$setSelection(n.row,n.column,l.row,l.column)},this.$setSelection=function(t,i,n,l){if(!this.$silent){var d=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,i),this.cursor.setPosition(n,l),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||d!=this.$isEmpty||f)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),t.call(this)},this.selectTo=function(t,i){this.$moveSelection(function(){this.moveCursorTo(t,i)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,i){this.clearSelection(),this.moveCursorTo(t,i)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,i){if(typeof i=="undefined"){var n=t||this.lead;t=n.row,i=n.column}return this.session.getWordRange(t,i)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),i=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(i)},this.getLineRange=function(t,i){var n=typeof t=="number"?t:this.lead.row,l,d=this.session.getFoldLine(n);return d?(n=d.start.row,l=d.end.row):l=n,i===!0?new o(n,0,l,this.session.getLine(l).length):new o(n,0,l+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,i,n){var l=t.column,d=t.column+i;return n<0&&(l=t.column-i,d=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(l,d).split(" ").length-1==i},this.moveCursorLeft=function(){var t=this.lead.getPosition(),i;if(i=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t=this.lead.getPosition(),i;if(i=this.session.getFoldAt(t.row,t.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=l)}}this.moveCursorTo(i.row,i.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,i=this.doc.getLine(t).length;this.moveCursorTo(t,i)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),l=n.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var d=this.session.getFoldAt(t,i,1);if(d){this.moveCursorTo(d.end.row,d.end.column);return}if(this.session.nonTokenRe.exec(l)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,l=n.substring(i)),i>=n.length){this.moveCursorTo(t,n.length),this.moveCursorRight(),t0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(d)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)},this.$shortWordEndIndex=function(t){var i=0,n,l=/\s/,d=this.session.tokenRe;if(d.lastIndex=0,this.session.tokenRe.exec(t))i=this.session.tokenRe.lastIndex;else{for(;(n=t[i])&&l.test(n);)i++;if(i<1){for(d.lastIndex=0;(n=t[i])&&!d.test(n);)if(d.lastIndex=0,i++,l.test(n))if(i>2){i--;break}else{for(;(n=t[i])&&l.test(n);)i++;if(i>2)break}}}return d.lastIndex=0,i},this.moveCursorShortWordRight=function(){var t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),l=n.substring(i),d=this.session.getFoldAt(t,i,1);if(d)return this.moveCursorTo(d.end.row,d.end.column);if(i==n.length){var f=this.doc.getLength();do t++,l=this.doc.getLine(t);while(t0&&/^\s*$/.test(l));i=l.length,/\s+$/.test(l)||(l="")}var d=s.stringReverse(l),f=this.$shortWordEndIndex(d);return this.moveCursorTo(t,i-f)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,i){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),l;if(i===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(l=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(l/this.session.$bidiHandler.charWidths[0])):l=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var d=this.session.lineWidgets[this.lead.row];t<0?t-=d.rowsAbove||0:t>0&&(t+=d.rowCount-(d.rowsAbove||0))}var f=this.session.screenToDocumentPosition(n.row+t,n.column,l);t!==0&&i===0&&f.row===this.lead.row&&f.column===this.lead.column,this.moveCursorTo(f.row,f.column+i,i===0)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,i,n){var l=this.session.getFoldAt(t,i,1);l&&(t=l.start.row,i=l.start.column),this.$keepDesiredColumnOnChange=!0;var d=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(d.charAt(i))&&d.charAt(i-1)&&(this.lead.row==t&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(t,i),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,i,n){var l=this.session.screenToDocumentPosition(t,i);this.moveCursorTo(l.row,l.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var i=this.getRange();return t?(t.start.column=i.start.column,t.start.row=i.start.row,t.end.column=i.end.column,t.end.row=i.end.row):t=i,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var i=this.getCursor();try{t(this);var n=this.getCursor();return o.fromPoints(i,n)}catch{return o.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(i){var n=i.clone();return n.isBackwards=i.cursor==i.start,n});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},this.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var i=t.length;i--;){var n=o.fromPoints(t[i].start,t[i].end);t[i].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(t[i]))return!1;return!0}}).call(a.prototype),h.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,h,p){var g=e("./config"),s=2e3,c=function(){function o(a){this.states=a,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],l=0,d=this.matchMappings[t]={defaultToken:"text"},f="g",m=[],$=0;$1?v.onMatch=this.$applyToken:v.onMatch=v.token),_>1&&(/\\\d/.test(v.regex)?x=v.regex.replace(/\\([0-9]+)/g,function(y,w){return"\\"+(parseInt(w,10)+l+1)}):(_=1,x=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&m.push(v)),d[l]=$,l+=_,n.push(x),v.onMatch||(v.onMatch=null)}}n.length||(d[0]=0,n.push("$")),m.forEach(function(y){y.splitRegex=this.createSplitterRegexp(y.regex,f)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",f)}}return o.prototype.$setMaxTokenCount=function(a){s=a|0},o.prototype.$applyToken=function(a){var t=this.splitRegex.exec(a).slice(1),i=this.token.apply(this,t);if(typeof i=="string")return[{type:i,value:a}];for(var n=[],l=0,d=i.length;lv){var k=a.substring(v,T-q.length);_.type==y?_.value+=k:(_.type&&$.push(_),_={type:y,value:k})}for(var S=0;Ss){for(x>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:a});v1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:$,state:i.length?i:n}},o}();c.prototype.reportError=g.reportError,h.Tokenizer=c}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,h,p){var g=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,t){if(!t){for(var i in a)this.$rules[i]=a[i];return}for(var i in a){for(var n=a[i],l=0;l=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},c.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},c.prototype.getCurrentTokenRow=function(){return this.$row},c.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,a=this.$tokenIndex,t=o[a].start;if(t!==void 0)return t;for(t=0;a>0;)a-=1,t+=o[a].value.length;return t},c.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},c.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],a=this.getCurrentTokenColumn();return new g(this.$row,a,this.$row,a+o.value.length)},c}();h.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,h,p){var g=e("../../lib/oop"),s=e("../behaviour").Behaviour,c=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},l={'"':'"',"'":"'"},d=function($){var v=-1;if($.multiSelect&&(v=$.selection.index,n.rangeCount!=$.multiSelect.rangeCount&&(n={rangeCount:$.multiSelect.rangeCount})),n[v])return i=n[v];i=n[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function($,v,x,_){var y=$.end.row-$.start.row;return{text:x+v+_,selection:[0,$.start.column+1,y,$.end.column+(y?0:1)]}},m=function($){this.add("braces","insertion",function(v,x,_,y,w){var q=_.getCursorPosition(),T=y.doc.getLine(q.row);if(w=="{"){d(_);var k=_.getSelectionRange(),S=y.doc.getTextRange(k);if(S!==""&&S!=="{"&&_.getWrapBehavioursEnabled())return f(k,S,"{","}");if(m.isSaneInsertion(_,y))return/[\]\}\)]/.test(T[q.column])||_.inMultiSelectMode||$&&$.braces?(m.recordAutoInsert(_,y,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(_,y,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){d(_);var b=T.substring(q.column,q.column+1);if(b=="}"){var C=y.$findOpeningBracket("}",{column:q.column+1,row:q.row});if(C!==null&&m.isAutoInsertedClosing(q,T,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
`||w==`\r
`){d(_);var E="";m.isMaybeInsertedClosing(q,T)&&(E=o.stringRepeat("}",i.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var b=T.substring(q.column,q.column+1);if(b==="}"){var O=y.findMatchingBracket({row:q.row,column:q.column+1},"}");if(!O)return null;var L=this.$getIndent(y.getLine(O.row))}else if(E)var L=this.$getIndent(T);else{m.clearMaybeInsertedClosing();return}var M=L+y.getTabString();return{text:`
`+M+`
`+L+E,selection:[1,M.length,1,M.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,x,_,y,w){var q=y.doc.getTextRange(w);if(!w.isMultiLine()&&q=="{"){d(_);var T=y.doc.getLine(w.start.row),k=T.substring(w.end.column,w.end.column+1);if(k=="}")return w.end.column++,w;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,x,_,y,w){if(w=="("){d(_);var q=_.getSelectionRange(),T=y.doc.getTextRange(q);if(T!==""&&_.getWrapBehavioursEnabled())return f(q,T,"(",")");if(m.isSaneInsertion(_,y))return m.recordAutoInsert(_,y,")"),{text:"()",selection:[1,1]}}else if(w==")"){d(_);var k=_.getCursorPosition(),S=y.doc.getLine(k.row),b=S.substring(k.column,k.column+1);if(b==")"){var C=y.$findOpeningBracket(")",{column:k.column+1,row:k.row});if(C!==null&&m.isAutoInsertedClosing(k,S,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,x,_,y,w){var q=y.doc.getTextRange(w);if(!w.isMultiLine()&&q=="("){d(_);var T=y.doc.getLine(w.start.row),k=T.substring(w.start.column+1,w.start.column+2);if(k==")")return w.end.column++,w}}),this.add("brackets","insertion",function(v,x,_,y,w){if(w=="["){d(_);var q=_.getSelectionRange(),T=y.doc.getTextRange(q);if(T!==""&&_.getWrapBehavioursEnabled())return f(q,T,"[","]");if(m.isSaneInsertion(_,y))return m.recordAutoInsert(_,y,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){d(_);var k=_.getCursorPosition(),S=y.doc.getLine(k.row),b=S.substring(k.column,k.column+1);if(b=="]"){var C=y.$findOpeningBracket("]",{column:k.column+1,row:k.row});if(C!==null&&m.isAutoInsertedClosing(k,S,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,x,_,y,w){var q=y.doc.getTextRange(w);if(!w.isMultiLine()&&q=="["){d(_);var T=y.doc.getLine(w.start.row),k=T.substring(w.start.column+1,w.start.column+2);if(k=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(v,x,_,y,w){var q=y.$mode.$quotes||l;if(w.length==1&&q[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;d(_);var T=w,k=_.getSelectionRange(),S=y.doc.getTextRange(k);if(S!==""&&(S.length!=1||!q[S])&&_.getWrapBehavioursEnabled())return f(k,S,T,T);if(!S){var b=_.getCursorPosition(),C=y.doc.getLine(b.row),E=C.substring(b.column-1,b.column),O=C.substring(b.column,b.column+1),L=y.getTokenAt(b.row,b.column),M=y.getTokenAt(b.row,b.column+1);if(E=="\\"&&L&&/escape/.test(L.type))return null;var R=L&&/string|escape/.test(L.type),D=!M||/string|escape/.test(M.type),V;if(O==T)V=R!==D,V&&/string\.end/.test(M.type)&&(V=!1);else{if(R&&!D||R&&D)return null;var B=y.$mode.tokenRe;B.lastIndex=0;var A=B.test(E);B.lastIndex=0;var I=B.test(O),F=y.$mode.$pairQuotesAfter,P=F&&F[T]&&F[T].test(E);if(!P&&A||I||O&&!/[\s;,.})\]\\]/.test(O))return null;var W=C[b.column-2];if(E==T&&(W==T||B.test(W)))return null;V=!0}return{text:V?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,x,_,y,w){var q=y.$mode.$quotes||l,T=y.doc.getTextRange(w);if(!w.isMultiLine()&&q.hasOwnProperty(T)){d(_);var k=y.doc.getLine(w.start.row),S=k.substring(w.start.column+1,w.start.column+2);if(S==T)return w.end.column++,w}})};m.isSaneInsertion=function($,v){var x=$.getCursorPosition(),_=new c(v,x.row,x.column);if(!this.$matchTokenType(_.getCurrentToken()||"text",a)){if(/[)}\]]/.test($.session.getLine(x.row)[x.column]))return!0;var y=new c(v,x.row,x.column+1);if(!this.$matchTokenType(y.getCurrentToken()||"text",a))return!1}return _.stepForward(),_.getCurrentTokenRow()!==x.row||this.$matchTokenType(_.getCurrentToken()||"text",t)},m.$matchTokenType=function($,v){return v.indexOf($.type||$)>-1},m.recordAutoInsert=function($,v,x){var _=$.getCursorPosition(),y=v.doc.getLine(_.row);this.isAutoInsertedClosing(_,y,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=_.row,i.autoInsertedLineEnd=x+y.substr(_.column),i.autoInsertedBrackets++},m.recordMaybeInsert=function($,v,x){var _=$.getCursorPosition(),y=v.doc.getLine(_.row);this.isMaybeInsertedClosing(_,y)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=_.row,i.maybeInsertedLineStart=y.substr(0,_.column)+x,i.maybeInsertedLineEnd=y.substr(_.column),i.maybeInsertedBrackets++},m.isAutoInsertedClosing=function($,v,x){return i.autoInsertedBrackets>0&&$.row===i.autoInsertedRow&&x===i.autoInsertedLineEnd[0]&&v.substr($.column)===i.autoInsertedLineEnd},m.isMaybeInsertedClosing=function($,v){return i.maybeInsertedBrackets>0&&$.row===i.maybeInsertedRow&&v.substr($.column)===i.maybeInsertedLineEnd&&v.substr(0,$.column)==i.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},g.inherits(m,s),h.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,h,p){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],s=0,c=[],o=0;o2?W%w!=w-1:W%w==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,k=this.blockComment.end,S=new RegExp("^(\\s*)(?:"+t.escapeRegExp(T)+")"),b=new RegExp("(?:"+t.escapeRegExp(k)+")\\s*$"),C=function(V,B){O(V,B)||(!x||/\S/.test(V))&&(v.insertInLine({row:B,column:V.length},k),v.insertInLine({row:B,column:y},T))},E=function(V,B){var A;(A=V.match(b))&&v.removeInLine(B,V.length-A[0].length,V.length),(A=V.match(S))&&v.removeInLine(B,A[1].length,A[0].length)},O=function(V,B){if(S.test(V))return!0;for(var A=f.getTokens(B),I=0;IV.length&&(D=V.length)}),y==1/0&&(y=D,x=!1,_=!1),q&&y%w!=0&&(y=Math.floor(y/w)*w),R(_?E:C)},this.toggleBlockComment=function(d,f,m,$){var v=this.blockComment;if(!!v){!v.start&&v[0]&&(v=v[0]);var x=new i(f,$.row,$.column),_=x.getCurrentToken();f.selection;var y=f.selection.toOrientedRange(),w,q;if(_&&/comment/.test(_.type)){for(var T,k;_&&/comment/.test(_.type);){var S=_.value.indexOf(v.start);if(S!=-1){var b=x.getCurrentTokenRow(),C=x.getCurrentTokenColumn()+S;T=new n(b,C,b,C+v.start.length);break}_=x.stepBackward()}for(var x=new i(f,$.row,$.column),_=x.getCurrentToken();_&&/comment/.test(_.type);){var S=_.value.indexOf(v.end);if(S!=-1){var b=x.getCurrentTokenRow(),C=x.getCurrentTokenColumn()+S;k=new n(b,C,b,C+v.end.length);break}_=x.stepForward()}k&&f.remove(k),T&&(f.remove(T),w=T.start.row,q=-v.start.length)}else q=v.start.length,w=m.start.row,f.insert(m.end,v.end),f.insert(m.start,v.start);y.start.row==w&&(y.start.column+=q),y.end.row==w&&(y.end.column+=q),f.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(d,f,m){return this.$getIndent(f)},this.checkOutdent=function(d,f,m){return!1},this.autoOutdent=function(d,f,m){},this.$getIndent=function(d){return d.match(/^\s*/)[0]},this.createWorker=function(d){return null},this.createModeDelegates=function(d){this.$embeds=[],this.$modes={};for(var f in d)if(d[f]){var m=d[f],$=m.prototype.$id,v=g.$modes[$];v||(g.$modes[$]=v=new m),g.$modes[f]||(g.$modes[f]=v),this.$embeds.push(f),this.$modes[f]=v}for(var x=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],f=0;fthis.row)){var n=a(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},t.prototype.setPosition=function(i,n,l){var d;if(l?d={row:i,column:n}:d=this.$clipPositionToDocument(i,n),!(this.row==d.row&&this.column==d.column)){var f={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._signal("change",{old:f,value:d})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(i,n){var l={};return i>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):i<0?(l.row=0,l.column=0):(l.row=i,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,n))),n<0&&(l.column=0),l},t}();c.prototype.$insertRight=!1,g.implement(c.prototype,s);function o(t,i,n){var l=n?t.column<=i.column:t.column=d&&(n=d-1,l=void 0);var f=this.getLine(n);return l==null&&(l=f.length),l=Math.min(Math.max(l,0),f.length),{row:n,column:l}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,l){return{row:n,column:l}},i.prototype.$clipPosition=function(n){var l=this.getLength();return n.row>=l?(n.row=Math.max(0,l-1),n.column=this.getLine(l-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,l){n=Math.min(Math.max(n,0),this.getLength());var d=0;n0,f=l=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(n,l){if(n instanceof o||(n=o.fromPoints(n.start,n.end)),l.length===0&&n.isEmpty())return n.start;if(l==this.getTextRange(n))return n.end;this.remove(n);var d;return l?d=this.insert(n.start,l):d=n.start,d},i.prototype.applyDeltas=function(n){for(var l=0;l=0;l--)this.revertDelta(n[l])},i.prototype.applyDelta=function(n,l){var d=n.action=="insert";(d?n.lines.length<=1&&!n.lines[0]:!o.comparePoints(n.start,n.end))||(d&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(s(this.$lines,n,l),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var l=this.$lines.length;(n.action=="remove"&&n.start.row20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=l,d==-1&&(d=l),m<=d&&i.fireUpdateEvent(m,d)}}}return o.prototype.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(a,t){var i={first:a,last:t};this._signal("update",{data:i})},o.prototype.start=function(a){this.currentLine=Math.min(a||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)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(a){var t=a.start.row,i=a.end.row-t;if(i===0)this.lines[t]=null;else if(a.action=="remove")this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},o.prototype.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},o.prototype.$tokenizeRow=function(a){var t=this.doc.getLine(a),i=this.states[a-1],n=this.tokenizer.getLineTokens(t,i,a);return this.states[a]+""!=n.state+""?(this.states[a]=n.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=n.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o}();g.implement(c.prototype,s),h.BackgroundTokenizer=c}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,h,p){var g=e("./lib/lang"),s=e("./range").Range,c=function(){function o(a,t,i){i===void 0&&(i="text"),this.setRegexp(a),this.clazz=t,this.type=i}return o.prototype.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},o.prototype.update=function(a,t,i,n){if(!!this.regExp)for(var l=n.firstRow,d=n.lastRow,f={},m=l;m<=d;m++){var $=this.cache[m];$==null&&($=g.getMatchOffsets(i.getLine(m),this.regExp),$.length>this.MAX_RANGES&&($=$.slice(0,this.MAX_RANGES)),$=$.map(function(y){return new s(m,y.offset,m,y.offset+y.length)}),this.cache[m]=$.length?$:"");for(var v=$.length;v--;){var x=$[v].toScreenRange(i),_=x.toString();f[_]||(f[_]=!0,t.drawSingleLineMarker(a,x,this.clazz,n))}}},o}();c.prototype.MAX_RANGES=500,h.SearchHighlight=c}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,h,p){var g=e("../range").Range,s=function(){function c(o,a){this.foldData=o,Array.isArray(a)?this.folds=a:a=this.folds=[a];var t=a[a.length-1];this.range=new g(a[0].start.row,a[0].start.column,t.end.row,t.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return c.prototype.shiftRow=function(o){this.start.row+=o,this.end.row+=o,this.folds.forEach(function(a){a.start.row+=o,a.end.row+=o})},c.prototype.addFold=function(o){if(o.sameRow){if(o.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(a,t){return-a.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},c.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},c.prototype.walk=function(o,a,t){var i=0,n=this.folds,l,d,f,m=!0;a==null&&(a=this.end.row,t=this.end.column);for(var $=0;$0)){var m=s(a,d.start);return f===0?t&&m!==0?-l-2:l:m>0||m===0&&!t?l:-l-1}}return-l-1},o.prototype.add=function(a){var t=!a.isEmpty(),i=this.pointIndex(a.start,t);i<0&&(i=-i-1);var n=this.pointIndex(a.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,a)},o.prototype.addList=function(a){for(var t=[],i=a.length;i--;)t.push.apply(t,this.add(a[i]));return t},o.prototype.substractPoint=function(a){var t=this.pointIndex(a);if(t>=0)return this.ranges.splice(t,1)},o.prototype.merge=function(){var a=[],t=this.ranges;t=t.sort(function(f,m){return s(f.start,m.start)});for(var i=t[0],n,l=1;l=0},o.prototype.containsPoint=function(a){return this.pointIndex(a)>=0},o.prototype.rangeAtPoint=function(a){var t=this.pointIndex(a);if(t>=0)return this.ranges[t]},o.prototype.clipRows=function(a,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row=n)break}if(a.action=="insert")for(var v=l-n,x=-t.column+i.column;fn)break;if($.start.row==n&&$.start.column>=t.column&&($.start.column==t.column&&this.$bias<=0||($.start.column+=x,$.start.row+=v)),$.end.row==n&&$.end.column>=t.column){if($.end.column==t.column&&this.$bias<0)continue;$.end.column==t.column&&x>0&&f$.start.column&&$.end.column==d[f+1].start.column&&($.end.column-=x),$.end.column+=x,$.end.row+=v}}else for(var v=n-l,x=t.column-i.column;fl)break;$.end.rowt.column)&&($.end.column=t.column,$.end.row=t.row):($.end.column+=x,$.end.row+=v):$.end.row>l&&($.end.row+=v),$.start.rowt.column)&&($.start.column=t.column,$.start.row=t.row):($.start.column+=x,$.start.row+=v):$.start.row>l&&($.start.row+=v)}if(v!=0&&f=t)return d;if(d.end.row>t)return null}return null},this.getNextFoldLine=function(t,i){var n=this.$foldData,l=0;for(i&&(l=n.indexOf(i)),l==-1&&(l=0),l;l=t)return d}return null},this.getFoldedRowCount=function(t,i){for(var n=this.$foldData,l=i-t+1,d=0;d=i){$=t?l-=i-$:l=0);break}else m>=t&&($>=t?l-=m-$:l-=m-t+1)}return l},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(i,n){return i.start.row-n.start.row}),t},this.addFold=function(t,i){var n=this.$foldData,l=!1,d;t instanceof c?d=t:(d=new c(i,t),d.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(d.range);var f=d.start.row,m=d.start.column,$=d.end.row,v=d.end.column,x=this.getFoldAt(f,m,1),_=this.getFoldAt($,v,-1);if(x&&_==x)return x.addSubFold(d);x&&!x.range.isStart(f,m)&&this.removeFold(x),_&&!_.range.isEnd($,v)&&this.removeFold(_);var y=this.getFoldsInRange(d.range);y.length>0&&(this.removeFolds(y),d.collapseChildren||y.forEach(function(k){d.addSubFold(k)}));for(var w=0;w0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(t,i){var n,l;if(t==null)n=new g(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof t=="number")n=new g(t,0,t,this.getLine(t).length);else if("row"in t)n=g.fromPoints(t,t);else{if(Array.isArray(t))return l=[],t.forEach(function(f){l=l.concat(this.unfold(f))},this),l;n=t}l=this.getFoldsInRangeList(n);for(var d=l;l.length==1&&g.comparePoints(l[0].start,n.start)<0&&g.comparePoints(l[0].end,n.end)>0;)this.expandFolds(l),l=this.getFoldsInRangeList(n);if(i!=!1?this.removeFolds(l):this.expandFolds(l),d.length)return d},this.isRowFolded=function(t,i){return!!this.getFoldLine(t,i)},this.getRowFoldEnd=function(t,i){var n=this.getFoldLine(t,i);return n?n.end.row:t},this.getRowFoldStart=function(t,i){var n=this.getFoldLine(t,i);return n?n.start.row:t},this.getFoldDisplayLine=function(t,i,n,l,d){l==null&&(l=t.start.row),d==null&&(d=0),i==null&&(i=t.end.row),n==null&&(n=this.getLine(i).length);var f=this.doc,m="";return t.walk(function($,v,x,_){if(!(vv)break;while(d&&m.test(d.type)&&!/^comment.start/.test(d.type));d=l.stepBackward()}else d=l.getCurrentToken();return $.end.row=l.getCurrentTokenRow(),$.end.column=l.getCurrentTokenColumn(),/^comment.end/.test(d.type)||($.end.column+=d.value.length-2),$}},this.foldAll=function(t,i,n,l){n==null&&(n=1e5);var d=this.foldWidgets;if(!!d){i=i||this.getLength(),t=t||0;for(var f=t;f=t&&(f=m.end.row,m.collapseChildren=n,this.addFold("...",m))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(i){for(var n=t.getTokens(i),l=0;l=0;){var f=n[l];if(f==null&&(f=n[l]=this.getFoldWidget(l)),f=="start"){var m=this.getFoldWidgetRange(l);if(d||(d=m),m&&m.end.row>=t)break}l--}return{range:l!==-1&&m,firstRange:d}},this.onFoldWidgetClick=function(t,i){i=i.domEvent;var n={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},l=this.$toggleFoldWidget(t,n);if(!l){var d=i.target||i.srcElement;d&&/ace_fold-widget/.test(d.className)&&(d.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,i){if(!!this.getFoldWidget){var n=this.getFoldWidget(t),l=this.getLine(t),d=n==="end"?-1:1,f=this.getFoldAt(t,d===-1?0:l.length,d);if(f)return i.children||i.all?this.removeFold(f):this.expandFold(f),f;var m=this.getFoldWidgetRange(t,!0);if(m&&!m.isMultiLine()&&(f=this.getFoldAt(m.start.row,m.start.column,1),f&&m.isEqual(f.range)))return this.removeFold(f),f;if(i.siblings){var $=this.getParentFoldRangeData(t);if($.range)var v=$.range.start.row+1,x=$.range.end.row;this.foldAll(v,x,i.all?1e4:0)}else i.children?(x=m?m.end.row:this.getLength(),this.foldAll(t+1,x,i.all?1e4:0)):m&&(i.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(t){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var n=this.$toggleFoldWidget(i,{});if(!n){var l=this.getParentFoldRangeData(i,!0);if(n=l.range||l.firstRange,n){i=n.start.row;var d=this.getFoldAt(i,this.getLine(i).length,1);d?this.removeFold(d):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var i=t.start.row,n=t.end.row-i;if(n===0)this.foldWidgets[i]=null;else if(t.action=="remove")this.foldWidgets.splice(i,n+1,null);else{var l=Array(n+1);l.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,l)}},this.tokenizerUpdateFoldWidgets=function(t){var i=t.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}h.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,h,p){var g=e("../token_iterator").TokenIterator,s=e("../range").Range;function c(){this.findMatchingBracket=function(o,a){if(o.column==0)return null;var t=a||this.getLine(o.row).charAt(o.column-1);if(t=="")return null;var i=t.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],o):this.$findOpeningBracket(i[2],o):null},this.getBracketRange=function(o){var a=this.getLine(o.row),t=!0,i,n=a.charAt(o.column-1),l=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(l||(n=a.charAt(o.column),o={row:o.row,column:o.column+1},l=n&&n.match(/([\(\[\{])|([\)\]\}])/),t=!1),!l)return null;if(l[1]){var d=this.$findClosingBracket(l[1],o);if(!d)return null;i=s.fromPoints(o,d),t||(i.end.column++,i.start.column--),i.cursor=i.end}else{var d=this.$findOpeningBracket(l[2],o);if(!d)return null;i=s.fromPoints(d,o),t||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(o,a){var t=this.getLine(o.row),i=/([\(\[\{])|([\)\]\}])/,n=!a&&t.charAt(o.column-1),l=n&&n.match(i);if(l||(n=(a===void 0||a)&&t.charAt(o.column),o={row:o.row,column:o.column+1},l=n&&n.match(i)),!l)return null;var d=new s(o.row,o.column-1,o.row,o.column),f=l[1]?this.$findClosingBracket(l[1],o):this.$findOpeningBracket(l[2],o);if(!f)return[d];var m=new s(f.row,f.column,f.row,f.column+1);return[d,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,a,t){var i=this.$brackets[o],n=1,l=new g(this,a.row,a.column),d=l.getCurrentToken();if(d||(d=l.stepForward()),!!d){t||(t=new RegExp("(\\.?"+d.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var f=a.column-l.getCurrentTokenColumn()-2,m=d.value;;){for(;f>=0;){var $=m.charAt(f);if($==i){if(n-=1,n==0)return{row:l.getCurrentTokenRow(),column:f+l.getCurrentTokenColumn()}}else $==o&&(n+=1);f-=1}do d=l.stepBackward();while(d&&!t.test(d.type));if(d==null)break;m=d.value,f=m.length-1}return null}},this.$findClosingBracket=function(o,a,t){var i=this.$brackets[o],n=1,l=new g(this,a.row,a.column),d=l.getCurrentToken();if(d||(d=l.stepForward()),!!d){t||(t=new RegExp("(\\.?"+d.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var f=a.column-l.getCurrentTokenColumn();;){for(var m=d.value,$=m.length;f<$;){var v=m.charAt(f);if(v==i){if(n-=1,n==0)return{row:l.getCurrentTokenRow(),column:f+l.getCurrentTokenColumn()}}else v==o&&(n+=1);f+=1}do d=l.stepForward();while(d&&!t.test(d.type));if(d==null)break;f=0}return null}},this.getMatchingTags=function(o){var a=new g(this,o.row,o.column),t=this.$findTagName(a);if(!!t){var i=a.stepBackward();return i.value==="<"?this.$findClosingTag(a,t):this.$findOpeningTag(a,t)}},this.$findTagName=function(o){var a=o.getCurrentToken(),t=!1,i=!1;if(a&&a.type.indexOf("tag-name")===-1)do i?a=o.stepBackward():a=o.stepForward(),a&&(a.value==="/>"?i=!0:a.type.indexOf("tag-name")!==-1&&(t=!0));while(a&&!t);return a},this.$findClosingTag=function(o,a){var t,i=a.value,n=a.value,l=0,d=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);a=o.stepForward();var f=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+a.value.length),m=!1;do if(t=a,a=o.stepForward(),a){if(a.value===">"&&!m){var $=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);m=!0}if(a.type.indexOf("tag-name")!==-1){if(i=a.value,n===i){if(t.value==="<")l++;else if(t.value===""&&(l--,l<0)){o.stepBackward();var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2);a=o.stepForward();var x=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+a.value.length);if(a=o.stepForward(),a&&a.value===">")var _=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(n===i&&a.value==="/>"&&(l--,l<0))var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),x=v,_=x,$=new s(f.end.row,f.end.column,f.end.row,f.end.column+1)}while(a&&l>=0);if(d&&$&&v&&_&&f&&x)return{openTag:new s(d.start.row,d.start.column,$.end.row,$.end.column),closeTag:new s(v.start.row,v.start.column,_.end.row,_.end.column),openTagName:f,closeTagName:x}},this.$findOpeningTag=function(o,a){var t=o.getCurrentToken(),i=a.value,n=0,l=o.getCurrentTokenRow(),d=o.getCurrentTokenColumn(),f=d+2,m=new s(l,d,l,f);o.stepForward();var $=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+a.value.length);if(a=o.stepForward(),!(!a||a.value!==">")){var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(a=t,l=o.getCurrentTokenRow(),d=o.getCurrentTokenColumn(),f=d+a.value.length,t=o.stepBackward(),a){if(a.type.indexOf("tag-name")!==-1){if(i===a.value)if(t.value==="<"){if(n++,n>0){var x=new s(l,d,l,f),_=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do a=o.stepForward();while(a&&a.value!==">");var y=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else t.value===""&&n--}else if(a.value==="/>"){for(var w=0,q=t;q;){if(q.type.indexOf("tag-name")!==-1&&q.value===i){n--;break}else if(q.value==="<")break;q=o.stepBackward(),w++}for(var T=0;TE&&(this.$docRowCache.splice(E,C),this.$screenRowCache.splice(E,C))},S.prototype.$getRowCacheIndex=function(b,C){for(var E=0,O=b.length-1;E<=O;){var L=E+O>>1,M=b[L];if(C>M)E=L+1;else if(C=C));M++);return O=E[M],O?(O.index=M,O.start=L-O.value.length,O):null},S.prototype.setUndoManager=function(b){if(this.$undoManager=b,this.$informUndoManager&&this.$informUndoManager.cancel(),b){var C=this;b.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},S.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},S.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},S.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},S.prototype.setUseSoftTabs=function(b){this.setOption("useSoftTabs",b)},S.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},S.prototype.setTabSize=function(b){this.setOption("tabSize",b)},S.prototype.getTabSize=function(){return this.$tabSize},S.prototype.isTabStop=function(b){return this.$useSoftTabs&&b.column%this.$tabSize==0},S.prototype.setNavigateWithinSoftTabs=function(b){this.setOption("navigateWithinSoftTabs",b)},S.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},S.prototype.setOverwrite=function(b){this.setOption("overwrite",b)},S.prototype.getOverwrite=function(){return this.$overwrite},S.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},S.prototype.addGutterDecoration=function(b,C){this.$decorations[b]||(this.$decorations[b]=""),this.$decorations[b]+=" "+C,this._signal("changeBreakpoint",{})},S.prototype.removeGutterDecoration=function(b,C){this.$decorations[b]=(this.$decorations[b]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},S.prototype.getBreakpoints=function(){return this.$breakpoints},S.prototype.setBreakpoints=function(b){this.$breakpoints=[];for(var C=0;C0&&(O=!!E.charAt(C-1).match(this.tokenRe)),O||(O=!!E.charAt(C).match(this.tokenRe)),O)var L=this.tokenRe;else if(/^\s+$/.test(E.slice(C-1,C+1)))var L=/\s/;else var L=this.nonTokenRe;var M=C;if(M>0){do M--;while(M>=0&&E.charAt(M).match(L));M++}for(var R=C;Rb&&(b=C.screenWidth)}),this.lineWidgetWidth=b},S.prototype.$computeWidth=function(b){if(this.$modified||b){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),E=this.$rowLengthCache,O=0,L=0,M=this.$foldData[L],R=M?M.start.row:1/0,D=C.length,V=0;VR){if(V=M.end.row+1,V>=D)break;M=this.$foldData[L++],R=M?M.start.row:1/0}E[V]==null&&(E[V]=this.$getStringScreenWidth(C[V])[0]),E[V]>O&&(O=E[V])}this.screenWidth=O}},S.prototype.getLine=function(b){return this.doc.getLine(b)},S.prototype.getLines=function(b,C){return this.doc.getLines(b,C)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function(b){return this.doc.getTextRange(b||this.selection.getRange())},S.prototype.insert=function(b,C){return this.doc.insert(b,C)},S.prototype.remove=function(b){return this.doc.remove(b)},S.prototype.removeFullLines=function(b,C){return this.doc.removeFullLines(b,C)},S.prototype.undoChanges=function(b,C){if(!!b.length){this.$fromUndo=!0;for(var E=b.length-1;E!=-1;E--){var O=b[E];O.action=="insert"||O.action=="remove"?this.doc.revertDelta(O):O.folds&&this.addFolds(O.folds)}!C&&this.$undoSelect&&(b.selectionBefore?this.selection.fromJSON(b.selectionBefore):this.selection.setRange(this.$getUndoSelection(b,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function(b,C){if(!!b.length){this.$fromUndo=!0;for(var E=0;Eb.end.column&&(M.start.column+=D),M.end.row==b.end.row&&M.end.column>b.end.column&&(M.end.column+=D)),R&&M.start.row>=b.end.row&&(M.start.row+=R,M.end.row+=R)}if(M.end=this.insert(M.start,O),L.length){var V=b.start,B=M.start,R=B.row-V.row,D=B.column-V.column;this.addFolds(L.map(function(F){return F=F.clone(),F.start.row==V.row&&(F.start.column+=D),F.end.row==V.row&&(F.end.column+=D),F.start.row+=R,F.end.row+=R,F}))}return M},S.prototype.indentRows=function(b,C,E){E=E.replace(/\t/g,this.getTabString());for(var O=b;O<=C;O++)this.doc.insertInLine({row:O,column:0},E)},S.prototype.outdentRows=function(b){for(var C=b.collapseRows(),E=new n(0,0,0,0),O=this.getTabSize(),L=C.start.row;L<=C.end.row;++L){var M=this.getLine(L);E.start.row=L,E.end.row=L;for(var R=0;R0){var O=this.getRowFoldEnd(C+E);if(O>this.doc.getLength()-1)return 0;var L=O-C}else{b=this.$clipRowToDocument(b),C=this.$clipRowToDocument(C);var L=C-b+1}var M=new n(b,0,C,Number.MAX_VALUE),R=this.getFoldsInRange(M).map(function(V){return V=V.clone(),V.start.row+=L,V.end.row+=L,V}),D=E==0?this.doc.getLines(b,C):this.doc.removeFullLines(b,C);return this.doc.insertFullLines(b+L,D),R.length&&this.addFolds(R),L},S.prototype.moveLinesUp=function(b,C){return this.$moveLines(b,C,-1)},S.prototype.moveLinesDown=function(b,C){return this.$moveLines(b,C,1)},S.prototype.duplicateLines=function(b,C){return this.$moveLines(b,C,0)},S.prototype.$clipRowToDocument=function(b){return Math.max(0,Math.min(b,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function(b,C){return C<0?0:Math.min(this.doc.getLine(b).length,C)},S.prototype.$clipPositionToDocument=function(b,C){if(C=Math.max(0,C),b<0)b=0,C=0;else{var E=this.doc.getLength();b>=E?(b=E-1,C=this.doc.getLine(E-1).length):C=Math.min(this.doc.getLine(b).length,C)}return{row:b,column:C}},S.prototype.$clipRangeToDocument=function(b){b.start.row<0?(b.start.row=0,b.start.column=0):b.start.column=this.$clipColumnToRow(b.start.row,b.start.column);var C=this.doc.getLength()-1;return b.end.row>C?(b.end.row=C,b.end.column=this.doc.getLine(C).length):b.end.column=this.$clipColumnToRow(b.end.row,b.end.column),b},S.prototype.setUseWrapMode=function(b){if(b!=this.$useWrapMode){if(this.$useWrapMode=b,this.$modified=!0,this.$resetRowCache(0),b){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function(b,C){(this.$wrapLimitRange.min!==b||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:b,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function(b,C){var E=this.$wrapLimitRange;E.max<0&&(E={min:C,max:C});var O=this.$constrainWrapLimit(b,E.min,E.max);return O!=this.$wrapLimit&&O>1?(this.$wrapLimit=O,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function(b,C,E){return C&&(b=Math.max(C,b)),E&&(b=Math.min(E,b)),b},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function(b){this.setWrapLimitRange(b,b)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function(b){var C=this.$useWrapMode,E=b.action,O=b.start,L=b.end,M=O.row,R=L.row,D=R-M,V=null;if(this.$updating=!0,D!=0)if(E==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(M,D);var B=this.$foldData;V=this.getFoldsInRange(b),this.removeFolds(V);var A=this.getFoldLine(L.row),I=0;if(A){A.addRemoveChars(L.row,L.column,O.column-L.column),A.shiftRow(-D);var F=this.getFoldLine(M);F&&F!==A&&(F.merge(A),A=F),I=B.indexOf(A)+1}for(I;I=L.row&&A.shiftRow(-D)}R=M}else{var P=Array(D);P.unshift(M,0);var W=C?this.$wrapData:this.$rowLengthCache;W.splice.apply(W,P);var B=this.$foldData,A=this.getFoldLine(M),I=0;if(A){var N=A.range.compareInside(O.row,O.column);N==0?(A=A.split(O.row,O.column),A&&(A.shiftRow(D),A.addRemoveChars(R,0,L.column-O.column))):N==-1&&(A.addRemoveChars(M,0,L.column-O.column),A.shiftRow(D)),I=B.indexOf(A)+1}for(I;I=M&&A.shiftRow(D)}}else{D=Math.abs(b.start.column-b.end.column),E==="remove"&&(V=this.getFoldsInRange(b),this.removeFolds(V),D=-D);var A=this.getFoldLine(M);A&&A.addRemoveChars(M,O.column,D)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(M,R):this.$updateRowLengthCache(M,R),V},S.prototype.$updateRowLengthCache=function(b,C,E){this.$rowLengthCache[b]=null,this.$rowLengthCache[C]=null},S.prototype.$updateWrapData=function(b,C){var E=this.doc.getAllLines(),O=this.getTabSize(),L=this.$wrapData,M=this.$wrapLimit,R,D,V=b;for(C=Math.min(C,E.length-1);V<=C;)D=this.getFoldLine(V,D),D?(R=[],D.walk(function(B,A,I,F){var P;if(B!=null){P=this.$getDisplayTokens(B,R.length),P[0]=x;for(var W=1;WC-F;){var P=M+C-F;if(b[P-1]>=w&&b[P]>=w){I(P);continue}if(b[P]==x||b[P]==_){for(P;P!=M-1&&b[P]!=x;P--);if(P>M){I(P);continue}for(P=M+C,P;P>2)),M-1);P>W&&b[P]W&&b[P]W&&b[P]==y;)P--}else for(;P>W&&b[P]W){I(++P);continue}P=M+C,b[P]==v&&P--,I(P-F)}return O},S.prototype.$getDisplayTokens=function(b,C){var E=[],O;C=C||0;for(var L=0;L39&&M<48||M>57&&M<64?E.push(y):M>=4352&&k(M)?E.push($,v):E.push($)}return E},S.prototype.$getStringScreenWidth=function(b,C,E){if(C==0)return[0,0];C==null&&(C=1/0),E=E||0;var O,L;for(L=0;L=4352&&k(O)?E+=2:E+=1,!(E>C));L++);return[E,L]},S.prototype.getRowLength=function(b){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[b]&&this.lineWidgets[b].rowCount||0),!this.$useWrapMode||!this.$wrapData[b]?C:this.$wrapData[b].length+C},S.prototype.getRowLineCount=function(b){return!this.$useWrapMode||!this.$wrapData[b]?1:this.$wrapData[b].length+1},S.prototype.getRowWrapIndent=function(b){if(this.$useWrapMode){var C=this.screenToDocumentPosition(b,Number.MAX_VALUE),E=this.$wrapData[C.row];return E.length&&E[0]=0)var D=B[A],L=this.$docRowCache[A],F=b>B[I-1];else var F=!I;for(var P=this.getLength()-1,W=this.getNextFoldLine(L),N=W?W.start.row:1/0;D<=b&&(V=this.getRowLength(L),!(D+V>b||L>=P));)D+=V,L++,L>N&&(L=W.end.row+1,W=this.getNextFoldLine(L,W),N=W?W.start.row:1/0),F&&(this.$docRowCache.push(L),this.$screenRowCache.push(D));if(W&&W.start.row<=L)O=this.getFoldDisplayLine(W),L=W.start.row;else{if(D+V<=b||L>P)return{row:P,column:this.getLine(P).length};O=this.getLine(L),W=null}var j=0,z=Math.floor(b-D);if(this.$useWrapMode){var H=this.$wrapData[L];H&&(R=H[z],z>0&&H.length&&(j=H.indent,M=H[z-1]||H[H.length-1],O=O.substring(M)))}return E!==void 0&&this.$bidiHandler.isBidiRow(D+z,L,z)&&(C=this.$bidiHandler.offsetToCol(E)),M+=this.$getStringScreenWidth(O,C-j)[1],this.$useWrapMode&&M>=R&&(M=R-1),W?W.idxToPosition(M):{row:L,column:M}},S.prototype.documentToScreenPosition=function(b,C){if(typeof C=="undefined")var E=this.$clipPositionToDocument(b.row,b.column);else E=this.$clipPositionToDocument(b,C);b=E.row,C=E.column;var O=0,L=null,M=null;M=this.getFoldAt(b,C,1),M&&(b=M.start.row,C=M.start.column);var R,D=0,V=this.$docRowCache,B=this.$getRowCacheIndex(V,b),A=V.length;if(A&&B>=0)var D=V[B],O=this.$screenRowCache[B],I=b>V[A-1];else var I=!A;for(var F=this.getNextFoldLine(D),P=F?F.start.row:1/0;D=P){if(R=F.end.row+1,R>b)break;F=this.getNextFoldLine(R,F),P=F?F.start.row:1/0}else R=D+1;O+=this.getRowLength(D),D=R,I&&(this.$docRowCache.push(D),this.$screenRowCache.push(O))}var W="";F&&D>=P?(W=this.getFoldDisplayLine(F,b,C),L=F.start.row):(W=this.getLine(b).substring(0,C),L=b);var N=0;if(this.$useWrapMode){var j=this.$wrapData[L];if(j){for(var z=0;W.length>=j[z];)O++,z++;W=W.substring(j[z-1]||0,W.length),N=z>0?j.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(O+=this.lineWidgets[D].rowsAbove),{row:O,column:N+this.$getStringScreenWidth(W)[0]}},S.prototype.documentToScreenColumn=function(b,C){return this.documentToScreenPosition(b,C).column},S.prototype.documentToScreenRow=function(b,C){return this.documentToScreenPosition(b,C).row},S.prototype.getScreenLength=function(){var b=0,C=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,M=0,O=0,C=this.$foldData[O++],R=C?C.start.row:1/0;MR&&(M=C.end.row+1,C=this.$foldData[O++],R=C?C.start.row:1/0)}else{b=this.getLength();for(var E=this.$foldData,O=0;OE));M++);return[O,M]})},S.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()},S}();m.$uid=0,m.prototype.$modes=o.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=k,g.implement(m.prototype,a);var $=1,v=2,x=3,_=4,y=9,w=10,q=11,T=12;function k(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),o.defineOptions(m.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var b=typeof S=="number"?S:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,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(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),h.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,h,p){var g=e("./lib/lang"),s=e("./lib/oop"),c=e("./range").Range,o=function(){function t(){this.$options={}}return t.prototype.set=function(i){return s.mixin(this.$options,i),this},t.prototype.getOptions=function(){return g.copyObject(this.$options)},t.prototype.setOptions=function(i){this.$options=i},t.prototype.find=function(i){var n=this.$options,l=this.$matchIterator(i,n);if(!l)return!1;var d=null;return l.forEach(function(f,m,$,v){return d=new c(f,m,$,v),m==v&&n.start&&n.start.start&&n.skipCurrent!=!1&&d.isEqual(n.start)?(d=null,!1):!0}),d},t.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var l=n.range,d=l?i.getLines(l.start.row,l.end.row):i.doc.getAllLines(),f=[],m=n.re;if(n.$isMultiLine){var $=m.length,v=d.length-$,x;e:for(var _=m.offset||0;_<=v;_++){for(var y=0;y<$;y++)if(d[_+y].search(m[y])==-1)continue e;var w=d[_],q=d[_+$-1],T=w.length-w.match(m[0])[0].length,k=q.match(m[$-1])[0].length;x&&x.end.row===_&&x.end.column>T||(f.push(x=new c(_,T,_+$-1,k)),$>2&&(_=_+$-2))}}else for(var S=0;SO&&f[y].end.row==L;)y--;for(f=f.slice(S,y+1),S=0,y=f.length;S=v;T--)if(w(T,Number.MAX_VALUE,q))return;if(n.wrap!=!1){for(T=x,v=$.row;T>=v;T--)if(w(T,Number.MAX_VALUE,q))return}}};else var _=function(T){var k=$.row;if(!w(k,$.column,T)){for(k=k+1;k<=x;k++)if(w(k,0,T))return;if(n.wrap!=!1){for(k=v,x=$.row;k<=x;k++)if(w(k,0,T))return}}};if(n.$isMultiLine)var y=l.length,w=function(q,T,k){var S=d?q-y+1:q;if(!(S<0||S+y>i.getLength())){var b=i.getLine(S),C=b.search(l[0]);if(!(!d&&CT)&&k(S,C,S+y-1,O))return!0}}};else if(d)var w=function(T,k,S){var b=i.getLine(T),C=[],E,O=0;for(l.lastIndex=0;E=l.exec(b);){var L=E[0].length;if(O=E.index,!L){if(O>=b.length)break;l.lastIndex=O+=1}if(E.index+L>k)break;C.push(E.index,L)}for(var M=C.length-1;M>=0;M-=2){var R=C[M-1],L=C[M];if(S(T,R,T,R+L))return!0}};else var w=function(T,k,S){var b=i.getLine(T),C,E;for(l.lastIndex=k;E=l.exec(b);){var O=E[0].length;if(C=E.index,S(T,C,T,C+O))return!0;if(!O&&(l.lastIndex=C+=1,C>=b.length))return!1}};return{forEach:_}},t}();function a(t,i){function n(l){return/\w/.test(l)||i.regExp?"\\b":""}return n(t[0])+t+n(t[t.length-1])}h.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,h,p){var g=e("../lib/keys"),s=e("../lib/useragent"),c=g.KEY_MODS;function o(t,i){this.platform=i||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,i){o.call(this,t,i),this.$singleCommand=!1}a.prototype=o.prototype,function(){this.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},this.removeCommand=function(i,n){var l=i&&(typeof i=="string"?i:i.name);i=this.commands[l],n||delete this.commands[l];var d=this.commandKeyBinding;for(var f in d){var m=d[f];if(m==i)delete d[f];else if(Array.isArray(m)){var $=m.indexOf(i);$!=-1&&(m.splice($,1),m.length==1&&(d[f]=m[0]))}}},this.bindKey=function(i,n,l){if(typeof i=="object"&&i&&(l==null&&(l=i.position),i=i[this.platform]),!!i){if(typeof n=="function")return this.addCommand({exec:n,bindKey:i,name:n.name||i});i.split("|").forEach(function(d){var f="";if(d.indexOf(" ")!=-1){var m=d.split(/\s+/);d=m.pop(),m.forEach(function(x){var _=this.parseKeys(x),y=c[_.hashId]+_.key;f+=(f?" ":"")+y,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var $=this.parseKeys(d),v=c[$.hashId]+$.key;this._addCommandToBinding(f+v,n,l)},this)}};function t(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}this._addCommandToBinding=function(i,n,l){var d=this.commandKeyBinding,f;if(!n)delete d[i];else if(!d[i]||this.$singleCommand)d[i]=n;else{Array.isArray(d[i])?(f=d[i].indexOf(n))!=-1&&d[i].splice(f,1):d[i]=[d[i]],typeof l!="number"&&(l=t(n));var m=d[i];for(f=0;fl)break}m.splice(f,0,n)}},this.addCommands=function(i){i&&Object.keys(i).forEach(function(n){var l=i[n];if(!!l){if(typeof l=="string")return this.bindKey(l,n);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=n),this.addCommand(l))}},this)},this.removeCommands=function(i){Object.keys(i).forEach(function(n){this.removeCommand(i[n])},this)},this.bindKeys=function(i){Object.keys(i).forEach(function(n){this.bindKey(n,i[n])},this)},this._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},this.parseKeys=function(i){var n=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(v){return v}),l=n.pop(),d=g[l];if(g.FUNCTION_KEYS[d])l=g.FUNCTION_KEYS[d].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var f=0,m=n.length;m--;){var $=g.KEY_MODS[n[m]];if($==null)return typeof console!="undefined"&&console.error("invalid modifier "+n[m]+" in "+i),!1;f|=$}return{key:l,hashId:f}},this.findKeyCommand=function(n,l){var d=c[n]+l;return this.commandKeyBinding[d]},this.handleKeyboard=function(i,n,l,d){if(!(d<0)){var f=c[n]+l,m=this.commandKeyBinding[f];return i.$keyChain&&(i.$keyChain+=" "+f,m=this.commandKeyBinding[i.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||f,{command:"null"}):(i.$keyChain&&((!n||n==4)&&l.length==1?i.$keyChain=i.$keyChain.slice(0,-f.length-1):(n==-1||d>0)&&(i.$keyChain="")),{command:m})}},this.getStatusText=function(i,n){return n.$keyChain||""}}.call(o.prototype),h.HashHandler=o,h.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,h,p){var g=this&&this.__extends||function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(l[f]=d[f])},t(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function l(){this.constructor=i}i.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}}(),s=e("../lib/oop"),c=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(t){g(i,t);function i(n,l){var d=t.call(this,l,n)||this;return d.byName=d.commands,d.setDefaultHandler("exec",function(f){return f.args?f.command.exec(f.editor,f.args,f.event,!1):f.command.exec(f.editor,{},f.event,!0)}),d}return i.prototype.exec=function(n,l,d){if(Array.isArray(n)){for(var f=n.length;f--;)if(this.exec(n[f],l,d))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!n||l&&l.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(l))return!1;var m={editor:l,command:n,args:d};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(l){this.macro.push([l.command,l.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,n):this.exec(l[0],n,l[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},i}(c);s.implement(a.prototype,o),h.CommandManager=a}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,h,p){var g=e("../lib/lang"),s=e("../config"),c=e("../range").Range;function o(t,i){return{win:t,mac:i}}h.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){s.loadModule("ace/ext/settings_menu",function(i){i.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(t){s.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){s.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,i){typeof i=="number"&&!isNaN(i)&&t.gotoLine(i),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){s.loadModule("ace/ext/searchbox",function(i){i.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,i){t.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,i){t.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,i){t.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,i){t.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var i=t.$copyWithEmptySelection&&t.selection.isEmpty(),n=i?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,i){t.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){s.loadModule("ace/ext/searchbox",function(i){i.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var i=t.selection.getRange();i.start.column=0,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var i=t.selection.getRange();i.end.column=Number.MAX_VALUE,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,i){t.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,i){t.insert(g.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var i=t.selection.getRange();i.start.column=i.end.column=0,i.end.row++,t.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var i=t.selection.isBackwards(),n=i?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),l=i?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),d=t.session.doc.getLine(n.row).length,f=t.session.doc.getTextRange(t.selection.getRange()),m=f.replace(/\n\s*/," ").length,$=t.session.doc.getLine(n.row),v=n.row+1;v<=l.row+1;v++){var x=g.stringTrimLeft(g.stringTrimRight(t.session.doc.getLine(v)));x.length!==0&&(x=" "+x),$+=x}l.row+10?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+m)):(d=t.session.doc.getLine(n.row).length>d?d+1:d,t.selection.moveCursorTo(n.row,d))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var i=t.session.doc.getLength()-1,n=t.session.doc.getLine(i).length,l=t.selection.rangeList.ranges,d=[];l.length<1&&(l=[t.selection.getRange()]);for(var f=0;fa[t].column&&t++,l.unshift(t,0),a.splice.apply(a,l),this.$updateRows()}}},c.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(!!o){var a=!0;o.forEach(function(t,i){if(t)for(a=!1,t.row=i;t.$oldWidget;)t.$oldWidget.row=i,t=t.$oldWidget}),a&&(this.session.lineWidgets=null)}},c.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var a=this.session.lineWidgets[o.row];return a&&(o.$oldWidget=a,a.el&&a.el.parentNode&&(a.el.parentNode.removeChild(a.el),a._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},c.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var a=this.editor.renderer;o.html&&!o.el&&(o.el=g.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=g.createElement("div"),o.el.textContent=o.text),o.el&&(g.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&g.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex=5,a.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex=3),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/a.layerConfig.lineHeight);var t=this.session.getFoldAt(o.row,0);if(o.$fold=t,t){var i=this.session.lineWidgets;o.row==t.end.row&&!i[t.start.row]?i[t.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,a),this.onWidgetChanged(o),o},c.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var a=this.session.lineWidgets[o.row];if(a==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;a;){if(a.$oldWidget==o){a.$oldWidget=o.$oldWidget;break}a=a.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},c.prototype.getWidgetsAtRow=function(o){for(var a=this.session.lineWidgets,t=a&&a[o],i=[];t;)i.push(t),t=t.$oldWidget;return i},c.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},c.prototype.measureWidgets=function(o,a){var t=this.session._changedWidgets,i=a.layerConfig;if(!(!t||!t.length)){for(var n=1/0,l=0;l0&&!i[n];)n--;this.firstRow=t.firstRow,this.lastRow=t.lastRow,a.$cursorLayer.config=t;for(var d=n;d<=l;d++){var f=i[d];if(!(!f||!f.el)){if(f.hidden){f.el.style.top=-100-(f.pixelHeight||0)+"px";continue}f._inDocument||(f._inDocument=!0,a.container.appendChild(f.el));var m=a.$cursorLayer.getPixelPosition({row:d,column:0},!0).top;f.coverLine||(m+=t.lineHeight*this.session.getRowLineCount(f.row)),f.el.style.top=m-t.offset+"px";var $=f.coverGutter?0:a.gutterWidth;f.fixedWidth||($-=a.scrollLeft),f.el.style.left=$+"px",f.fullWidth&&f.screenWidth&&(f.el.style.minWidth=t.width+2*t.padding+"px"),f.fixedWidth?f.el.style.right=a.scrollBar.getWidth()+"px":f.el.style.right=""}}}},c}();h.LineWidgets=s}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/clipboard","ace/lib/keys"],function(e,h,p){var g=this&&this.__values||function(b){var C=typeof Symbol=="function"&&Symbol.iterator,E=C&&b[C],O=0;if(E)return E.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&O>=b.length&&(b=void 0),{value:b&&b[O++],done:!b}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/oop"),c=e("./lib/dom"),o=e("./lib/lang"),a=e("./lib/useragent"),t=e("./keyboard/textinput").TextInput,i=e("./mouse/mouse_handler").MouseHandler,n=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,m=e("./range").Range,$=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,x=e("./commands/default_commands").commands,_=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./line_widgets").LineWidgets,q=e("./clipboard"),T=e("./lib/keys"),k=function(){function b(C,E,O){this.$toDestroy=[];var L=C.getContainerElement();this.container=L,this.renderer=C,this.id="editor"+ ++b.$uid,this.commands=new v(a.isMac?"mac":"win",x),typeof document=="object"&&(this.textInput=new t(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(this)),this.keyBinding=new l(this),this.$search=new f().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(M,R){R._$emitInputEvent.schedule(31)}),this.setSession(E||O&&O.session||new d("")),_.resetOptions(this),O&&this.setOptions(O),_._signal("editor",this)}return b.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.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)},b.prototype.startOperation=function(C){if(this.curOp){if(!C||this.curOp.command)return;this.prevOp=this.curOp}C||(this.previousCommand=null,C={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:C.command||{},args:C.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},b.prototype.endOperation=function(C){if(this.curOp&&this.session){if(C&&C.returnValue===!1||!this.session)return this.curOp=null;if(C==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var E=this.curOp.command,O=E&&E.scrollIntoView;if(O){switch(O){case"center-animate":O="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var L=this.selection.getRange(),M=this.renderer.layerConfig;(L.start.row>=M.lastRow||L.end.row<=M.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}O=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var R=this.selection.toJSON();this.curOp.selectionAfter=R,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(R),this.prevOp=this.curOp,this.curOp=null}},b.prototype.$historyTracker=function(C){if(!!this.$mergeUndoDeltas){var E=this.prevOp,O=this.$mergeableCommands,L=E.command&&C.command.name==E.command.name;if(C.command.name=="insertstring"){var M=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),L=L&&this.mergeNextCommand&&(!/\s/.test(M)||/\s/.test(E.args)),this.mergeNextCommand=!0}else L=L&&O.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(L=!1),L?this.session.mergeUndoDeltas=!0:O.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},b.prototype.setKeyboardHandler=function(C,E){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var O=this;_.loadModule(["keybinding",C],function(L){O.$keybindingId==C&&O.keyBinding.setKeyboardHandler(L&&L.handler),E&&E()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),E&&E()},b.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},b.prototype.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var E=this.session;if(E){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 O=this.session.getSelection();O.off("changeCursor",this.$onCursorChange),O.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.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=C.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(C)),this._signal("changeSession",{session:C,oldSession:E}),this.curOp=null,E&&E._signal("changeEditor",{oldEditor:this}),C&&C._signal("changeEditor",{editor:this}),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},b.prototype.getSession=function(){return this.session},b.prototype.setValue=function(C,E){return this.session.doc.setValue(C),E?E==1?this.navigateFileEnd():E==-1&&this.navigateFileStart():this.selectAll(),C},b.prototype.getValue=function(){return this.session.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.resize=function(C){this.renderer.onResize(C)},b.prototype.setTheme=function(C,E){this.renderer.setTheme(C,E)},b.prototype.getTheme=function(){return this.renderer.getTheme()},b.prototype.setStyle=function(C){this.renderer.setStyle(C)},b.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},b.prototype.getFontSize=function(){return this.getOption("fontSize")||c.computedStyle(this.container).fontSize},b.prototype.setFontSize=function(C){this.setOption("fontSize",C)},b.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var E=C.session;if(!(!E||E.destroyed)){E.$bracketHighlight&&(E.$bracketHighlight.markerIds.forEach(function(I){E.removeMarker(I)}),E.$bracketHighlight=null);var O=C.getCursorPosition(),L=C.getKeyboardHandler(),M=L&&L.$getDirectionForHighlight&&L.$getDirectionForHighlight(C),R=E.getMatchingBracketRanges(O,M);if(!R){var D=new y(E,O.row,O.column),V=D.getCurrentToken();if(V&&/\b(?:tag-open|tag-name)/.test(V.type)){var B=E.getMatchingTags(O);B&&(R=[B.openTagName,B.closeTagName])}}if(!R&&E.$mode.getMatching&&(R=E.$mode.getMatching(C.session)),!R){C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide();return}var A="ace_bracket";Array.isArray(R)?R.length==1&&(A="ace_error_bracket"):R=[R],R.length==2&&(m.comparePoints(R[0].end,R[1].start)==0?R=[m.fromPoints(R[0].start,R[1].end)]:m.comparePoints(R[0].start,R[1].end)==0&&(R=[m.fromPoints(R[1].start,R[0].end)])),E.$bracketHighlight={ranges:R,markerIds:R.map(function(I){return E.addMarker(I,A,"text")})},C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide()}},50)}},b.prototype.focus=function(){this.textInput.focus()},b.prototype.isFocused=function(){return this.textInput.isFocused()},b.prototype.blur=function(){this.textInput.blur()},b.prototype.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},b.prototype.onBlur=function(C){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},b.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},b.prototype.onDocumentChange=function(C){var E=this.session.$useWrapMode,O=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,O,E),this._signal("change",C),this.$cursorChange()},b.prototype.onTokenizerUpdate=function(C){var E=C.data;this.renderer.updateLines(E.first,E.last)},b.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},b.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},b.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},b.prototype.$updateHighlightActiveLine=function(){var C=this.getSession(),E;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(E=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(E=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(E=!1)),C.$highlightLineMarker&&!E)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&E){var O=new m(E.row,E.column,E.row,1/0);O.id=C.addMarker(O,"ace_active-line","screenLine"),C.$highlightLineMarker=O}else E&&(C.$highlightLineMarker.start.row=E.row,C.$highlightLineMarker.end.row=E.row,C.$highlightLineMarker.start.column=E.column,C._signal("changeBackMarker"))},b.prototype.onSelectionChange=function(C){var E=this.session;if(E.$selectionMarker&&E.removeMarker(E.$selectionMarker),E.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var O=this.selection.getRange(),L=this.getSelectionStyle();E.$selectionMarker=E.addMarker(O,"ace_selection",L)}var M=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(M),this._signal("changeSelection")},b.prototype.$getSelectionHighLightRegexp=function(){var C=this.session,E=this.getSelectionRange();if(!(E.isEmpty()||E.isMultiLine())){var O=E.start.column,L=E.end.column,M=C.getLine(E.start.row),R=M.substring(O,L);if(!(R.length>5e3||!/[\w\d]/.test(R))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:R}),V=M.substring(O-1,L+1);if(!!D.test(V))return D}}},b.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},b.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},b.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},b.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},b.prototype.onChangeMode=function(C){this.renderer.updateText(),this._emit("changeMode",C)},b.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},b.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},b.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},b.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},b.prototype.getCopyText=function(){var C=this.getSelectedText(),E=this.session.doc.getNewLineCharacter(),O=!1;if(!C&&this.$copyWithEmptySelection){O=!0;for(var L=this.selection.getAllRanges(),M=0;MI.search(/\S|$/)){var V=I.substr(M.column).search(/\S|$/);O.doc.removeInLine(M.row,M.column,M.column+V)}}this.clearSelection();var B=M.column,A=O.getState(M.row),I=O.getLine(M.row),F=L.checkOutdent(A,I,C);if(O.insert(M,C),R&&R.selection&&(R.selection.length==2?this.selection.setSelectionRange(new m(M.row,B+R.selection[0],M.row,B+R.selection[1])):this.selection.setSelectionRange(new m(M.row+R.selection[0],R.selection[1],M.row+R.selection[2],R.selection[3]))),this.$enableAutoIndent){if(O.getDocument().isNewLine(C)){var P=L.getNextLineIndent(A,I.slice(0,M.column),O.getTabString());O.insert({row:M.row+1,column:0},P)}F&&L.autoOutdent(A,O,M.row)}},b.prototype.autoIndent=function(){var C=this.session,E=C.getMode(),O,L;if(this.selection.isEmpty())O=0,L=C.doc.getLength()-1;else{var M=this.getSelectionRange();O=M.start.row,L=M.end.row}for(var R="",D="",V="",B,A,I,F=C.getTabString(),P=O;P<=L;P++)P>0&&(R=C.getState(P-1),D=C.getLine(P-1),V=E.getNextLineIndent(R,D,F)),B=C.getLine(P),A=E.$getIndent(B),V!==A&&(A.length>0&&(I=new m(P,0,P,A.length),C.remove(I)),V.length>0&&C.insert({row:P,column:0},V)),E.autoOutdent(R,C,P)},b.prototype.onTextInput=function(C,E){if(!E)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var O=this.applyComposition.bind(this,C,E);this.selection.rangeCount?this.forEachSelection(O):O(),this.endOperation()},b.prototype.applyComposition=function(C,E){if(E.extendLeft||E.extendRight){var O=this.selection.getRange();O.start.column-=E.extendLeft,O.end.column+=E.extendRight,O.start.column<0&&(O.start.row--,O.start.column+=this.session.getLine(O.start.row).length+1),this.selection.setRange(O),!C&&!O.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!0),E.restoreStart||E.restoreEnd){var O=this.selection.getRange();O.start.column-=E.restoreStart,O.end.column-=E.restoreEnd,this.selection.setRange(O)}},b.prototype.onCommandKey=function(C,E,O){return this.keyBinding.onCommandKey(C,E,O)},b.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},b.prototype.getOverwrite=function(){return this.session.getOverwrite()},b.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},b.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},b.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},b.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},b.prototype.getDragDelay=function(){return this.getOption("dragDelay")},b.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},b.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},b.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},b.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},b.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},b.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},b.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},b.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},b.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},b.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},b.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},b.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},b.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},b.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},b.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},b.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},b.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},b.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},b.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},b.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},b.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},b.prototype.getReadOnly=function(){return this.getOption("readOnly")},b.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},b.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},b.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},b.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},b.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},b.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},b.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},b.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},b.prototype.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var E=this.getSelectionRange();if(this.getBehavioursEnabled()){var O=this.session,L=O.getState(E.start.row),M=O.getMode().transformAction(L,"deletion",this,O,E);if(E.end.column===0){var R=O.getTextRange(E);if(R[R.length-1]==`
`){var D=O.getLine(E.end.row);/^\s+$/.test(D)&&(E.end.column=D.length)}}M&&(E=M)}this.session.remove(E),this.clearSelection()},b.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},b.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(C)},b.prototype.setGhostText=function(C,E){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(C,E)},b.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},b.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var C=this.getCursorPosition(),E=C.column;if(E!==0){var O=this.session.getLine(C.row),L,M;EV.toLowerCase()?1:0});for(var M=new m(0,0,0,0),L=C.first;L<=C.last;L++){var R=E.getLine(L);M.start.row=L,M.end.row=L,M.end.column=R.length,E.replace(M,O[L-C.first])}},b.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),E=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,E.first,E.last)},b.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),E=this.session.getState(C.row),O=this.getSelectionRange();this.session.getMode().toggleBlockComment(E,this.session,O,C)},b.prototype.getNumberAt=function(C,E){var O=/[\-]?[0-9]+(?:\.[0-9]+)?/g;O.lastIndex=0;for(var L=this.session.getLine(C);O.lastIndex=E){var R={value:M[0],start:M.index,end:M.index+M[0].length};return R}}return null},b.prototype.modifyNumber=function(C){var E=this.selection.getCursor().row,O=this.selection.getCursor().column,L=new m(E,O-1,E,O),M=this.session.getTextRange(L);if(!isNaN(parseFloat(M))&&isFinite(M)){var R=this.getNumberAt(E,O);if(R){var D=R.value.indexOf(".")>=0?R.start+R.value.indexOf(".")+1:R.end,V=R.start+R.value.length-D,B=parseFloat(R.value);B*=Math.pow(10,V),D!==R.end&&O=D&&R<=V&&(O=H,B.selection.clearSelection(),B.moveCursorTo(C,D+L),B.selection.selectTo(C,V+L)),D=V});for(var A=this.$toggleWordPairs,I,F=0;F=V&&D<=B&&P.match(/((?:https?|ftp):\/\/[\S]+)/)){A=P.replace(/[\s:.,'";}\]]+$/,"");break}V=B}}catch(W){O={error:W}}finally{try{F&&!F.done&&(L=I.return)&&L.call(I)}finally{if(O)throw O.error}}return A},b.prototype.openLink=function(){var C=this.selection.getCursor(),E=this.findLinkAt(C.row,C.column);return E&&window.open(E,"_blank"),E!=null},b.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},b.prototype.duplicateSelection=function(){var C=this.selection,E=this.session,O=C.getRange(),L=C.isBackwards();if(O.isEmpty()){var M=O.start.row;E.duplicateLines(M,M)}else{var R=L?O.start:O.end,D=E.insert(R,E.getTextRange(O),!1);O.start=R,O.end=D,C.setSelectionRange(O,L)}},b.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},b.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},b.prototype.moveText=function(C,E,O){return this.session.moveText(C,E,O)},b.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},b.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},b.prototype.$moveLines=function(C,E){var O,L,M=this.selection;if(!M.inMultiSelectMode||this.inVirtualSelectionMode){var R=M.toOrientedRange();O=this.$getSelectedRows(R),L=this.session.$moveLines(O.first,O.last,E?0:C),E&&C==-1&&(L=0),R.moveBy(L,0),M.fromOrientedRange(R)}else{var D=M.rangeList.ranges;M.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var V=0,B=0,A=D.length,I=0;IW+1)break;W=N.last}for(I--,V=this.session.$moveLines(P,W,E?0:C),E&&C==-1&&(F=I+1);F<=I;)D[F].moveBy(V,0),F++;E||(V=0),B+=V}M.fromOrientedRange(M.ranges[0]),M.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},b.prototype.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},b.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},b.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},b.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},b.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},b.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},b.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},b.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},b.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},b.prototype.$moveByPage=function(C,E){var O=this.renderer,L=this.renderer.layerConfig,M=C*Math.floor(L.height/L.lineHeight);E===!0?this.selection.$moveSelection(function(){this.moveCursorBy(M,0)}):E===!1&&(this.selection.moveCursorBy(M,0),this.selection.clearSelection());var R=O.scrollTop;O.scrollBy(0,M*L.lineHeight),E!=null&&O.scrollCursorIntoView(null,.5),O.animateScrolling(R)},b.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},b.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},b.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},b.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},b.prototype.scrollPageDown=function(){this.$moveByPage(1)},b.prototype.scrollPageUp=function(){this.$moveByPage(-1)},b.prototype.scrollToRow=function(C){this.renderer.scrollToRow(C)},b.prototype.scrollToLine=function(C,E,O,L){this.renderer.scrollToLine(C,E,O,L)},b.prototype.centerSelection=function(){var C=this.getSelectionRange(),E={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(E,.5)},b.prototype.getCursorPosition=function(){return this.selection.getCursor()},b.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},b.prototype.getSelectionRange=function(){return this.selection.getRange()},b.prototype.selectAll=function(){this.selection.selectAll()},b.prototype.clearSelection=function(){this.selection.clearSelection()},b.prototype.moveCursorTo=function(C,E){this.selection.moveCursorTo(C,E)},b.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},b.prototype.jumpToMatching=function(C,E){var O=this.getCursorPosition(),L=new y(this.session,O.row,O.column),M=L.getCurrentToken(),R=0;M&&M.type.indexOf("tag-name")!==-1&&(M=L.stepBackward());var D=M||L.stepForward();if(!!D){var V,B=!1,A={},I=O.column-D.start,F,P={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;I1?A[D.value]++:M.value===""&&A[D.value]--,A[D.value]===-1&&(V="tag",B=!0));B||(M=D,R++,D=L.stepForward(),I=0)}while(D&&!B);if(!!V){var W,N;if(V==="bracket")W=this.session.getBracketRange(O),W||(W=new m(L.getCurrentTokenRow(),L.getCurrentTokenColumn()+I-1,L.getCurrentTokenRow(),L.getCurrentTokenColumn()+I-1),N=W.start,(E||N.row===O.row&&Math.abs(N.column-O.column)<2)&&(W=this.session.getBracketRange(N)));else if(V==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(W=new m(L.getCurrentTokenRow(),L.getCurrentTokenColumn()-2,L.getCurrentTokenRow(),L.getCurrentTokenColumn()-2),W.compare(O.row,O.column)===0){var j=this.session.getMatchingTags(O);j&&(j.openTag.contains(O.row,O.column)?(W=j.closeTag,N=W.start):(W=j.openTag,j.closeTag.start.row===O.row&&j.closeTag.start.column===O.column?N=W.end:N=W.start))}N=N||W.start}N=W&&W.cursor||N,N&&(C?W&&E?this.selection.setRange(W):W&&W.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(N.row,N.column):this.selection.moveTo(N.row,N.column))}}},b.prototype.gotoLine=function(C,E,O){this.selection.clearSelection(),this.session.unfold({row:C-1,column:E||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(C-1,E||0),this.isRowFullyVisible(C-1)||this.scrollToLine(C-1,!0,O)},b.prototype.navigateTo=function(C,E){this.selection.moveTo(C,E)},b.prototype.navigateUp=function(C){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var E=this.selection.anchor.getPosition();return this.moveCursorToPosition(E)}this.selection.clearSelection(),this.selection.moveCursorBy(-C||-1,0)},b.prototype.navigateDown=function(C){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var E=this.selection.anchor.getPosition();return this.moveCursorToPosition(E)}this.selection.clearSelection(),this.selection.moveCursorBy(C||1,0)},b.prototype.navigateLeft=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorLeft();else{var E=this.getSelectionRange().start;this.moveCursorToPosition(E)}this.clearSelection()},b.prototype.navigateRight=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorRight();else{var E=this.getSelectionRange().end;this.moveCursorToPosition(E)}this.clearSelection()},b.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},b.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},b.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},b.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},b.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},b.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},b.prototype.replace=function(C,E){E&&this.$search.set(E);var O=this.$search.find(this.session),L=0;return O&&(this.$tryReplace(O,C)&&(L=1),this.selection.setSelectionRange(O),this.renderer.scrollSelectionIntoView(O.start,O.end)),L},b.prototype.replaceAll=function(C,E){E&&this.$search.set(E);var O=this.$search.findAll(this.session),L=0;if(!O.length)return L;var M=this.getSelectionRange();this.selection.moveTo(0,0);for(var R=O.length-1;R>=0;--R)this.$tryReplace(O[R],C)&&L++;return this.selection.setSelectionRange(M),L},b.prototype.$tryReplace=function(C,E){var O=this.session.getTextRange(C);return E=this.$search.replace(O,E),E!==null?(C.end=this.session.replace(C,E),C):null},b.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},b.prototype.find=function(C,E,O){E||(E={}),typeof C=="string"||C instanceof RegExp?E.needle=C:typeof C=="object"&&s.mixin(E,C);var L=this.selection.getRange();E.needle==null&&(C=this.session.getTextRange(L)||this.$search.$options.needle,C||(L=this.session.getWordRange(L.start.row,L.start.column),C=this.session.getTextRange(L)),this.$search.set({needle:C})),this.$search.set(E),E.start||this.$search.set({start:L});var M=this.$search.find(this.session);if(E.preventScroll)return M;if(M)return this.revealRange(M,O),M;E.backwards?L.start=L.end:L.end=L.start,this.selection.setRange(L)},b.prototype.findNext=function(C,E){this.find({skipCurrent:!0,backwards:!1},C,E)},b.prototype.findPrevious=function(C,E){this.find(C,{skipCurrent:!0,backwards:!0},E)},b.prototype.revealRange=function(C,E){this.session.unfold(C),this.selection.setSelectionRange(C);var O=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),E!==!1&&this.renderer.animateScrolling(O)},b.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(C){C.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()},b.prototype.setAutoScrollEditorIntoView=function(C){if(!!C){var E,O=this,L=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var M=this.$scrollAnchor;M.style.cssText="position:absolute",this.container.insertBefore(M,this.container.firstChild);var R=this.on("changeSelection",function(){L=!0}),D=this.renderer.on("beforeRender",function(){L&&(E=O.renderer.container.getBoundingClientRect())}),V=this.renderer.on("afterRender",function(){if(L&&E&&(O.isFocused()||O.searchBox&&O.searchBox.isFocused())){var B=O.renderer,A=B.$cursorLayer.$pixelPos,I=B.layerConfig,F=A.top-I.offset;A.top>=0&&F+E.top<0?L=!0:A.topwindow.innerHeight?L=!1:L=null,L!=null&&(M.style.top=F+"px",M.style.left=A.left+"px",M.style.height=I.lineHeight+"px",M.scrollIntoView(L)),L=E=null}});this.setAutoScrollEditorIntoView=function(B){B||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",R),this.renderer.off("afterRender",V),this.renderer.off("beforeRender",D))}}},b.prototype.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",E=this.renderer.$cursorLayer;!E||(E.setSmoothBlinking(/smooth/.test(C)),E.isBlinking=!this.$readOnly&&C!="wide",c.setCssClass(E.element,"ace_slim-cursors",/slim/.test(C)))},b.prototype.prompt=function(C,E,O){var L=this;_.loadModule("ace/ext/prompt",function(M){M.prompt(L,C,E,O)})},b}();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"],["&&","||"],["==","!="]],s.implement(k.prototype,$),_.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(b){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:b})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(b){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(b){this.textInput.setReadOnly(b),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(b){this.textInput.setCopyWithEmptySelection(b)},initialValue:!1},cursorStyle:{set:function(b){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(b){this.setAutoScrollEditorIntoView(b)}},keyboardHandler:{set:function(b){this.setKeyboardHandler(b)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(b){this.session.setValue(b)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(b){this.setSession(b)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(b){this.renderer.$gutterLayer.setShowLineNumbers(b),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),b&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(b){this.$showLineNumbers&&b?S.attach(this):S.detach(this)}},placeholder:{set:function(b){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var C=this.session&&(this.renderer.$composition||this.getValue());if(C&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),c.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!C&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),c.addCssClass(this.container,"ace_hasPlaceholder");var E=c.createElement("div");E.className="ace_placeholder",E.textContent=this.$placeholder||"",this.renderer.placeholderNode=E,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(b){var C={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(L){L.blur(),L.renderer.content.focus()},readOnly:!0},E=function(L){L.target==this.renderer.content&&L.keyCode===T.enter&&(L.stopPropagation(),L.preventDefault(),this.focus())},O="ace_keyboard-focus";b?(this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.content.setAttribute("tabindex",0),this.renderer.content.classList.add(O),this.renderer.content.setAttribute("aria-label","Editor, press Enter key to start editing, press Escape key to exit"),this.renderer.content.addEventListener("keyup",E.bind(this)),this.commands.addCommand(C)):(this.textInput.getElement().setAttribute("tabindex",0),this.renderer.content.setAttribute("tabindex",-1),this.renderer.content.classList.remove(O),this.renderer.content.setAttribute("aria-label",""),this.renderer.content.removeEventListener("keyup",E.bind(this)),this.commands.removeCommand(C))},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",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 S={getText:function(b,C){return(Math.abs(b.selection.lead.row-C)||C+1+(C<9?"\xB7":""))+""},getWidth:function(b,C,E){return Math.max(C.toString().length,(E.lastRow+1).toString().length,2)*E.characterWidth},update:function(b,C){C.renderer.$loop.schedule(C.renderer.CHANGE_GUTTER)},attach:function(b){b.renderer.$gutterLayer.$renderer=this,b.on("changeSelection",this.update),this.update(null,b)},detach:function(b){b.renderer.$gutterLayer.$renderer==this&&(b.renderer.$gutterLayer.$renderer=null),b.off("changeSelection",this.update),this.update(null,b)}};h.Editor=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,h,p){var g=function(){function y(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return y.prototype.addSession=function(w){this.$session=w},y.prototype.add=function(w,q,T){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),q===!1||!this.lastDeltas){this.lastDeltas=[];var k=this.$undoStack.length;k>this.$undoDepth-1&&this.$undoStack.splice(0,k-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},y.prototype.addSelection=function(w,q){this.selections.push({value:w,rev:q||this.$rev})},y.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},y.prototype.markIgnored=function(w,q){q==null&&(q=this.$rev+1);for(var T=this.$undoStack,k=T.length;k--;){var S=T[k][0];if(S.id<=w)break;S.id0},y.prototype.canRedo=function(){return this.$redoStack.length>0},y.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},y.prototype.isAtBookmark=function(){return this.$rev===this.mark},y.prototype.toJSON=function(){},y.prototype.fromJSON=function(){},y.prototype.$prettyPrint=function(w){return w?i(w):i(this.$undoStack)+`
---
`+i(this.$redoStack)},y}();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 s(y,w){for(var q=w;q--;){var T=y[q];if(T&&!T[0].ignore){for(;q"+y.end.row+":"+y.end.column}function l(y,w){var q=y.action=="insert",T=w.action=="insert";if(q&&T)if(o(w.start,y.end)>=0)m(w,y,-1);else if(o(w.start,y.start)<=0)m(y,w,1);else return null;else if(q&&!T)if(o(w.start,y.end)>=0)m(w,y,-1);else if(o(w.end,y.start)<=0)m(y,w,-1);else return null;else if(!q&&T)if(o(w.start,y.start)>=0)m(w,y,1);else if(o(w.start,y.start)<=0)m(y,w,1);else return null;else if(!q&&!T)if(o(w.start,y.start)>=0)m(w,y,1);else if(o(w.end,y.start)<=0)m(y,w,-1);else return null;return[w,y]}function d(y,w){for(var q=y.length;q--;)for(var T=0;T=0?m(y,w,-1):(o(y.start,w.start)<=0||m(y,c.fromPoints(w.start,y.start),-1),m(w,y,1));else if(!q&&T)o(w.start,y.end)>=0?m(w,y,-1):(o(w.start,y.start)<=0||m(w,c.fromPoints(y.start,w.start),-1),m(y,w,1));else if(!q&&!T)if(o(w.start,y.end)>=0)m(w,y,-1);else if(o(w.end,y.start)<=0)m(y,w,-1);else{var k,S;return o(y.start,w.start)<0&&(k=y,y=v(y,w.start)),o(y.end,w.end)>0&&(S=v(y,w.end)),$(w.end,y.start,y.end,-1),S&&!k&&(y.lines=S.lines,y.start=S.start,y.end=S.end,S=y),[w,k,S].filter(Boolean)}return[w,y]}function m(y,w,q){$(y.start,w.start,w.end,q),$(y.end,w.start,w.end,q)}function $(y,w,q,T){y.row==(T==1?w:q).row&&(y.column+=T*(q.column-w.column)),y.row+=T*(q.row-w.row)}function v(y,w){var q=y.lines,T=y.end;y.end=a(w);var k=y.end.row-y.start.row,S=q.splice(k,q.length),b=k?w.column:w.column-y.start.column;q.push(S[0].substring(0,b)),S[0]=S[0].substr(b);var C={start:a(w),end:T,lines:S,action:y.action};return C}function x(y,w){w=t(w);for(var q=y.length;q--;){for(var T=y[q],k=0;kv&&(y=$.end.row+1,$=d.getNextFoldLine(y,$),v=$?$.start.row:1/0),y>m){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}x=this.$lines.get(++_),x?x.row=y:(x=this.$lines.createCell(y,l,this.session,i),this.$lines.push(x)),this.$renderCell(x,l,$,y),y++}this._signal("afterRender"),this.$updateGutterWidth(l)},n.prototype.$updateGutterWidth=function(l){var d=this.session,f=d.gutterRenderer||this.$renderer,m=d.$firstLineNumber,$=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||d.$useWrapMode)&&($=d.getLength()+m-1);var v=f?f.getWidth(d,$,l):$.toString().length*l.characterWidth,x=this.$padding||this.$computePadding();v+=x.left+x.right,v!==this.gutterWidth&&!isNaN(v)&&(this.gutterWidth=v,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",v))},n.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var l=this.session.selection.getCursor();this.$cursorRow!==l.row&&(this.$cursorRow=l.row)}},n.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var l=this.session.selection.cursor.row;if(this.$cursorRow=l,!(this.$cursorCell&&this.$cursorCell.row==l)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var d=this.$lines.cells;this.$cursorCell=null;for(var f=0;f=this.$cursorRow){if(m.row>this.$cursorRow){var $=this.session.getFoldLine(this.$cursorRow);if(f>0&&$&&$.start.row==d[f-1].row)m=d[f-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},n.prototype.scrollLines=function(l){var d=this.config;if(this.config=l,this.$updateCursorRow(),this.$lines.pageChanged(d,l))return this.update(l);this.$lines.moveContainer(l);var f=Math.min(l.lastRow+l.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=f,!d||m0;$--)this.$lines.shift();if(m>f)for(var $=this.session.getFoldedRowCount(f+1,m);$>0;$--)this.$lines.pop();l.firstRowm&&this.$lines.push(this.$renderLines(l,m+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(l)},n.prototype.$renderLines=function(l,d,f){for(var m=[],$=d,v=this.session.getNextFoldLine($),x=v?v.start.row:1/0;$>x&&($=v.end.row+1,v=this.session.getNextFoldLine($,v),x=v?v.start.row:1/0),!($>f);){var _=this.$lines.createCell($,l,this.session,i);this.$renderCell(_,l,v,$),m.push(_),$++}return m},n.prototype.$renderCell=function(l,d,f,m){var $=l.element,v=this.session,x=$.childNodes[0],_=$.childNodes[1],y=$.childNodes[2],w=v.$firstLineNumber,q=v.$breakpoints,T=v.$decorations,k=v.gutterRenderer||this.$renderer,S=this.$showFoldWidgets&&v.foldWidgets,b=f?f.start.row:Number.MAX_VALUE,C=d.lineHeight+"px",E;if(this.$useSvgGutterIcons?(E="ace_gutter-cell_svg-icons ",this.$annotations[m]?(y.className="ace_icon_svg"+this.$annotations[m].className,g.setStyle(y.style,"height",C),g.setStyle(y.style,"display","block")):g.setStyle(y.style,"display","none")):(E="ace_gutter-cell ",g.setStyle(y.style,"display","none")),this.$highlightGutterLine&&(m==this.$cursorRow||f&&m=b&&this.$cursorRow<=f.end.row)&&(E+="ace_gutter-active-line ",this.$cursorCell!=l&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=l)),q[m]&&(E+=q[m]),T[m]&&(E+=T[m]),this.$annotations[m]&&(E+=this.$annotations[m].className),$.className!=E&&($.className=E),S){var O=S[m];O==null&&(O=S[m]=v.getFoldWidget(m))}if(O){var E="ace_fold-widget ace_"+O;O=="start"&&m==b&&mf.right-d.right)return"foldWidgets"},n}();t.prototype.$fixedWidth=!1,t.prototype.$highlightGutterLine=!0,t.prototype.$renderer="",t.prototype.$showLineNumbers=!0,t.prototype.$showFoldWidgets=!0,s.implement(t.prototype,o);function i(n){var l=document.createTextNode("");n.appendChild(l);var d=g.createElement("span");n.appendChild(d);var f=g.createElement("span");return n.appendChild(f),n}h.Gutter=t}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,h,p){var g=e("../range").Range,s=e("../lib/dom"),c=function(){function a(t){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return a.prototype.setPadding=function(t){this.$padding=t},a.prototype.setSession=function(t){this.session=t},a.prototype.setMarkers=function(t){this.markers=t},a.prototype.elt=function(t,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=t},a.prototype.update=function(t){if(!!t){this.config=t,this.i=0;var i;for(var n in this.markers){var l=this.markers[n];if(!l.range){l.update(i,this,this.session,t);continue}var d=l.range.clipRows(t.firstRow,t.lastRow);if(!d.isEmpty())if(d=d.toScreenRange(this.session),l.renderer){var f=this.$getTop(d.start.row,t),m=this.$padding+d.start.column*t.characterWidth;l.renderer(i,d,m,f,t)}else l.type=="fullLine"?this.drawFullLineMarker(i,d,l.clazz,t):l.type=="screenLine"?this.drawScreenLineMarker(i,d,l.clazz,t):d.isMultiLine()?l.type=="text"?this.drawTextMarker(i,d,l.clazz,t):this.drawMultiLineMarker(i,d,l.clazz,t):this.drawSingleLineMarker(i,d,l.clazz+" ace_start ace_br15",t)}if(this.i!=-1)for(;this.iy,v==$),l,v==$?0:1,d)},a.prototype.drawMultiLineMarker=function(t,i,n,l,d){var f=this.$padding,m=l.lineHeight,$=this.$getTop(i.start.row,l),v=f+i.start.column*l.characterWidth;if(d=d||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var x=i.clone();x.end.row=x.start.row,x.end.column=this.session.getLine(x.start.row).length,this.drawBidiSingleLineMarker(t,x,n+" ace_br1 ace_start",l,null,d)}else this.elt(n+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+$+"px;left:"+v+"px;"+(d||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var x=i.clone();x.start.row=x.end.row,x.start.column=0,this.drawBidiSingleLineMarker(t,x,n+" ace_br12",l,null,d)}else{$=this.$getTop(i.end.row,l);var _=i.end.column*l.characterWidth;this.elt(n+" ace_br12","height:"+m+"px;width:"+_+"px;top:"+$+"px;left:"+f+"px;"+(d||""))}if(m=(i.end.row-i.start.row-1)*l.lineHeight,!(m<=0)){$=this.$getTop(i.start.row+1,l);var y=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(y?" ace_br"+y:""),"height:"+m+"px;right:0;top:"+$+"px;left:"+f+"px;"+(d||""))}},a.prototype.drawSingleLineMarker=function(t,i,n,l,d,f){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(t,i,n,l,d,f);var m=l.lineHeight,$=(i.end.column+(d||0)-i.start.column)*l.characterWidth,v=this.$getTop(i.start.row,l),x=this.$padding+i.start.column*l.characterWidth;this.elt(n,"height:"+m+"px;width:"+$+"px;top:"+v+"px;left:"+x+"px;"+(f||""))},a.prototype.drawBidiSingleLineMarker=function(t,i,n,l,d,f){var m=l.lineHeight,$=this.$getTop(i.start.row,l),v=this.$padding,x=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);x.forEach(function(_){this.elt(n,"height:"+m+"px;width:"+(_.width+(d||0))+"px;top:"+$+"px;left:"+(v+_.left)+"px;"+(f||""))},this)},a.prototype.drawFullLineMarker=function(t,i,n,l,d){var f=this.$getTop(i.start.row,l),m=l.lineHeight;i.start.row!=i.end.row&&(m+=this.$getTop(i.end.row,l)-f),this.elt(n,"height:"+m+"px;top:"+f+"px;left:0;right:0;"+(d||""))},a.prototype.drawScreenLineMarker=function(t,i,n,l,d){var f=this.$getTop(i.start.row,l),m=l.lineHeight;this.elt(n,"height:"+m+"px;top:"+f+"px;left:0;right:0;"+(d||""))},a}();c.prototype.$padding=0;function o(a,t,i,n){return(a?1:0)|(t?2:0)|(i?4:0)|(n?8:0)}h.Marker=c}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(e,h,p){var g=e("../lib/oop"),s=e("../lib/dom"),c=e("../lib/lang"),o=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,t=function(){function i(n){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return i.prototype.$updateEolChar=function(){var n=this.session.doc,l=n.getNewLineCharacter()==`
`&&n.getNewLineMode()!="windows",d=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},i.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",function(l){this._signal("changeCharacterSize",l)}.bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},i.prototype.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,typeof n=="string"?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides===n?!1:(this.$highlightIndentGuides=n,n)},i.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var l=this.$tabStrings=[0],d=1;dw&&(_=y.end.row+1,y=this.session.getNextFoldLine(_,y),w=y?y.start.row:1/0),!(_>m);){var q=$[v++];if(q){this.dom.removeChildren(q),this.$renderLine(q,_,_==w?y:!1),x&&(q.style.top=this.$lines.computeLineTop(_,n,this.session)+"px");var T=n.lineHeight*this.session.getRowLength(_)+"px";q.style.height!=T&&(x=!0,q.style.height=T)}_++}if(x)for(;v0;m--)this.$lines.shift();if(l.lastRow>n.lastRow)for(var m=this.session.getFoldedRowCount(n.lastRow+1,l.lastRow);m>0;m--)this.$lines.pop();n.firstRowl.lastRow&&this.$lines.push(this.$renderLinesFragment(n,l.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(n,l,d){for(var f=[],m=l,$=this.session.getNextFoldLine(m),v=$?$.start.row:1/0;m>v&&(m=$.end.row+1,$=this.session.getNextFoldLine(m,$),v=$?$.start.row:1/0),!(m>d);){var x=this.$lines.createCell(m,n,this.session),_=x.element;this.dom.removeChildren(_),s.setStyle(_.style,"height",this.$lines.computeLineHeight(m,n,this.session)+"px"),s.setStyle(_.style,"top",this.$lines.computeLineTop(m,n,this.session)+"px"),this.$renderLine(_,m,m==v?$:!1),this.$useLineGroups()?_.className="ace_line_group":_.className="ace_line",f.push(x),m++}return f},i.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var l=n.firstRow,d=n.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(n,l,d))},i.prototype.$renderToken=function(n,l,d,f){for(var m=this,$=/(\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,v=this.dom.createFragment(this.element),x,_=0;x=$.exec(f);){var y=x[1],w=x[2],q=x[3],T=x[4],k=x[5];if(!(!m.showSpaces&&w)){var S=_!=x.index?f.slice(_,x.index):"";if(_=x.index+x[0].length,S&&v.appendChild(this.dom.createTextNode(S,this.element)),y){var b=m.session.getScreenTabSize(l+x.index);v.appendChild(m.$tabStrings[b].cloneNode(!0)),l+=b-1}else if(w)if(m.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=c.stringRepeat(m.SPACE_CHAR,w.length),v.appendChild(C)}else v.appendChild(this.com.createTextNode(w,this.element));else if(q){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=c.stringRepeat(m.SPACE_CHAR,q.length),v.appendChild(C)}else if(T){l+=1;var C=this.dom.createElement("span");C.style.width=m.config.characterWidth*2+"px",C.className=m.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=m.showSpaces?m.SPACE_CHAR:T,v.appendChild(C)}else if(k){l+=1;var C=this.dom.createElement("span");C.style.width=m.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=k,v.appendChild(C)}}}if(v.appendChild(this.dom.createTextNode(_?f.slice(_):f,this.element)),this.$textToken[d.type])n.appendChild(v);else{var E="ace_"+d.type.replace(/\./g," ace_"),C=this.dom.createElement("span");d.type=="fold"&&(C.style.width=d.value.length*this.config.characterWidth+"px"),C.className=E,C.appendChild(v),n.appendChild(C)}return l+f.length},i.prototype.renderIndentGuide=function(n,l,d){var f=l.search(this.$indentGuideRe);if(f<=0||f>=d)return l;if(l[0]==" "){f-=f%this.tabSize;for(var m=f/this.tabSize,$=0;$$[v].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&n[l.row]!==""&&l.column===n[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var v=l.row+1;v0){for(var m=0;m=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,l)}}else for(var d=n.length-1;d>=0;d--){var f=n[d];if(this.$highlightIndentGuideMarker.end&&f.row=$;)v=this.$renderToken(x,v,y,w.substring(0,$-f)),w=w.substring($-f),f=$,x=this.$createLineElement(),n.appendChild(x),x.appendChild(this.dom.createTextNode(c.stringRepeat("\xA0",d.indent),this.element)),m++,v=0,$=d[m]||Number.MAX_VALUE;w.length!=0&&(f+=w.length,v=this.$renderToken(x,v,y,w))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(x,v,null,"",!0)},i.prototype.$renderSimpleLine=function(n,l){for(var d=0,f=0;fthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,d,m,$);d=this.$renderToken(n,d,m,$)}}},i.prototype.$renderOverflowMessage=function(n,l,d,f,m){d&&this.$renderToken(n,l,d,f.slice(0,this.MAX_LINE_LENGTH-l));var $=this.dom.createElement("span");$.className="ace_inline_button ace_keyword ace_toggle_wrap",$.textContent=m?"":"",n.appendChild($)},i.prototype.$renderLine=function(n,l,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(l)),d)var f=this.$getFoldLineTokens(l,d);else var f=this.session.getTokens(l);var m=n;if(f.length){var $=this.session.getRowSplitData(l);if($&&$.length){this.$renderWrappedLine(n,f,$);var m=n.lastChild}else{var m=n;this.$useLineGroups()&&(m=this.$createLineElement(),n.appendChild(m)),this.$renderSimpleLine(m,f)}}else this.$useLineGroups()&&(m=this.$createLineElement(),n.appendChild(m));if(this.showEOL&&m){d&&(l=d.end.row);var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_eol",v.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(v)}},i.prototype.$getFoldLineTokens=function(n,l){var d=this.session,f=[];function m(v,x,_){for(var y=0,w=0;w+v[y].value.length_-x&&(q=q.substring(0,_-x)),f.push({type:v[y].type,value:q}),w=x+q.length,y+=1}for(;w<_&&y_?f.push({type:v[y].type,value:q.substring(0,_-w)}):f.push(v[y]),w+=q.length,y+=1}}var $=d.getTokens(n);return l.walk(function(v,x,_,y,w){v!=null?f.push({type:"fold",value:v}):(w&&($=d.getTokens(x)),$.length&&m($,y,_))},l.end.row,this.session.getLine(l.end.row).length),f},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();t.prototype.$textToken={text:!0,rparen:!0,lparen:!0},t.prototype.EOF_CHAR="\xB6",t.prototype.EOL_CHAR_LF="\xAC",t.prototype.EOL_CHAR_CRLF="\xA4",t.prototype.EOL_CHAR=t.prototype.EOL_CHAR_LF,t.prototype.TAB_CHAR="\u2014",t.prototype.SPACE_CHAR="\xB7",t.prototype.$padding=0,t.prototype.MAX_LINE_LENGTH=1e4,t.prototype.showInvisibles=!1,t.prototype.showSpaces=!1,t.prototype.showTabs=!1,t.prototype.showEOL=!1,t.prototype.displayIndentGuides=!0,t.prototype.$highlightIndentGuides=!0,t.prototype.$tabStrings=[],t.prototype.destroy={},t.prototype.onChangeTabSize=t.prototype.$computeTabString,g.implement(t.prototype,a),h.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,h,p){var g=e("../lib/dom"),s=function(){function c(o){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.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 c.prototype.$updateOpacity=function(o){for(var a=this.cursors,t=a.length;t--;)g.setStyle(a[t].style,"opacity",o?"":"0")},c.prototype.$startCssAnimation=function(){for(var o=this.cursors,a=o.length;a--;)o[a].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},c.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},c.prototype.setPadding=function(o){this.$padding=o},c.prototype.setSession=function(o){this.session=o},c.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},c.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},c.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,g.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},c.prototype.addCursor=function(){var o=g.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},c.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},c.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),o(!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 a=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),a()},this.blinkInterval),a()}},c.prototype.getPixelPosition=function(o,a){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(o),i=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,o.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),n=(t.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},c.prototype.isCursorInView=function(o,a){return o.top>=0&&o.topo.height+o.offset||l.top<0)&&t>1)){var d=this.cursors[i++]||this.addCursor(),f=d.style;this.drawCursor?this.drawCursor(d,l,o,a[t],this.session):this.isCursorInView(l,o)?(g.setStyle(f,"display","block"),g.translate(d,l.left,l.top),g.setStyle(f,"width",Math.round(o.characterWidth)+"px"),g.setStyle(f,"height",o.lineHeight+"px")):g.setStyle(f,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=l,this.restartTimer()},c.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},c.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},c}();s.prototype.$padding=0,s.prototype.drawCursor=null,h.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,h,p){var g=this&&this.__extends||function(){var d=function(f,m){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&($[x]=v[x])},d(f,m)};return function(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");d(f,m);function $(){this.constructor=f}f.prototype=m===null?Object.create(m):($.prototype=m.prototype,new $)}}(),s=e("./lib/oop"),c=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,t=32768,i=function(){function d(f,m){this.element=c.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=c.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return d.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},d}();s.implement(i.prototype,a);var n=function(d){g(f,d);function f(m,$){var v=d.call(this,m,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,$.$scrollbarWidth=v.width=c.scrollbarWidth(m.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return f.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(m){this.element.style.height=m+"px"},f.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>t?(this.coeff=t/m,m=t):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},f.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},f}(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var l=function(d){g(f,d);function f(m,$){var v=d.call(this,m,"-h")||this;return v.scrollLeft=0,v.height=$.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return f.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.setWidth=function(m){this.element.style.width=m+"px"},f.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},f.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},f.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},f}(i);h.ScrollBar=n,h.ScrollBarV=n,h.ScrollBarH=l,h.VScrollBar=n,h.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,h,p){var g=this&&this.__extends||function(){var l=function(d,f){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,$){m.__proto__=$}||function(m,$){for(var v in $)Object.prototype.hasOwnProperty.call($,v)&&(m[v]=$[v])},l(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");l(d,f);function m(){this.constructor=d}d.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}}(),s=e("./lib/oop"),c=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter;c.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 t=function(){function l(d,f){this.element=c.createElement("div"),this.element.className="ace_sb"+f,this.inner=c.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,d.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(d){this.element.style.display=d?"":"none",this.isVisible=d,this.coeff=1},l}();s.implement(t.prototype,a);var i=function(l){g(d,l);function d(f,m){var $=l.call(this,f,"-v")||this;return $.scrollTop=0,$.scrollHeight=0,$.parent=f,$.width=$.VScrollWidth,$.renderer=m,$.inner.style.width=$.element.style.width=($.width||15)+"px",$.$minWidth=0,$}return d.prototype.onMouseDown=function(f,m){if(f==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var $=this,v=m.clientY,x=function(S){v=S.clientY},_=function(){clearInterval(T)},y=m.clientY,w=this.thumbTop,q=function(){if(v!==void 0){var S=$.scrollTopFromThumbTop(w+v-y);S!==$.scrollTop&&$._emit("scroll",{data:S})}};o.capture(this.inner,x,_);var T=setInterval(q,20);return o.preventDefault(m)}var k=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(k)}),o.preventDefault(m)}},d.prototype.getHeight=function(){return this.height},d.prototype.scrollTopFromThumbTop=function(f){var m=f*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(f){this.height=Math.max(0,f),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},d.prototype.setScrollHeight=function(f,m){this.pageHeight===f&&!m||(this.pageHeight=f,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})))},d.prototype.setScrollTop=function(f){this.scrollTop=f,f<0&&(f=0),this.thumbTop=f*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},d}(t);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=function(l){g(d,l);function d(f,m){var $=l.call(this,f,"-h")||this;return $.scrollLeft=0,$.scrollWidth=0,$.height=$.HScrollHeight,$.inner.style.height=$.element.style.height=($.height||12)+"px",$.renderer=m,$}return d.prototype.onMouseDown=function(f,m){if(f==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var $=this,v=m.clientX,x=function(S){v=S.clientX},_=function(){clearInterval(T)},y=m.clientX,w=this.thumbLeft,q=function(){if(v!==void 0){var S=$.scrollLeftFromThumbLeft(w+v-y);S!==$.scrollLeft&&$._emit("scroll",{data:S})}};o.capture(this.inner,x,_);var T=setInterval(q,20);return o.preventDefault(m)}var k=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(k)}),o.preventDefault(m)}},d.prototype.getHeight=function(){return this.isVisible?this.height:0},d.prototype.scrollLeftFromThumbLeft=function(f){var m=f*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},d.prototype.setWidth=function(f){this.width=Math.max(0,f),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},d.prototype.setScrollWidth=function(f,m){this.pageWidth===f&&!m||(this.pageWidth=f,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})))},d.prototype.setScrollLeft=function(f){this.scrollLeft=f,f<0&&(f=0),this.thumbLeft=f*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},d}(t);n.prototype.setInnerWidth=n.prototype.setScrollWidth,h.ScrollBar=i,h.ScrollBarV=i,h.ScrollBarH=n,h.VScrollBar=i,h.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,h,p){var g=e("./lib/event"),s=function(){function c(o,a){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=a||window;var t=this;this._flush=function(i){t.pending=!1;var n=t.changes;if(n&&(g.blockIdle(100),t.changes=0,t.onRender(n)),t.changes){if(t.$recursionLimit--<0)return;t.schedule()}else t.$recursionLimit=2}}return c.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},c.prototype.clear=function(o){var a=this.changes;return this.changes=0,a},c}();h.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,h,p){var g=e("../lib/oop"),s=e("../lib/dom"),c=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),t=e("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",l=200,d=function(){function f(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=c.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return f.prototype.$setMeasureNodeStyles=function(m,$){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",a.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=$?"hidden":"visible"},f.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var $=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=$&&$.width===m.width&&$.height===m.height,this._emit("changeCharacterSize",{data:m})}},f.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function($){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},f.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=o.onIdle(function $(){m.checkForSizeChanges(),o.onIdle($,500)},500)},f.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},f.prototype.$measureSizes=function(m){var $={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/i};return $.width===0||$.height===0?null:$},f.prototype.$measureCharWidth=function(m){this.$main.textContent=c.stringRepeat(m,i);var $=this.$main.getBoundingClientRect();return $.width/i},f.prototype.getCharacterWidth=function(m){var $=this.charSizes[m];return $===void 0&&($=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),$},f.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},f.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},f.prototype.$initTransformMeasureNodes=function(){var m=function($,v){return["div",{style:"position: absolute;top:"+$+"px;left:"+v+"px;"}]};this.els=s.buildDom([m(0,0),m(l,0),m(0,l),m(l,l)],this.el)},f.prototype.transformCoordinates=function(m,$){if(m){var v=this.$getZoom(this.el);m=w(1/v,m)}function x(B,A,I){var F=B[1]*A[0]-B[0]*A[1];return[(-A[1]*I[0]+A[0]*I[1])/F,(+B[1]*I[0]-B[0]*I[1])/F]}function _(B,A){return[B[0]-A[0],B[1]-A[1]]}function y(B,A){return[B[0]+A[0],B[1]+A[1]]}function w(B,A){return[B*A[0],B*A[1]]}this.els||this.$initTransformMeasureNodes();function q(B){var A=B.getBoundingClientRect();return[A.left,A.top]}var T=q(this.els[0]),k=q(this.els[1]),S=q(this.els[2]),b=q(this.els[3]),C=x(_(b,k),_(b,S),_(y(k,S),y(b,T))),E=w(1+C[0],_(k,T)),O=w(1+C[1],_(S,T));if($){var L=$,M=C[0]*L[0]/l+C[1]*L[1]/l+1,R=y(w(L[0],E),w(L[1],O));return y(w(1/M/l,R),T)}var D=_(m,T),V=x(_(E,w(C[0],D)),_(O,w(C[1],D)),D);return w(l,V)},f}();d.prototype.$characterSize={width:0,height:0},g.implement(d.prototype,t),h.FontMetrics=d}),ace.define("ace/css/editor.css",["require","exports","module"],function(e,h,p){p.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_icon_svg{
margin-left: -14px;
float: left;
}
.ace_gutter-cell.ace_error, .ace_icon.ace_error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
background-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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
background-color: crimson;
}
.ace_icon_svg.ace_warning {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
background-color: darkorange;
}
.ace_icon_svg.ace_info {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
background-color: royalblue;
}
.ace_scrollbar {
contain: strict;
position: absolute;
right: 0;
bottom: 0;
z-index: 6;
}
.ace_scrollbar-inner {
position: absolute;
cursor: text;
left: 0;
top: 0;
}
.ace_scrollbar-v{
overflow-x: hidden;
overflow-y: scroll;
top: 0;
}
.ace_scrollbar-h {
overflow-x: scroll;
overflow-y: hidden;
left: 0;
}
.ace_print-margin {
position: absolute;
height: 100%;
}
.ace_text-input {
position: absolute;
z-index: 0;
width: 0.5em;
height: 1em;
opacity: 0;
background: transparent;
-moz-appearance: none;
appearance: none;
border: none;
resize: none;
outline: none;
overflow: hidden;
font: inherit;
padding: 0 1px;
margin: 0 -1px;
contain: strict;
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
/*with \`pre-line\` chrome inserts instead of space*/
white-space: pre!important;
}
.ace_text-input.ace_composition {
background: transparent;
color: inherit;
z-index: 1000;
opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker {
border-bottom: 1px solid;
position: absolute;
border-radius: 0;
margin-top: 1px;
}
[ace_nocontext=true] {
transform: none!important;
filter: none!important;
clip-path: none!important;
mask : none!important;
contain: none!important;
perspective: none!important;
mix-blend-mode: initial!important;
z-index: auto;
}
.ace_layer {
z-index: 1;
position: absolute;
overflow: hidden;
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
word-wrap: normal;
white-space: pre;
height: 100%;
width: 100%;
box-sizing: border-box;
/* setting pointer-events: auto; on node under the mouse, which changes
during scroll, will break mouse wheel scrolling in Safari */
pointer-events: none;
}
.ace_gutter-layer {
position: relative;
width: auto;
text-align: right;
pointer-events: auto;
height: 1000000px;
contain: style size layout;
}
.ace_text-layer {
font: inherit !important;
position: absolute;
height: 1000000px;
width: 1000000px;
contain: style size layout;
}
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
contain: style size layout;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line,
.ace_hidpi .ace_text-layer > .ace_line_group {
contain: strict;
}
.ace_cjk {
display: inline-block;
text-align: center;
}
.ace_cursor-layer {
z-index: 4;
}
.ace_cursor {
z-index: 4;
position: absolute;
box-sizing: border-box;
border-left: 2px solid;
/* workaround for smooth cursor repaintng whole screen in chrome */
transform: translatez(0);
}
.ace_multiselect .ace_cursor {
border-left-width: 1px;
}
.ace_slim-cursors .ace_cursor {
border-left-width: 1px;
}
.ace_overwrite-cursors .ace_cursor {
border-left-width: 0;
border-bottom: 1px solid;
}
.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
opacity: 0;
}
.ace_smooth-blinking .ace_cursor {
transition: opacity 0.18s;
}
.ace_animate-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: step-end;
animation-name: blink-ace-animate;
animation-iteration-count: infinite;
}
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: ease-in-out;
animation-name: blink-ace-animate-smooth;
}
@keyframes blink-ace-animate {
from, to { opacity: 1; }
60% { opacity: 0; }
}
@keyframes blink-ace-animate-smooth {
from, to { opacity: 1; }
45% { opacity: 1; }
60% { opacity: 0; }
85% { opacity: 0; }
}
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 3;
}
.ace_marker-layer .ace_selection {
position: absolute;
z-index: 5;
}
.ace_marker-layer .ace_bracket {
position: absolute;
z-index: 6;
}
.ace_marker-layer .ace_error_bracket {
position: absolute;
border-bottom: 1px solid #DE5555;
border-radius: 0;
}
.ace_marker-layer .ace_active-line {
position: absolute;
z-index: 2;
}
.ace_marker-layer .ace_selected-word {
position: absolute;
z-index: 4;
box-sizing: border-box;
}
.ace_line .ace_fold {
box-sizing: border-box;
display: inline-block;
height: 11px;
margin-top: -2px;
vertical-align: middle;
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
background-repeat: no-repeat, repeat-x;
background-position: center center, top left;
color: transparent;
border: 1px solid black;
border-radius: 2px;
cursor: pointer;
pointer-events: auto;
}
.ace_dark .ace_fold {
}
.ace_fold:hover{
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}
.ace_tooltip {
background-color: #f5f5f5;
border: 1px solid gray;
border-radius: 1px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: black;
max-width: 100%;
padding: 3px 4px;
position: fixed;
z-index: 999999;
box-sizing: border-box;
cursor: default;
white-space: pre;
word-wrap: break-word;
line-height: normal;
font-style: normal;
font-weight: normal;
letter-spacing: normal;
pointer-events: none;
}
.ace_tooltip:focus {
outline: 1px solid black;
}
.ace_gutter-tooltip_header {
font-weight: bold;
}
.ace_gutter-tooltip_body {
padding-top: 5px;
}
.ace_gutter-tooltip .ace_icon {
display: inline-block;
width: 18px;
}
.ace_icon_svg {
display: inline-block;
width: 12px;
vertical-align: top;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 12px;
-webkit-mask-position: center;
}
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
padding-right: 13px;
}
.ace_fold-widget {
box-sizing: border-box;
margin: 0 -12px 0 1px;
display: none;
width: 11px;
vertical-align: top;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: center;
border-radius: 3px;
border: 1px solid transparent;
cursor: pointer;
}
.ace_folding-enabled .ace_fold-widget {
display: inline-block;
}
.ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}
.ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}
.ace_fold-widget:hover {
border: 1px solid rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}
.ace_fold-widget:active {
border: 1px solid rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
* Dark version for fold widgets
*/
.ace_dark .ace_fold-widget {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}
.ace_inline_button {
border: 1px solid lightgray;
display: inline-block;
margin: -1px 8px;
padding: 0 5px;
pointer-events: auto;
cursor: pointer;
}
.ace_inline_button:hover {
border-color: gray;
background: rgba(200,200,200,0.2);
display: inline-block;
pointer-events: auto;
}
.ace_fold-widget.ace_invalid {
background-color: #FFB4B4;
border-color: #DE5555;
}
.ace_fade-fold-widgets .ace_fold-widget {
transition: opacity 0.4s ease 0.05s;
opacity: 0;
}
.ace_fade-fold-widgets:hover .ace_fold-widget {
transition: opacity 0.05s ease 0.05s;
opacity:1;
}
.ace_underline {
text-decoration: underline;
}
.ace_bold {
font-weight: bold;
}
.ace_nobold .ace_bold {
font-weight: normal;
}
.ace_italic {
font-style: italic;
}
.ace_error-marker {
background-color: rgba(255, 0, 0,0.2);
position: absolute;
z-index: 9;
}
.ace_highlight-marker {
background-color: rgba(255, 255, 0,0.2);
position: absolute;
z-index: 8;
}
.ace_mobile-menu {
position: absolute;
line-height: 1.5;
border-radius: 4px;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
background: white;
box-shadow: 1px 3px 2px grey;
border: 1px solid #dcdcdc;
color: black;
}
.ace_dark > .ace_mobile-menu {
background: #333;
color: #ccc;
box-shadow: 1px 3px 2px grey;
border: 1px solid #444;
}
.ace_mobile-button {
padding: 2px;
cursor: pointer;
overflow: hidden;
}
.ace_mobile-button:hover {
background-color: #eee;
opacity:1;
}
.ace_mobile-button:active {
background-color: #ddd;
}
.ace_placeholder {
font-family: arial;
transform: scale(0.9);
transform-origin: left;
white-space: pre;
opacity: 0.7;
margin: 0 10px;
}
.ace_ghost_text {
opacity: 0.5;
font-style: italic;
white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,h,p){var g=e("../lib/dom"),s=e("../lib/oop"),c=e("../lib/event_emitter").EventEmitter,o=function(){function a(t,i){this.canvas=g.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top=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)"},t.element.appendChild(this.canvas)}return a.prototype.$updateDecorators=function(t){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(t){this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height;var n=(t.lastRow+1)*this.lineHeight;nC.priority?1:0}var f=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),f){var m={info:1,warning:2,error:3};f.forEach(function(b){b.priority=m[b.type]||null}),f=f.sort(d);for(var $=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&(k=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round(k-this.halfMinDecorationHeight),q=Math.round(k+this.halfMinDecorationHeight)}l.fillStyle=i[f[v].type]||null,l.fillRect(0,y,this.canvasWidth,q-w)}}var S=this.renderer.session.selection.getCursor();if(S){var _=this.compensateFoldRows(S.row,$),y=Math.round((S.row-_)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,y,this.canvasWidth,2)}},a.prototype.compensateFoldRows=function(t,i){var n=0;if(i&&i.length>0)for(var l=0;li[l].start.row&&t=i[l].end.row&&(n+=i[l].end.row-i[l].start.row);return n},a}();s.implement(o.prototype,c),h.Decorator=o}),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,p){var g=e("./lib/oop"),s=e("./lib/dom"),c=e("./lib/lang"),o=e("./config"),a=e("./layer/gutter").Gutter,t=e("./layer/marker").Marker,i=e("./layer/text").Text,n=e("./layer/cursor").Cursor,l=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,$=e("./renderloop").RenderLoop,v=e("./layer/font_metrics").FontMetrics,x=e("./lib/event_emitter").EventEmitter,_=e("./css/editor.css"),y=e("./layer/decorators").Decorator,w=e("./lib/useragent");s.importCssString(_,"ace_editor.css",!1);var q=function(){function T(k,S){var b=this;this.container=k||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(S),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content);var C=this.$textLayer=new i(this.content);this.canvas=C.element,this.$markerFront=new t(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(E){b.$scrollAnimation||b.session.setScrollTop(E.data-b.scrollMargin.top)}),this.scrollBarH.on("scroll",function(E){b.$scrollAnimation||b.session.setScrollLeft(E.data-b.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(E){b.updateCharacterSize(),b.onResize(!0,b.gutterWidth,b.$size.width,b.$size.height),b._signal("changeCharacterSize",E)}),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=!w.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(),o.resetOptions(this),o._signal("renderer",this)}return T.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(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function(k){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=k,k&&this.scrollMargin.top&&k.getScrollTop()<=0&&k.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(k),this.$markerBack.setSession(k),this.$markerFront.setSession(k),this.$gutterLayer.setSession(k),this.$textLayer.setSession(k),!!k&&(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))},T.prototype.updateLines=function(k,S,b){if(S===void 0&&(S=1/0),this.$changedLines?(this.$changedLines.firstRow>k&&(this.$changedLines.firstRow=k),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function(k){k?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function(k,S,b,C){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var E=this.container;C||(C=E.clientHeight||E.scrollHeight),b||(b=E.clientWidth||E.scrollWidth);var O=this.$updateCachedSize(k,S,b,C);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!b&&!C)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?this.$renderChanges(O|this.$changes,!0):this.$loop.schedule(O|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function(k,S,b,C){C-=this.$extraHeight||0;var E=0,O=this.$size,L={width:O.width,height:O.height,scrollerHeight:O.scrollerHeight,scrollerWidth:O.scrollerWidth};if(C&&(k||O.height!=C)&&(O.height=C,E|=this.CHANGE_SIZE,O.scrollerHeight=O.height,this.$horizScroll&&(O.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(O.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",E=E|this.CHANGE_SCROLL),b&&(k||O.width!=b)){E|=this.CHANGE_SIZE,O.width=b,S==null&&(S=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=S,s.setStyle(this.scrollBarH.element.style,"left",S+"px"),s.setStyle(this.scroller.style,"left",S+this.margin.left+"px"),O.scrollerWidth=Math.max(0,b-S-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var M=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",M),s.setStyle(this.scroller.style,"right",M),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(O.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&(E|=this.CHANGE_FULL)}return O.$dirty=!b||!C,E&&this._signal("resize",L),E},T.prototype.onGutterResize=function(k){var S=this.$showGutter?k:0;S!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,S,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()},T.prototype.adjustWrapLimit=function(){var k=this.$size.scrollerWidth-this.$padding*2,S=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(S,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},T.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},T.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=s.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var S=this.$printMarginEl.style;S.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",S.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var k=this.textarea.style,S=this.$composition;if(!this.$keepTextAreaAtCursor&&!S){s.translate(this.textarea,-100,0);return}var b=this.$cursorLayer.$pixelPos;if(!!b){S&&S.markerRange&&(b=this.$cursorLayer.getPixelPosition(S.markerRange.start,!0));var C=this.layerConfig,E=b.top,O=b.left;E-=C.offset;var L=S&&S.useTextareaForIME||w.isMobile?this.lineHeight:1;if(E<0||E>C.height-L){s.translate(this.textarea,0,0);return}var M=1,R=this.$size.height-L;if(!S)E+=this.lineHeight;else if(S.useTextareaForIME){var D=this.textarea.value;M=this.characterWidth*this.session.$getStringScreenWidth(D)[0]}else E+=this.lineHeight+2;O-=this.scrollLeft,O>this.$size.scrollerWidth-M&&(O=this.$size.scrollerWidth-M),O+=this.gutterWidth+this.margin.left,s.setStyle(k,"height",L+"px"),s.setStyle(k,"width",M+"px"),s.translate(this.textarea,Math.min(O,this.$size.scrollerWidth-M),Math.min(E,R))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var k=this.layerConfig,S=k.lastRow,b=this.session.documentToScreenRow(S,0)*k.lineHeight;return b-this.session.getScrollTop()>k.height-k.lineHeight?S-1:S},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function(k,S,b,C){var E=this.scrollMargin;E.top=k|0,E.bottom=S|0,E.right=C|0,E.left=b|0,E.v=E.top+E.bottom,E.h=E.left+E.right,E.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-E.top),this.updateFull()},T.prototype.setMargin=function(k,S,b,C){var E=this.margin;E.top=k|0,E.bottom=S|0,E.right=C|0,E.left=b|0,E.v=E.top+E.bottom,E.h=E.left+E.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function(k){this.setOption("hScrollBarAlwaysVisible",k)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},T.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,S=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(S-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-S&&(k=this.scrollTop+S,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function(k,S){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!S){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var b=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),b.firstRow!=this.layerConfig.firstRow&&b.firstRowScreen==this.layerConfig.firstRowScreen){var C=this.scrollTop+(b.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;C>0&&(this.scrollTop=C,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}b=this.layerConfig,this.$updateScrollBarV(),k&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-b.offset);var E=b.width+2*this.$padding+"px",O=b.minHeight+"px";s.setStyle(this.content.style,"width",E),s.setStyle(this.content.style,"height",O)}if(k&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-b.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(b):this.$textLayer.scrollLines(b),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(b):this.$gutterLayer.scrollLines(b)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(b),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(b),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(b),this._signal("afterRender",k)},T.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,S=this.$maxLines*this.lineHeight,b=Math.min(S,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(b+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&b>this.$maxPixelHeight&&(b=this.$maxPixelHeight);var C=b<=2*this.lineHeight,E=!C&&k>S;if(b!=this.desiredHeight||this.$size.height!=this.desiredHeight||E!=this.$vScroll){E!=this.$vScroll&&(this.$vScroll=E,this.scrollBarV.setVisible(E));var O=this.container.clientWidth;this.container.style.height=b+"px",this.$updateCachedSize(!0,this.$gutterWidth,O,b),this.desiredHeight=b,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var k=this.session,S=this.$size,b=S.height<=2*this.lineHeight,C=this.session.getScreenLength(),E=C*this.lineHeight,O=this.$getLongestLine(),L=!b&&(this.$hScrollBarAlwaysVisible||S.scrollerWidth-O-2*this.$padding<0),M=this.$horizScroll!==L;M&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var D=S.scrollerHeight+this.lineHeight,V=!this.$maxLines&&this.$scrollPastEnd?(S.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;E+=V;var B=this.scrollMargin;this.session.setScrollTop(Math.max(-B.top,Math.min(this.scrollTop,E-S.scrollerHeight+B.bottom))),this.session.setScrollLeft(Math.max(-B.left,Math.min(this.scrollLeft,O+2*this.$padding-S.scrollerWidth+B.right)));var A=!b&&(this.$vScrollBarAlwaysVisible||S.scrollerHeight-E+V<0||this.scrollTop>B.top),I=R!==A;I&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var F=this.scrollTop%this.lineHeight,P=Math.ceil(D/this.lineHeight)-1,W=Math.max(0,Math.round((this.scrollTop-F)/this.lineHeight)),N=W+P,j,z,H=this.lineHeight;W=k.screenToDocumentRow(W,0);var K=k.getFoldLine(W);K&&(W=K.start.row),j=k.documentToScreenRow(W,0),z=k.getRowLength(W)*H,N=Math.min(k.screenToDocumentRow(N,0),k.getLength()-1),D=S.scrollerHeight+k.getRowLength(N)*H+z,F=this.scrollTop-j*H;var Q=0;return(this.layerConfig.width!=O||M)&&(Q=this.CHANGE_H_SCROLL),(M||I)&&(Q|=this.$updateCachedSize(!0,this.gutterWidth,S.width,S.height),this._signal("scrollbarVisibilityChanged"),I&&(O=this.$getLongestLine())),this.layerConfig={width:O,padding:this.$padding,firstRow:W,firstRowScreen:j,lastRow:N,lineHeight:H,characterWidth:this.characterWidth,minHeight:D,maxHeight:E,offset:F,gutterOffset:H?Math.max(0,Math.ceil((F+S.height-S.scrollerHeight)/H)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(O-this.$padding),Q},T.prototype.$updateLines=function(){if(!!this.$changedLines){var k=this.$changedLines.firstRow,S=this.$changedLines.lastRow;this.$changedLines=null;var b=this.layerConfig;if(!(k>b.lastRow+1)&&!(Sthis.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function(k,S){this.$gutterLayer.addGutterDecoration(k,S)},T.prototype.removeGutterDecoration=function(k,S){this.$gutterLayer.removeGutterDecoration(k,S)},T.prototype.updateBreakpoints=function(k){this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function(k,S,b){this.scrollCursorIntoView(k,b),this.scrollCursorIntoView(S,b)},T.prototype.scrollCursorIntoView=function(k,S,b){if(this.$size.scrollerHeight!==0){var C=this.$cursorLayer.getPixelPosition(k),E=C.left,O=C.top,L=b&&b.top||0,M=b&&b.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+L>O?(S&&R+L>O+this.lineHeight&&(O-=S*this.$size.scrollerHeight),O===0&&(O=-this.scrollMargin.top),this.session.setScrollTop(O)):R+this.$size.scrollerHeight-M=1-this.scrollMargin.top||S>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function(k,S){var b;if(this.$hasCssTransforms){b={top:0,left:0};var C=this.$fontMetrics.transformCoordinates([k,S]);k=C[1]-this.gutterWidth-this.margin.left,S=C[0]}else b=this.scroller.getBoundingClientRect();var E=k+this.scrollLeft-b.left-this.$padding,O=E/this.characterWidth,L=Math.floor((S+this.scrollTop-b.top)/this.lineHeight),M=this.$blockCursor?Math.floor(O):Math.round(O);return{row:L,column:M,side:O-M>0?1:-1,offsetX:E}},T.prototype.screenToTextCoordinates=function(k,S){var b;if(this.$hasCssTransforms){b={top:0,left:0};var C=this.$fontMetrics.transformCoordinates([k,S]);k=C[1]-this.gutterWidth-this.margin.left,S=C[0]}else b=this.scroller.getBoundingClientRect();var E=k+this.scrollLeft-b.left-this.$padding,O=E/this.characterWidth,L=this.$blockCursor?Math.floor(O):Math.round(O),M=Math.floor((S+this.scrollTop-b.top)/this.lineHeight);return this.session.screenToDocumentPosition(M,Math.max(L,0),E)},T.prototype.textToScreenCoordinates=function(k,S){var b=this.scroller.getBoundingClientRect(),C=this.session.documentToScreenPosition(k,S),E=this.$padding+(this.session.$bidiHandler.isBidiRow(C.row,k)?this.session.$bidiHandler.getPosLeft(C.column):Math.round(C.column*this.characterWidth)),O=C.row*this.lineHeight;return{pageX:b.left+E-this.scrollLeft,pageY:b.top+O-this.scrollTop}},T.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function(k){var S=this.session.selection.cursor;this.addToken(k,"composition_placeholder",S.row,S.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function(k,S){var b=this.session.selection.cursor,C=S||{row:b.row,column:b.column};this.removeGhostText();var E=k.split(`
`);this.addToken(E[0],"ghost_text",C.row,C.column),this.$ghostText={text:k,position:{row:C.row,column:C.column}},E.length>1&&(this.$ghostTextWidget={text:E.slice(1).join(`
`),row:C.row,column:C.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},T.prototype.removeGhostText=function(){if(!!this.$ghostText){var k=this.$ghostText.position;this.removeExtraToken(k.row,k.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function(k,S,b,C){var E=this.session;E.bgTokenizer.lines[b]=null;var O={type:S,value:k},L=E.getTokens(b);if(C==null||!L.length)L.push(O);else for(var M=0,R=0;R1||Math.abs(k.$size.height-C)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T}();q.prototype.CHANGE_CURSOR=1,q.prototype.CHANGE_MARKER=2,q.prototype.CHANGE_GUTTER=4,q.prototype.CHANGE_SCROLL=8,q.prototype.CHANGE_LINES=16,q.prototype.CHANGE_TEXT=32,q.prototype.CHANGE_SIZE=64,q.prototype.CHANGE_MARKER_BACK=128,q.prototype.CHANGE_MARKER_FRONT=256,q.prototype.CHANGE_FULL=512,q.prototype.CHANGE_H_SCROLL=1024,q.prototype.$changes=0,q.prototype.$padding=null,q.prototype.$frozen=!1,q.prototype.STEPS=8,g.implement(q.prototype,x),o.defineOptions(q.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&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(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},fadeFoldWidgets:{set:function(T){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),h.VirtualRenderer=q}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,h,p){var g=e("../lib/oop"),s=e("../lib/net"),c=e("../lib/event_emitter").EventEmitter,o=e("../config");function a(l){var d="importScripts('"+s.qualifyURL(l)+"');";try{return new Blob([d],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new f;return m.append(d),m.getBlob("application/javascript")}}function t(l){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var d=a(l),f=window.URL||window.webkitURL,m=f.createObjectURL(d);return new Worker(m)}return new Worker(l)}var i=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,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,c),this.$createWorkerFromOldConfig=function(l,d,f,m,$){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),o.get("packaged")||!e.toUrl)m=m||o.moduleUrl(d,"worker");else{var v=this.$normalizePath;m=m||v(e.toUrl("ace/worker/worker.js",null,"_"));var x={};l.forEach(function(_){x[_]=v(e.toUrl(_,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(m),$&&this.send("importScripts",$),this.$worker.postMessage({init:!0,tlns:x,module:d,classname:f}),this.$worker},this.onMessage=function(l){var d=l.data;switch(d.type){case"event":this._signal(d.name,{data:d.data});break;case"call":var f=this.callbacks[d.id];f&&(f(d.data),delete this.callbacks[d.id]);break;case"error":this.reportError(d.data);break;case"log":window.console&&console.log&&console.log.apply(console,d.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return s.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,d){this.$worker.postMessage({command:l,args:d})},this.call=function(l,d,f){if(f){var m=this.callbackId++;this.callbacks[m]=f,d.push(m)}this.send(l,d)},this.emit=function(l,d){try{d.data&&d.data.err&&(d.data.err={message:d.data.err.message,stack:d.data.err.stack,code:d.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:d.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;!l||(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(i.prototype);var n=function(l,d,f){var m=null,$=!1,v=Object.create(c),x=[],_=new i({messageBuffer:x,terminate:function(){},postMessage:function(w){x.push(w),!!m&&($?setTimeout(y):y())}});_.setEmitSync=function(w){$=w};var y=function(){var w=x.shift();w.command?m[w.command].apply(m,w.args):w.event&&v._signal(w.event,w.data)};return v.postMessage=function(w){_.onMessage({data:w})},v.callback=function(w,q){this.postMessage({type:"call",id:q,data:w})},v.emit=function(w,q){this.postMessage({type:"event",name:w,data:q})},o.loadModule(["worker",d],function(w){for(m=new w[f](v);x.length;)y()}),_};h.UIWorkerClient=n,h.WorkerClient=i,h.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,h,p){var g=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,c=e("./lib/oop"),o=function(){function a(t,i,n,l,d,f){var m=this;this.length=i,this.session=t,this.doc=t.getDocument(),this.mainClass=d,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=n;var $=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=$.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return a.prototype.setup=function(){var t=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=n.addMarker(new g(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(d){var f=i.createAnchor(d.row,d.column);f.$insertRight=!0,f.detach(),t.others.push(f)}),n.setUndoSelect(!1)},a.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new g(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},a.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var t=0;t=this.pos.column&&i.start.column<=this.pos.column+this.length+1,d=i.start.column-this.pos.column;if(this.updateAnchors(t),l&&(this.length+=n),l&&!this.session.$fromUndo){if(t.action==="insert")for(var f=this.others.length-1;f>=0;f--){var m=this.others[f],$={row:m.row,column:m.column+d};this.doc.insertMergedLines($,t.lines)}else if(t.action==="remove")for(var f=this.others.length-1;f>=0;f--){var m=this.others[f],$={row:m.row,column:m.column+d};this.doc.remove(new g($.row,$.column,$.row,$.column-n))}}this.$updating=!1,this.updateMarkers()}},a.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var i=this.others.length;i--;)this.others[i].onChange(t);this.updateMarkers()},a.prototype.updateMarkers=function(){if(!this.$updating){var t=this,i=this.session,n=function(d,f){i.removeMarker(d.markerId),d.markerId=i.addMarker(new g(d.row,d.column,d.row,d.column+t.length),f,null,!1)};n(this.pos,this.mainClass);for(var l=this.others.length;l--;)n(this.others[l],this.othersClass)}},a.prototype.onCursorChange=function(t){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},a.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},a.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var t=this.session.getUndoManager(),i=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],h.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.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,p){var g=e("./range_list").RangeList,s=e("./range").Range,c=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),t=e("./lib/lang"),i=e("./commands/multi_select_commands");h.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=e("./search").Search,l=new n;function d(_,y,w){return l.$options.wrap=!0,l.$options.needle=y,l.$options.backwards=w==-1,l.find(_)}var f=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(_,y){if(!!_){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(_),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),y||this.fromOrientedRange(_);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}_.cursor||(_.cursor=_.end);var q=this.rangeList.add(_);return this.$onAddRange(_),q.length&&this.$onRemoveRange(q),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),y||this.fromOrientedRange(_)}},this.toSingleRange=function(_){_=_||this.ranges[0];var y=this.rangeList.removeAll();y.length&&this.$onRemoveRange(y),_&&this.fromOrientedRange(_)},this.substractPoint=function(_){var y=this.rangeList.substractPoint(_);if(y)return this.$onRemoveRange(y),y[0]},this.mergeOverlappingRanges=function(){var _=this.rangeList.merge();_.length&&this.$onRemoveRange(_)},this.$onAddRange=function(_){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(_),this._signal("addRange",{range:_})},this.$onRemoveRange=function(_){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var y=this.rangeList.ranges.pop();_.push(y),this.rangeCount=0}for(var w=_.length;w--;){var q=this.ranges.indexOf(_[w]);this.ranges.splice(q,1)}this._signal("removeRange",{ranges:_}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),y=y||this.ranges[0],y&&!y.isEqual(this.getRange())&&this.fromOrientedRange(y)},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 _=this.ranges.length?this.ranges:[this.getRange()],y=[],w=0;w<_.length;w++){var q=_[w],T=q.start.row,k=q.end.row;if(T===k)y.push(q.clone());else{for(y.push(new s(T,q.start.column,T,this.session.getLine(T).length));++T1){var _=this.rangeList.ranges,y=_[_.length-1],w=s.fromPoints(_[0].start,y.end);this.toSingleRange(),this.setSelectionRange(w,y.cursor==y.start)}else{var q=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),k=this.rectangularRangeBlock(q,T);k.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(_,y,w){var q=[],T=_.column0;)V--;if(V>0)for(var B=0;q[B].isEmpty();)B++;for(var A=V;A>=B;A--)q[A].isEmpty()&&q.splice(A,1)}return q}}.call(c.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(_){_.cursor||(_.cursor=_.end);var y=this.getSelectionStyle();return _.marker=this.session.addMarker(_,"ace_selection",y),this.session.$selectionMarkers.push(_),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,_},this.removeSelectionMarker=function(_){if(!!_.marker){this.session.removeMarker(_.marker);var y=this.session.$selectionMarkers.indexOf(_);y!=-1&&this.session.$selectionMarkers.splice(y,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(_){for(var y=this.session.$selectionMarkers,w=_.length;w--;){var q=_[w];if(!!q.marker){this.session.removeMarker(q.marker);var T=y.indexOf(q);T!=-1&&y.splice(T,1)}}this.session.selectionMarkerCount=y.length},this.$onAddRange=function(_){this.addSelectionMarker(_.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(_){this.removeSelectionMarkers(_.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(_){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(_){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(_){var y=_.command,w=_.editor;if(!!w.multiSelect){if(y.multiSelectAction)y.multiSelectAction=="forEach"?q=w.forEachSelection(y,_.args):y.multiSelectAction=="forEachLine"?q=w.forEachSelection(y,_.args,!0):y.multiSelectAction=="single"?(w.exitMultiSelectMode(),q=y.exec(w,_.args||{})):q=y.multiSelectAction(w,_.args||{});else{var q=y.exec(w,_.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return q}},this.forEachSelection=function(_,y,w){if(!this.inVirtualSelectionMode){var q=w&&w.keepOrder,T=w==!0||w&&w.$byLines,k=this.session,S=this.selection,b=S.rangeList,C=(q?S:b).ranges,E;if(!C.length)return _.exec?_.exec(this,y||{}):_(this,y||{});var O=S._eventRegistry;S._eventRegistry={};var L=new c(k);this.inVirtualSelectionMode=!0;for(var M=C.length;M--;){if(T)for(;M>0&&C[M].start.row==C[M-1].end.row;)M--;L.fromOrientedRange(C[M]),L.index=M,this.selection=k.selection=L;var R=_.exec?_.exec(this,y||{}):_(this,y||{});!E&&R!==void 0&&(E=R),L.toOrientedRange(C[M])}L.detach(),this.selection=k.selection=S,this.inVirtualSelectionMode=!1,S._eventRegistry=O,S.mergeOverlappingRanges(),S.ranges[0]&&S.fromOrientedRange(S.ranges[0]);var D=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),D&&D.from==D.to&&this.renderer.animateScrolling(D.from),E}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var _="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var y=this.multiSelect.rangeList.ranges,w=[],q=0;q0);S<0&&(S=0),b>=E&&(b=E-1)}var L=this.session.removeFullLines(S,b);L=this.$reAlignText(L,C),this.session.insert({row:S,column:0},L.join(`
`)+`
`),C||(k.start.column=0,k.end.column=L[L.length-1].length),this.selection.setRange(k)}else{T.forEach(function(V){y.substractPoint(V.cursor)});var M=0,R=1/0,D=w.map(function(V){var B=V.cursor,A=_.getLine(B.row),I=A.substr(B.column).search(/\S/g);return I==-1&&(I=0),B.column>M&&(M=B.column),IF?_.insert(A,t.stringRepeat(" ",I-F)):_.remove(new s(A.row,A.column,A.row,A.column-I+F)),V.start.column=V.end.column=M,V.start.row=V.end.row=A.row,V.cursor=V.end}),y.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(_,y){var w=!0,q=!0,T,k,S;return _.map(function(L){var M=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?T==null?(T=M[1].length,k=M[2].length,S=M[3].length,M):(T+k+S!=M[1].length+M[2].length+M[3].length&&(q=!1),T!=M[1].length&&(w=!1),T>M[1].length&&(T=M[1].length),kM[3].length&&(S=M[3].length),M):[L]}).map(y?C:w?q?E:C:O);function b(L){return t.stringRepeat(" ",L)}function C(L){return L[2]?b(T)+L[2]+b(k-L[2].length+S)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function E(L){return L[2]?b(T+k-L[2].length)+L[2]+b(S)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function O(L){return L[2]?b(T)+L[2]+b(S)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(m.prototype);function $(_,y){return _.row==y.row&&_.column==y.column}h.onSessionChange=function(_){var y=_.session;y&&!y.multiSelect&&(y.$selectionMarkers=[],y.selection.$initRangeList(),y.multiSelect=y.selection),this.multiSelect=y&&y.multiSelect;var w=_.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),y&&(y.multiSelect.on("addRange",this.$onAddRange),y.multiSelect.on("removeRange",this.$onRemoveRange),y.multiSelect.on("multiSelect",this.$onMultiSelect),y.multiSelect.on("singleSelect",this.$onSingleSelect),y.multiSelect.lead.on("change",this.$checkMultiselectChange),y.multiSelect.anchor.on("change",this.$checkMultiselectChange)),y&&this.inMultiSelectMode!=y.selection.inMultiSelectMode&&(y.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(_){_.$multiselectOnSessionChange||(_.$onAddRange=_.$onAddRange.bind(_),_.$onRemoveRange=_.$onRemoveRange.bind(_),_.$onMultiSelect=_.$onMultiSelect.bind(_),_.$onSingleSelect=_.$onSingleSelect.bind(_),_.$multiselectOnSessionChange=h.onSessionChange.bind(_),_.$checkMultiselectChange=_.$checkMultiselectChange.bind(_),_.$multiselectOnSessionChange(_),_.on("changeSession",_.$multiselectOnSessionChange),_.on("mousedown",o),_.commands.addCommands(i.defaultCommands),x(_))}function x(_){if(!_.textInput)return;var y=_.textInput.getElement(),w=!1;a.addListener(y,"keydown",function(T){var k=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);_.$blockSelectEnabled&&k?w||(_.renderer.setMouseCursor("crosshair"),w=!0):w&&q()},_),a.addListener(y,"keyup",q,_),a.addListener(y,"blur",q,_);function q(T){w&&(_.renderer.setMouseCursor(""),w=!1)}}h.MultiSelect=v,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(_){v(this),_?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(_){this.$blockSelectEnabled=_},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,h,p){var g=e("../../range").Range,s=h.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(c,o,a){var t=c.getLine(a);return this.foldingStartMarker.test(t)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(c,o,a){return null},this.indentationBlock=function(c,o,a){var t=/\S/,i=c.getLine(o),n=i.search(t);if(n!=-1){for(var l=a||i.length,d=c.getLength(),f=o,m=o;++of){var x=c.getLine(m).length;return new g(f,l,m,x)}}},this.openingBracketBlock=function(c,o,a,t,i){var n={row:a,column:t+1},l=c.$findClosingBracket(o,n,i);if(!!l){var d=c.foldWidgets[l.row];return d==null&&(d=c.getFoldWidget(l.row)),d=="start"&&l.row>n.row&&(l.row--,l.column=c.getLine(l.row).length),g.fromPoints(n,l)}},this.closingBracketBlock=function(c,o,a,t,i){var n={row:a,column:t},l=c.$findOpeningBracket(o,n);if(!!l)return l.column++,n.column--,g.fromPoints(l,n)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,h,p){var g=e("../line_widgets").LineWidgets,s=e("../lib/dom"),c=e("../range").Range;function o(t,i,n){for(var l=0,d=t.length-1;l<=d;){var f=l+d>>1,m=n(i,t[f]);if(m>0)l=f+1;else if(m<0)d=f-1;else return f}return-(l+1)}function a(t,i,n){var l=t.getAnnotations().sort(c.comparePoints);if(!!l.length){var d=o(l,{row:i,column:-1},c.comparePoints);d<0&&(d=-d-1),d>=l.length?d=n>0?0:l.length-1:d===0&&n<0&&(d=l.length-1);var f=l[d];if(!(!f||!n)){if(f.row===i){do f=l[d+=n];while(f&&f.row===i);if(!f)return l.slice()}var m=[];i=f.row;do m[n<0?"unshift":"push"](f),f=l[d+=n];while(f&&f.row==i);return m.length&&m}}}h.showErrorMarker=function(t,i){var n=t.session;n.widgetManager||(n.widgetManager=new g(n),n.widgetManager.attach(t));var l=t.getCursorPosition(),d=l.row,f=n.widgetManager.getWidgetsAtRow(d).filter(function(T){return T.type=="errorMarker"})[0];f?f.destroy():d-=i;var m=a(n,d,i),$;if(m){var v=m[0];l.column=(v.pos&&typeof v.column!="number"?v.pos.sc:v.column)||0,l.row=v.row,$=t.renderer.$gutterLayer.$annotations[l.row]}else{if(f)return;$={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(l.row),t.selection.moveToPosition(l);var x={row:l.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},_=x.el.appendChild(s.createElement("div")),y=x.el.appendChild(s.createElement("div"));y.className="error_widget_arrow "+$.className;var w=t.renderer.$cursorLayer.getPixelPosition(l).left;y.style.left=w+t.renderer.gutterWidth-5+"px",x.el.className="error_widget_wrapper",_.className="error_widget "+$.className,_.innerHTML=$.text.join("
"),_.appendChild(s.createElement("div"));var q=function(T,k,S){if(k===0&&(S==="esc"||S==="return"))return x.destroy(),{command:"null"}};x.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(q),n.widgetManager.removeLineWidget(x),t.off("changeSelection",x.destroy),t.off("changeSession",x.destroy),t.off("mouseup",x.destroy),t.off("change",x.destroy))},t.keyBinding.addKeyboardHandler(q),t.on("changeSelection",x.destroy),t.on("changeSession",x.destroy),t.on("mouseup",x.destroy),t.on("change",x.destroy),t.session.widgetManager.addLineWidget(x),x.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:x.el.offsetHeight})},s.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,p){e("./loader_build")(h);var g=e("./lib/dom"),s=e("./range").Range,c=e("./editor").Editor,o=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,t=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(i,n){if(typeof i=="string"){var l=i;if(i=document.getElementById(l),!i)throw new Error("ace.edit can't find div #"+l)}if(i&&i.env&&i.env.editor instanceof c)return i.env.editor;var d="";if(i&&/input|textarea/i.test(i.tagName)){var f=i;d=f.value,i=g.createElement("pre"),f.parentNode.replaceChild(i,f)}else i&&(d=i.textContent,i.innerHTML="");var m=h.createEditSession(d),$=new c(new t(i),m,n),v={document:m,editor:$,onResize:$.resize.bind($,null)};return f&&(v.textarea=f),$.on("destroy",function(){v.editor.container.env=null}),$.container.env=$.env=v,$},h.createEditSession=function(i,n){var l=new o(i,n);return l.setUndoManager(new a),l},h.Range=s,h.Editor=c,h.EditSession=o,h.UndoManager=a,h.VirtualRenderer=t,h.version=h.config.version}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e);for(var h in e)e.hasOwnProperty(h)&&(window.ace[h]=e[h]);window.ace.default=window.ace,r&&(r.exports=window.ace)})}()})(ace$2);var ace$1=ace$2.exports,themeSqlserver={exports:{}};(function(r,u){ace.define("ace/theme/sqlserver.css",["require","exports","module"],function(e,h,p){p.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,p){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){r&&(r.exports=e)})}()})(themeSqlserver);var modeJavascript={exports:{}};(function(r,u){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,h,p){var g=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,c=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},c.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};g.inherits(c,s),c.getTagRule=function(o){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},c.getStartRule=function(o){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:o}},c.getEndRule=function(o){return{token:"comment.doc",regex:"\\*\\/",next:o}},h.DocCommentHighlightRules=c}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,h,p){function g(){var n=t.replace("\\d","\\d\\-"),l={onMatch:function(f,m,$){var v=f.charAt(1)=="/"?2:1;return v==1?(m!=this.nextState?$.unshift(this.next,this.nextState,0):$.unshift(this.next),$[2]++):v==2&&m==this.nextState&&($[1]--,(!$[1]||$[1]<0)&&($.shift(),$.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:f.slice(0,v)},{type:"meta.tag.tag-name.xml",value:f.substr(v)}]},regex:"?"+n+"",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var d={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[d,l,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(f,m,$){return m==$[0]&&$.shift(),f.length==2&&($[0]==this.nextState&&$[1]--,(!$[1]||$[1]<0)&&$.splice(0,2)),this.next=$[0]||"start",[{type:this.token,value:f}]},nextState:"jsx"},d,s("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:n},{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"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function s(n){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var c=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,t="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",i=function(n){var l=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"),d="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",f="\\\\(?: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:[o.getStartRule("doc-start"),s("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:"("+t+")(\\.)(prototype)(\\.)("+t+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+t+")(\\.)("+t+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+t+")(\\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:"("+t+")(\\.)("+t+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+t+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+t+")(\\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:"(?:"+d+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:l,regex:t},{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:"("+t+")(\\.)("+t+")(\\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:t},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),s("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:[s("function_arguments"),{token:"variable.parameter",regex:t},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!n||!n.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,$,v){if(this.next=m=="{"?this.nextState:"",m=="{"&&v.length)v.unshift("start",$);else if(m=="}"&&v.length&&(v.shift(),this.next=v.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:f},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+t+")(\\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"}),(!n||n.jsx!=0)&&g.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};c.inherits(i,a),h.JavaScriptHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,p){var g=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(c,o){return/^\s+$/.test(c)?/^\s*\}/.test(o):!1},this.autoOutdent=function(c,o){var a=c.getLine(o),t=a.match(/^(\s*\})/);if(!t)return 0;var i=t[1].length,n=c.findMatchingBracket({row:o,column:i});if(!n||n.row==o)return 0;var l=this.$getIndent(c.getLine(n.row));c.replace(new g(o,0,o,i-1),l)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(s.prototype),h.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,p){var g=e("../../lib/oop"),s=e("../../range").Range,c=e("./fold_mode").FoldMode,o=h.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};g.inherits(o,c),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(a,t,i){var n=a.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var l=this._getFoldWidgetBase(a,t,i);return!l&&this.startRegionRe.test(n)?"start":l},this.getFoldWidgetRange=function(a,t,i,n){var l=a.getLine(i);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(a,l,i);var d=l.match(this.foldingStartMarker);if(d){var f=d.index;if(d[1])return this.openingBracketBlock(a,d[1],i,f);var m=a.getCommentFoldRange(i,f+d[0].length,1);return m&&!m.isMultiLine()&&(n?m=this.getSectionRange(a,i):t!="all"&&(m=null)),m}if(t!=="markbegin"){var d=l.match(this.foldingStopMarker);if(d){var f=d.index+d[0].length;return d[1]?this.closingBracketBlock(a,d[1],i,f):a.getCommentFoldRange(i,f,-1)}}},this.getSectionRange=function(a,t){var i=a.getLine(t),n=i.search(/\S/),l=t,d=i.length;t+=1;for(var f=t,m=a.getLength();++t$)break;var v=this.getFoldWidgetRange(a,"all",t);if(v){if(v.start.row<=l)break;if(v.isMultiLine())t=v.end.row;else if(n==$)break}f=t}}return new s(l,d,f,a.getLine(f).length)},this.getCommentRegionBlock=function(a,t,i){for(var n=t.search(/\s*$/),l=a.getLength(),d=i,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++id)return new s(d,n,v,t.length)}}.call(o.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,p){var g=e("../lib/oop"),s=e("./text").Mode,c=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,t=e("./behaviour/cstyle").CstyleBehaviour,i=e("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=c,this.$outdent=new o,this.$behaviour=new t,this.foldingRules=new i};g.inherits(n,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,d,f){var m=this.$getIndent(d),$=this.getTokenizer().getLineTokens(d,l),v=$.tokens,x=$.state;if(v.length&&v[v.length-1].type=="comment")return m;if(l=="start"||l=="no_regex"){var _=d.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);_&&(m+=f)}else if(l=="doc-start"){if(x=="start"||x=="no_regex")return"";var _=d.match(/^\s*(\/?)\*/);_&&(_[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(l,d,f){return this.$outdent.checkOutdent(d,f)},this.autoOutdent=function(l,d,f){this.$outdent.autoOutdent(d,f)},this.createWorker=function(l){var d=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return d.attachToDocument(l.getDocument()),d.on("annotate",function(f){l.setAnnotations(f.data)}),d.on("terminate",function(){l.clearAnnotations()}),d},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(n.prototype),h.Mode=n}),function(){ace.require(["ace/mode/javascript"],function(e){r&&(r.exports=e)})}()})(modeJavascript);var modeJson={exports:{}};(function(r,u){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,h,p){var g=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,c=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(c,s),h.JsonHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,p){var g=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(c,o){return/^\s+$/.test(c)?/^\s*\}/.test(o):!1},this.autoOutdent=function(c,o){var a=c.getLine(o),t=a.match(/^(\s*\})/);if(!t)return 0;var i=t[1].length,n=c.findMatchingBracket({row:o,column:i});if(!n||n.row==o)return 0;var l=this.$getIndent(c.getLine(n.row));c.replace(new g(o,0,o,i-1),l)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(s.prototype),h.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,p){var g=e("../../lib/oop"),s=e("../../range").Range,c=e("./fold_mode").FoldMode,o=h.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};g.inherits(o,c),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(a,t,i){var n=a.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var l=this._getFoldWidgetBase(a,t,i);return!l&&this.startRegionRe.test(n)?"start":l},this.getFoldWidgetRange=function(a,t,i,n){var l=a.getLine(i);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(a,l,i);var d=l.match(this.foldingStartMarker);if(d){var f=d.index;if(d[1])return this.openingBracketBlock(a,d[1],i,f);var m=a.getCommentFoldRange(i,f+d[0].length,1);return m&&!m.isMultiLine()&&(n?m=this.getSectionRange(a,i):t!="all"&&(m=null)),m}if(t!=="markbegin"){var d=l.match(this.foldingStopMarker);if(d){var f=d.index+d[0].length;return d[1]?this.closingBracketBlock(a,d[1],i,f):a.getCommentFoldRange(i,f,-1)}}},this.getSectionRange=function(a,t){var i=a.getLine(t),n=i.search(/\S/),l=t,d=i.length;t+=1;for(var f=t,m=a.getLength();++t$)break;var v=this.getFoldWidgetRange(a,"all",t);if(v){if(v.start.row<=l)break;if(v.isMultiLine())t=v.end.row;else if(n==$)break}f=t}}return new s(l,d,f,a.getLine(f).length)},this.getCommentRegionBlock=function(a,t,i){for(var n=t.search(/\s*$/),l=a.getLength(),d=i,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++id)return new s(d,n,v,t.length)}}.call(o.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,h,p){var g=e("../lib/oop"),s=e("./text").Mode,c=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,t=e("./folding/cstyle").FoldMode,i=e("../worker/worker_client").WorkerClient,n=function(){this.HighlightRules=c,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new t};g.inherits(n,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(l,d,f){var m=this.$getIndent(d);if(l=="start"){var $=d.match(/^.*[\{\(\[]\s*$/);$&&(m+=f)}return m},this.checkOutdent=function(l,d,f){return this.$outdent.checkOutdent(d,f)},this.autoOutdent=function(l,d,f){this.$outdent.autoOutdent(d,f)},this.createWorker=function(l){var d=new i(["ace"],"ace/mode/json_worker","JsonWorker");return d.attachToDocument(l.getDocument()),d.on("annotate",function(f){l.setAnnotations(f.data)}),d.on("terminate",function(){l.clearAnnotations()}),d},this.$id="ace/mode/json"}.call(n.prototype),h.Mode=n}),function(){ace.require(["ace/mode/json"],function(e){r&&(r.exports=e)})}()})(modeJson);var modeCss={exports:{}};(function(r,u){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,h,p){var g=e("../lib/oop");e("../lib/lang");var s=e("./text_highlight_rules").TextHighlightRules,c=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",o=h.supportFunction="rgb|rgba|url|attr|counter|counters",a=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",t=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",i=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",n=h.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=h.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=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",f=function(){var m=this.createKeywordMapper({"support.function":o,"support.constant":a,"support.type":c,"support.constant.color":t,"support.constant.fonts":i},"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:n},{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:"("+n+")(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:n},{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:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{include:"url"},{token:m,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(f,s),h.CssHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,p){var g=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(c,o){return/^\s+$/.test(c)?/^\s*\}/.test(o):!1},this.autoOutdent=function(c,o){var a=c.getLine(o),t=a.match(/^(\s*\})/);if(!t)return 0;var i=t[1].length,n=c.findMatchingBracket({row:o,column:i});if(!n||n.row==o)return 0;var l=this.$getIndent(c.getLine(n.row));c.replace(new g(o,0,o,i-1),l)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(s.prototype),h.MatchingBraceOutdent=s}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,h,p){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}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var c=document.createElement("c").style;for(var o in c)if(typeof c[o]=="string"){var a=o.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()});g.hasOwnProperty(a)||(g[a]=1)}}this.completionsDefined=!0},this.getCompletions=function(c,o,a,t){if(this.completionsDefined||this.defineCompletions(),c==="ruleset"||o.$mode.$id=="ace/mode/scss"){var i=o.getLine(a.row).substr(0,a.column),n=/\([^)]*$/.test(i);return n&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(c,o,a,t)):this.getPropertyCompletions(c,o,a,t,n)}return[]},this.getPropertyCompletions=function(c,o,a,t,i){i=i||!1;var n=Object.keys(g);return n.map(function(l){return{caption:l,snippet:l+": $0"+(i?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(c,o,a,t){var i=o.getLine(a.row).substr(0,a.column),n=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!n)return[];var l=[];return n in g&&typeof g[n]=="object"&&(l=Object.keys(g[n])),l.map(function(d){return{caption:d,snippet:d,meta:"property value",score:1e6}})}}).call(s.prototype),h.CssCompletions=s}),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,p){var g=e("../../lib/oop");e("../behaviour").Behaviour;var s=e("./cstyle").CstyleBehaviour,c=e("../../token_iterator").TokenIterator,o=function(){this.inherit(s),this.add("colon","insertion",function(a,t,i,n,l){if(l===":"&&i.selection.isEmpty()){var d=i.getCursorPosition(),f=new c(n,d.row,d.column),m=f.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=f.stepBackward()),m&&m.type==="support.type"){var $=n.doc.getLine(d.row),v=$.substring(d.column,d.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test($.substring(d.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(a,t,i,n,l){var d=n.doc.getTextRange(l);if(!l.isMultiLine()&&d===":"){var f=i.getCursorPosition(),m=new c(n,f.row,f.column),$=m.getCurrentToken();if($&&$.value.match(/\s+/)&&($=m.stepBackward()),$&&$.type==="support.type"){var v=n.doc.getLine(l.start.row),x=v.substring(l.end.column,l.end.column+1);if(x===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(a,t,i,n,l){if(l===";"&&i.selection.isEmpty()){var d=i.getCursorPosition(),f=n.doc.getLine(d.row),m=f.substring(d.column,d.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(a,t,i,n,l){if(l==="!"&&i.selection.isEmpty()){var d=i.getCursorPosition(),f=n.doc.getLine(d.row);if(/^\s*(;|}|$)/.test(f.substring(d.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(o,s),h.CssBehaviour=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,p){var g=e("../../lib/oop"),s=e("../../range").Range,c=e("./fold_mode").FoldMode,o=h.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};g.inherits(o,c),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(a,t,i){var n=a.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var l=this._getFoldWidgetBase(a,t,i);return!l&&this.startRegionRe.test(n)?"start":l},this.getFoldWidgetRange=function(a,t,i,n){var l=a.getLine(i);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(a,l,i);var d=l.match(this.foldingStartMarker);if(d){var f=d.index;if(d[1])return this.openingBracketBlock(a,d[1],i,f);var m=a.getCommentFoldRange(i,f+d[0].length,1);return m&&!m.isMultiLine()&&(n?m=this.getSectionRange(a,i):t!="all"&&(m=null)),m}if(t!=="markbegin"){var d=l.match(this.foldingStopMarker);if(d){var f=d.index+d[0].length;return d[1]?this.closingBracketBlock(a,d[1],i,f):a.getCommentFoldRange(i,f,-1)}}},this.getSectionRange=function(a,t){var i=a.getLine(t),n=i.search(/\S/),l=t,d=i.length;t+=1;for(var f=t,m=a.getLength();++t$)break;var v=this.getFoldWidgetRange(a,"all",t);if(v){if(v.start.row<=l)break;if(v.isMultiLine())t=v.end.row;else if(n==$)break}f=t}}return new s(l,d,f,a.getLine(f).length)},this.getCommentRegionBlock=function(a,t,i){for(var n=t.search(/\s*$/),l=a.getLength(),d=i,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++id)return new s(d,n,v,t.length)}}.call(o.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,p){var g=e("../lib/oop"),s=e("./text").Mode,c=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,t=e("./css_completions").CssCompletions,i=e("./behaviour/css").CssBehaviour,n=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=c,this.$outdent=new o,this.$behaviour=new i,this.$completer=new t,this.foldingRules=new n};g.inherits(l,s),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(d,f,m){var $=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,d).tokens;if(v.length&&v[v.length-1].type=="comment")return $;var x=f.match(/^.*\{\s*$/);return x&&($+=m),$},this.checkOutdent=function(d,f,m){return this.$outdent.checkOutdent(f,m)},this.autoOutdent=function(d,f,m){this.$outdent.autoOutdent(f,m)},this.getCompletions=function(d,f,m,$){return this.$completer.getCompletions(d,f,m,$)},this.createWorker=function(d){var f=new a(["ace"],"ace/mode/css_worker","Worker");return f.attachToDocument(d.getDocument()),f.on("annotate",function(m){d.setAnnotations(m.data)}),f.on("terminate",function(){d.clearAnnotations()}),f},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(l.prototype),h.Mode=l}),function(){ace.require(["ace/mode/css"],function(e){r&&(r.exports=e)})}()})(modeCss);var extLanguage_tools={exports:{}};(function(r,u){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,p){function g(y){var w=new Date().toLocaleString("en-us",y);return w.length==1?"0"+w:w}var s=e("./lib/dom"),c=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),t=e("./range").Range,i=e("./range_list").RangeList,n=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,d=e("./clipboard"),f={CURRENT_WORD:function(y){return y.session.getTextRange(y.session.getWordRange())},SELECTION:function(y,w,q){var T=y.session.getTextRange();return q?T.replace(/\n\r?([ \t]*\S)/g,`
`+q+"$1"):T},CURRENT_LINE:function(y){return y.session.getLine(y.getCursorPosition().row)},PREV_LINE:function(y){return y.session.getLine(y.getCursorPosition().row-1)},LINE_INDEX:function(y){return y.getCursorPosition().row},LINE_NUMBER:function(y){return y.getCursorPosition().row+1},SOFT_TABS:function(y){return y.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(y){return y.session.getTabSize()},CLIPBOARD:function(y){return d.getText&&d.getText()},FILENAME:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0]},FILENAME_BASE:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(y){return this.FILEPATH(y).replace(/[^/\\]*$/,"")},FILEPATH:function(y){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(y){var w=y.session.$mode||{};return w.blockComment&&w.blockComment.start||""},BLOCK_COMMENT_END:function(y){var w=y.session.$mode||{};return w.blockComment&&w.blockComment.end||""},LINE_COMMENT:function(y){var w=y.session.$mode||{};return w.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"})};f.SELECTED_TEXT=f.SELECTION;var m=function(){this.snippetMap={},this.snippetNameMap={}};(function(){c.implement(this,o),this.getTokenizer=function(){return m.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function w(k){return k=k.substr(1),/^\d+$/.test(k)?[{tabstopId:parseInt(k,10)}]:[{text:k}]}function q(k){return"(?:[^\\\\"+k+"]|\\\\.)"}var T={regex:"/("+q("/")+"+)/",onMatch:function(k,S,b){var C=b[0];return C.fmtString=!0,C.guard=k.slice(1,-1),C.flag="",""},next:"formatString"};return m.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(k,S,b){var C=k[1];return(C=="}"&&b.length||"`$\\".indexOf(C)!=-1)&&(k=C),[k]}},{regex:/}/,onMatch:function(k,S,b){return[b.length?b.shift():k]}},{regex:/\$(?:\d+|\w+)/,onMatch:w},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(k,S,b){var C=w(k.substr(1));return b.unshift(C[0]),C},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+q("\\|")+"*\\|",onMatch:function(k,S,b){var C=k.slice(1,-1).replace(/\\[,|\\]|,/g,function(E){return E.length==2?E[1]:"\0"}).split("\0").map(function(E){return{value:E}});return b[0].choices=C,[C[0]]},next:"start"},T,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(k,S,b){return b.length&&b[0].expectElse?(b[0].expectElse=!1,b[0].ifEnd={elseEnd:b[0]},[b[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(k,S,b){var C=k[1];return C=="}"&&b.length||"`$\\".indexOf(C)!=-1?k=C:C=="n"?k=`
`:C=="t"?k=" ":"ulULE".indexOf(C)!=-1&&(k={changeCase:C,local:C>"a"}),[k]}},{regex:"/\\w*}",onMatch:function(k,S,b){var C=b.shift();return C&&(C.flag=k.slice(1,-1)),this.next=C&&C.tabstopId?"start":"",[C||k]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(k,S,b){return[{text:k.slice(1)}]}},{regex:/\${\w+/,onMatch:function(k,S,b){var C={text:k.slice(2)};return b.unshift(C),[C]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(k,S,b){var C=b.shift();return this.next=C&&C.tabstopId?"start":"",[C||k]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(k,S,b){var C=b[0];return C.formatFunction=k.slice(2,-1),[b.shift()]},next:"formatString"},T,{regex:/:[\?\-+]?/,onMatch:function(k,S,b){k[1]=="+"&&(b[0].ifEnd=b[0]),k[1]=="?"&&(b[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),m.$tokenizer},this.tokenizeTmSnippet=function(w,q){return this.getTokenizer().getLineTokens(w,q).tokens.map(function(T){return T.value||T})},this.getVariableValue=function(w,q,T){if(/^\d+$/.test(q))return(this.variables.__||{})[q]||"";if(/^[A-Z]\d+$/.test(q))return(this.variables[q[0]+"__"]||{})[q.substr(1)]||"";if(q=q.replace(/^TM_/,""),!this.variables.hasOwnProperty(q))return"";var k=this.variables[q];return typeof k=="function"&&(k=this.variables[q](w,q,T)),k==null?"":k},this.variables=f,this.tmStrFormat=function(w,q,T){if(!q.fmt)return w;var k=q.flag||"",S=q.guard;S=new RegExp(S,k.replace(/[^gim]/g,""));var b=typeof q.fmt=="string"?this.tokenizeTmSnippet(q.fmt,"formatString"):q.fmt,C=this,E=w.replace(S,function(){var O=C.variables.__;C.variables.__=[].slice.call(arguments);for(var L=C.resolveVariables(b,T),M="E",R=0;R1?(P=j[j.length-1].length,F+=j.length-1):P+=N.length,W+=N}else N&&(N.start?N.end={row:F,column:P}:N.start={row:F,column:P})}),{text:W,tabstops:L,tokens:O}};this.getDisplayTextForSnippet=function(w,q){var T=y.call(this,w,q);return T.text},this.insertSnippetForSelection=function(w,q,T){var k=y.call(this,w,q),S=w.getSelectionRange();T&&T.compareRange(S)===0&&(S=T);var b=w.session.replace(S,k.text),C=new $(w),E=w.inVirtualSelectionMode&&w.selection.index;C.addTabstops(k.tabstops,S.start,b,E)},this.insertSnippet=function(w,q,T){var k=this;if(w.inVirtualSelectionMode)return k.insertSnippetForSelection(w,q,T);w.forEachSelection(function(){k.insertSnippetForSelection(w,q,T)},null,{keepOrder:!0}),w.tabstopManager&&w.tabstopManager.tabNext()},this.$getScope=function(w){var q=w.session.$mode.$id||"";if(q=q.split("/").pop(),q==="html"||q==="php"){q==="php"&&!w.session.$mode.inlinePhp&&(q="html");var T=w.getCursorPosition(),k=w.session.getState(T.row);typeof k=="object"&&(k=k[0]),k.substring&&(k.substring(0,3)=="js-"?q="javascript":k.substring(0,4)=="css-"?q="css":k.substring(0,4)=="php-"&&(q="php"))}return q},this.getActiveScopes=function(w){var q=this.$getScope(w),T=[q],k=this.snippetMap;return k[q]&&k[q].includeScopes&&T.push.apply(T,k[q].includeScopes),T.push("_"),T},this.expandWithTab=function(w,q){var T=this,k=w.forEachSelection(function(){return T.expandSnippetForSelection(w,q)},null,{keepOrder:!0});return k&&w.tabstopManager&&w.tabstopManager.tabNext(),k},this.expandSnippetForSelection=function(w,q){var T=w.getCursorPosition(),k=w.session.getLine(T.row),S=k.substring(0,T.column),b=k.substr(T.column),C=this.snippetMap,E;return this.getActiveScopes(w).some(function(O){var L=C[O];return L&&(E=this.findMatchingSnippet(L,S,b)),!!E},this),E?(q&&q.dryRun||(w.session.doc.removeInLine(T.row,T.column-E.replaceBefore.length,T.column+E.replaceAfter.length),this.variables.M__=E.matchBefore,this.variables.T__=E.matchAfter,this.insertSnippetForSelection(w,E.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(w,q,T){for(var k=w.length;k--;){var S=w[k];if(!(S.startRe&&!S.startRe.test(q))&&!(S.endRe&&!S.endRe.test(T))&&!(!S.startRe&&!S.endRe))return S.matchBefore=S.startRe?S.startRe.exec(q):[""],S.matchAfter=S.endRe?S.endRe.exec(T):[""],S.replaceBefore=S.triggerRe?S.triggerRe.exec(q)[0]:"",S.replaceAfter=S.endTriggerRe?S.endTriggerRe.exec(T)[0]:"",S}},this.snippetMap={},this.snippetNameMap={},this.register=function(w,q){function T(O){return O&&!/^\^?\(.*\)\$?$|^\\b$/.test(O)&&(O="(?:"+O+")"),O||""}function k(O,L,M){return O=T(O),L=T(L),M?(O=L+O,O&&O[O.length-1]!="$"&&(O+="$")):(O+=L,O&&O[0]!="^"&&(O="^"+O)),new RegExp(O)}function S(O){O.scope||(O.scope=q||"_"),q=O.scope,b[q]||(b[q]=[],C[q]={});var L=C[q];if(O.name){var M=L[O.name];M&&E.unregister(M),L[O.name]=O}b[q].push(O),O.prefix&&(O.tabTrigger=O.prefix),!O.content&&O.body&&(O.content=Array.isArray(O.body)?O.body.join(`
`):O.body),O.tabTrigger&&!O.trigger&&(!O.guard&&/^\w/.test(O.tabTrigger)&&(O.guard="\\b"),O.trigger=a.escapeRegExp(O.tabTrigger)),!(!O.trigger&&!O.guard&&!O.endTrigger&&!O.endGuard)&&(O.startRe=k(O.trigger,O.guard,!0),O.triggerRe=new RegExp(O.trigger),O.endRe=k(O.endTrigger,O.endGuard,!0),O.endTriggerRe=new RegExp(O.endTrigger))}var b=this.snippetMap,C=this.snippetNameMap,E=this;w||(w=[]),Array.isArray(w)?w.forEach(S):Object.keys(w).forEach(function(O){S(w[O])}),this._signal("registerSnippets",{scope:q})},this.unregister=function(w,q){function T(b){var C=S[b.scope||q];if(C&&C[b.name]){delete C[b.name];var E=k[b.scope||q],O=E&&E.indexOf(b);O>=0&&E.splice(O,1)}}var k=this.snippetMap,S=this.snippetNameMap;w.content?T(w):Array.isArray(w)&&w.forEach(T)},this.parseSnippetFile=function(w){w=w.replace(/\r/g,"");for(var q=[],T={},k=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,S;S=k.exec(w);){if(S[1])try{T=JSON.parse(S[1]),q.push(T)}catch{}if(S[4])T.content=S[4].replace(/^\t/gm,""),q.push(T),T={};else{var b=S[2],C=S[3];if(b=="regex"){var E=/\/((?:[^\/\\]|\\.)*)|$/g;T.guard=E.exec(C)[1],T.trigger=E.exec(C)[1],T.endTrigger=E.exec(C)[1],T.endGuard=E.exec(C)[1]}else b=="snippet"?(T.tabTrigger=C.match(/^\S*/)[0],T.name||(T.name=C)):b&&(T[b]=C)}}return q},this.getSnippetByName=function(w,q){var T=this.snippetNameMap,k;return this.getActiveScopes(q).some(function(S){var b=T[S];return b&&(k=b[w]),!!k},this),k}}).call(m.prototype);var $=function(y){if(y.tabstopManager)return y.tabstopManager;y.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(y)};(function(){this.attach=function(y){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=y,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(y){for(var w=y.action[0]=="r",q=this.selectedTabstop||{},T=q.parents||{},k=(this.tabstops||[]).slice(),S=0;S2&&(this.tabstops.length&&b.push(b.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,b))},this.addTabstopMarkers=function(y){var w=this.editor.session;y.forEach(function(q){q.markerId||(q.markerId=w.addMarker(q,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(y){var w=this.editor.session;y.forEach(function(q){w.removeMarker(q.markerId),q.markerId=null})},this.removeRange=function(y){var w=y.tabstop.indexOf(y);w!=-1&&y.tabstop.splice(w,1),w=this.ranges.indexOf(y),w!=-1&&this.ranges.splice(w,1),w=y.tabstop.rangeList.ranges.indexOf(y),w!=-1&&y.tabstop.splice(w,1),this.editor.session.removeMarker(y.markerId),y.tabstop.length||(w=this.tabstops.indexOf(y.tabstop),w!=-1&&this.tabstops.splice(w,1),this.tabstops.length||this.detach())},this.keyboardHandler=new n,this.keyboardHandler.bindKeys({Tab:function(y){h.snippetManager&&h.snippetManager.expandWithTab(y)||(y.tabstopManager.tabNext(1),y.renderer.scrollCursorIntoView())},"Shift-Tab":function(y){y.tabstopManager.tabNext(-1),y.renderer.scrollCursorIntoView()},Esc:function(y){y.tabstopManager.detach()}})}).call($.prototype);var v=function(y,w){y.row==0&&(y.column+=w.column),y.row+=w.row},x=function(y,w){y.row==w.row&&(y.column-=w.column),y.row-=w.row};s.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 m;var _=e("./editor").Editor;(function(){this.insertSnippet=function(y,w){return h.snippetManager.insertSnippet(this,y,w)},this.expandSnippet=function(y){return h.snippetManager.expandWithTab(this,y)}}).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"],function(e,h,p){var g=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,c=e("../range").Range,o=e("../lib/event"),a=e("../lib/lang"),t=e("../lib/dom"),i=function(d){return"suggest-aria-id:".concat(d)},n=function(d){var f=new g(d);f.$maxLines=4;var m=new s(f);return m.setHighlightActiveLine(!1),m.setShowPrintMargin(!1),m.renderer.setShowGutter(!1),m.renderer.setHighlightGutterLine(!1),m.$mouseHandler.$focusTimeout=0,m.$highlightTagPending=!0,m},l=function(){function d(f){var m=t.createElement("div"),$=new n(m);f&&f.appendChild(m),m.style.display="none",$.renderer.content.style.cursor="default",$.renderer.setStyle("ace_autocomplete"),$.renderer.container.setAttribute("role","listbox"),$.renderer.container.setAttribute("aria-label","Autocomplete suggestions"),$.setOption("displayIndentGuides",!1),$.setOption("dragDelay",150);var v=function(){};$.focus=v,$.$isFocused=!0,$.renderer.$cursorLayer.restartTimer=v,$.renderer.$cursorLayer.element.style.opacity=0,$.renderer.$maxLines=8,$.renderer.$keepTextAreaAtCursor=!1,$.setHighlightActiveLine(!1),$.session.highlight(""),$.session.$searchHighlight.clazz="ace_highlight-marker",$.on("mousedown",function(k){var S=k.getDocumentPosition();$.selection.moveToPosition(S),y.start.row=y.end.row=S.row,k.stop()});var x,_=new c(-1,0,-1,1/0),y=new c(-1,0,-1,1/0);y.id=$.session.addMarker(y,"ace_active-line","fullLine"),$.setSelectOnHover=function(k){k?_.id&&($.session.removeMarker(_.id),_.id=null):_.id=$.session.addMarker(_,"ace_line-hover","fullLine")},$.setSelectOnHover(!1),$.on("mousemove",function(k){if(!x){x=k;return}if(!(x.x==k.x&&x.y==k.y)){x=k,x.scrollTop=$.renderer.scrollTop;var S=x.getDocumentPosition().row;_.start.row!=S&&(_.id||$.setRow(S),q(S))}}),$.renderer.on("beforeRender",function(){if(x&&_.start.row!=-1){x.$pos=null;var k=x.getDocumentPosition().row;_.id||$.setRow(k),q(k,!0)}}),$.renderer.on("afterRender",function(){var k=$.getRow(),S=$.renderer.$textLayer,b=S.element.childNodes[k-S.config.firstRow],C=document.activeElement;if(b!==S.selectedNode&&S.selectedNode&&(t.removeCssClass(S.selectedNode,"ace_selected"),C.removeAttribute("aria-activedescendant"),S.selectedNode.removeAttribute("id")),S.selectedNode=b,b){t.addCssClass(b,"ace_selected");var E=i(k);b.id=E,$.renderer.container.setAttribute("aria-activedescendant",E),C.setAttribute("aria-activedescendant",E),b.setAttribute("role","option"),b.setAttribute("aria-label",$.getData(k).value),b.setAttribute("aria-setsize",$.data.length),b.setAttribute("aria-posinset",k)}});var w=function(){q(-1)},q=function(k,S){k!==_.start.row&&(_.start.row=_.end.row=k,S||$.session._emit("changeBackMarker"),$._emit("changeHoverMarker"))};$.getHoveredRow=function(){return _.start.row},o.addListener($.container,"mouseout",w),$.on("hide",w),$.on("changeSelection",w),$.session.doc.getLength=function(){return $.data.length},$.session.doc.getLine=function(k){var S=$.data[k];return typeof S=="string"?S:S&&S.value||""};var T=$.session.bgTokenizer;return T.$tokenizeRow=function(k){function S(A,I){A&&C.push({type:(b.className||"")+(I||""),value:A})}var b=$.data[k],C=[];if(!b)return C;typeof b=="string"&&(b={value:b});for(var E=b.caption||b.value||b.name,O=E.toLowerCase(),L=($.filterText||"").toLowerCase(),M=0,R=0,D=0;D<=L.length;D++)if(D!=R&&(b.matchMask&1<=R?b="bottom":b="top"),b==="top"?(D.bottom=k.top-this.$borderSize,D.top=D.bottom-R):b==="bottom"&&(D.top=k.top+S+this.$borderSize,D.bottom=D.top+R);var A=D.top>=0&&D.bottom<=O;if(!C&&!A)return!1;A?M.$maxPixelHeight=null:b==="top"?M.$maxPixelHeight=B:M.$maxPixelHeight=V,b==="top"?(E.style.top="",E.style.bottom=O-D.bottom+"px",$.isTopdown=!1):(E.style.top=D.top+"px",E.style.bottom="",$.isTopdown=!0),E.style.display="";var I=k.left;return I+E.offsetWidth>L&&(I=L-E.offsetWidth),E.style.left=I+"px",E.style.right="",$.isOpen||($.isOpen=!0,this._signal("show"),x=null),$.anchorPos=k,$.anchor=b,!0},$.show=function(k,S,b){this.tryShow(k,S,b?"bottom":void 0,!0)},$.goTo=function(k){var S=this.getRow(),b=this.session.getLength()-1;switch(k){case"up":S=S<=0?b:S-1;break;case"down":S=S>=b?-1:S+1;break;case"start":S=0;break;case"end":S=b}this.setRow(S)},$.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},$.$imageSize=0,$.$borderSize=1,$}return d}();t.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #CAD6FA;
z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid #abbffe;
margin-top: -1px;
background: rgba(233,233,253,0.4);
position: absolute;
z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid rgba(109, 150, 13, 0.8);
background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
opacity: 0.5;
margin: 0 0.9em;
}
.ace_completion-message {
color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #93ca12;
}
.ace_editor.ace_autocomplete {
width: 300px;
z-index: 200000;
border: 1px lightgray solid;
position: fixed;
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
line-height: 1.4;
background: #fefefe;
color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
border: 1px #484747 solid;
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
line-height: 1.4;
background: #25282c;
color: #c1c1c1;
}
.ace_autocomplete_right .ace_text-layer {
width: calc(100% - 8px);
}
.ace_autocomplete_right .ace_line {
display: flex;
}
.ace_autocomplete_right .ace_completion-meta {
flex: 1;
text-align: right;
}
`,"autocompletion.css",!1),h.AcePopup=l,h.$singleLineEditor=n,h.getAriaId=i}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(e,h,p){var g=e("../snippets").snippetManager,s=function(){function c(){this.editor=null}return c.prototype.show=function(o,a,t){if(t=t||"",o&&this.editor&&this.editor!==o&&(this.hide(),this.editor=null),!o||!a)return!1;var i=a.snippet?g.getDisplayTextForSnippet(o,a.snippet):a.value;return!i||!i.startsWith(t)?!1:(this.editor=o,i=i.slice(t.length),i===""?o.removeGhostText():o.setGhostText(i),!0)},c.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},c.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},c.prototype.destroy=function(){this.hide(),this.editor=null},c}();h.AceInline=s}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,h,p){h.parForEach=function(s,c,o){var a=0,t=s.length;t===0&&o();for(var i=0;i=0&&o.test(s[t]);t--)a.push(s[t]);return a.reverse().join("")},h.retrieveFollowingIdentifier=function(s,c,o){o=o||g;for(var a=[],t=c;tthis.filterText&&x.lastIndexOf(this.filterText,0)===0)var _=this.filtered;else var _=this.all;this.filterText=x,_=this.filterCompletions(_,this.filterText),_=_.sort(function(w,q){return q.exactMatch-w.exactMatch||q.$score-w.$score||(w.caption||w.value).localeCompare(q.caption||q.value)});var y=null;_=_.filter(function(w){var q=w.snippet||w.caption||w.value;return q===y?!1:(y=q,!0)}),this.filtered=_},v.prototype.filterCompletions=function(x,_){var y=[],w=_.toUpperCase(),q=_.toLowerCase();e:for(var T=0,k;k=x[T];T++){var S=!this.ignoreCaption&&k.caption||k.value||k.snippet;if(!!S){var b=-1,C=0,E=0,O,L;if(this.exactMatch){if(_!==S.substr(0,_.length))continue e}else{var M=S.toLowerCase().indexOf(q);if(M>-1)E=M;else for(var R=0;R<_.length;R++){var D=S.indexOf(q[R],b+1),V=S.indexOf(w[R],b+1);if(O=D>=0&&(V<0||D0&&(b===-1&&(E+=10),E+=L,C|=1<",o.escapeHTML(y.caption),"
","
",o.escapeHTML(n(y.snippet))].join(""))},id:"snippetCompleter"},d=[l,t,i];h.setCompleters=function(y){d.length=0,y&&d.push.apply(d,y)},h.addCompleter=function(y){d.push(y)},h.textCompleter=t,h.keyWordCompleter=i,h.snippetCompleter=l;var f={name:"expandSnippet",exec:function(y){return g.expandWithTab(y)},bindKey:"Tab"},m=function(y,w){$(w.session.$mode)},$=function(y){typeof y=="string"&&(y=c.$modes[y]),!!y&&(g.files||(g.files={}),v(y.$id,y.snippetFileId),y.modes&&y.modes.forEach($))},v=function(y,w){!w||!y||g.files[y]||(g.files[y]={},c.loadModule(w,function(q){!q||(g.files[y]=q,!q.snippets&&q.snippetText&&(q.snippets=g.parseSnippetFile(q.snippetText)),g.register(q.snippets||[],q.scope),q.includeScopes&&(g.snippetMap[q.scope].includeScopes=q.includeScopes,q.includeScopes.forEach(function(T){$("ace/mode/"+T)})))}))},x=function(y){var w=y.editor,q=w.completer&&w.completer.activated;if(y.command.name==="backspace")q&&!a.getCompletionPrefix(w)&&w.completer.detach();else if(y.command.name==="insertstring"){var T=a.getCompletionPrefix(w);if(T&&!q){var k=s.for(w);k.autoInsert=!1,k.showPopup(w)}}},_=e("../editor").Editor;e("../config").defineOptions(_.prototype,"editor",{enableBasicAutocompletion:{set:function(y){y?(this.completers||(this.completers=Array.isArray(y)?y:d),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(y){y?(this.completers||(this.completers=Array.isArray(y)?y:d),this.commands.on("afterExec",x)):this.commands.removeListener("afterExec",x)},value:!1},enableSnippets:{set:function(y){y?(this.commands.addCommand(f),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(f),this.off("changeMode",m))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){r&&(r.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",r=>{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(r){let u=[{meta:"VForm API",caption:"getWidgetRef",value:"getWidgetRef()",score:1},{meta:"VForm API",caption:"getFormRef",value:"getFormRef()",score:1}];r.require("ace/ext/language_tools").addCompleter({getCompletions:function(h,p,g,s,c){return s.length===0?c(null,[]):c(null,u)}})},setJsonMode(){this.aceEditor.getSession().setMode("ace/mode/json")},setCssMode(){this.aceEditor.getSession().setMode("ace/mode/css")},getEditorAnnotations(){return this.aceEditor.getSession().getAnnotations()},setValue(r){this.aceEditor.getSession().setValue(r)}}},_hoisted_1$s={class:"ace-container"},_hoisted_2$k={class:"ace-editor",ref:"ace"};function _sfc_render$2B(r,u,e,h,p,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(r,u="vue"){let e=JSON.stringify(r);return u==="html"?`
VForm Demo
Submit