@zydon/common-csr 2.0.30 → 2.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,1272 @@
1
- import { a } from '../../../chunk-75QNIQAU.mjs';
1
+ import { a as a$1 } from '../../../chunk-75QNIQAU.mjs';
2
+ import { b, a, c } from '../../../chunk-FUA3A67U.mjs';
2
3
  import { useState, useEffect } from 'react';
3
4
  import { useFormContext, useFieldArray } from 'react-hook-form';
4
- import eo from '@mui/material/Button';
5
- import we from '@mui/material/ToggleButtonGroup';
6
- import U from '@zydon/common/components/Icon';
7
- import Wo from '@zydon/common/hooks/usePopover';
8
- import Me from '@zydon/common/hooks/useToggle';
9
- import wo from '@mui/material/Popover';
10
- import k from '@mui/material/Stack';
11
- import No from '@mui/material/TextField';
12
- import lo from '@mui/material/Typography';
13
- import To from '@mui/material/IconButton';
5
+ import ni from '@mui/material/Button';
6
+ import uc from '@mui/material/ToggleButtonGroup';
7
+ import zn from '@zydon/common/components/Icon';
8
+ import _l from '@zydon/common/hooks/usePopover';
9
+ import pc from '@zydon/common/hooks/useToggle';
10
+ import lo from '@mui/material/Popover';
11
+ import bt from '@mui/material/Stack';
12
+ import ho from '@mui/material/TextField';
13
+ import Hr from '@mui/material/Typography';
14
+ import so from '@mui/material/IconButton';
14
15
  import { styled, alpha } from '@mui/material/styles';
15
16
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
16
- import Xo from 'react-ace/lib/ace';
17
- import 'ace-builds/src-noconflict/mode-mysql';
18
- import 'ace-builds/src-noconflict/theme-github';
19
- import 'ace-builds/src-noconflict/ext-language_tools';
20
- import Jo from '@zydon/common/components/SearchInput';
21
- import Vo from '@zydon/common/components/Scrollbar';
22
- import te from '@zydon/common/components/DataGrid';
23
- import he from '@zydon/common/components/ActionButton';
24
- import Ce from '@zydon/common/components/ExpandableGroup';
25
- import M from '@zydon/common/form/Autocomplete';
26
- import ce from '@zydon/common/form/Field';
27
- import Pe from '@mui/material/ToggleButton';
28
-
29
- var w=styled(k)(({theme:o})=>({borderBottom:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(o.palette.grey[500],.32)}`,padding:16})),J=styled(k)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:o.palette.grey[100]}})),j=styled(k)(({theme:o})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:"#fff",padding:"8px 16px",borderRadius:8,border:`1px solid ${alpha(o.palette.grey[500],.24)}`,cursor:"pointer",color:o.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${o.palette.primary.main}`,backgroundColor:alpha(o.palette.primary.main,.05)}})),oo=styled(k)(({theme:o})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(o.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:o.palette.text.disabled,fontSize:12}}})),G=styled(To)({padding:0});var Oo=({openPopover:o,handleClose:t,argumentsValues:a,filter:n,onExecute:l})=>{let[s,i]=useState([]),d=(r,p)=>{if(p&&p!=="")s.filter(u=>u.name===r).length>0?i(s.map(u=>u.name===r?{name:r,value:p}:u)):i([...s||[],{name:r,value:p}]);else {let m=s.filter(u=>u.name===r);i(m);}},g=()=>{let r=n||"";return s.forEach(p=>{r=r.replace(`$ARG[${p.name}]`,`'${p.value}'`);}),r};return jsxs(wo,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,title:"Pr\xE9-visualizar",children:[jsx(lo,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(w,{children:a?.map((r,p)=>jsx(No,{name:r,label:r,size:"small",onChange:m=>d(r,m.target.value),required:!0},p))}),jsxs(k,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(eo,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(eo,{variant:"contained",color:"primary",size:"small",startIcon:jsx(U,{icon:"PLAY_SIMPLE"}),onClick:()=>l(g()),disabled:s.length<a.length,children:"Executar"})]})]})},ro=Oo;var Ho=({openPopover:o,handleClose:t,addItem:a})=>{let[n,l]=useState("");return jsxs(wo,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(lo,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(w,{children:jsx(No,{value:n,onChange:i=>l(i.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(k,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(eo,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(eo,{variant:"contained",color:"primary",size:"small",startIcon:jsx(U,{icon:"SAVE_MARK"}),disabled:!n||n==="",onClick:()=>{a(n),t(),l("");},children:"Salvar"})]})]})},ao=Ho;var Ko=({label:o,itens:t,argumentsValues:a,fields:n,addItem:l,removeItem:s,insertItemSQL:i})=>{let[d,g]=useState(!1),r=Wo(),p=()=>{g(!d);},m=(c,C)=>{c.stopPropagation(),s&&s(C);},u=c=>{i(a?` $ARG[${c}]`:n?` this.${c}`:` ${c}`);};return jsxs(k,{children:[jsxs(k,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(G,{edge:"end",onClick:p,children:jsx(U,{icon:d?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(lo,{variant:"overline",color:"text.primary",children:o}),l&&jsxs(Fragment,{children:[jsx(G,{edge:"end",onClick:r.onOpen,children:jsx(U,{icon:"SIMPLE_ADD"})}),jsx(ao,{addItem:l,handleClose:r.onClose,openPopover:r.open})]})]}),d&&jsx(k,{spacing:.5,children:jsx(Vo,{sx:{maxHeight:150},children:t?.map((c,C)=>jsxs(j,{direction:"row",justifyContent:"space-between",onClick:()=>u(c),children:[jsx(lo,{variant:"caption",textAlign:"center",width:"100%",children:c}),s&&jsx(To,{edge:"end",onClick:E=>m(E,c),children:jsx(U,{icon:"DELETE_MARK_BUTTON_02"})})]},C))})})]})},P=Ko;var oe=({fieldsSelect:o,argumentsValues:t,onChangeArguments:a,sql:n,setSql:l,setFilterRule:s})=>{let[i,d]=useState(),{setValue:g}=useFormContext(),[r,p]=useState(1),[m,u]=useState(),c=e=>{m.session.insert(r,` ${e} `);},C=e=>{a([...t||[],e]);},E=e=>{a(t?.filter(F=>F!==e));},R=e=>{l(e[0]),s(e[0]),g("groups",void 0);},T=i?o.filter(e=>e.id.toString().toLocaleLowerCase().includes(i)||e.description.toString().toLocaleLowerCase().includes(i)||e.name?.toString().toLocaleLowerCase().includes(i)):o;return console.log({"react-ace/lib/ace":n}),jsxs(k,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(J,{children:[jsx(Jo,{value:i,trigger:"change",onSearch:e=>d(e?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(P,{label:"Campos",fields:!0,itens:T.map(e=>e.name),insertItemSQL:c}),jsx(P,{label:"Argumentos",argumentsValues:!0,itens:t,addItem:C,removeItem:E,insertItemSQL:c}),jsx(P,{label:"Operadores",insertItemSQL:c,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(P,{label:"Filtros",fields:!0,insertItemSQL:c,itens:T.map(e=>e.name)})]}),jsx(oo,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(Xo,{mode:"mysql",theme:"github",name:"splitEditor",onChange:e=>{console.log(e),R(e);},onCursorChange:e=>{console.log({selection:e}),p(e.getCursor);},value:n,onLoad:e=>u(e),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},so=oe;var re=({data:o,fields:t,isLoading:a,isError:n})=>jsxs(k,{children:[jsx(lo,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),n&&jsx(k,{children:"Falha ao gerar resultado"}),o&&jsx(te,{columns:t?.map(l=>({field:l,headerName:l,width:150,type:"string"})),loading:a,rows:o,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})]}),mo=re;var uo=styled(k)(({theme:o})=>({border:`1px solid ${alpha(o.palette.primary.main,.32)}`,backgroundColor:alpha(o.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),go=styled(To)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),N=styled(M)(()=>({width:230}));var de=({index:o,indexGroup:t,removeConditional:a,fieldsSelect:n})=>{let{watch:l}=useFormContext(),s=`groups.[${t}].conditionals[${o}].field`,i=`groups.[${t}].conditionals[${o}].conditional`,d=`groups.[${t}].conditionals[${o}].type`,g=`groups.[${t}].conditionals[${o}].value`,r=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],p=l(d);return jsxs(k,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(M,{label:"Se",name:s,size:"small",fullWidth:!0,options:n?.map(m=>({value:m.name,label:m.description}))}),jsx(M,{label:"Estado",name:i,size:"small",fullWidth:!0,options:r}),jsx(M,{label:"Objetivo",name:`groups.[${t}].conditionals[${o}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),p==="value"?jsx(ce,{label:"Valor",name:g,size:"small",fullWidth:!0}):jsx(M,{label:"Se",name:g,size:"small",fullWidth:!0,options:n?.map(m=>({value:m.name,label:m.description}))}),jsx(go,{color:"error",onClick:()=>{a(o);},children:jsx(U,{icon:"DELETE_MARK_BUTTON_02"})})]})},fo=de;var Ie=({index:o,removeGroup:t,fieldsSelect:a})=>{let{control:n}=useFormContext(),l=`groups.[${o}].operator`,{fields:s,append:i,remove:d}=useFieldArray({name:`groups.${o}.conditionals`,control:n});return jsx(Ce,{name:`GRUPO ${o+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(N,{name:l,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>t(o),children:jsxs(k,{spacing:1.5,alignItems:"flex-start",children:[s.map((g,r)=>jsx(fo,{index:r,indexGroup:o,removeConditional:p=>d(p),fieldsSelect:a},g.id)),jsx(he,{actionType:"NEW",onClick:()=>i({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},vo=Ie;var Ee=({fieldsSelect:o})=>{let{control:t}=useFormContext(),{fields:a,append:n,remove:l}=useFieldArray({name:"groups",control:t});return jsxs(k,{gap:1.5,children:[jsxs(uo,{direction:"row",spacing:1.5,children:[jsx(lo,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(k,{children:jsx(N,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(lo,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),a.map((s,i)=>jsx(vo,{index:i,removeGroup:d=>l(d),fieldsSelect:o},s.id)),jsx(eo,{size:"large",color:"inherit",startIcon:jsx(U,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{n({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},Io=Ee;var bo=styled(k)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),So=styled(k)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),K=styled(Pe)(()=>({lineHeight:"1em"})),yo=styled(k)(()=>({padding:12}));var ze=({argumentsValues:o,onChangeArguments:t,fieldsSelect:a$1,onChangeRule:n,onChangeSqlProcessed:l,defaultMode:s,defaultFilter:i,dataPreview:d,errorPreview:g,loadingPreview:r})=>{let[p,m]=useState(i||""),[u,c]=Me(),[C,E]=useState(s||"simple"),{watch:R,setValue:T}=useFormContext(),e=Wo(),F=R("operator"),Eo=R("groups");useEffect(()=>()=>{T("config",{});},[]);let Lo=(h,X)=>{if(X==="advanced"){let $=a(Eo,F);m($),l($),n($);}E(X);},Po=h=>{u||C==="simple"||o.length===0?c():e.onOpen(h);},Ro=h=>{c(),l(h);};return jsx(Fragment,{children:jsxs(bo,{children:[jsxs(So,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(we,{color:"primary",value:C,size:"small",exclusive:!0,onChange:Lo,children:[jsx(K,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(K,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(eo,{variant:"outlined",color:"inherit",onClick:h=>Po(h),startIcon:!u&&jsx(U,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:u?"Voltar":"Executar"}),!!e.open&&jsx(ro,{handleClose:e.onClose,openPopover:e.open,argumentsValues:o,filter:p,onExecute:h=>Ro(h)})]}),jsx(yo,{children:u?jsx(mo,{fields:a$1.map(h=>h.name),data:d,isError:g,isLoading:r}):jsx(Fragment,{children:C==="simple"?jsx(Io,{fieldsSelect:a$1,sql:p,setSql:m}):jsx(so,{fieldsSelect:a$1,argumentsValues:o,onChangeArguments:t,sql:p,setSql:m,setFilterRule:n})})})]})})},Tr=ze;
30
-
31
- export { Tr as default };
17
+ import Rl from '@zydon/common/components/SearchInput';
18
+ import Ll from '@zydon/common/components/Scrollbar';
19
+ import Nl from '@zydon/common/components/DataGrid';
20
+ import Xl from '@zydon/common/components/ActionButton';
21
+ import Jl from '@zydon/common/components/ExpandableGroup';
22
+ import rn from '@zydon/common/form/Autocomplete';
23
+ import Gl from '@zydon/common/form/Field';
24
+ import ac from '@mui/material/ToggleButton';
25
+
26
+ var ht=b((oi,Ct)=>{(function(){var o="ace",h=function(){return this}();if(!h&&typeof window<"u"&&(h=window),!o);var _=function(n,e,t){if(typeof n!="string"){_.original?_.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(t=e),_.modules[n]||(_.payloads[n]=t,_.modules[n]=null);};_.modules={},_.payloads={};var y=function(n,e,t){if(typeof e=="string"){var r=a(n,e);if(r!=null)return t&&t(),r}else if(Object.prototype.toString.call(e)==="[object Array]"){for(var i=[],s=0,c=e.length;s<c;++s){var p=a(n,e[s]);if(p==null&&m.original)return;i.push(p);}return t&&t.apply(null,i)||!0}},m=function(n,e){var t=y("",n,e);return t==null&&m.original?m.original.apply(this,arguments):t},f=function(n,e){if(e.indexOf("!")!==-1){var t=e.split("!");return f(n,t[0])+"!"+f(n,t[1])}if(e.charAt(0)=="."){var r=n.split("/").slice(0,-1).join("/");for(e=r+"/"+e;e.indexOf(".")!==-1&&i!=e;){var i=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"");}}return e},a=function(n,e){e=f(n,e);var t=_.modules[e];if(!t){if(t=_.payloads[e],typeof t=="function"){var r={},i={id:e,uri:"",exports:r,packaged:!0},s=function(p,C){return y(e,p,C)},c=t(s,r,i);r=c||i.exports,_.modules[e]=r,delete _.payloads[e];}t=_.modules[e]=r||t;}return t};function l(n){var e=h;n&&(h[n]||(h[n]={}),e=h[n]),(!e.define||!e.define.packaged)&&(_.original=e.define,e.define=_,e.define.packaged=!0),(!e.require||!e.require.packaged)&&(m.original=e.require,e.require=m,e.require.packaged=!0);}l(o);})();ace.define("ace/lib/es6-shim",["require","exports","module"],function(o,h,_){function y(m,f,a){Object.defineProperty(m,f,{value:a,enumerable:!1,writable:!0,configurable:!0});}String.prototype.startsWith||y(String.prototype,"startsWith",function(m,f){return f=f||0,this.lastIndexOf(m,f)===f}),String.prototype.endsWith||y(String.prototype,"endsWith",function(m,f){var a=this;(f===void 0||f>a.length)&&(f=a.length),f-=m.length;var l=a.indexOf(m,f);return l!==-1&&l===f}),String.prototype.repeat||y(String.prototype,"repeat",function(m){for(var f="",a=this;m>0;)m&1&&(f+=a),(m>>=1)&&(a+=a);return f}),String.prototype.includes||y(String.prototype,"includes",function(m,f){return this.indexOf(m,f)!=-1}),Object.assign||(Object.assign=function(m){if(m==null)throw new TypeError("Cannot convert undefined or null to object");for(var f=Object(m),a=1;a<arguments.length;a++){var l=arguments[a];l!=null&&Object.keys(l).forEach(function(n){f[n]=l[n];});}return f}),Object.values||(Object.values=function(m){return Object.keys(m).map(function(f){return m[f]})}),Array.prototype.find||y(Array.prototype,"find",function(m){for(var f=this.length,a=arguments[1],l=0;l<f;l++){var n=this[l];if(m.call(a,n,l,this))return n}}),Array.prototype.findIndex||y(Array.prototype,"findIndex",function(m){for(var f=this.length,a=arguments[1],l=0;l<f;l++){var n=this[l];if(m.call(a,n,l,this))return l}}),Array.prototype.includes||y(Array.prototype,"includes",function(m,f){return this.indexOf(m,f)!=-1}),Array.prototype.fill||y(Array.prototype,"fill",function(m){for(var f=this,a=f.length>>>0,l=arguments[1],n=l>>0,e=n<0?Math.max(a+n,0):Math.min(n,a),t=arguments[2],r=t===void 0?a:t>>0,i=r<0?Math.max(a+r,0):Math.min(r,a);e<i;)f[e]=m,e++;return f}),Array.of||y(Array,"of",function(){return Array.prototype.slice.call(arguments)});});ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(o,h,_){o("./es6-shim");});ace.define("ace/lib/deep_copy",["require","exports","module"],function(o,h,_){h.deepCopy=function y(m){if(typeof m!="object"||!m)return m;var f;if(Array.isArray(m)){f=[];for(var a=0;a<m.length;a++)f[a]=y(m[a]);return f}if(Object.prototype.toString.call(m)!=="[object Object]")return m;f={};for(var a in m)f[a]=y(m[a]);return f};});ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(o,h,_){h.last=function(f){return f[f.length-1]},h.stringReverse=function(f){return f.split("").reverse().join("")},h.stringRepeat=function(f,a){for(var l="";a>0;)a&1&&(l+=f),(a>>=1)&&(f+=f);return l};var y=/^\s\s*/,m=/\s\s*$/;h.stringTrimLeft=function(f){return f.replace(y,"")},h.stringTrimRight=function(f){return f.replace(m,"")},h.copyObject=function(f){var a={};for(var l in f)a[l]=f[l];return a},h.copyArray=function(f){for(var a=[],l=0,n=f.length;l<n;l++)f[l]&&typeof f[l]=="object"?a[l]=this.copyObject(f[l]):a[l]=f[l];return a},h.deepCopy=o("./deep_copy").deepCopy,h.arrayToMap=function(f){for(var a={},l=0;l<f.length;l++)a[f[l]]=1;return a},h.createMap=function(f){var a=Object.create(null);for(var l in f)a[l]=f[l];return a},h.arrayRemove=function(f,a){for(var l=0;l<=f.length;l++)a===f[l]&&f.splice(l,1);},h.escapeRegExp=function(f){return f.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},h.escapeHTML=function(f){return (""+f).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},h.getMatchOffsets=function(f,a){var l=[];return f.replace(a,function(n){l.push({offset:arguments[arguments.length-2],length:n.length});}),l},h.deferredCall=function(f){var a=null,l=function(){a=null,f();},n=function(e){return n.cancel(),a=setTimeout(l,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),f(),n},n.cancel=function(){return clearTimeout(a),a=null,n},n.isPending=function(){return a},n},h.delayedCall=function(f,a){var l=null,n=function(){l=null,f();},e=function(t){l==null&&(l=setTimeout(n,t||a));};return e.delay=function(t){l&&clearTimeout(l),l=setTimeout(n,t||a);},e.schedule=e,e.call=function(){this.cancel(),f();},e.cancel=function(){l&&clearTimeout(l),l=null;},e.isPending=function(){return l},e},h.supportsLookbehind=function(){try{new RegExp("(?<=.)");}catch{return !1}return !0},h.skipEmptyMatch=function(f,a,l){return l&&f.codePointAt(a)>65535?2:1};});ace.define("ace/lib/useragent",["require","exports","module"],function(o,h,_){h.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},h.getOS=function(){return h.isMac?h.OS.MAC:h.isLinux?h.OS.LINUX:h.OS.WINDOWS};var y=typeof navigator=="object"?navigator:{},m=(/mac|win|linux/i.exec(y.platform)||["other"])[0].toLowerCase(),f=y.userAgent||"",a=y.appName||"";h.isWin=m=="win",h.isMac=m=="mac",h.isLinux=m=="linux",h.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((f.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((f.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),h.isOldIE=h.isIE&&h.isIE<9,h.isGecko=h.isMozilla=f.match(/ Gecko\/\d+/),h.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",h.isWebKit=parseFloat(f.split("WebKit/")[1])||void 0,h.isChrome=parseFloat(f.split(" Chrome/")[1])||void 0,h.isSafari=parseFloat(f.split(" Safari/")[1])&&!h.isChrome||void 0,h.isEdge=parseFloat(f.split(" Edge/")[1])||void 0,h.isAIR=f.indexOf("AdobeAIR")>=0,h.isAndroid=f.indexOf("Android")>=0,h.isChromeOS=f.indexOf(" CrOS ")>=0,h.isIOS=/iPad|iPhone|iPod/.test(f)&&!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(o,h,_){var y=o("./useragent"),m="http://www.w3.org/1999/xhtml";h.buildDom=function t(r,i,s){if(typeof r=="string"&&r){var c=document.createTextNode(r);return i&&i.appendChild(c),c}if(!Array.isArray(r))return r&&r.appendChild&&i&&i.appendChild(r),r;if(typeof r[0]!="string"||!r[0]){for(var p=[],C=0;C<r.length;C++){var E=t(r[C],i,s);E&&p.push(E);}return p}var S=document.createElement(r[0]),M=r[1],g=1;M&&typeof M=="object"&&!Array.isArray(M)&&(g=2);for(var C=g;C<r.length;C++)t(r[C],S,s);return g==2&&Object.keys(M).forEach(function(d){var A=M[d];d==="class"?S.className=Array.isArray(A)?A.join(" "):A:typeof A=="function"||d=="value"||d[0]=="$"?S[d]=A:d==="ref"?s&&(s[A]=S):d==="style"?typeof A=="string"&&(S.style.cssText=A):A!=null&&S.setAttribute(d,A);}),i&&i.appendChild(S),S},h.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},h.createElement=function(t,r){return document.createElementNS?document.createElementNS(r||m,t):document.createElement(t)},h.removeChildren=function(t){t.innerHTML="";},h.createTextNode=function(t,r){var i=r?r.ownerDocument:document;return i.createTextNode(t)},h.createFragment=function(t){var r=t?t.ownerDocument:document;return r.createDocumentFragment()},h.hasCssClass=function(t,r){var i=(t.className+"").split(/\s+/g);return i.indexOf(r)!==-1},h.addCssClass=function(t,r){h.hasCssClass(t,r)||(t.className+=" "+r);},h.removeCssClass=function(t,r){for(var i=t.className.split(/\s+/g);;){var s=i.indexOf(r);if(s==-1)break;i.splice(s,1);}t.className=i.join(" ");},h.toggleCssClass=function(t,r){for(var i=t.className.split(/\s+/g),s=!0;;){var c=i.indexOf(r);if(c==-1)break;s=!1,i.splice(c,1);}return s&&i.push(r),t.className=i.join(" "),s},h.setCssClass=function(t,r,i){i?h.addCssClass(t,r):h.removeCssClass(t,r);},h.hasCssString=function(t,r){var i=0,s;if(r=r||document,s=r.querySelectorAll("style")){for(;i<s.length;)if(s[i++].id===t)return !0}},h.removeElementById=function(t,r){r=r||document,r.getElementById(t)&&r.getElementById(t).remove();};var f,a=[];h.useStrictCSP=function(t){f=t,t==!1?l():a||(a=[]);};function l(){var t=a;a=null,t&&t.forEach(function(r){n(r[0],r[1]);});}function n(t,r,i){if(!(typeof document>"u")){if(a){if(i)l();else if(i===!1)return a.push([t,r])}if(!f){var s=i;!i||!i.getRootNode?s=document:(s=i.getRootNode(),(!s||s==i)&&(s=document));var c=s.ownerDocument||s;if(r&&h.hasCssString(r,s))return null;r&&(t+=`
27
+ /*# sourceURL=ace/css/`+r+" */");var p=h.createElement("style");p.appendChild(c.createTextNode(t)),r&&(p.id=r),s==c&&(s=h.getDocumentHead(c)),s.insertBefore(p,s.firstChild);}}}if(h.importCssString=n,h.importCssStylsheet=function(t,r){h.buildDom(["link",{rel:"stylesheet",href:t}],h.getDocumentHead(r));},h.scrollbarWidth=function(t){var r=h.createElement("ace_inner");r.style.width="100%",r.style.minWidth="0px",r.style.height="200px",r.style.display="block";var i=h.createElement("ace_outer"),s=i.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",i.appendChild(r);var c=t&&t.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(i);var p=r.offsetWidth;s.overflow="scroll";var C=r.offsetWidth;return p===C&&(C=i.clientWidth),c.removeChild(i),p-C},h.computedStyle=function(t,r){return window.getComputedStyle(t,"")||{}},h.setStyle=function(t,r,i){t[r]!==i&&(t[r]=i);},h.HAS_CSS_ANIMATION=!1,h.HAS_CSS_TRANSFORMS=!1,h.HI_DPI=y.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,y.isChromeOS&&(h.HI_DPI=!1),typeof document<"u"){var e=document.createElement("div");h.HI_DPI&&e.style.transform!==void 0&&(h.HAS_CSS_TRANSFORMS=!0),!y.isEdge&&typeof e.style.animationName<"u"&&(h.HAS_CSS_ANIMATION=!0),e=null;}h.HAS_CSS_TRANSFORMS?h.translate=function(t,r,i){t.style.transform="translate("+Math.round(r)+"px, "+Math.round(i)+"px)";}:h.translate=function(t,r,i){t.style.top=Math.round(i)+"px",t.style.left=Math.round(r)+"px";};});ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(o,h,_){var y=o("./dom");h.get=function(m,f){var a=new XMLHttpRequest;a.open("GET",m,!0),a.onreadystatechange=function(){a.readyState===4&&f(a.responseText);},a.send(null);},h.loadScript=function(m,f){var a=y.getDocumentHead(),l=document.createElement("script");l.src=m,a.appendChild(l),l.onload=l.onreadystatechange=function(n,e){(e||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,e||f());};},h.qualifyURL=function(m){var f=document.createElement("a");return f.href=m,f.href};});ace.define("ace/lib/oop",["require","exports","module"],function(o,h,_){h.inherits=function(y,m){y.super_=m,y.prototype=Object.create(m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}});},h.mixin=function(y,m){for(var f in m)y[f]=m[f];return y},h.implement=function(y,m){h.mixin(y,m);};});ace.define("ace/lib/event_emitter",["require","exports","module"],function(o,h,_){var y={},m=function(){this.propagationStopped=!0;},f=function(){this.defaultPrevented=!0;};y._emit=y._dispatchEvent=function(a,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[a]||[],e=this._defaultHandlers[a];if(!(!n.length&&!e)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=a),l.stopPropagation||(l.stopPropagation=m),l.preventDefault||(l.preventDefault=f),n=n.slice();for(var t=0;t<n.length&&(n[t](l,this),!l.propagationStopped);t++);if(e&&!l.defaultPrevented)return e(l,this)}},y._signal=function(a,l){var n=(this._eventRegistry||{})[a];if(n){n=n.slice();for(var e=0;e<n.length;e++)n[e](l,this);}},y.once=function(a,l){var n=this;if(this.on(a,function e(){n.off(a,e),l.apply(null,arguments);}),!l)return new Promise(function(e){l=e;})},y.setDefaultHandler=function(a,l){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[a]){var e=n[a],t=n._disabled_[a];t||(n._disabled_[a]=t=[]),t.push(e);var r=t.indexOf(l);r!=-1&&t.splice(r,1);}n[a]=l;},y.removeDefaultHandler=function(a,l){var n=this._defaultHandlers;if(n){var e=n._disabled_[a];if(n[a]==l)e&&this.setDefaultHandler(a,e.pop());else if(e){var t=e.indexOf(l);t!=-1&&e.splice(t,1);}}},y.on=y.addEventListener=function(a,l,n){this._eventRegistry=this._eventRegistry||{};var e=this._eventRegistry[a];return e||(e=this._eventRegistry[a]=[]),e.indexOf(l)==-1&&e[n?"unshift":"push"](l),l},y.off=y.removeListener=y.removeEventListener=function(a,l){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];if(n){var e=n.indexOf(l);e!==-1&&n.splice(e,1);}},y.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0);},h.EventEmitter=y;});ace.define("ace/lib/report_error",["require","exports","module"],function(o,h,_){h.reportError=function(m,f){var a=new Error(m);a.data=f,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a});};});ace.define("ace/lib/default_english_messages",["require","exports","module"],function(o,h,_){var y={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};h.defaultEnglishMessages=y;});ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(o,h,_){"no use strict";var y=o("./oop"),m=o("./event_emitter").EventEmitter,f=o("./report_error").reportError,a=o("./default_english_messages").defaultEnglishMessages,l={setOptions:function(i){Object.keys(i).forEach(function(s){this.setOption(s,i[s]);},this);},getOptions:function(i){var s={};if(i)Array.isArray(i)||(s=i,i=Object.keys(s));else {var c=this.$options;i=Object.keys(c).filter(function(p){return !c[p].hidden});}return i.forEach(function(p){s[p]=this.getOption(p);},this),s},setOption:function(i,s){if(this["$"+i]!==s){var c=this.$options[i];if(!c)return n('misspelled option "'+i+'"');if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(i,s);c.handlesSet||(this["$"+i]=s),c&&c.set&&c.set.call(this,s);}},getOption:function(i){var s=this.$options[i];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(i):s&&s.get?s.get.call(this):this["$"+i]:n('misspelled option "'+i+'"')}};function n(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments);}var e,t,r=function(){function i(){this.$defaultOptions={},e=a,t="dollarSigns";}return i.prototype.defineOptions=function(s,c,p){return s.$options||(this.$defaultOptions[c]=s.$options={}),Object.keys(p).forEach(function(C){var E=p[C];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=C),s.$options[E.name]=E,"initialValue"in E&&(s["$"+E.name]=E.initialValue);}),y.implement(s,l),this},i.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(c){var p=s.$options[c];"value"in p&&s.setOption(c,p.value);});},i.prototype.setDefaultValue=function(s,c,p){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][c])break;if(!this.$defaultOptions[s][c])return !1}var C=this.$defaultOptions[s]||(this.$defaultOptions[s]={});C[c]&&(C.forwardTo?this.setDefaultValue(C.forwardTo,c,p):C[c].value=p);},i.prototype.setDefaultValues=function(s,c){Object.keys(c).forEach(function(p){this.setDefaultValue(s,p,c[p]);},this);},i.prototype.setMessages=function(s,c){e=s,c&&c.placeholders&&(t=c.placeholders);},i.prototype.nls=function(s,c,p){e[s]||(n("No message found for the key '"+s+"' in the provided messages, trying to find a translation for the default string '"+c+"'."),e[c]||n("No message found for the default string '"+c+"' in the provided messages. Falling back to the default English message."));var C=e[s]||e[c]||c;return p&&(t==="dollarSigns"&&(C=C.replace(/\$(\$|[\d]+)/g,function(E,S){return S=="$"?"$":p[S]})),t==="curlyBrackets"&&(C=C.replace(/\{([^\}]+)\}/g,function(E,S){return p[S]}))),C},i}();r.prototype.warn=n,r.prototype.reportError=f,y.implement(r.prototype,m),h.AppConfig=r;});ace.define("ace/theme/textmate-css",["require","exports","module"],function(o,h,_){_.exports=`.ace-tm .ace_gutter {
28
+ background: #f0f0f0;
29
+ color: #333;
30
+ }
31
+
32
+ .ace-tm .ace_print-margin {
33
+ width: 1px;
34
+ background: #e8e8e8;
35
+ }
36
+
37
+ .ace-tm .ace_fold {
38
+ background-color: #6B72E6;
39
+ }
40
+
41
+ .ace-tm {
42
+ background-color: #FFFFFF;
43
+ color: black;
44
+ }
45
+
46
+ .ace-tm .ace_cursor {
47
+ color: black;
48
+ }
49
+
50
+ .ace-tm .ace_invisible {
51
+ color: rgb(191, 191, 191);
52
+ }
53
+
54
+ .ace-tm .ace_storage,
55
+ .ace-tm .ace_keyword {
56
+ color: blue;
57
+ }
58
+
59
+ .ace-tm .ace_constant {
60
+ color: rgb(197, 6, 11);
61
+ }
62
+
63
+ .ace-tm .ace_constant.ace_buildin {
64
+ color: rgb(88, 72, 246);
65
+ }
66
+
67
+ .ace-tm .ace_constant.ace_language {
68
+ color: rgb(88, 92, 246);
69
+ }
70
+
71
+ .ace-tm .ace_constant.ace_library {
72
+ color: rgb(6, 150, 14);
73
+ }
74
+
75
+ .ace-tm .ace_invalid {
76
+ background-color: rgba(255, 0, 0, 0.1);
77
+ color: red;
78
+ }
79
+
80
+ .ace-tm .ace_support.ace_function {
81
+ color: rgb(60, 76, 114);
82
+ }
83
+
84
+ .ace-tm .ace_support.ace_constant {
85
+ color: rgb(6, 150, 14);
86
+ }
87
+
88
+ .ace-tm .ace_support.ace_type,
89
+ .ace-tm .ace_support.ace_class {
90
+ color: rgb(109, 121, 222);
91
+ }
92
+
93
+ .ace-tm .ace_keyword.ace_operator {
94
+ color: rgb(104, 118, 135);
95
+ }
96
+
97
+ .ace-tm .ace_string {
98
+ color: rgb(3, 106, 7);
99
+ }
100
+
101
+ .ace-tm .ace_comment {
102
+ color: rgb(76, 136, 107);
103
+ }
104
+
105
+ .ace-tm .ace_comment.ace_doc {
106
+ color: rgb(0, 102, 255);
107
+ }
108
+
109
+ .ace-tm .ace_comment.ace_doc.ace_tag {
110
+ color: rgb(128, 159, 191);
111
+ }
112
+
113
+ .ace-tm .ace_constant.ace_numeric {
114
+ color: rgb(0, 0, 205);
115
+ }
116
+
117
+ .ace-tm .ace_variable {
118
+ color: rgb(49, 132, 149);
119
+ }
120
+
121
+ .ace-tm .ace_xml-pe {
122
+ color: rgb(104, 104, 91);
123
+ }
124
+
125
+ .ace-tm .ace_entity.ace_name.ace_function {
126
+ color: #0000A2;
127
+ }
128
+
129
+
130
+ .ace-tm .ace_heading {
131
+ color: rgb(12, 7, 255);
132
+ }
133
+
134
+ .ace-tm .ace_list {
135
+ color:rgb(185, 6, 144);
136
+ }
137
+
138
+ .ace-tm .ace_meta.ace_tag {
139
+ color:rgb(0, 22, 142);
140
+ }
141
+
142
+ .ace-tm .ace_string.ace_regex {
143
+ color: rgb(255, 0, 0)
144
+ }
145
+
146
+ .ace-tm .ace_marker-layer .ace_selection {
147
+ background: rgb(181, 213, 255);
148
+ }
149
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
150
+ box-shadow: 0 0 3px 0px white;
151
+ }
152
+ .ace-tm .ace_marker-layer .ace_step {
153
+ background: rgb(252, 255, 0);
154
+ }
155
+
156
+ .ace-tm .ace_marker-layer .ace_stack {
157
+ background: rgb(164, 229, 101);
158
+ }
159
+
160
+ .ace-tm .ace_marker-layer .ace_bracket {
161
+ margin: -1px 0 0 -1px;
162
+ border: 1px solid rgb(192, 192, 192);
163
+ }
164
+
165
+ .ace-tm .ace_marker-layer .ace_active-line {
166
+ background: rgba(0, 0, 0, 0.07);
167
+ }
168
+
169
+ .ace-tm .ace_gutter-active-line {
170
+ background-color : #dcdcdc;
171
+ }
172
+
173
+ .ace-tm .ace_marker-layer .ace_selected-word {
174
+ background: rgb(250, 250, 255);
175
+ border: 1px solid rgb(200, 200, 250);
176
+ }
177
+
178
+ .ace-tm .ace_indent-guide {
179
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
180
+ }
181
+
182
+ .ace-tm .ace_indent-guide-active {
183
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
184
+ }
185
+ `;});ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(o,h,_){h.isDark=!1,h.cssClass="ace-tm",h.cssText=o("./textmate-css"),h.$id="ace/theme/textmate";var y=o("../lib/dom");y.importCssString(h.cssText,h.cssClass,!1);});ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(o,h,_){"no use strict";var y=o("./lib/lang"),m=o("./lib/net"),f=o("./lib/dom"),a=o("./lib/app_config").AppConfig;_.exports=h=new a;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};h.get=function(r){if(!l.hasOwnProperty(r))throw new Error("Unknown config key: "+r);return l[r]},h.set=function(r,i){if(l.hasOwnProperty(r))l[r]=i;else if(this.setDefaultValue("",r,i)==!1)throw new Error("Unknown config key: "+r);r=="useStrictCSP"&&f.useStrictCSP(i);},h.all=function(){return y.copyObject(l)},h.$modes={},h.moduleUrl=function(r,i){if(l.$moduleUrls[r])return l.$moduleUrls[r];var s=r.split("/");i=i||s[s.length-2]||"";var c=i=="snippets"?"/":"-",p=s[s.length-1];if(i=="worker"&&c=="-"){var C=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");p=p.replace(C,"");}(!p||p==i)&&s.length>1&&(p=s[s.length-2]);var E=l[i+"Path"];return E==null?E=l.basePath:c=="/"&&(i=c=""),E&&E.slice(-1)!="/"&&(E+="/"),E+i+c+p+this.get("suffix")},h.setModuleUrl=function(r,i){return l.$moduleUrls[r]=i};var n=function(r,i){if(r==="ace/theme/textmate"||r==="./theme/textmate")return i(null,o("./theme/textmate"));if(e)return e(r,i);console.error("loader is not configured");},e;h.setLoader=function(r){e=r;},h.dynamicModules=Object.create(null),h.$loading={},h.$loaded={},h.loadModule=function(r,i){var s;if(Array.isArray(r))var c=r[0],p=r[1];else if(typeof r=="string")var p=r;var C=function(E){if(E&&!h.$loading[p])return i&&i(E);if(h.$loading[p]||(h.$loading[p]=[]),h.$loading[p].push(i),!(h.$loading[p].length>1)){var S=function(){n(p,function(M,g){g&&(h.$loaded[p]=g),h._emit("load.module",{name:p,module:g});var d=h.$loading[p];h.$loading[p]=null,d.forEach(function(A){A&&A(g);});});};if(!h.get("packaged"))return S();m.loadScript(h.moduleUrl(p,c),S),t();}};if(h.dynamicModules[p])h.dynamicModules[p]().then(function(E){E.default?C(E.default):C(E);});else {try{s=this.$require(p);}catch{}C(s||h.$loaded[p]);}},h.$require=function(r){if(typeof _.require=="function"){var i="require";return _[i](r)}},h.setModuleLoader=function(r,i){h.dynamicModules[r]=i;};var t=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),t=function(){});};h.version="1.36.0";});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(o,h,_){o("./lib/fixoldbrowsers");var y=o("./config");y.setLoader(function(l,n){o([l],function(e){n(null,e);});});var m=function(){return this||typeof window<"u"&&window}();_.exports=function(l){y.init=f,y.$require=o,l.require=o,typeof define=="function"&&(l.define=define);},f(!0);function f(l){if(!(!m||!m.document)){y.set("packaged",l||o.packaged||_.packaged||m.define&&define.packaged);var n={},e="",t=document.currentScript||document._currentScript,r=t&&t.ownerDocument||document;t&&t.src&&(e=t.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=r.getElementsByTagName("script"),s=0;s<i.length;s++){var c=i[s],p=c.src||c.getAttribute("src");if(p){for(var C=c.attributes,E=0,S=C.length;E<S;E++){var M=C[E];M.name.indexOf("data-ace-")===0&&(n[a(M.name.replace(/^data-ace-/,""))]=M.value);}var g=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);g&&(e=g[1]);}}e&&(n.base=n.base||e,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var d in n)typeof n[d]<"u"&&y.set(d,n[d]);}}function a(l){return l.replace(/-(.)/g,function(n,e){return e.toUpperCase()})}});ace.define("ace/range",["require","exports","module"],function(o,h,_){var y=function(){function m(f,a,l,n){this.start={row:f,column:a},this.end={row:l,column:n};}return m.prototype.isEqual=function(f){return this.start.row===f.start.row&&this.end.row===f.end.row&&this.start.column===f.start.column&&this.end.column===f.end.column},m.prototype.toString=function(){return "Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},m.prototype.contains=function(f,a){return this.compare(f,a)==0},m.prototype.compareRange=function(f){var a,l=f.end,n=f.start;return a=this.compare(l.row,l.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},m.prototype.comparePoint=function(f){return this.compare(f.row,f.column)},m.prototype.containsRange=function(f){return this.comparePoint(f.start)==0&&this.comparePoint(f.end)==0},m.prototype.intersects=function(f){var a=this.compareRange(f);return a==-1||a==0||a==1},m.prototype.isEnd=function(f,a){return this.end.row==f&&this.end.column==a},m.prototype.isStart=function(f,a){return this.start.row==f&&this.start.column==a},m.prototype.setStart=function(f,a){typeof f=="object"?(this.start.column=f.column,this.start.row=f.row):(this.start.row=f,this.start.column=a);},m.prototype.setEnd=function(f,a){typeof f=="object"?(this.end.column=f.column,this.end.row=f.row):(this.end.row=f,this.end.column=a);},m.prototype.inside=function(f,a){return this.compare(f,a)==0?!(this.isEnd(f,a)||this.isStart(f,a)):!1},m.prototype.insideStart=function(f,a){return this.compare(f,a)==0?!this.isEnd(f,a):!1},m.prototype.insideEnd=function(f,a){return this.compare(f,a)==0?!this.isStart(f,a):!1},m.prototype.compare=function(f,a){return !this.isMultiLine()&&f===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:f<this.start.row?-1:f>this.end.row?1:this.start.row===f?a>=this.start.column?0:-1:this.end.row===f?a<=this.end.column?0:1:0},m.prototype.compareStart=function(f,a){return this.start.row==f&&this.start.column==a?-1:this.compare(f,a)},m.prototype.compareEnd=function(f,a){return this.end.row==f&&this.end.column==a?1:this.compare(f,a)},m.prototype.compareInside=function(f,a){return this.end.row==f&&this.end.column==a?1:this.start.row==f&&this.start.column==a?-1:this.compare(f,a)},m.prototype.clipRows=function(f,a){if(this.end.row>a)var l={row:a+1,column:0};else if(this.end.row<f)var l={row:f,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<f)var n={row:f,column:0};return m.fromPoints(n||this.start,l||this.end)},m.prototype.extend=function(f,a){var l=this.compare(f,a);if(l==0)return this;if(l==-1)var n={row:f,column:a};else var e={row:f,column:a};return m.fromPoints(n||this.start,e||this.end)},m.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},m.prototype.isMultiLine=function(){return this.start.row!==this.end.row},m.prototype.clone=function(){return m.fromPoints(this.start,this.end)},m.prototype.collapseRows=function(){return this.end.column==0?new m(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new m(this.start.row,0,this.end.row,0)},m.prototype.toScreenRange=function(f){var a=f.documentToScreenPosition(this.start),l=f.documentToScreenPosition(this.end);return new m(a.row,a.column,l.row,l.column)},m.prototype.moveBy=function(f,a){this.start.row+=f,this.start.column+=a,this.end.row+=f,this.end.column+=a;},m}();y.fromPoints=function(m,f){return new y(m.row,m.column,f.row,f.column)},y.comparePoints=function(m,f){return m.row-f.row||m.column-f.column},h.Range=y;});ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(o,h,_){for(var y=o("./oop"),m={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},f={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)f["Digit"+a]=48+a,f["Numpad"+a]=96+a,m.PRINTABLE_KEYS[48+a]=""+a,m.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var l=String.fromCharCode(a+32);f["Key"+l.toUpperCase()]=a,m.PRINTABLE_KEYS[a]=l;}for(var a=1;a<13;a++)f["F"+a]=111+a,m.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var e in n)f[e]=f[e+"Left"]=f[e+"Right"]=n[e];h.$codeToKeyCode=f,m.PRINTABLE_KEYS[173]="-";for(var t in m.FUNCTION_KEYS){var r=m.FUNCTION_KEYS[t].toLowerCase();m[r]=parseInt(t,10);}for(var t in m.PRINTABLE_KEYS){var r=m.PRINTABLE_KEYS[t].toLowerCase();m[r]=parseInt(t,10);}y.mixin(m,m.MODIFIER_KEYS),y.mixin(m,m.PRINTABLE_KEYS),y.mixin(m,m.FUNCTION_KEYS),m.enter=m.return,m.escape=m.esc,m.del=m.delete,function(){for(var i=["cmd","ctrl","alt","shift"],s=Math.pow(2,i.length);s--;)m.KEY_MODS[s]=i.filter(function(c){return s&m.KEY_MODS[c]}).join("-")+"-";}(),m.KEY_MODS[0]="",m.KEY_MODS[-1]="input-",y.mixin(h,m),h.default=h,h.keyCodeToString=function(i){var s=m[i];return typeof s!="string"&&(s=String.fromCharCode(i)),s.toLowerCase()};});ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(o,h,_){var y=o("./keys"),m=o("./useragent"),f=null,a=0,l;function n(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}});}catch{}}function e(){return l==null&&n(),l}function t(E,S,M){this.elem=E,this.type=S,this.callback=M;}t.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0;};var r=h.addListener=function(E,S,M,g){E.addEventListener(S,M,e()),g&&g.$toDestroy.push(new t(E,S,M));},i=h.removeListener=function(E,S,M){E.removeEventListener(S,M,e());};h.stopEvent=function(E){return h.stopPropagation(E),h.preventDefault(E),!1},h.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation();},h.preventDefault=function(E){E.preventDefault&&E.preventDefault();},h.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||m.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},h.capture=function(E,S,M){var g=E&&E.ownerDocument||document;function d(A){S&&S(A),M&&M(A),i(g,"mousemove",S),i(g,"mouseup",d),i(g,"dragstart",d);}return r(g,"mousemove",S),r(g,"mouseup",d),r(g,"dragstart",d),d},h.addMouseWheelListener=function(E,S,M){r(E,"wheel",function(g){var d=.15,A=g.deltaX||0,L=g.deltaY||0;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=A*d,g.wheelY=L*d;break;case g.DOM_DELTA_LINE:var $=15;g.wheelX=A*$,g.wheelY=L*$;break;case g.DOM_DELTA_PAGE:var T=150;g.wheelX=A*T,g.wheelY=L*T;break}S(g);},M);},h.addMultiMouseDownListener=function(E,S,M,g,d){var A=0,L,$,T,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function b(u){if(h.getButton(u)!==0?A=0:u.detail>1?(A++,A>4&&(A=1)):A=1,m.isIE){var v=Math.abs(u.clientX-L)>5||Math.abs(u.clientY-$)>5;(!T||v)&&(A=1),T&&clearTimeout(T),T=setTimeout(function(){T=null;},S[A-1]||600),A==1&&(L=u.clientX,$=u.clientY);}if(u._clicks=A,M[g]("mousedown",u),A>4)A=0;else if(A>1)return M[g](w[A],u)}Array.isArray(E)||(E=[E]),E.forEach(function(u){r(u,"mousedown",b,d);});};function s(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}h.getModifierString=function(E){return y.KEY_MODS[s(E)]};function c(E,S,M){var g=s(S);if(!M&&S.code&&(M=y.$codeToKeyCode[S.code]||M),!m.isMac&&f){if(S.getModifierState&&(S.getModifierState("OS")||S.getModifierState("Win"))&&(g|=8),f.altGr)if((3&g)!=3)f.altGr=0;else return;if(M===18||M===17){var d=S.location;if(M===17&&d===1)f[M]==1&&(a=S.timeStamp);else if(M===18&&g===3&&d===2){var A=S.timeStamp-a;A<50&&(f.altGr=!0);}}}if(M in y.MODIFIER_KEYS&&(M=-1),!(!g&&M===13&&S.location===3&&(E(S,g,-M),S.defaultPrevented))){if(m.isChromeOS&&g&8){if(E(S,g,M),S.defaultPrevented)return;g&=-9;}return !g&&!(M in y.FUNCTION_KEYS)&&!(M in y.PRINTABLE_KEYS)?!1:E(S,g,M)}}h.addCommandKeyListener=function(E,S,M){var g=null;r(E,"keydown",function(d){f[d.keyCode]=(f[d.keyCode]||0)+1;var A=c(S,d,d.keyCode);return g=d.defaultPrevented,A},M),r(E,"keypress",function(d){g&&(d.ctrlKey||d.altKey||d.shiftKey||d.metaKey)&&(h.stopEvent(d),g=null);},M),r(E,"keyup",function(d){f[d.keyCode]=null;},M),f||(p(),r(window,"focus",p));};function p(){f=Object.create(null);}if(typeof window=="object"&&window.postMessage&&!m.isOldIE){var C=1;h.nextTick=function(E,S){S=S||window;var M="zero-timeout-message-"+C++,g=function(d){d.data==M&&(h.stopPropagation(d),i(S,"message",g),E());};r(S,"message",g),S.postMessage(M,"*");};}h.$idleBlocked=!1,h.onIdle=function(E,S){return setTimeout(function M(){h.$idleBlocked?setTimeout(M,100):E();},S)},h.$idleBlockId=null,h.blockIdle=function(E){h.$idleBlockId&&clearTimeout(h.$idleBlockId),h.$idleBlocked=!0,h.$idleBlockId=setTimeout(function(){h.$idleBlocked=!1;},E||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(E){setTimeout(E,17);};});ace.define("ace/clipboard",["require","exports","module"],function(o,h,_){var y;_.exports={lineMode:!1,pasteCancelled:function(){return y&&y>Date.now()-50?!0:y=!1},cancel:function(){y=Date.now();}};});ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(o,h,_){var y=o("../lib/event"),m=o("../config").nls,f=o("../lib/useragent"),a=o("../lib/dom"),l=o("../lib/lang"),n=o("../clipboard"),e=f.isChrome<18,t=f.isIE,r=f.isChrome>63,i=400,s=o("../lib/keys"),c=s.KEY_MODS,p=f.isIOS,C=p?/\s/:/\n/,E=f.isMobile,S;S=function(M,g){var d=a.createElement("textarea");d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck","false"),d.style.opacity="0",M.insertBefore(d,M.firstChild);var A=!1,L=!1,$=!1,T=!1,w="";E||(d.style.fontSize="1px");var b=!1,u=!1,v="",x=0,k=0,R=0,I=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,O=0;try{var F=document.activeElement===d;}catch{}this.setNumberOfExtraLines=function(z){if(I=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,z<0){O=0;return}O=z;},this.setAriaOptions=function(z){if(z.activeDescendant?(d.setAttribute("aria-haspopup","true"),d.setAttribute("aria-autocomplete",z.inline?"both":"list"),d.setAttribute("aria-activedescendant",z.activeDescendant)):(d.setAttribute("aria-haspopup","false"),d.setAttribute("aria-autocomplete","both"),d.removeAttribute("aria-activedescendant")),z.role&&d.setAttribute("role",z.role),z.setLabel){d.setAttribute("aria-roledescription",m("text-input.aria-roledescription","editor"));var Q="";if(g.$textInputAriaLabel&&(Q+="".concat(g.$textInputAriaLabel,", ")),g.session){var J=g.session.selection.cursor.row;Q+=m("text-input.aria-label","Cursor at row $0",[J+1]);}d.setAttribute("aria-label",Q);}},this.setAriaOptions({role:"textbox"}),y.addListener(d,"blur",function(z){u||(g.onBlur(z),F=!1);},g),y.addListener(d,"focus",function(z){if(!u){if(F=!0,f.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(z),f.isEdge?setTimeout(P):P();}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),w||r||this.$focusScroll=="browser")return d.focus({preventScroll:!0});var z=d.style.top;d.style.position="fixed",d.style.top="0px";try{var Q=d.getBoundingClientRect().top!=0;}catch{return}var J=[];if(Q)for(var re=d.parentElement;re&&re.nodeType==1;)J.push(re),re.setAttribute("ace_nocontext","true"),!re.parentElement&&re.getRootNode?re=re.getRootNode().host:re=re.parentElement;d.focus({preventScroll:!0}),Q&&J.forEach(function(ae){ae.removeAttribute("ace_nocontext");}),setTimeout(function(){d.style.position="",d.style.top=="0px"&&(d.style.top=z);},0);},this.blur=function(){d.blur();},this.isFocused=function(){return F},g.on("beforeEndOperation",function(){var z=g.curOp,Q=z&&z.command&&z.command.name;if(Q!="insertstring"){var J=Q&&(z.docChanged||z.selectionChanged);$&&J&&(v=d.value="",Le()),P();}});var N=function(z,Q){for(var J=Q,re=1;re<=z-I&&re<2*O+1;re++)J+=g.session.getLine(z-re).length+1;return J},P=p?function(z){if(!(!F||A&&!z||T)){z||(z="");var Q=`
186
+ ab`+z+`cde fg
187
+ `;Q!=d.value&&(d.value=v=Q);var J=4,re=4+(z.length||(g.selection.isEmpty()?0:1));(x!=J||k!=re)&&d.setSelectionRange(J,re),x=J,k=re;}}:function(){if(!($||T)&&!(!F&&!V)){$=!0;var z=0,Q=0,J="";if(g.session){var re=g.selection,ae=re.getRange(),me=re.cursor.row;me===D+1?(I=D+1,D=I+2*O):me===I-1?(D=I-1,I=D-2*O):(me<I-1||me>D+1)&&(I=me>O?me-O:0,D=me>O?me+O:2*O);for(var we=[],ve=I;ve<=D;ve++)we.push(g.session.getLine(ve));if(J=we.join(`
188
+ `),z=N(ae.start.row,ae.start.column),Q=N(ae.end.row,ae.end.column),ae.start.row<I){var pe=g.session.getLine(I-1);z=ae.start.row<I-1?0:z,Q+=pe.length+1,J=pe+`
189
+ `+J;}else if(ae.end.row>D){var le=g.session.getLine(D+1);Q=ae.end.row>D+1?le.length:ae.end.column,Q+=J.length+1,J=J+`
190
+ `+le;}else E&&me>0&&(J=`
191
+ `+J,Q+=1,z+=1);J.length>i&&(z<i&&Q<i?J=J.slice(0,i):(J=`
192
+ `,z==Q?z=Q=0:(z=0,Q=1)));var Ce=J+`
193
+
194
+ `;Ce!=v&&(d.value=v=Ce,x=k=Ce.length);}if(V&&(x=d.selectionStart,k=d.selectionEnd),k!=Q||x!=z||d.selectionEnd!=k)try{d.setSelectionRange(z,Q),x=z,k=Q;}catch{}$=!1;}};this.resetSelection=P,F&&g.onFocus();var W=function(z){return z.selectionStart===0&&z.selectionEnd>=v.length&&z.value===v&&v&&z.selectionEnd!==k},B=function(z){$||(A?A=!1:W(d)?(g.selectAll(),P()):E&&d.selectionStart!=x&&P());},H=null;this.setInputHandler=function(z){H=z;},this.getInputHandler=function(){return H};var V=!1,U=function(z,Q){if(V&&(V=!1),L)return P(),z&&g.onPaste(z),L=!1,"";for(var J=d.selectionStart,re=d.selectionEnd,ae=x,me=v.length-k,we=z,ve=z.length-J,pe=z.length-re,le=0;ae>0&&v[le]==z[le];)le++,ae--;for(we=we.slice(le),le=1;me>0&&v.length-le>x-1&&v[v.length-le]==z[z.length-le];)le++,me--;ve-=le-1,pe-=le-1;var Ce=we.length-le+1;if(Ce<0&&(ae=-Ce,Ce=0),we=we.slice(0,Ce),!Q&&!we&&!ve&&!ae&&!me&&!pe)return "";T=!0;var lt=!1;return f.isAndroid&&we==". "&&(we=" ",lt=!0),we&&!ae&&!me&&!ve&&!pe||b?g.onTextInput(we):g.onTextInput(we,{extendLeft:ae,extendRight:me,restoreStart:ve,restoreEnd:pe}),T=!1,v=z,x=J,k=re,R=pe,lt?`
195
+ `:we},K=function(z){if($)return oe();if(z&&z.inputType){if(z.inputType=="historyUndo")return g.execCommand("undo");if(z.inputType=="historyRedo")return g.execCommand("redo")}var Q=d.value,J=U(Q,!0);(Q.length>i+100||C.test(J)||E&&x<1&&x==k)&&P();},Z=function(z,Q,J){var re=z.clipboardData||window.clipboardData;if(!(!re||e)){var ae=t||J?"Text":"text/plain";try{return Q?re.setData(ae,Q)!==!1:re.getData(ae)}catch(me){if(!J)return Z(me,Q,!0)}}},Y=function(z,Q){var J=g.getCopyText();if(!J)return y.preventDefault(z);Z(z,J)?(p&&(P(J),A=J,setTimeout(function(){A=!1;},10)),Q?g.onCut():g.onCopy(),y.preventDefault(z)):(A=!0,d.value=J,d.select(),setTimeout(function(){A=!1,P(),Q?g.onCut():g.onCopy();}));},ne=function(z){Y(z,!0);},G=function(z){Y(z,!1);},ie=function(z){var Q=Z(z);n.pasteCancelled()||(typeof Q=="string"?(Q&&g.onPaste(Q,z),f.isIE&&setTimeout(P),y.preventDefault(z)):(d.value="",L=!0));};y.addCommandKeyListener(d,function(z,Q,J){if(!$)return g.onCommandKey(z,Q,J)},g),y.addListener(d,"select",B,g),y.addListener(d,"input",K,g),y.addListener(d,"cut",ne,g),y.addListener(d,"copy",G,g),y.addListener(d,"paste",ie,g),(!("oncut"in d)||!("oncopy"in d)||!("onpaste"in d))&&y.addListener(M,"keydown",function(z){if(!(f.isMac&&!z.metaKey||!z.ctrlKey))switch(z.keyCode){case 67:G(z);break;case 86:ie(z);break;case 88:ne(z);break}},g);var ee=function(z){if(!($||!g.onCompositionStart||g.$readOnly)&&($={},!b)){z.data&&($.useTextareaForIME=!1),setTimeout(oe,0),g._signal("compositionStart"),g.on("mousedown",Ie);var Q=g.getSelectionRange();Q.end.row=Q.start.row,Q.end.column=Q.start.column,$.markerRange=Q,$.selectionStart=x,g.onCompositionStart($),$.useTextareaForIME?(v=d.value="",x=0,k=0):(d.msGetInputContext&&($.context=d.msGetInputContext()),d.getInputContext&&($.context=d.getInputContext()));}},oe=function(){if(!(!$||!g.onCompositionUpdate||g.$readOnly)){if(b)return Ie();if($.useTextareaForIME)g.onCompositionUpdate(d.value);else {var z=d.value;U(z),$.markerRange&&($.context&&($.markerRange.start.column=$.selectionStart=$.context.compositionStartOffset),$.markerRange.end.column=$.markerRange.start.column+k-$.selectionStart+R);}}},Le=function(z){!g.onCompositionEnd||g.$readOnly||($=!1,g.onCompositionEnd(),g.off("mousedown",Ie),z&&K());};function Ie(){u=!0,d.blur(),d.focus(),u=!1;}var Ae=l.delayedCall(oe,50).schedule.bind(null,null);function ye(z){z.keyCode==27&&d.value.length<d.selectionStart&&($||(v=d.value),x=k=-1,P()),Ae();}y.addListener(d,"compositionstart",ee,g),y.addListener(d,"compositionupdate",oe,g),y.addListener(d,"keyup",ye,g),y.addListener(d,"keydown",Ae,g),y.addListener(d,"compositionend",Le,g),this.getElement=function(){return d},this.setCommandMode=function(z){b=z,d.readOnly=!1;},this.setReadOnly=function(z){b||(d.readOnly=z);},this.setCopyWithEmptySelection=function(z){},this.onContextMenu=function(z){V=!0,P(),g._emit("nativecontextmenu",{target:g,domEvent:z}),this.moveToMouse(z,!0);},this.moveToMouse=function(z,Q){w||(w=d.style.cssText),d.style.cssText=(Q?"z-index:100000;":"")+(f.isIE?"opacity:0.1;":"")+"text-indent: -"+(x+k)*g.renderer.characterWidth*.5+"px;";var J=g.container.getBoundingClientRect(),re=a.computedStyle(g.container),ae=J.top+(parseInt(re.borderTopWidth)||0),me=J.left+(parseInt(J.borderLeftWidth)||0),we=J.bottom-ae-d.clientHeight-2,ve=function(pe){a.translate(d,pe.clientX-me-2,Math.min(pe.clientY-ae-2,we));};ve(z),z.type=="mousedown"&&(g.renderer.$isMousePressed=!0,clearTimeout(Se),f.isWin&&y.capture(g.container,ve,We));},this.onContextMenuClose=We;var Se;function We(){clearTimeout(Se),Se=setTimeout(function(){w&&(d.style.cssText=w,w=""),g.renderer.$isMousePressed=!1,g.renderer.$keepTextAreaAtCursor&&g.renderer.$moveTextAreaToCursor();},0);}var Oe=function(z){g.textInput.onContextMenu(z),We();};y.addListener(d,"mouseup",Oe,g),y.addListener(d,"mousedown",function(z){z.preventDefault(),We();},g),y.addListener(g.renderer.scroller,"contextmenu",Oe,g),y.addListener(d,"contextmenu",Oe,g),p&&oo(M,g,d);function oo(z,Q,J){var re=null,ae=!1;J.addEventListener("keydown",function(we){re&&clearTimeout(re),ae=!0;},!0),J.addEventListener("keyup",function(we){re=setTimeout(function(){ae=!1;},100);},!0);var me=function(we){if(document.activeElement===J&&!(ae||$||Q.$mouseHandler.isMousePressed)&&!A){var ve=J.selectionStart,pe=J.selectionEnd,le=null,Ce=0;if(ve==0?le=s.up:ve==1?le=s.home:pe>k&&v[pe]==`
196
+ `?le=s.end:ve<x&&v[ve-1]==" "?(le=s.left,Ce=c.option):ve<x||ve==x&&k!=x&&ve==pe?le=s.left:pe>k&&v.slice(0,pe).split(`
197
+ `).length>2?le=s.down:pe>k&&v[pe-1]==" "?(le=s.right,Ce=c.option):(pe>k||pe==k&&k!=x&&ve==pe)&&(le=s.right),ve!==pe&&(Ce|=c.shift),le){var lt=Q.onCommandKey({},Ce,le);if(!lt&&Q.commands){le=s.keyCodeToString(le);var Xn=Q.commands.findKeyCommand(Ce,le);Xn&&Q.execCommand(Xn);}x=ve,k=pe,P("");}}};document.addEventListener("selectionchange",me),Q.on("destroy",function(){document.removeEventListener("selectionchange",me);});}this.destroy=function(){d.parentElement&&d.parentElement.removeChild(d);};},h.TextInput=S,h.$setUserAgentForTests=function(M,g){E=M,p=g;};});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(o,h,_){var y=o("../lib/useragent"),m=0,f=550,a=function(){function e(t){t.$clickSelection=null;var r=t.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(s){t[s]=this[s];},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange");}return e.prototype.onMouseDown=function(t){var r=t.inSelection(),i=t.getDocumentPosition();this.mousedownEvent=t;var s=this.editor,c=t.getButton();if(c!==0){var p=s.getSelectionRange(),C=p.isEmpty();(C||c==1)&&s.selection.moveToPosition(i),c==2&&(s.textInput.onContextMenu(t.domEvent),y.isMozilla||t.preventDefault());return}if(this.mousedownEvent.time=Date.now(),r&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(t);return}return this.captureMouse(t),this.startSelect(i,t.domEvent._clicks>1),t.preventDefault()},e.prototype.startSelect=function(t,r){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(t):r||i.selection.moveToPosition(t),r||this.select(),i.setStyle("ace_selecting"),this.setState("select"));},e.prototype.select=function(){var t,r=this.editor,i=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i);if(s==-1)t=this.$clickSelection.end;else if(s==1)t=this.$clickSelection.start;else {var c=n(this.$clickSelection,i);i=c.cursor,t=c.anchor;}r.selection.setSelectionAnchor(t.row,t.column);}r.selection.selectToPosition(i),r.renderer.scrollCursorIntoView();},e.prototype.extendSelectionBy=function(t){var r,i=this.editor,s=i.renderer.screenToTextCoordinates(this.x,this.y),c=i.selection[t](s.row,s.column);if(this.$clickSelection){var p=this.$clickSelection.comparePoint(c.start),C=this.$clickSelection.comparePoint(c.end);if(p==-1&&C<=0)r=this.$clickSelection.end,(c.end.row!=s.row||c.end.column!=s.column)&&(s=c.start);else if(C==1&&p>=0)r=this.$clickSelection.start,(c.start.row!=s.row||c.start.column!=s.column)&&(s=c.end);else if(p==-1&&C==1)s=c.end,r=c.start;else {var E=n(this.$clickSelection,s);s=E.cursor,r=E.anchor;}i.selection.setSelectionAnchor(r.row,r.column);}i.selection.selectToPosition(s),i.renderer.scrollCursorIntoView();},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting");},e.prototype.focusWait=function(){var t=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(t>m||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition());},e.prototype.onDoubleClick=function(t){var r=t.getDocumentPosition(),i=this.editor,s=i.session,c=s.getBracketRange(r);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=i.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=c,this.select();},e.prototype.onTripleClick=function(t){var r=t.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var s=i.getSelectionRange();s.isMultiLine()&&s.contains(r.row,r.column)?(this.$clickSelection=i.selection.getLineRange(s.start.row),this.$clickSelection.end=i.selection.getLineRange(s.end.row).end):this.$clickSelection=i.selection.getLineRange(r.row),this.select();},e.prototype.onQuadClick=function(t){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll");},e.prototype.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,s=t.domEvent.timeStamp,c=s-i.t,p=c?t.wheelX/c:i.vx,C=c?t.wheelY/c:i.vy;c<f&&(p=(p+i.vx)/2,C=(C+i.vy)/2);var E=Math.abs(p/C),S=!1;if(E>=1&&r.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(S=!0),E<=1&&r.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(S=!0),S)i.allowed=s;else if(s-i.allowed<f){var M=Math.abs(p)<=1.5*Math.abs(i.vx)&&Math.abs(C)<=1.5*Math.abs(i.vy);M?(S=!0,i.allowed=s):i.allowed=0;}if(i.t=s,i.vx=p,i.vy=C,S)return r.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()}},e}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,h.DefaultHandlers=a;function l(e,t,r,i){return Math.sqrt(Math.pow(r-e,2)+Math.pow(i-t,2))}function n(e,t){if(e.start.row==e.end.row)var r=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var r=t.column-4;else var r=2*t.row-e.start.row-e.end.row;return r<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}});ace.define("ace/lib/scroll",["require","exports","module"],function(o,h,_){h.preventParentScroll=function(m){m.stopPropagation();var f=m.currentTarget,a=f.scrollHeight>f.clientHeight;a||m.preventDefault();};});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(o,h,_){var y=this&&this.__extends||function(){var c=function(p,C){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,S){E.__proto__=S;}||function(E,S){for(var M in S)Object.prototype.hasOwnProperty.call(S,M)&&(E[M]=S[M]);},c(p,C)};return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");c(p,C);function E(){this.constructor=p;}p.prototype=C===null?Object.create(C):(E.prototype=C.prototype,new E);}}(),m=this&&this.__values||function(c){var p=typeof Symbol=="function"&&Symbol.iterator,C=p&&c[p],E=0;if(C)return C.call(c);if(c&&typeof c.length=="number")return {next:function(){return c&&E>=c.length&&(c=void 0),{value:c&&c[E++],done:!c}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},f=o("./lib/dom");o("./lib/event");var l=o("./range").Range,n=o("./lib/scroll").preventParentScroll,e="ace_tooltip",t=function(){function c(p){this.isOpen=!1,this.$element=null,this.$parentNode=p;}return c.prototype.$init=function(){return this.$element=f.createElement("div"),this.$element.className=e,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(p){this.getElement().textContent=p;},c.prototype.setHtml=function(p){this.getElement().innerHTML=p;},c.prototype.setPosition=function(p,C){this.getElement().style.left=p+"px",this.getElement().style.top=C+"px";},c.prototype.setClassName=function(p){f.addCssClass(this.getElement(),p);},c.prototype.setTheme=function(p){this.$element.className=e+" "+(p.isDark?"ace_dark ":"")+(p.cssClass||"");},c.prototype.show=function(p,C,E){p!=null&&this.setText(p),C!=null&&E!=null&&this.setPosition(C,E),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0);},c.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=e,this.isOpen=!1);},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element);},c}(),r=function(){function c(){this.popups=[];}return c.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups();},c.prototype.removePopup=function(p){var C=this.popups.indexOf(p);C!==-1&&(this.popups.splice(C,1),this.updatePopups());},c.prototype.updatePopups=function(){var p,C,E,S;this.popups.sort(function(b,u){return u.priority-b.priority});var M=[];try{for(var g=m(this.popups),d=g.next();!d.done;d=g.next()){var A=d.value,L=!0;try{for(var $=(E=void 0,m(M)),T=$.next();!T.done;T=$.next()){var w=T.value;if(this.doPopupsOverlap(w,A)){L=!1;break}}}catch(b){E={error:b};}finally{try{T&&!T.done&&(S=$.return)&&S.call($);}finally{if(E)throw E.error}}L?M.push(A):A.hide();}}catch(b){p={error:b};}finally{try{d&&!d.done&&(C=g.return)&&C.call(g);}finally{if(p)throw p.error}}},c.prototype.doPopupsOverlap=function(p,C){var E=p.getElement().getBoundingClientRect(),S=C.getElement().getBoundingClientRect();return E.left<S.right&&E.right>S.left&&E.top<S.bottom&&E.bottom>S.top},c}(),i=new r;h.popupManager=i,h.Tooltip=t;var s=function(c){y(p,c);function p(C){C===void 0&&(C=document.body);var E=c.call(this,C)||this;E.timeout=void 0,E.lastT=0,E.idleTime=350,E.lastEvent=void 0,E.onMouseOut=E.onMouseOut.bind(E),E.onMouseMove=E.onMouseMove.bind(E),E.waitForHover=E.waitForHover.bind(E),E.hide=E.hide.bind(E);var S=E.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",E.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",function(){S.contains(document.activeElement)||this.hide();}.bind(E)),S.addEventListener("wheel",n),E}return p.prototype.addToEditor=function(C){C.on("mousemove",this.onMouseMove),C.on("mousedown",this.hide),C.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0);},p.prototype.removeFromEditor=function(C){C.off("mousemove",this.onMouseMove),C.off("mousedown",this.hide),C.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null);},p.prototype.onMouseMove=function(C,E){this.lastEvent=C,this.lastT=Date.now();var S=E.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide();}this.timeout||S||(this.lastEvent=C,this.timeout=setTimeout(this.waitForHover,this.idleTime));},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var C=Date.now()-this.lastT;if(this.idleTime-C>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-C);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor);},p.prototype.isOutsideOfText=function(C){var E=C.editor,S=C.getDocumentPosition(),M=E.session.getLine(S.row);if(S.column==M.length){var g=E.renderer.pixelToScreenCoordinates(C.clientX,C.clientY),d=E.session.documentToScreenPosition(S.row,S.column);if(d.column!=g.column||d.row!=g.row)return !0}return !1},p.prototype.setDataProvider=function(C){this.$gatherData=C;},p.prototype.showForRange=function(C,E,S,M){var g=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var d=C.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(d.theme)),this.isOpen=!0,this.addMarker(E,C.session),this.range=l.fromPoints(E.start,E.end);var A=d.textToScreenCoordinates(E.start.row,E.start.column),L=d.scroller.getBoundingClientRect();A.pageX<L.left&&(A.pageX=L.left);var $=this.getElement();$.innerHTML="",$.appendChild(S),$.style.maxHeight="",$.style.display="block";var T=$.clientHeight,w=$.clientWidth,b=window.innerHeight-A.pageY-d.lineHeight,u=!0;A.pageY-T<0&&A.pageY<b&&(u=!1),$.style.maxHeight=(u?A.pageY:b)-g+"px",$.style.top=u?"":A.pageY+d.lineHeight+"px",$.style.bottom=u?window.innerHeight-A.pageY+"px":"",$.style.left=Math.min(A.pageX,window.innerWidth-w-g)+"px";}},p.prototype.addMarker=function(C,E){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=E,this.marker=E&&E.addMarker(C,"ace_highlight-marker","text");},p.prototype.hide=function(C){!C&&document.activeElement==this.getElement()||C&&C.target&&(C.type!="keydown"||C.ctrlKey||C.metaKey)&&this.$element.contains(C.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.removePopup(this)));},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0);},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0);},p.prototype.onMouseOut=function(C){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!C.relatedTarget||this.getElement().contains(C.relatedTarget)||C&&C.currentTarget.contains(C.relatedTarget)||C.relatedTarget.classList.contains("ace_content")||this.hide());},p}(t);h.HoverTooltip=s;});ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(o,h,_){var y=this&&this.__extends||function(){var i=function(s,c){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,C){p.__proto__=C;}||function(p,C){for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(p[E]=C[E]);},i(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");i(s,c);function p(){this.constructor=s;}s.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p);}}(),m=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,c=s&&i[s],p=0;if(c)return c.call(i);if(i&&typeof i.length=="number")return {next:function(){return i&&p>=i.length&&(i=void 0),{value:i&&i[p++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},f=o("../lib/dom"),a=o("../lib/event"),l=o("../tooltip").Tooltip,n=o("../config").nls;o("../lib/lang");function t(i){var s=i.editor,c=s.renderer.$gutterLayer,p=new r(s);i.editor.setDefaultHandler("guttermousedown",function(d){if(!(!s.isFocused()||d.getButton()!=0)){var A=c.getRegion(d);if(A!="foldWidgets"){var L=d.getDocumentPosition().row,$=s.session.selection;if(d.getShiftKey())$.selectTo(L,0);else {if(d.domEvent.detail==2)return s.selectAll(),d.preventDefault();i.$clickSelection=s.selection.getLineRange(L);}return i.setState("selectByLines"),i.captureMouse(d),d.preventDefault()}}});var C,E;function S(){var d=E.getDocumentPosition().row,A=s.session.getLength();if(d==A){var L=s.renderer.pixelToScreenCoordinates(0,E.y).row,$=E.$pos;if(L>s.session.documentToScreenRow($.row,$.column))return M()}if(p.showTooltip(d),!!p.isOpen)if(s.on("mousewheel",M),i.$tooltipFollowsMouse)g(E);else {var T=E.getGutterRow(),w=c.$lines.get(T);if(w){var b=w.element.querySelector(".ace_gutter_annotation"),u=b.getBoundingClientRect(),v=p.getElement().style;v.left=u.right+"px",v.top=u.bottom+"px";}else g(E);}}function M(){C&&(C=clearTimeout(C)),p.isOpen&&(p.hideTooltip(),s.off("mousewheel",M));}function g(d){p.setPosition(d.x,d.y);}i.editor.setDefaultHandler("guttermousemove",function(d){var A=d.domEvent.target||d.domEvent.srcElement;if(f.hasCssClass(A,"ace_fold-widget"))return M();p.isOpen&&i.$tooltipFollowsMouse&&g(d),E=d,!C&&(C=setTimeout(function(){C=null,E&&!i.isMousePressed?S():M();},50));}),a.addListener(s.renderer.$gutter,"mouseout",function(d){E=null,!(!p.isOpen||C)&&(C=setTimeout(function(){C=null,M();},50));},s),s.on("changeSession",M),s.on("input",M);}h.GutterHandler=t;var r=function(i){y(s,i);function s(c){var p=i.call(this,c.container)||this;return p.editor=c,p}return s.prototype.setPosition=function(c,p){var C=window.innerWidth||document.documentElement.clientWidth,E=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),M=this.getHeight();c+=15,p+=15,c+S>C&&(c-=c+S-C),p+M>E&&(p-=20+M),l.prototype.setPosition.call(this,c,p);},Object.defineProperty(s,"annotationLabels",{get:function(){return {error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(c){var p,C=this.editor.renderer.$gutterLayer,E=C.$annotations[c],S;E?S={displayText:Array.from(E.displayText),type:Array.from(E.type)}:S={displayText:[],type:[]};var M=C.session.getFoldLine(c);if(M&&C.$showFoldedAnnotations){for(var g={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},A,L=c+1;L<=M.end.row;L++)if(C.$annotations[L])for(var $=0;$<C.$annotations[L].text.length;$++){var T=C.$annotations[L].type[$];g[T].push(C.$annotations[L].text[$]),(!A||d[T]<d[A])&&(A=T);}if(["error","security","warning"].includes(A)){var w="".concat(s.annotationsToSummaryString(g)," in folded code.");S.displayText.push(w),S.type.push(A+"_fold");}}if(S.displayText.length===0)return this.hide();for(var b={error:[],security:[],warning:[],info:[],hint:[]},u=C.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<S.displayText.length;L++){var v=f.createElement("span"),x=f.createElement("span");(p=x.classList).add.apply(p,["ace_".concat(S.type[L]),u]),x.setAttribute("aria-label","".concat(s.annotationLabels[S.type[L].replace("_fold","")].singular)),x.setAttribute("role","img"),x.appendChild(f.createTextNode(" ")),v.appendChild(x),v.appendChild(f.createTextNode(S.displayText[L])),v.appendChild(f.createElement("br")),b[S.type[L].replace("_fold","")].push(v);}var k=this.getElement();f.removeChildren(k),b.error.forEach(function(R){return k.appendChild(R)}),b.security.forEach(function(R){return k.appendChild(R)}),b.warning.forEach(function(R){return k.appendChild(R)}),b.info.forEach(function(R){return k.appendChild(R)}),b.hint.forEach(function(R){return k.appendChild(R)}),k.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this);},s.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this);},s.annotationsToSummaryString=function(c){var p,C,E=[],S=["error","security","warning","info","hint"];try{for(var M=m(S),g=M.next();!g.done;g=M.next()){var d=g.value;if(c[d].length){var A=c[d].length===1?s.annotationLabels[d].singular:s.annotationLabels[d].plural;E.push("".concat(c[d].length," ").concat(A));}}}catch(L){p={error:L};}finally{try{g&&!g.done&&(C=M.return)&&C.call(M);}finally{if(p)throw p.error}}return E.join(", ")},s}(l);h.GutterTooltip=r;});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(o,h,_){var y=o("../lib/event"),m=o("../lib/useragent"),f=function(){function a(l,n){this.speed,this.wheelX,this.wheelY,this.domEvent=l,this.editor=n,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1;}return a.prototype.stopPropagation=function(){y.stopPropagation(this.domEvent),this.propagationStopped=!0;},a.prototype.preventDefault=function(){y.preventDefault(this.domEvent),this.defaultPrevented=!0;},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault();},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(l,0),e=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-e},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,n=l.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else {var e=this.getDocumentPosition();this.$inSelection=n.contains(e.row,e.column);}return this.$inSelection},a.prototype.getButton=function(){return y.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return m.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();h.MouseEvent=f;});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(o,h,_){var y=o("../lib/dom"),m=o("../lib/event"),f=o("../lib/useragent"),a=200,l=200,n=5;function e(r){var i=r.editor,s=y.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent="\xA0";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(N){r[N]=this[N];},this),i.on("mousedown",this.onMouseDown.bind(r));var p=i.container,C,E,S,M,g,d,A=0,L,$,T,w,b;this.onDragStart=function(N){if(this.cancelDrag||!p.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(N);},0),N.preventDefault()}g=i.getSelectionRange();var W=N.dataTransfer;W.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(s),W.setDragImage&&W.setDragImage(s,0,0),setTimeout(function(){i.container.removeChild(s);}),W.clearData(),W.setData("Text",i.session.getTextRange()),$=!0,this.setState("drag");},this.onDragEnd=function(N){if(p.draggable=!1,$=!1,this.setState(null),!i.getReadOnly()){var P=N.dataTransfer.dropEffect;!L&&P=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle();}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("");},this.onDragEnter=function(N){if(!(i.getReadOnly()||!O(N.dataTransfer)))return E=N.clientX,S=N.clientY,C||k(),A++,N.dataTransfer.dropEffect=L=F(N),m.preventDefault(N)},this.onDragOver=function(N){if(!(i.getReadOnly()||!O(N.dataTransfer)))return E=N.clientX,S=N.clientY,C||(k(),A++),I!==null&&(I=null),N.dataTransfer.dropEffect=L=F(N),m.preventDefault(N)},this.onDragLeave=function(N){if(A--,A<=0&&C)return R(),L=null,m.preventDefault(N)},this.onDrop=function(N){if(d){var P=N.dataTransfer;if($)switch(L){case"move":g.contains(d.row,d.column)?g={start:d,end:d}:g=i.moveText(g,d);break;case"copy":g=i.moveText(g,d,!0);break}else {var W=P.getData("Text");g={start:d,end:i.session.insert(d,W)},i.focus(),L=null;}return R(),m.preventDefault(N)}},m.addListener(p,"dragstart",this.onDragStart.bind(r),i),m.addListener(p,"dragend",this.onDragEnd.bind(r),i),m.addListener(p,"dragenter",this.onDragEnter.bind(r),i),m.addListener(p,"dragover",this.onDragOver.bind(r),i),m.addListener(p,"dragleave",this.onDragLeave.bind(r),i),m.addListener(p,"drop",this.onDrop.bind(r),i);function u(N,P){var W=Date.now(),B=!P||N.row!=P.row,H=!P||N.column!=P.column;if(!w||B||H)i.moveCursorToPosition(N),w=W,b={x:E,y:S};else {var V=t(b.x,b.y,E,S);V>n?w=null:W-w>=l&&(i.renderer.scrollCursorIntoView(),w=null);}}function v(N,P){var W=Date.now(),B=i.renderer.layerConfig.lineHeight,H=i.renderer.layerConfig.characterWidth,V=i.renderer.scroller.getBoundingClientRect(),U={x:{left:E-V.left,right:V.right-E},y:{top:S-V.top,bottom:V.bottom-S}},K=Math.min(U.x.left,U.x.right),Z=Math.min(U.y.top,U.y.bottom),Y={row:N.row,column:N.column};K/H<=2&&(Y.column+=U.x.left<U.x.right?-3:2),Z/B<=1&&(Y.row+=U.y.top<U.y.bottom?-1:1);var ne=N.row!=Y.row,G=N.column!=Y.column,ie=!P||N.row!=P.row;ne||G&&!ie?T?W-T>=a&&i.renderer.scrollCursorIntoView(Y):T=W:T=null;}function x(){var N=d;d=i.renderer.screenToTextCoordinates(E,S),u(d,N),v(d,N);}function k(){g=i.selection.toOrientedRange(),C=i.session.addMarker(g,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(M),x(),M=setInterval(x,20),A=0,m.addListener(document,"mousemove",D);}function R(){clearInterval(M),i.session.removeMarker(C),C=null,i.selection.fromOrientedRange(g),i.isFocused()&&!$&&i.$resetCursorStyle(),g=null,d=null,A=0,T=null,w=null,m.removeListener(document,"mousemove",D);}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&C&&R();},20));}function O(N){var P=N.types;return !P||Array.prototype.some.call(P,function(W){return W=="text/plain"||W=="Text"})}function F(N){var P=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],B=f.isMac?N.altKey:N.ctrlKey,H="uninitialized";try{H=N.dataTransfer.effectAllowed.toLowerCase();}catch{}var V="none";return B&&P.indexOf(H)>=0?V="copy":W.indexOf(H)>=0?V="move":P.indexOf(H)>=0&&(V="copy"),V}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag();},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd();},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd();},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,i=r.container;i.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var s=f.isWin?"default":"move";r.renderer.setCursorStyle(s),this.setState("dragReady");},this.onMouseDrag=function(r){var i=this.editor.container;if(f.isIE&&this.state=="dragReady"){var s=t(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&i.dragDrop();}if(this.state==="dragWait"){var s=t(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()));}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var i=this.editor,s=r.inSelection(),c=r.getButton(),p=r.domEvent.detail||1;if(p===1&&c===0&&s){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var C=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in C&&(C.unselectable="on"),i.getDragDelay()){if(f.isWebKit){this.cancelDrag=!0;var E=i.container;E.draggable=!0;}this.setState("dragWait");}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0;}}};}).call(e.prototype);function t(r,i,s,c){return Math.sqrt(Math.pow(s-r,2)+Math.pow(c-i,2))}h.DragdropHandler=e;});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(o,h,_){var y=o("./mouse_event").MouseEvent,m=o("../lib/event"),f=o("../lib/dom");h.addTouchListeners=function(a,l){var n="scroll",e,t,r,i,s,c,p=0,C,E=0,S=0,M=0,g,d;function A(){var u=window.navigator&&window.navigator.clipboard,v=!1,x=function(){var I=l.getCopyText(),D=l.session.getUndoManager().hasUndo();d.replaceChild(f.buildDom(v?["span",!I&&k("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&k("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&k("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],u&&k("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&k("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],k("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],k("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),d.firstChild);},k=function(I){return l.commands.canExecute(I,l)},R=function(I){var D=I.target.getAttribute("action");if(D=="more"||!v)return v=!v,x();D=="paste"?u.readText().then(function(O){l.execCommand(D,O);}):D&&((D=="cut"||D=="copy")&&(u?u.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(D)),d.firstChild.style.display="none",v=!1,D!="openCommandPalette"&&l.focus();};d=f.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){n="menu",I.stopPropagation(),I.preventDefault(),l.textInput.focus();},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),R(I);},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container);}function L(){if(!l.getOption("enableMobileMenu")){d&&$();return}d||A();var u=l.selection.cursor,v=l.renderer.textToScreenCoordinates(u.row,u.column),x=l.renderer.textToScreenCoordinates(0,0).pageX,k=l.renderer.scrollLeft,R=l.container.getBoundingClientRect();d.style.top=v.pageY-R.top-3+"px",v.pageX-R.left<R.width-70?(d.style.left="",d.style.right="10px"):(d.style.right="",d.style.left=x+k-R.left+"px"),d.style.display="",d.firstChild.style.display="none",l.on("input",$);}function $(u){d&&(d.style.display="none"),l.off("input",$);}function T(){s=null,clearTimeout(s);var u=l.selection.getRange(),v=u.contains(C.row,C.column);(u.isEmpty()||!v)&&(l.selection.moveToPosition(C),l.selection.selectWord()),n="wait",L();}function w(){s=null,clearTimeout(s),l.selection.moveToPosition(C);var u=E>=2?l.selection.getLineRange(C.row):l.session.getBracketRange(C);u&&!u.isEmpty()?l.selection.setRange(u):l.selection.selectWord(),n="wait";}m.addListener(a,"contextmenu",function(u){if(g){var v=l.textInput.getElement();v.focus();}},l),m.addListener(a,"touchstart",function(u){var v=u.touches;if(s||v.length>1){clearTimeout(s),s=null,r=-1,n="zoom";return}g=l.$mouseHandler.isMousePressed=!0;var x=l.renderer.layerConfig.lineHeight,k=l.renderer.layerConfig.lineHeight,R=u.timeStamp;i=R;var I=v[0],D=I.clientX,O=I.clientY;Math.abs(e-D)+Math.abs(t-O)>x&&(r=-1),e=u.clientX=D,t=u.clientY=O,S=M=0;var F=new y(u,l);if(C=F.getDocumentPosition(),R-r<500&&v.length==1&&!p)E++,u.preventDefault(),u.button=0,w();else {E=0;var N=l.selection.cursor,P=l.selection.isEmpty()?N:l.selection.anchor,W=l.renderer.$cursorLayer.getPixelPosition(N,!0),B=l.renderer.$cursorLayer.getPixelPosition(P,!0),H=l.renderer.scroller.getBoundingClientRect(),V=l.renderer.layerConfig.offset,U=l.renderer.scrollLeft,K=function(ne,G){return ne=ne/k,G=G/x-.75,ne*ne+G*G};if(u.clientX<H.left){n="zoom";return}var Z=K(u.clientX-H.left-W.left+U,u.clientY-H.top-W.top+V),Y=K(u.clientX-H.left-B.left+U,u.clientY-H.top-B.top+V);Z<3.5&&Y<3.5&&(n=Z>Y?"cursor":"anchor"),Y<3.5?n="anchor":Z<3.5?n="cursor":n="scroll",s=setTimeout(T,450);}r=R;},l),m.addListener(a,"touchend",function(u){g=l.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),n=="zoom"?(n="",p=0):s?(l.selection.moveToPosition(C),p=0,L()):n=="scroll"?(b(),$()):L(),clearTimeout(s),s=null;},l),m.addListener(a,"touchmove",function(u){s&&(clearTimeout(s),s=null);var v=u.touches;if(!(v.length>1||n=="zoom")){var x=v[0],k=e-x.clientX,R=t-x.clientY;if(n=="wait")if(k*k+R*R>4)n="cursor";else return u.preventDefault();e=x.clientX,t=x.clientY,u.clientX=x.clientX,u.clientY=x.clientY;var I=u.timeStamp,D=I-i;if(i=I,n=="scroll"){var O=new y(u,l);O.speed=1,O.wheelX=k,O.wheelY=R,10*Math.abs(k)<Math.abs(R)&&(k=0),10*Math.abs(R)<Math.abs(k)&&(R=0),D!=0&&(S=k/D,M=R/D),l._emit("mousewheel",O),O.propagationStopped||(S=M=0);}else {var F=new y(u,l),N=F.getDocumentPosition();n=="cursor"?l.selection.moveCursorToPosition(N):n=="anchor"&&l.selection.setSelectionAnchor(N.row,N.column),l.renderer.scrollCursorIntoView(N),u.preventDefault();}}},l);function b(){p+=60,c=setInterval(function(){p--<=0&&(clearInterval(c),c=null),Math.abs(S)<.01&&(S=0),Math.abs(M)<.01&&(M=0),p<20&&(S=.9*S),p<20&&(M=.9*M);var u=l.session.getScrollTop();l.renderer.scrollBy(10*S,10*M),u==l.session.getScrollTop()&&(p=0);},10);}};});ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(o,h,_){var y=o("../lib/event"),m=o("../lib/useragent"),f=o("./default_handlers").DefaultHandlers,a=o("./default_gutter_handler").GutterHandler,l=o("./mouse_event").MouseEvent,n=o("./dragdrop_handler").DragdropHandler,e=o("./touch_handler").addTouchListeners,t=o("../config"),r=function(){function i(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var c=this;this.editor=s,new f(this),new a(this),new n(this);var p=function(S){var M=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());M&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus();});},C=s.renderer.getMouseEventTarget();y.addListener(C,"click",this.onMouseEvent.bind(this,"click"),s),y.addListener(C,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),y.addMultiMouseDownListener([C,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),y.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),e(s.container,s);var E=s.renderer.$gutter;y.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),y.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),s),y.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),y.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),y.addListener(C,"mousedown",p,s),y.addListener(E,"mousedown",p,s),m.isIE&&s.renderer.scrollBarV&&(y.addListener(s.renderer.scrollBarV.element,"mousedown",p,s),y.addListener(s.renderer.scrollBarH.element,"mousedown",p,s)),s.on("mousemove",function(S){if(!(c.state||c.$dragDelay||!c.$dragEnabled)){var M=s.renderer.screenToTextCoordinates(S.x,S.y),g=s.session.selection.getRange(),d=s.renderer;!g.isEmpty()&&g.insideStart(M.row,M.column)?d.setCursorStyle("default"):d.setCursorStyle("");}},s);}return i.prototype.onMouseEvent=function(s,c){this.editor.session&&this.editor._emit(s,new l(c,this.editor));},i.prototype.onMouseMove=function(s,c){var p=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!p||!p.length||this.editor._emit(s,new l(c,this.editor));},i.prototype.onMouseWheel=function(s,c){var p=new l(c,this.editor);p.speed=this.$scrollSpeed*2,p.wheelX=c.wheelX,p.wheelY=c.wheelY,this.editor._emit(s,p);},i.prototype.setState=function(s){this.state=s;},i.prototype.captureMouse=function(s,c){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var p=this.editor,C=this.editor.renderer;C.$isMousePressed=!0;var E=this,S=function(L){if(L){if(m.isWebKit&&!L.which&&E.releaseMouse)return E.releaseMouse();E.x=L.clientX,E.y=L.clientY,c&&c(L),E.mouseEvent=new l(L,E.editor),E.$mouseMoved=!0;}},M=function(L){p.off("beforeEndOperation",d),clearInterval(A),p.session&&g(),E[E.state+"End"]&&E[E.state+"End"](L),E.state="",E.isMousePressed=C.$isMousePressed=!1,C.$keepTextAreaAtCursor&&C.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,L&&E.onMouseEvent("mouseup",L),p.endOperation();},g=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1;};if(m.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){M(s);});var d=function(L){E.releaseMouse&&p.curOp.command.name&&p.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse());};p.on("beforeEndOperation",d),p.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=S,E.releaseMouse=y.capture(this.editor.container,S,M);var A=setInterval(g,20);},i.prototype.cancelContextMenu=function(){var s=function(c){c&&c.domEvent&&c.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),c&&c.domEvent&&y.stopEvent(c.domEvent));}.bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s);},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse();},i}();r.prototype.releaseMouse=null,t.defineOptions(r.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:m.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),h.MouseHandler=r;});ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(o,h,_){var y=o("../lib/dom"),m=function(){function f(a){a.on("click",function(l){var n=l.getDocumentPosition(),e=a.session,t=e.getFoldAt(n.row,n.column,1);t&&(l.getAccelKey()?e.removeFold(t):e.expandFold(t),l.stop());var r=l.domEvent&&l.domEvent.target;r&&y.hasCssClass(r,"ace_inline_button")&&y.hasCssClass(r,"ace_toggle_wrap")&&(e.setOption("wrap",!e.getUseWrapMode()),a.renderer.scrollCursorIntoView());}),a.on("gutterclick",function(l){var n=a.renderer.$gutterLayer.getRegion(l);if(n=="foldWidgets"){var e=l.getDocumentPosition().row,t=a.session;t.foldWidgets&&t.foldWidgets[e]&&a.session.onFoldWidgetClick(e,l),a.isFocused()||a.focus(),l.stop();}}),a.on("gutterdblclick",function(l){var n=a.renderer.$gutterLayer.getRegion(l);if(n=="foldWidgets"){var e=l.getDocumentPosition().row,t=a.session,r=t.getParentFoldRangeData(e,!0),i=r.range||r.firstRange;if(i){e=i.start.row;var s=t.getFoldAt(e,t.getLine(e).length,1);s?t.removeFold(s):(t.addFold("...",i),a.renderer.scrollCursorIntoView({row:i.start.row,column:0}));}l.stop();}});}return f}();h.FoldHandler=m;});ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(o,h,_){var y=o("../lib/keys"),m=o("../lib/event"),f=function(){function a(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands);}return a.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0);},a.prototype.setKeyboardHandler=function(l){var n=this.$handlers;if(n[n.length-1]!=l){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(l,1);}},a.prototype.addKeyboardHandler=function(l,n){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var e=this.$handlers.indexOf(l);e!=-1&&this.$handlers.splice(e,1),n==null?this.$handlers.push(l):this.$handlers.splice(n,0,l),e==-1&&l.attach&&l.attach(this.$editor);}},a.prototype.removeKeyboardHandler=function(l){var n=this.$handlers.indexOf(l);return n==-1?!1:(this.$handlers.splice(n,1),l.detach&&l.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var l=this.$data,n=l.editor;return this.$handlers.map(function(e){return e.getStatusText&&e.getStatusText(n,l)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(l,n,e,t){for(var r,i=!1,s=this.$editor.commands,c=this.$handlers.length;c--&&(r=this.$handlers[c].handleKeyboard(this.$data,l,n,e,t),!(!(!r||!r.command)&&(r.command=="null"?i=!0:i=s.exec(r.command,this.$editor,r.args,t),i&&t&&l!=-1&&r.passEvent!=!0&&r.command.passEvent!=!0&&m.stopEvent(t),i))););return !i&&l==-1&&(r={command:"insertstring"},i=s.exec("insertstring",this.$editor,n)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),i},a.prototype.onCommandKey=function(l,n,e){var t=y.keyCodeToString(e);return this.$callKeyboardHandlers(n,t,e,l)},a.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},a}();h.KeyBinding=f;});ace.define("ace/lib/bidiutil",["require","exports","module"],function(o,h,_){var f=0,a=0,l=!1,e=!1,t=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p=0,C=1,E=0,S=1,M=2,g=3,d=4,A=5,L=6,$=7,T=8,w=9,b=10,u=11,v=12,x=13,k=14,R=15,I=16,D=17,O=18,F=[O,O,O,O,O,O,O,O,O,L,A,L,T,A,O,O,O,O,O,O,O,O,O,O,O,O,O,O,A,A,A,L,T,d,d,u,u,u,d,d,d,d,d,b,w,b,w,w,M,M,M,M,M,M,M,M,M,M,w,d,d,d,d,d,d,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,d,d,d,d,d,d,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,d,d,d,d,O,O,O,O,O,O,A,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,w,d,u,u,u,u,d,d,d,d,E,d,d,O,d,d,u,u,M,M,d,E,d,d,d,M,E,d,d,d,d,d],N=[T,T,T,T,T,T,T,T,T,T,T,O,O,O,E,S,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,T,A,x,k,R,I,D,w,u,u,u,u,u,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,w,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,T];function P(U,K,Z,Y){var ne=f?c:s,G=null,ie=null,ee=null,oe=0,Le=null,Ie=null,Ae=-1,ye=null,Se=null,We=[];if(!Y)for(ye=0,Y=[];ye<Z;ye++)Y[ye]=H(U[ye]);for(a=f,l=!1,e=!1,t=!1,Se=0;Se<Z;Se++){if(G=oe,We[Se]=ie=B(U,Y,We,Se),oe=ne[G][ie],Le=oe&240,oe&=15,K[Se]=ee=ne[oe][5],Le>0)if(Le==16){for(ye=Ae;ye<Se;ye++)K[ye]=1;Ae=-1;}else Ae=-1;if(Ie=ne[oe][6],Ie)Ae==-1&&(Ae=Se);else if(Ae>-1){for(ye=Ae;ye<Se;ye++)K[ye]=ee;Ae=-1;}Y[Se]==A&&(K[Se]=0),a|=ee;}if(t){for(ye=0;ye<Z;ye++)if(Y[ye]==L){K[ye]=f;for(var Oe=ye-1;Oe>=0&&Y[Oe]==T;Oe--)K[Oe]=f;}}}function W(U,K,Z){if(!(a<U)){if(U==1&&f==C&&!e){Z.reverse();return}for(var Y=Z.length,ne=0,G,ie,ee,oe;ne<Y;){if(K[ne]>=U){for(G=ne+1;G<Y&&K[G]>=U;)G++;for(ie=ne,ee=G-1;ie<ee;ie++,ee--)oe=Z[ie],Z[ie]=Z[ee],Z[ee]=oe;ne=G;}ne++;}}}function B(U,K,Z,Y){var ne=K[Y],G,ie,ee,oe;switch(ne){case E:case S:l=!1;case d:case g:return ne;case M:return l?g:M;case $:return l=!0,S;case T:return d;case w:return Y<1||Y+1>=K.length||(G=Z[Y-1])!=M&&G!=g||(ie=K[Y+1])!=M&&ie!=g?d:(l&&(ie=g),ie==G?ie:d);case b:return G=Y>0?Z[Y-1]:A,G==M&&Y+1<K.length&&K[Y+1]==M?M:d;case u:if(Y>0&&Z[Y-1]==M)return M;if(l)return d;for(oe=Y+1,ee=K.length;oe<ee&&K[oe]==u;)oe++;return oe<ee&&K[oe]==M?M:d;case v:for(ee=K.length,oe=Y+1;oe<ee&&K[oe]==v;)oe++;if(oe<ee){var Le=U[Y],Ie=Le>=1425&&Le<=2303||Le==64286;if(G=K[oe],Ie&&(G==S||G==$))return S}return Y<1||(G=K[Y-1])==A?d:Z[Y-1];case A:return l=!1,e=!0,f;case L:return t=!0,d;case x:case k:case I:case D:case R:l=!1;case O:return d}}function H(U){var K=U.charCodeAt(0),Z=K>>8;return Z==0?K>191?E:F[K]:Z==5?/[\u0591-\u05f4]/.test(U)?S:E:Z==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(U)?v:/[\u0660-\u0669\u066b-\u066c]/.test(U)?g:K==1642?u:/[\u06f0-\u06f9]/.test(U)?M:$:Z==32&&K<=8287?N[K&255]:Z==254&&K>=65136?$:d}h.L=E,h.R=S,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(U,K,Z){if(U.length<2)return {};var Y=U.split(""),ne=new Array(Y.length),G=new Array(Y.length),ie=[];f=Z?C:p,P(Y,ie,Y.length,K);for(var ee=0;ee<ne.length;ne[ee]=ee,ee++);W(2,ie,ne),W(1,ie,ne);for(var ee=0;ee<ne.length-1;ee++)K[ee]===g?ie[ee]=h.AN:ie[ee]===S&&(K[ee]>$&&K[ee]<x||K[ee]===d||K[ee]===O)?ie[ee]=h.ON_R:ee>0&&Y[ee-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(Y[ee])&&(ie[ee-1]=ie[ee]=h.R_H,ee++);Y[Y.length-1]===h.DOT&&(ie[Y.length-1]=h.B),Y[0]==="\u202B"&&(ie[0]=h.RLE);for(var ee=0;ee<ne.length;ee++)G[ee]=ie[ne[ee]];return {logicalFromVisual:ne,bidiLevels:G}},h.hasBidiCharacters=function(U,K){for(var Z=!1,Y=0;Y<U.length;Y++)K[Y]=H(U.charAt(Y)),!Z&&(K[Y]==S||K[Y]==$||K[Y]==g)&&(Z=!0);return Z},h.getVisualFromLogicalIdx=function(U,K){for(var Z=0;Z<K.logicalFromVisual.length;Z++)if(K.logicalFromVisual[Z]==U)return Z;return 0};});ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(o,h,_){var y=o("./lib/bidiutil"),m=o("./lib/lang"),f=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function l(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=y,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=f.test(n.getValue());}return l.prototype.isBidiRow=function(n,e,t){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(e,t),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&f.test(n.lines.join(`
198
+ `))&&(this.seenBidi=!0,this.currentRow=null);},l.prototype.getDocumentRow=function(){var n=0,e=this.session.$screenRowCache;if(e.length){var t=this.session.$getRowCacheIndex(e,this.currentRow);t>=0&&(n=this.session.$docRowCache[t]);}return n},l.prototype.getSplitIndex=function(){var n=0,e=this.session.$screenRowCache;if(e.length)for(var t,r=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-n>0&&(t=this.session.$getRowCacheIndex(e,this.currentRow-n-1),t===r);)r=t,n++;else n=this.currentRow;return n},l.prototype.updateRowLine=function(n,e){n===void 0&&(n=this.getDocumentRow());var t=n===this.session.getLength()-1,r=t?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[n];i&&(e===void 0&&(e=this.getSplitIndex()),e>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[y.L],this.line=e<i.length?this.line.substring(i[e-1],i[e]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[e]),e==i.length&&(this.line+=this.showInvisibles?r:y.DOT));}else this.line+=this.showInvisibles?r:y.DOT;var s=this.session,c=0,p;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(C,E){return C===" "||s.isFullWidth(C.charCodeAt(0))?(p=C===" "?s.getScreenTabSize(E+c):2,c+=p-1,m.stringRepeat(y.DOT,p)):C}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==y.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width);},l.prototype.updateBidiMap=function(){var n=[];y.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=y.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={};},l.prototype.markAsDirty=function(){this.currentRow=null;},l.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var e=this.characterWidth=n.$characterSize.width,t=n.$measureCharWidth("\u05D4");this.charWidths[y.L]=this.charWidths[y.EN]=this.charWidths[y.ON_R]=e,this.charWidths[y.R]=this.charWidths[y.AN]=t,this.charWidths[y.R_H]=t*.45,this.charWidths[y.B]=this.charWidths[y.RLE]=0,this.currentRow=null;}},l.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null;},l.prototype.setEolChar=function(n){this.EOL=n;},l.prototype.setContentWidth=function(n){this.contentWidth=n;},l.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(n,e){for(var t=n.getCursorPosition(),r=n.selection.getSelectionAnchor().row;r<=t.row;r++)!e&&n.session.getLine(r).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(r,0,1):e&&n.session.getLine(r).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:r},n.session.$bidiHandler.RLE);},l.prototype.getPosLeft=function(n){n-=this.wrapIndent;var e=this.line.charAt(0)===this.RLE?1:0,t=n>e?this.session.getOverwrite()?n:n-1:e,r=y.getVisualFromLogicalIdx(t,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&n<=e&&i[r]%2!==0&&r++;for(var c=0;c<r;c++)s+=this.charWidths[i[c]];return !this.session.getOverwrite()&&n>e&&i[r]%2===0&&(s+=this.charWidths[i[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},l.prototype.getSelections=function(n,e){var t=this.bidiMap,r=t.bidiLevels,i,s=[],c=0,p=Math.min(n,e)-this.wrapIndent,C=Math.max(n,e)-this.wrapIndent,E=!1,S=!1,M=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,d=0;d<r.length;d++)g=t.logicalFromVisual[d],i=r[d],E=g>=p&&g<C,E&&!S?M=c:!E&&S&&s.push({left:M,width:c-M}),c+=this.charWidths[i],S=E;if(E&&d===r.length&&s.push({left:M,width:c-M}),this.isRtlDir)for(var A=0;A<s.length;A++)s[A].left+=this.rtlLineOffset;return s},l.prototype.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var e=0,t=Math.max(t,0),r=0,i=0,s=this.bidiMap.bidiLevels,c=this.charWidths[s[i]];for(this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);t>r+c/2;){if(r+=c,i===s.length-1){c=0;break}c=this.charWidths[s[++i]];}return i>0&&s[i-1]%2!==0&&s[i]%2===0?(t<r&&i--,e=this.bidiMap.logicalFromVisual[i]):i>0&&s[i-1]%2===0&&s[i]%2!==0?e=1+(t>r?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===s.length-1&&c===0&&s[i-1]%2===0||!this.isRtlDir&&i===0&&s[i]%2!==0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&s[i-1]%2!==0&&c!==0&&i--,e=this.bidiMap.logicalFromVisual[i]),e===0&&this.isRtlDir&&e++,e+this.wrapIndent},l}();h.BidiHandler=a;});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(o,h,_){var y=o("./lib/oop"),m=o("./lib/lang"),f=o("./lib/event_emitter").EventEmitter,a=o("./range").Range,l=function(){function n(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(r){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&r.old.column!=r.value.column&&(t.$desiredColumn=null);}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection");});}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return !this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t);},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},n.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"));},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE);},n.prototype.setRange=function(e,t){var r=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(r.row,r.column,i.row,i.column);},n.prototype.$setSelection=function(e,t,r,i){if(!this.$silent){var s=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(r,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||c)&&this._emit("changeSelection");}},n.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this);},n.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t);});},n.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e);});},n.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t);},n.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e);},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp);},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown);},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight);},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft);},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart);},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd);},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd);},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart);},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight);},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft);},n.prototype.getWordRange=function(e,t){if(typeof t>"u"){var r=e||this.lead;e=r.row,t=r.column;}return this.session.getWordRange(e,t)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange());},n.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t);},n.prototype.getLineRange=function(e,t){var r=typeof e=="number"?e:this.lead.row,i,s=this.session.getFoldLine(r);return s?(r=s.start.row,i=s.end.row):i=r,t===!0?new a(r,0,i,this.session.getLine(i).length):new a(r,0,i+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange());},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0);},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0);},n.prototype.wouldMoveIntoSoftTab=function(e,t,r){var i=e.column,s=e.column+t;return r<0&&(i=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,s).split(" ").length-1==t},n.prototype.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else {var r=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,r,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-r):this.moveCursorBy(0,-1);}},n.prototype.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else {var r=this.session.getTabSize(),e=this.lead;this.wouldMoveIntoSoftTab(e,r,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,r):this.moveCursorBy(0,1);}},n.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,r=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(r,0),s=this.session.getDisplayLine(e,null,i.row,i.column),c=s.match(/^\s*/);c[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(i.column+=c[0].length),this.moveCursorToPosition(i);},n.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var r=this.session.getLine(t.row);if(t.column==r.length){var i=r.search(/\s+$/);i>0&&(t.column=i);}}this.moveCursorTo(t.row,t.column);},n.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t);},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0);},n.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,r=this.doc.getLine(e),i=r.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=r.substring(t)),t>=r.length){this.moveCursorTo(e,r.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t);},n.prototype.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,r;if(r=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(r.start.row,r.start.column);return}var i=this.session.getFoldStringAt(e,t,-1);i==null&&(i=this.doc.getLine(e).substring(0,t));var s=m.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t);},n.prototype.$shortWordEndIndex=function(e){var t=0,r,i=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))t=this.session.tokenRe.lastIndex;else {for(;(r=e[t])&&i.test(r);)t++;if(t<1){for(s.lastIndex=0;(r=e[t])&&!s.test(r);)if(s.lastIndex=0,t++,i.test(r))if(t>2){t--;break}else {for(;(r=e[t])&&i.test(r);)t++;if(t>2)break}}}return s.lastIndex=0,t},n.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,r=this.doc.getLine(e),i=r.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==r.length){var c=this.doc.getLength();do e++,i=this.doc.getLine(e);while(e<c&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0;}var p=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+p);},n.prototype.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,r;if(r=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(r.start.row,r.start.column);var i=this.session.getLine(e).substring(0,t);if(t===0){do e--,i=this.doc.getLine(e);while(e>0&&/^\s*$/.test(i));t=i.length,/\s+$/.test(i)||(i="");}var s=m.stringReverse(i),c=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-c)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight();},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft();},n.prototype.moveCursorBy=function(e,t){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];e<0?e-=s.rowsAbove||0:e>0&&(e+=s.rowCount-(s.rowsAbove||0));}var c=this.session.screenToDocumentPosition(r.row+e,r.column,i);e!==0&&t===0&&c.row===this.lead.row&&(c.column,this.lead.column),this.moveCursorTo(c.row,c.column+t,t===0);},n.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column);},n.prototype.moveCursorTo=function(e,t,r){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t=t-1:t=t+1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,r||(this.$desiredColumn=null);},n.prototype.moveCursorToScreen=function(e,t,r){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,r);},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach();},n.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn;},n.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},n.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var r=this.getCursor();return a.fromPoints(t,r)}catch{return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t);}},n.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(t){var r=t.clone();return r.isBackwards=t.cursor==t.start,r});else {var e=this.getRange();e.isBackwards=this.isBackwards();}return e},n.prototype.fromJSON=function(e){if(e.start==null)if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var r=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(r.cursor=r.start),this.addRange(r,!0);}return}else e=e[0];this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards);},n.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return !1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return !1;return !0},n}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,y.implement(l.prototype,f),h.Selection=l;});ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(o,h,_){var y=o("./lib/report_error").reportError,m=2e3,f=function(){function a(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var n in this.states){for(var e=this.states[n],t=[],r=0,i=this.matchMappings[n]={defaultToken:"text"},s="g",c=[],p=0;p<e.length;p++){var C=e[p];if(C.defaultToken&&(i.defaultToken=C.defaultToken),C.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),C.unicode&&s.indexOf("u")===-1&&(s+="u"),C.regex!=null){C.regex instanceof RegExp&&(C.regex=C.regex.toString().slice(1,-1));var E=C.regex,S=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(C.token)?C.token.length==1||S==1?C.token=C.token[0]:S-1!=C.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:C,groupCount:S-1}),C.token=C.token[0]):(C.tokenArray=C.token,C.token=null,C.onMatch=this.$arrayTokens):typeof C.token=="function"&&!C.onMatch&&(S>1?C.onMatch=this.$applyToken:C.onMatch=C.token),S>1&&(/\\\d/.test(C.regex)?E=C.regex.replace(/\\([0-9]+)/g,function(M,g){return "\\"+(parseInt(g,10)+r+1)}):(S=1,E=this.removeCapturingGroups(C.regex)),!C.splitRegex&&typeof C.token!="string"&&c.push(C)),i[r]=p,r+=S,t.push(E),C.onMatch||(C.onMatch=null);}}t.length||(i[0]=0,t.push("$")),c.forEach(function(M){M.splitRegex=this.createSplitterRegexp(M.regex,s);},this),this.regExps[n]=new RegExp("("+t.join(")|(")+")|($)",s);}}return a.prototype.$setMaxTokenCount=function(l){m=l|0;},a.prototype.$applyToken=function(l){var n=this.splitRegex.exec(l).slice(1),e=this.token.apply(this,n);if(typeof e=="string")return [{type:e,value:l}];for(var t=[],r=0,i=e.length;r<i;r++)n[r]&&(t[t.length]={type:e[r],value:n[r]});return t},a.prototype.$arrayTokens=function(l){if(!l)return [];var n=this.splitRegex.exec(l);if(!n)return "text";for(var e=[],t=this.tokenArray,r=0,i=t.length;r<i;r++)n[r+1]&&(e[e.length]={type:t[r],value:n[r+1]});return e},a.prototype.removeCapturingGroups=function(l){var n=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e});return n},a.prototype.createSplitterRegexp=function(l,n){if(l.indexOf("(?=")!=-1){var e=0,t=!1,r={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,s,c,p,C,E){return t?t=C!="]":C?t=!0:p?(e==r.stack&&(r.end=E+1,r.stack=-1),e--):c&&(e++,c.length!=1&&(r.stack=e,r.start=E)),i}),r.end!=null&&/^\)*$/.test(l.substr(r.end))&&(l=l.substring(0,r.start)+l.substr(r.end));}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(n||"").replace("g",""))},a.prototype.getLineTokens=function(l,n){if(n&&typeof n!="string"){var e=n.slice(0);n=e[0],n==="#tmp"&&(e.shift(),n=e.shift());}else var e=[];var t=n||"start",r=this.states[t];r||(t="start",r=this.states[t]);var i=this.matchMappings[t],s=this.regExps[t];s.lastIndex=0;for(var c,p=[],C=0,E=0,S={type:null,value:""};c=s.exec(l);){var M=i.defaultToken,g=null,d=c[0],A=s.lastIndex;if(A-d.length>C){var L=l.substring(C,A-d.length);S.type==M?S.value+=L:(S.type&&p.push(S),S={type:M,value:L});}for(var $=0;$<c.length-2;$++)if(c[$+1]!==void 0){g=r[i[$]],g.onMatch?M=g.onMatch(d,t,e,l):M=g.token,g.next&&(typeof g.next=="string"?t=g.next:t=g.next(t,e),r=this.states[t],r||(this.reportError("state doesn't exist",t),t="start",r=this.states[t]),i=this.matchMappings[t],C=A,s=this.regExps[t],s.lastIndex=A),g.consumeLineEnd&&(C=A);break}if(d){if(typeof M=="string")(!g||g.merge!==!1)&&S.type===M?S.value+=d:(S.type&&p.push(S),S={type:M,value:d});else if(M){S.type&&p.push(S),S={type:null,value:""};for(var $=0;$<M.length;$++)p.push(M[$]);}}if(C==l.length)break;if(C=A,E++>m){for(E>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:l});C<l.length;)S.type&&p.push(S),S={value:l.substring(C,C+=500),type:"overflow"};t="start",e=[];break}}return S.type&&p.push(S),e.length>1&&e[0]!==t&&e.unshift("#tmp",t),{tokens:p,state:e.length?e:t}},a}();f.prototype.reportError=y,h.Tokenizer=f;});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(o,h,_){var y=o("../lib/deep_copy").deepCopy,m;m=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]};},function(){this.addRules=function(l,n){if(!n){for(var e in l)this.$rules[e]=l[e];return}for(var e in l){for(var t=l[e],r=0;r<t.length;r++){var i=t[r];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(n)!==0&&(i.next=n+i.next),i.nextState&&i.nextState.indexOf(n)!==0&&(i.nextState=n+i.nextState));}this.$rules[n+e]=t;}},this.getRules=function(){return this.$rules},this.embedRules=function(l,n,e,t,r){var i=typeof l=="function"?new l().getRules():l;if(t)for(var s=0;s<t.length;s++)t[s]=n+t[s];else {t=[];for(var c in i)t.push(n+c);}if(this.addRules(i,n),e)for(var p=Array.prototype[r?"push":"unshift"],s=0;s<t.length;s++)p.apply(this.$rules[t[s]],y(e));this.$embeds||(this.$embeds=[]),this.$embeds.push(n);},this.getEmbeds=function(){return this.$embeds};var f=function(l,n){return (l!="start"||n.length)&&n.unshift(this.nextState,l),this.nextState},a=function(l,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var l=0,n=this.$rules;function e(t){var r=n[t];r.processed=!0;for(var i=0;i<r.length;i++){var s=r[i],c=null;Array.isArray(s)&&(c=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var p=s.next||s.push;if(p&&Array.isArray(p)){var C=s.stateName;C||(C=s.token,typeof C!="string"&&(C=C[0]||""),n[C]&&(C+=l++)),n[C]=p,s.next=C,e(C);}else p=="pop"&&(s.next=a);if(s.push&&(s.nextState=s.next||s.push,s.next=f,delete s.push),s.rules)for(var E in s.rules)n[E]?n[E].push&&n[E].push.apply(n[E],s.rules[E]):n[E]=s.rules[E];var S=typeof s=="string"?s:s.include;if(S&&(S==="$self"&&(S="start"),Array.isArray(S)?c=S.map(function(g){return n[g]}):c=n[S]),c){var M=[i,1].concat(c);s.noEscape&&(M=M.filter(function(g){return !g.next})),r.splice.apply(r,M),i--;}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken);}}Object.keys(n).forEach(e,this);},this.createKeywordMapper=function(l,n,e,t){var r=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(i){for(var s=l[i],c=s.split(t||"|"),p=c.length;p--;){var C=c[p];this.$keywordList.push(C),e&&(C=C.toLowerCase()),r[C]=i;}},this),l=null,e?function(i){return r[i.toLowerCase()]||n}:function(i){return r[i]||n}},this.getKeywords=function(){return this.$keywords};}.call(m.prototype),h.TextHighlightRules=m;});ace.define("ace/mode/behaviour",["require","exports","module"],function(o,h,_){var y;y=function(){this.$behaviours={};},function(){this.add=function(m,f,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[m]:this.$behaviours[m]={};}this.$behaviours[m][f]=a;},this.addBehaviours=function(m){for(var f in m)for(var a in m[f])this.add(f,a,m[f][a]);},this.remove=function(m){this.$behaviours&&this.$behaviours[m]&&delete this.$behaviours[m];},this.inherit=function(m,f){if(typeof m=="function")var a=new m().getBehaviours(f);else var a=m.getBehaviours(f);this.addBehaviours(a);},this.getBehaviours=function(m){if(m){for(var f={},a=0;a<m.length;a++)this.$behaviours[m[a]]&&(f[m[a]]=this.$behaviours[m[a]]);return f}else return this.$behaviours};}.call(y.prototype),h.Behaviour=y;});ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(o,h,_){var y=o("./range").Range,m=function(){function f(a,l,n){this.$session=a,this.$row=l,this.$rowTokens=a.getTokens(l);var e=a.getTokenAt(l,n);this.$tokenIndex=e?e.index:-1;}return f.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1;}return this.$rowTokens[this.$tokenIndex]},f.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0;}return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentTokenRow=function(){return this.$row},f.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,l=this.$tokenIndex,n=a[l].start;if(n!==void 0)return n;for(n=0;l>0;)l-=1,n+=a[l].value.length;return n},f.prototype.getCurrentTokenPosition=function(){return {row:this.$row,column:this.getCurrentTokenColumn()}},f.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new y(this.$row,l,this.$row,l+a.value.length)},f}();h.TokenIterator=m;});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(o,h,_){var y=o("../../lib/oop"),m=o("../behaviour").Behaviour,f=o("../../token_iterator").TokenIterator,a=o("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],e,t={},r={'"':'"',"'":"'"},i=function(p){var C=-1;if(p.multiSelect&&(C=p.selection.index,t.rangeCount!=p.multiSelect.rangeCount&&(t={rangeCount:p.multiSelect.rangeCount})),t[C])return e=t[C];e=t[C]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""};},s=function(p,C,E,S){var M=p.end.row-p.start.row;return {text:E+C+S,selection:[0,p.start.column+1,M,p.end.column+(M?0:1)]}},c;c=function(p){p=p||{},this.add("braces","insertion",function(C,E,S,M,g){var d=S.getCursorPosition(),A=M.doc.getLine(d.row);if(g=="{"){i(S);var L=S.getSelectionRange(),$=M.doc.getTextRange(L),T=M.getTokenAt(d.row,d.column);if($!==""&&$!=="{"&&S.getWrapBehavioursEnabled())return s(L,$,"{","}");if(T&&/(?:string)\.quasi|\.xml/.test(T.type)){var w=[/tag\-(?:open|name)/,/attribute\-name/];return w.some(function(I){return I.test(T.type)})||/(string)\.quasi/.test(T.type)&&T.value[d.column-T.start-1]!=="$"?void 0:(c.recordAutoInsert(S,M,"}"),{text:"{}",selection:[1,1]})}else if(c.isSaneInsertion(S,M))return /[\]\}\)]/.test(A[d.column])||S.inMultiSelectMode||p.braces?(c.recordAutoInsert(S,M,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(S,M,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){i(S);var b=A.substring(d.column,d.column+1);if(b=="}"){var u=M.$findOpeningBracket("}",{column:d.column+1,row:d.row});if(u!==null&&c.isAutoInsertedClosing(d,A,g))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==`
199
+ `||g==`\r
200
+ `){i(S);var v="";c.isMaybeInsertedClosing(d,A)&&(v=a.stringRepeat("}",e.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var b=A.substring(d.column,d.column+1);if(b==="}"){var x=M.findMatchingBracket({row:d.row,column:d.column+1},"}");if(!x)return null;var k=this.$getIndent(M.getLine(x.row));}else if(v)var k=this.$getIndent(A);else {c.clearMaybeInsertedClosing();return}var R=k+M.getTabString();return {text:`
201
+ `+R+`
202
+ `+k+v,selection:[1,R.length,1,R.length]}}else c.clearMaybeInsertedClosing();}),this.add("braces","deletion",function(C,E,S,M,g){var d=M.doc.getTextRange(g);if(!g.isMultiLine()&&d=="{"){i(S);var A=M.doc.getLine(g.start.row),L=A.substring(g.end.column,g.end.column+1);if(L=="}")return g.end.column++,g;e.maybeInsertedBrackets--;}}),this.add("parens","insertion",function(C,E,S,M,g){if(g=="("){i(S);var d=S.getSelectionRange(),A=M.doc.getTextRange(d);if(A!==""&&S.getWrapBehavioursEnabled())return s(d,A,"(",")");if(c.isSaneInsertion(S,M))return c.recordAutoInsert(S,M,")"),{text:"()",selection:[1,1]}}else if(g==")"){i(S);var L=S.getCursorPosition(),$=M.doc.getLine(L.row),T=$.substring(L.column,L.column+1);if(T==")"){var w=M.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(w!==null&&c.isAutoInsertedClosing(L,$,g))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(C,E,S,M,g){var d=M.doc.getTextRange(g);if(!g.isMultiLine()&&d=="("){i(S);var A=M.doc.getLine(g.start.row),L=A.substring(g.start.column+1,g.start.column+2);if(L==")")return g.end.column++,g}}),this.add("brackets","insertion",function(C,E,S,M,g){if(g=="["){i(S);var d=S.getSelectionRange(),A=M.doc.getTextRange(d);if(A!==""&&S.getWrapBehavioursEnabled())return s(d,A,"[","]");if(c.isSaneInsertion(S,M))return c.recordAutoInsert(S,M,"]"),{text:"[]",selection:[1,1]}}else if(g=="]"){i(S);var L=S.getCursorPosition(),$=M.doc.getLine(L.row),T=$.substring(L.column,L.column+1);if(T=="]"){var w=M.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(w!==null&&c.isAutoInsertedClosing(L,$,g))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(C,E,S,M,g){var d=M.doc.getTextRange(g);if(!g.isMultiLine()&&d=="["){i(S);var A=M.doc.getLine(g.start.row),L=A.substring(g.start.column+1,g.start.column+2);if(L=="]")return g.end.column++,g}}),this.add("string_dquotes","insertion",function(C,E,S,M,g){var d=M.$mode.$quotes||r;if(g.length==1&&d[g]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(g)!=-1)return;i(S);var A=g,L=S.getSelectionRange(),$=M.doc.getTextRange(L);if($!==""&&($.length!=1||!d[$])&&S.getWrapBehavioursEnabled())return s(L,$,A,A);if(!$){var T=S.getCursorPosition(),w=M.doc.getLine(T.row),b=w.substring(T.column-1,T.column),u=w.substring(T.column,T.column+1),v=M.getTokenAt(T.row,T.column),x=M.getTokenAt(T.row,T.column+1);if(b=="\\"&&v&&/escape/.test(v.type))return null;var k=v&&/string|escape/.test(v.type),R=!x||/string|escape/.test(x.type),I;if(u==A)I=k!==R,I&&/string\.end/.test(x.type)&&(I=!1);else {if(k&&!R||k&&R)return null;var D=M.$mode.tokenRe;D.lastIndex=0;var O=D.test(b);D.lastIndex=0;var F=D.test(u),N=M.$mode.$pairQuotesAfter,P=N&&N[A]&&N[A].test(b);if(!P&&O||F||u&&!/[\s;,.})\]\\]/.test(u))return null;var W=w[T.column-2];if(b==A&&(W==A||D.test(W)))return null;I=!0;}return {text:I?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(C,E,S,M,g){var d=M.$mode.$quotes||r,A=M.doc.getTextRange(g);if(!g.isMultiLine()&&d.hasOwnProperty(A)){i(S);var L=M.doc.getLine(g.start.row),$=L.substring(g.start.column+1,g.start.column+2);if($==A)return g.end.column++,g}}),p.closeDocComment!==!1&&this.add("doc comment end","insertion",function(C,E,S,M,g){if(C==="doc-start"&&(g===`
203
+ `||g===`\r
204
+ `)&&S.selection.isEmpty()){var d=S.getCursorPosition();if(d.column===0)return;for(var A=M.doc.getLine(d.row),L=M.doc.getLine(d.row+1),$=M.getTokens(d.row),T=0,w=0;w<$.length;w++){T+=$[w].value.length;var b=$[w];if(T>=d.column){if(T===d.column){if(!/\.doc/.test(b.type))return;if(/\*\//.test(b.value)){var u=$[w+1];if(!u||!/\.doc/.test(u.type))return}}var v=d.column-(T-b.value.length),x=b.value.indexOf("*/"),k=b.value.indexOf("/**",x>-1?x+2:0);if(k!==-1&&v>k&&v<k+3||x!==-1&&k!==-1&&v>=x&&v<=k||!/\.doc/.test(b.type))return;break}}var R=this.$getIndent(A);if(/\s*\*/.test(L))return /^\s*\*/.test(A)?{text:g+R+"* ",selection:[1,2+R.length,1,2+R.length]}:{text:g+R+" * ",selection:[1,3+R.length,1,3+R.length]};if(/\/\*\*/.test(A.substring(0,d.column)))return {text:g+R+" * "+g+" "+R+"*/",selection:[1,4+R.length,1,4+R.length]}}});},c.isSaneInsertion=function(p,C){var E=p.getCursorPosition(),S=new f(C,E.row,E.column);if(!this.$matchTokenType(S.getCurrentToken()||"text",l)){if(/[)}\]]/.test(p.session.getLine(E.row)[E.column]))return !0;var M=new f(C,E.row,E.column+1);if(!this.$matchTokenType(M.getCurrentToken()||"text",l))return !1}return S.stepForward(),S.getCurrentTokenRow()!==E.row||this.$matchTokenType(S.getCurrentToken()||"text",n)},c.$matchTokenType=function(p,C){return C.indexOf(p.type||p)>-1},c.recordAutoInsert=function(p,C,E){var S=p.getCursorPosition(),M=C.doc.getLine(S.row);this.isAutoInsertedClosing(S,M,e.autoInsertedLineEnd[0])||(e.autoInsertedBrackets=0),e.autoInsertedRow=S.row,e.autoInsertedLineEnd=E+M.substr(S.column),e.autoInsertedBrackets++;},c.recordMaybeInsert=function(p,C,E){var S=p.getCursorPosition(),M=C.doc.getLine(S.row);this.isMaybeInsertedClosing(S,M)||(e.maybeInsertedBrackets=0),e.maybeInsertedRow=S.row,e.maybeInsertedLineStart=M.substr(0,S.column)+E,e.maybeInsertedLineEnd=M.substr(S.column),e.maybeInsertedBrackets++;},c.isAutoInsertedClosing=function(p,C,E){return e.autoInsertedBrackets>0&&p.row===e.autoInsertedRow&&E===e.autoInsertedLineEnd[0]&&C.substr(p.column)===e.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(p,C){return e.maybeInsertedBrackets>0&&p.row===e.maybeInsertedRow&&C.substr(p.column)===e.maybeInsertedLineEnd&&C.substr(0,p.column)==e.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){e.autoInsertedLineEnd=e.autoInsertedLineEnd.substr(1),e.autoInsertedBrackets--;},c.clearMaybeInsertedClosing=function(){e&&(e.maybeInsertedBrackets=0,e.maybeInsertedRow=-1);},y.inherits(c,m),h.CstyleBehaviour=c;});ace.define("ace/unicode",["require","exports","module"],function(o,h,_){for(var y=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],m=0,f=[],a=0;a<y.length;a+=2)f.push(m+=y[a]),y[a+1]&&f.push(45,m+=y[a+1]);h.wordChars=String.fromCharCode.apply(null,f);});ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(o,h,_){var y=o("../config"),m=o("../tokenizer").Tokenizer,f=o("./text_highlight_rules").TextHighlightRules,a=o("./behaviour/cstyle").CstyleBehaviour,l=o("../unicode"),n=o("../lib/lang"),e=o("../token_iterator").TokenIterator,t=o("../range").Range,r;r=function(){this.HighlightRules=f;},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new m(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,s,c,p){var C=s.doc,E=!0,S=!0,M=1/0,g=s.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var $=this.lineCommentStart.map(n.escapeRegExp).join("|"),A=this.lineCommentStart[0];else var $=n.escapeRegExp(this.lineCommentStart),A=this.lineCommentStart;$=new RegExp("^(\\s*)(?:"+$+") ?"),d=s.getUseSoftTabs();var b=function(F,N){var P=F.match($);if(P){var W=P[1].length,B=P[0].length;!x(F,W,B)&&P[0][B-1]==" "&&B--,C.removeInLine(N,W,B);}},v=A+" ",w=function(F,N){(!E||/\S/.test(F))&&(x(F,M,M)?C.insertInLine({row:N,column:M},v):C.insertInLine({row:N,column:M},A));},u=function(F,N){return $.test(F)},x=function(F,N,P){for(var W=0;N--&&F.charAt(N)==" ";)W++;if(W%g!=0)return !1;for(var W=0;F.charAt(P++)==" ";)W++;return g>2?W%g!=g-1:W%g==0};}else {if(!this.blockComment)return !1;var A=this.blockComment.start,L=this.blockComment.end,$=new RegExp("^(\\s*)(?:"+n.escapeRegExp(A)+")"),T=new RegExp("(?:"+n.escapeRegExp(L)+")\\s*$"),w=function(I,D){u(I,D)||(!E||/\S/.test(I))&&(C.insertInLine({row:D,column:I.length},L),C.insertInLine({row:D,column:M},A));},b=function(I,D){var O;(O=I.match(T))&&C.removeInLine(D,I.length-O[0].length,I.length),(O=I.match($))&&C.removeInLine(D,O[1].length,O[0].length);},u=function(I,D){if($.test(I))return !0;for(var O=s.getTokens(D),F=0;F<O.length;F++)if(O[F].type==="comment")return !0};}function k(I){for(var D=c;D<=p;D++)I(C.getLine(D),D);}var R=1/0;k(function(I,D){var O=I.search(/\S/);O!==-1?(O<M&&(M=O),S&&!u(I,D)&&(S=!1)):R>I.length&&(R=I.length);}),M==1/0&&(M=R,E=!1,S=!1),d&&M%g!=0&&(M=Math.floor(M/g)*g),k(S?b:w);},this.toggleBlockComment=function(i,s,c,p){var C=this.blockComment;if(C){!C.start&&C[0]&&(C=C[0]);var E=new e(s,p.row,p.column),S=E.getCurrentToken();s.selection;var g=s.selection.toOrientedRange(),d,A;if(S&&/comment/.test(S.type)){for(var L,$;S&&/comment/.test(S.type);){var T=S.value.indexOf(C.start);if(T!=-1){var w=E.getCurrentTokenRow(),b=E.getCurrentTokenColumn()+T;L=new t(w,b,w,b+C.start.length);break}S=E.stepBackward();}for(var E=new e(s,p.row,p.column),S=E.getCurrentToken();S&&/comment/.test(S.type);){var T=S.value.indexOf(C.end);if(T!=-1){var w=E.getCurrentTokenRow(),b=E.getCurrentTokenColumn()+T;$=new t(w,b,w,b+C.end.length);break}S=E.stepForward();}$&&s.remove($),L&&(s.remove(L),d=L.start.row,A=-C.start.length);}else A=C.start.length,d=c.start.row,s.insert(c.end,C.end),s.insert(c.start,C.start);g.start.row==d&&(g.start.column+=A),g.end.row==d&&(g.end.column+=A),s.selection.fromOrientedRange(g);}},this.getNextLineIndent=function(i,s,c){return this.$getIndent(s)},this.checkOutdent=function(i,s,c){return !1},this.autoOutdent=function(i,s,c){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var s in i)if(i[s]){var c=i[s],p=c.prototype.$id,C=y.$modes[p];C||(y.$modes[p]=C=new c),y.$modes[s]||(y.$modes[s]=C),this.$embeds.push(s),this.$modes[s]=C;}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],S=function(g){(function(d){var A=E[g],L=d[A];d[E[g]]=function(){return this.$delegator(A,arguments,L)};})(M);},M=this,s=0;s<E.length;s++)S(s);},this.$delegator=function(i,s,c){var p=s[0]||"start";if(typeof p!="string"){if(Array.isArray(p[2])){var C=p[2][p[2].length-1],E=this.$modes[C];if(E)return E[i].apply(E,[p[1]].concat([].slice.call(s,1)))}p=p[0]||"start";}for(var S=0;S<this.$embeds.length;S++)if(this.$modes[this.$embeds[S]]){var M=p.split(this.$embeds[S]);if(!M[0]&&M[1]){s[0]=M[1];var E=this.$modes[this.$embeds[S]];return E[i].apply(E,s)}}var g=c.apply(this,s);return c?g:void 0},this.transformAction=function(i,s,c,p,C){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var S in E)if(E[S][s]){var M=E[S][s].apply(this,arguments);if(M)return M}}},this.getKeywords=function(i){if(!this.completionKeywords){var s=this.$tokenizer.rules,c=[];for(var p in s)for(var C=s[p],E=0,S=C.length;E<S;E++)if(typeof C[E].token=="string")/keyword|support|storage/.test(C[E].token)&&c.push(C[E].regex);else if(typeof C[E].token=="object"){for(var M=0,g=C[E].token.length;M<g;M++)if(/keyword|support|storage/.test(C[E].token[M])){var p=C[E].regex.match(/\(.+?\)/g)[M];c.push(p.substr(1,p.length-2));}}this.completionKeywords=c;}return i?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,s,c,p){var C=this.$keywordList||this.$createKeywordList();return C.map(function(E){return {name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text";}.call(r.prototype),h.Mode=r;});ace.define("ace/apply_delta",["require","exports","module"],function(o,h,_){h.applyDelta=function(a,l,n){var e=l.start.row,t=l.start.column,r=a[e]||"";switch(l.action){case"insert":var i=l.lines;if(i.length===1)a[e]=r.substring(0,t)+l.lines[0]+r.substring(t);else {var s=[e,1].concat(l.lines);a.splice.apply(a,s),a[e]=r.substring(0,t)+a[e],a[e+l.lines.length-1]+=r.substring(t);}break;case"remove":var c=l.end.column,p=l.end.row;e===p?a[e]=r.substring(0,t)+r.substring(c):a.splice(e,p-e+1,r.substring(0,t)+a[p].substring(c));break}};});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(o,h,_){var y=o("./lib/oop"),m=o("./lib/event_emitter").EventEmitter,f=function(){function n(e,t,r){this.$onChange=this.onChange.bind(this),this.attach(e),typeof t!="number"?this.setPosition(t.row,t.column):this.setPosition(t,r);}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row)&&!(e.start.row>this.row)){var t=l(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0);}},n.prototype.setPosition=function(e,t,r){var i;if(r?i={row:e,column:t}:i=this.$clipPositionToDocument(e,t),!(this.row==i.row&&this.column==i.column)){var s={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:s,value:i});}},n.prototype.detach=function(){this.document.off("change",this.$onChange);},n.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange);},n.prototype.$clipPositionToDocument=function(e,t){var r={};return e>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):e<0?(r.row=0,r.column=0):(r.row=e,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,t))),t<0&&(r.column=0),r},n}();f.prototype.$insertRight=!1,y.implement(f.prototype,m);function a(n,e,t){var r=t?n.column<=e.column:n.column<e.column;return n.row<e.row||n.row==e.row&&r}function l(n,e,t){var r=n.action=="insert",i=(r?1:-1)*(n.end.row-n.start.row),s=(r?1:-1)*(n.end.column-n.start.column),c=n.start,p=r?c:n.end;return a(e,c,t)?{row:e.row,column:e.column}:a(p,e,!t)?{row:e.row+i,column:e.column+(e.row==p.row?s:0)}:{row:c.row,column:c.column}}h.Anchor=f;});ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(o,h,_){var y=o("./lib/oop"),m=o("./apply_delta").applyDelta,f=o("./lib/event_emitter").EventEmitter,a=o("./range").Range,l=o("./anchor").Anchor,n=function(){function e(t){this.$lines=[""],t.length===0?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t);}return e.prototype.setValue=function(t){var r=this.getLength()-1;this.remove(new a(0,0,r,this.getLine(r).length)),this.insert({row:0,column:0},t||"");},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(t,r){return new l(this,t,r)},e.prototype.$detectNewLine=function(t){var r=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=r?r[1]:`
205
+ `,this._signal("changeNewLineMode");},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return `\r
206
+ `;case"unix":return `
207
+ `;default:return this.$autoNewLine||`
208
+ `}},e.prototype.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"));},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(t){return t==`\r
209
+ `||t=="\r"||t==`
210
+ `},e.prototype.getLine=function(t){return this.$lines[t]||""},e.prototype.getLines=function(t,r){return this.$lines.slice(t,r+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(t){var r;if(t.start.row===t.end.row)r=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else {r=this.getLines(t.start.row,t.end.row),r[0]=(r[0]||"").substring(t.start.column);var i=r.length-1;t.end.row-t.start.row==i&&(r[i]=r[i].substring(0,t.end.column));}return r},e.prototype.insertLines=function(t,r){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,r)},e.prototype.removeLines=function(t,r){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,r)},e.prototype.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},e.prototype.insert=function(t,r){return this.getLength()<=1&&this.$detectNewLine(r),this.insertMergedLines(t,this.$split(r))},e.prototype.insertInLine=function(t,r){var i=this.clippedPos(t.row,t.column),s=this.pos(t.row,t.column+r.length);return this.applyDelta({start:i,end:s,action:"insert",lines:[r]},!0),this.clonePos(s)},e.prototype.clippedPos=function(t,r){var i=this.getLength();t===void 0?t=i:t<0?t=0:t>=i&&(t=i-1,r=void 0);var s=this.getLine(t);return r==null&&(r=s.length),r=Math.min(Math.max(r,0),s.length),{row:t,column:r}},e.prototype.clonePos=function(t){return {row:t.row,column:t.column}},e.prototype.pos=function(t,r){return {row:t,column:r}},e.prototype.$clipPosition=function(t){var r=this.getLength();return t.row>=r?(t.row=Math.max(0,r-1),t.column=this.getLine(r-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},e.prototype.insertFullLines=function(t,r){t=Math.min(Math.max(t,0),this.getLength());var i=0;t<this.getLength()?(r=r.concat([""]),i=0):(r=[""].concat(r),t--,i=this.$lines[t].length),this.insertMergedLines({row:t,column:i},r);},e.prototype.insertMergedLines=function(t,r){var i=this.clippedPos(t.row,t.column),s={row:i.row+r.length-1,column:(r.length==1?i.column:0)+r[r.length-1].length};return this.applyDelta({start:i,end:s,action:"insert",lines:r}),this.clonePos(s)},e.prototype.remove=function(t){var r=this.clippedPos(t.start.row,t.start.column),i=this.clippedPos(t.end.row,t.end.column);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})}),this.clonePos(r)},e.prototype.removeInLine=function(t,r,i){var s=this.clippedPos(t,r),c=this.clippedPos(t,i);return this.applyDelta({start:s,end:c,action:"remove",lines:this.getLinesForRange({start:s,end:c})},!0),this.clonePos(s)},e.prototype.removeFullLines=function(t,r){t=Math.min(Math.max(0,t),this.getLength()-1),r=Math.min(Math.max(0,r),this.getLength()-1);var i=r==this.getLength()-1&&t>0,s=r<this.getLength()-1,c=i?t-1:t,p=i?this.getLine(c).length:0,C=s?r+1:r,E=s?0:this.getLine(C).length,S=new a(c,p,C,E),M=this.$lines.slice(t,r+1);return this.applyDelta({start:S.start,end:S.end,action:"remove",lines:this.getLinesForRange(S)}),M},e.prototype.removeNewLine=function(t){t<this.getLength()-1&&t>=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]});},e.prototype.replace=function(t,r){if(t instanceof a||(t=a.fromPoints(t.start,t.end)),r.length===0&&t.isEmpty())return t.start;if(r==this.getTextRange(t))return t.end;this.remove(t);var i;return r?i=this.insert(t.start,r):i=t.start,i},e.prototype.applyDeltas=function(t){for(var r=0;r<t.length;r++)this.applyDelta(t[r]);},e.prototype.revertDeltas=function(t){for(var r=t.length-1;r>=0;r--)this.revertDelta(t[r]);},e.prototype.applyDelta=function(t,r){var i=t.action=="insert";(i?t.lines.length<=1&&!t.lines[0]:!a.comparePoints(t.start,t.end))||(i&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(m(this.$lines,t,r),this._signal("change",t)));},e.prototype.$safeApplyDelta=function(t){var r=this.$lines.length;(t.action=="remove"&&t.start.row<r&&t.end.row<r||t.action=="insert"&&t.start.row<=r)&&this.applyDelta(t);},e.prototype.$splitAndapplyLargeDelta=function(t,r){for(var i=t.lines,s=i.length-r+1,c=t.start.row,p=t.start.column,C=0,E=0;C<s;C=E){E+=r-1;var S=i.slice(C,E);S.push(""),this.applyDelta({start:this.pos(c+C,p),end:this.pos(c+E,p=0),action:t.action,lines:S},!0);}t.lines=i.slice(C),t.start.row=c+C,t.start.column=p,this.applyDelta(t,!0);},e.prototype.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:t.action=="insert"?"remove":"insert",lines:t.lines.slice()});},e.prototype.indexToPosition=function(t,r){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,c=r||0,p=i.length;c<p;c++)if(t-=i[c].length+s,t<0)return {row:c,column:t+i[c].length+s};return {row:p-1,column:t+i[p-1].length+s}},e.prototype.positionToIndex=function(t,r){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,c=0,p=Math.min(t.row,i.length),C=r||0;C<p;++C)c+=i[C].length+s;return c+t.column},e.prototype.$split=function(t){return t.split(/\r\n|\r|\n/)},e}();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",y.implement(n.prototype,f),h.Document=n;});ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(o,h,_){var y=o("./lib/oop"),m=o("./lib/event_emitter").EventEmitter,f=function(){function a(l,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var e=this;this.$worker=function(){if(e.running){for(var t=new Date,r=e.currentLine,i=-1,s=e.doc,c=r;e.lines[r];)r++;var p=s.getLength(),C=0;for(e.running=!1;r<p;){e.$tokenizeRow(r),i=r;do r++;while(e.lines[r]);if(C++,C%5===0&&new Date-t>20){e.running=setTimeout(e.$worker,20);break}}e.currentLine=r,i==-1&&(i=r),c<=i&&e.fireUpdateEvent(c,i);}};}return a.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0);},a.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop();},a.prototype.fireUpdateEvent=function(l,n){var e={first:l,last:n};this._signal("update",{data:e});},a.prototype.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700);},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700));},a.prototype.$updateOnChange=function(l){var n=l.start.row,e=l.end.row-n;if(e===0)this.lines[n]=null;else if(l.action=="remove")this.lines.splice(n,e+1,null),this.states.splice(n,e+1,null);else {var t=Array(e+1);t.unshift(n,1),this.lines.splice.apply(this.lines,t),this.states.splice.apply(this.states,t);}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop();},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1;},a.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},a.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},a.prototype.$tokenizeRow=function(l){var n=this.doc.getLine(l),e=this.states[l-1],t=this.tokenizer.getLineTokens(n,e,l);return this.states[l]+""!=t.state+""?(this.states[l]=t.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=t.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners();},a}();y.implement(f.prototype,m),h.BackgroundTokenizer=f;});ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(o,h,_){var y=o("./lib/lang"),m=o("./range").Range,f=function(){function a(l,n,e){e===void 0&&(e="text"),this.setRegexp(l),this.clazz=n,this.type=e;}return a.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[]);},a.prototype.update=function(l,n,e,t){if(this.regExp)for(var r=t.firstRow,i=t.lastRow,s={},c=r;c<=i;c++){var p=this.cache[c];p==null&&(p=y.getMatchOffsets(e.getLine(c),this.regExp),p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map(function(M){return new m(c,M.offset,c,M.offset+M.length)}),this.cache[c]=p.length?p:"");for(var C=p.length;C--;){var E=p[C].toScreenRange(e),S=E.toString();s[S]||(s[S]=!0,n.drawSingleLineMarker(l,E,this.clazz,t));}}},a}();f.prototype.MAX_RANGES=500,h.SearchHighlight=f;});ace.define("ace/undomanager",["require","exports","module","ace/range"],function(o,h,_){var y=function(){function d(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset();}return d.prototype.addSession=function(A){this.$session=A;},d.prototype.add=function(A,L,$){if(!this.$fromUndo&&A!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var T=this.$undoStack.length;T>this.$undoDepth-1&&this.$undoStack.splice(0,T-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),A.id=this.$rev=++this.$maxRev;}(A.action=="remove"||A.action=="insert")&&(this.$lastDelta=A),this.lastDeltas.push(A);}},d.prototype.addSelection=function(A,L){this.selections.push({value:A,rev:L||this.$rev});},d.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},d.prototype.markIgnored=function(A,L){L==null&&(L=this.$rev+1);for(var $=this.$undoStack,T=$.length;T--;){var w=$[T][0];if(w.id<=A)break;w.id<L&&(w.ignore=!0);}this.lastDeltas=null;},d.prototype.getSelection=function(A,L){for(var $=this.selections,T=$.length;T--;){var w=$[T];if(w.rev<A)return L&&(w=$[T+1]),w}},d.prototype.getRevision=function(){return this.$rev},d.prototype.getDeltas=function(A,L){L==null&&(L=this.$rev+1);for(var $=this.$undoStack,T=null,w=0,b=$.length;b--;){var u=$[b][0];if(u.id<L&&!T&&(T=b+1),u.id<=A){w=b+1;break}}return $.slice(w,T)},d.prototype.getChangedRanges=function(A,L){L==null&&(L=this.$rev+1);},d.prototype.getChangedLines=function(A,L){L==null&&(L=this.$rev+1);},d.prototype.undo=function(A,L){this.lastDeltas=null;var $=this.$undoStack;if(m($,$.length)){A||(A=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var T=$.pop(),w=null;return T&&(w=A.undoChanges(T,L),this.$redoStack.push(T),this.$syncRev()),this.$fromUndo=!1,w}},d.prototype.redo=function(A,L){if(this.lastDeltas=null,A||(A=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var $=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);g(this.$redoStack,$),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(b){b[0].id=++this.$maxRev;},this);}var T=this.$redoStack.pop(),w=null;return T&&(w=A.redoChanges(T,L),this.$undoStack.push(T),this.$syncRev()),this.$fromUndo=!1,w},d.prototype.$syncRev=function(){var A=this.$undoStack,L=A[A.length-1],$=L&&L[0].id||0;this.$redoStackBaseRev=$,this.$rev=$;},d.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[];},d.prototype.canUndo=function(){return this.$undoStack.length>0},d.prototype.canRedo=function(){return this.$redoStack.length>0},d.prototype.bookmark=function(A){A==null&&(A=this.$rev),this.mark=A;},d.prototype.isAtBookmark=function(){return this.$rev===this.mark},d.prototype.toJSON=function(){return {$redoStack:this.$redoStack,$undoStack:this.$undoStack}},d.prototype.fromJSON=function(A){this.reset(),this.$undoStack=A.$undoStack,this.$redoStack=A.$redoStack;},d.prototype.$prettyPrint=function(A){return A?r(A):r(this.$undoStack)+`
211
+ ---
212
+ `+r(this.$redoStack)},d}();y.prototype.hasUndo=y.prototype.canUndo,y.prototype.hasRedo=y.prototype.canRedo,y.prototype.isClean=y.prototype.isAtBookmark,y.prototype.markClean=y.prototype.bookmark;function m(d,A){for(var L=A;L--;){var $=d[L];if($&&!$[0].ignore){for(;L<A-1;){var T=c(d[L],d[L+1]);d[L]=T[0],d[L+1]=T[1],L++;}return !0}}}var f=o("./range").Range,a=f.comparePoints;f.comparePoints;function e(d){return {row:d.row,column:d.column}}function t(d){return {start:e(d.start),end:e(d.end),action:d.action,lines:d.lines.slice()}}function r(d){if(d=d||this,Array.isArray(d))return d.map(r).join(`
213
+ `);var A="";return d.action?(A=d.action=="insert"?"+":"-",A+="["+d.lines+"]"):d.value&&(Array.isArray(d.value)?A=d.value.map(i).join(`
214
+ `):A=i(d.value)),d.start&&(A+=i(d)),(d.id||d.rev)&&(A+=" ("+(d.id||d.rev)+")"),A}function i(d){return d.start.row+":"+d.start.column+"=>"+d.end.row+":"+d.end.column}function s(d,A){var L=d.action=="insert",$=A.action=="insert";if(L&&$)if(a(A.start,d.end)>=0)C(A,d,-1);else if(a(A.start,d.start)<=0)C(d,A,1);else return null;else if(L&&!$)if(a(A.start,d.end)>=0)C(A,d,-1);else if(a(A.end,d.start)<=0)C(d,A,-1);else return null;else if(!L&&$)if(a(A.start,d.start)>=0)C(A,d,1);else if(a(A.start,d.start)<=0)C(d,A,1);else return null;else if(!L&&!$)if(a(A.start,d.start)>=0)C(A,d,1);else if(a(A.end,d.start)<=0)C(d,A,-1);else return null;return [A,d]}function c(d,A){for(var L=d.length;L--;)for(var $=0;$<A.length;$++)if(!s(d[L],A[$])){for(;L<d.length;){for(;$--;)s(A[$],d[L]);$=A.length,L++;}return [d,A]}return d.selectionBefore=A.selectionBefore=d.selectionAfter=A.selectionAfter=null,[A,d]}function p(d,A){var L=d.action=="insert",$=A.action=="insert";if(L&&$)a(d.start,A.start)<0?C(A,d,1):C(d,A,1);else if(L&&!$)a(d.start,A.end)>=0?C(d,A,-1):(a(d.start,A.start)<=0||C(d,f.fromPoints(A.start,d.start),-1),C(A,d,1));else if(!L&&$)a(A.start,d.end)>=0?C(A,d,-1):(a(A.start,d.start)<=0||C(A,f.fromPoints(d.start,A.start),-1),C(d,A,1));else if(!L&&!$)if(a(A.start,d.end)>=0)C(A,d,-1);else if(a(A.end,d.start)<=0)C(d,A,-1);else {var T,w;return a(d.start,A.start)<0&&(T=d,d=S(d,A.start)),a(d.end,A.end)>0&&(w=S(d,A.end)),E(A.end,d.start,d.end,-1),w&&!T&&(d.lines=w.lines,d.start=w.start,d.end=w.end,w=d),[A,T,w].filter(Boolean)}return [A,d]}function C(d,A,L){E(d.start,A.start,A.end,L),E(d.end,A.start,A.end,L);}function E(d,A,L,$){d.row==($==1?A:L).row&&(d.column+=$*(L.column-A.column)),d.row+=$*(L.row-A.row);}function S(d,A){var L=d.lines,$=d.end;d.end=e(A);var T=d.end.row-d.start.row,w=L.splice(T,L.length),b=T?A.column:A.column-d.start.column;L.push(w[0].substring(0,b)),w[0]=w[0].substr(b);var u={start:e(A),end:$,lines:w,action:d.action};return u}function M(d,A){A=t(A);for(var L=d.length;L--;){for(var $=d[L],T=0;T<$.length;T++){var w=$[T],b=p(w,A);A=b[0],b.length!=2&&(b[2]?($.splice(T+1,1,b[1],b[2]),T++):b[1]||($.splice(T,1),T--));}$.length||d.splice(L,1);}return d}function g(d,A){for(var L=0;L<A.length;L++)for(var $=A[L],T=0;T<$.length;T++)M(d,$[T]);}h.UndoManager=y;});ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(o,h,_){var y=o("../range").Range,m=function(){function f(a,l){this.foldData=a,Array.isArray(l)?this.folds=l:l=this.folds=[l];var n=l[l.length-1];this.range=new y(l[0].start.row,l[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this);},this);}return f.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(l){l.start.row+=a,l.end.row+=a;});},f.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(l,n){return -l.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column);}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this;},f.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},f.prototype.walk=function(a,l,n){var e=0,t=this.folds,r,i,s,c=!0;l==null&&(l=this.end.row,n=this.end.column);for(var p=0;p<t.length;p++){if(r=t[p],i=r.range.compareStart(l,n),i==-1){a(null,l,n,e,c);return}if(s=a(null,r.start.row,r.start.column,e,c),s=!s&&a(r.placeholder,r.start.row,r.start.column,e),s||i===0)return;c=!r.sameRow,e=r.end.column;}a(null,l,n,e,c);},f.prototype.getNextFoldTo=function(a,l){for(var n,e,t=0;t<this.folds.length;t++){if(n=this.folds[t],e=n.range.compareEnd(a,l),e==-1)return {fold:n,kind:"after"};if(e===0)return {fold:n,kind:"inside"}}return null},f.prototype.addRemoveChars=function(a,l,n){var e=this.getNextFoldTo(a,l),t,r;if(e){if(t=e.fold,e.kind=="inside"&&t.start.column!=l&&t.start.row!=a)window.console&&window.console.log(a,l,t);else if(t.start.row==a){r=this.folds;var i=r.indexOf(t);for(i===0&&(this.start.column+=n),i;i<r.length;i++){if(t=r[i],t.start.column+=n,!t.sameRow)return;t.end.column+=n;}this.end.column+=n;}}},f.prototype.split=function(a,l){var n=this.getNextFoldTo(a,l);if(!n||n.kind=="inside")return null;var e=n.fold,t=this.folds,r=this.foldData,i=t.indexOf(e),s=t[i-1];this.end.row=s.end.row,this.end.column=s.end.column,t=t.splice(i,t.length-i);var c=new f(r,t);return r.splice(r.indexOf(this)+1,0,c),c},f.prototype.merge=function(a){for(var l=a.folds,n=0;n<l.length;n++)this.addFold(l[n]);var e=this.foldData;e.splice(e.indexOf(a),1);},f.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(l){a.push(" "+l.toString());}),a.push("]"),a.join(`
215
+ `)},f.prototype.idxToPosition=function(a){for(var l=0,n=0;n<this.folds.length;n++){var e=this.folds[n];if(a-=e.start.column-l,a<0)return {row:e.start.row,column:e.start.column+a};if(a-=e.placeholder.length,a<0)return e.start;l=e.end.column;}return {row:this.end.row,column:this.end.column+a}},f}();h.FoldLine=m;});ace.define("ace/range_list",["require","exports","module","ace/range"],function(o,h,_){var y=o("./range").Range,m=y.comparePoints,f=function(){function a(){this.ranges=[],this.$bias=1;}return a.prototype.pointIndex=function(l,n,e){for(var t=this.ranges,r=e||0;r<t.length;r++){var i=t[r],s=m(l,i.end);if(!(s>0)){var c=m(l,i.start);return s===0?n&&c!==0?-r-2:r:c>0||c===0&&!n?r:-r-1}}return -r-1},a.prototype.add=function(l){var n=!l.isEmpty(),e=this.pointIndex(l.start,n);e<0&&(e=-e-1);var t=this.pointIndex(l.end,n,e);return t<0?t=-t-1:t++,this.ranges.splice(e,t-e,l)},a.prototype.addList=function(l){for(var n=[],e=l.length;e--;)n.push.apply(n,this.add(l[e]));return n},a.prototype.substractPoint=function(l){var n=this.pointIndex(l);if(n>=0)return this.ranges.splice(n,1)},a.prototype.merge=function(){var l=[],n=this.ranges;n=n.sort(function(s,c){return m(s.start,c.start)});for(var e=n[0],t,r=1;r<n.length;r++){t=e,e=n[r];var i=m(t.end,e.start);i<0||i==0&&!t.isEmpty()&&!e.isEmpty()||(m(t.end,e.end)<0&&(t.end.row=e.end.row,t.end.column=e.end.column),n.splice(r,1),l.push(e),e=t,r--);}return this.ranges=n,l},a.prototype.contains=function(l,n){return this.pointIndex({row:l,column:n})>=0},a.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},a.prototype.rangeAtPoint=function(l){var n=this.pointIndex(l);if(n>=0)return this.ranges[n]},a.prototype.clipRows=function(l,n){var e=this.ranges;if(e[0].start.row>n||e[e.length-1].start.row<l)return [];var t=this.pointIndex({row:l,column:0});t<0&&(t=-t-1);var r=this.pointIndex({row:n,column:0},t);r<0&&(r=-r-1);for(var i=[],s=t;s<r;s++)i.push(e[s]);return i},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange);},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null);},a.prototype.$onChange=function(l){for(var n=l.start,e=l.end,t=n.row,r=e.row,i=this.ranges,s=0,c=i.length;s<c;s++){var p=i[s];if(p.end.row>=t)break}if(l.action=="insert")for(var C=r-t,E=-n.column+e.column;s<c;s++){var p=i[s];if(p.start.row>t)break;if(p.start.row==t&&p.start.column>=n.column&&(p.start.column==n.column&&this.$bias<=0||(p.start.column+=E,p.start.row+=C)),p.end.row==t&&p.end.column>=n.column){if(p.end.column==n.column&&this.$bias<0)continue;p.end.column==n.column&&E>0&&s<c-1&&p.end.column>p.start.column&&p.end.column==i[s+1].start.column&&(p.end.column-=E),p.end.column+=E,p.end.row+=C;}}else for(var C=t-r,E=n.column-e.column;s<c;s++){var p=i[s];if(p.start.row>r)break;p.end.row<r&&(t<p.end.row||t==p.end.row&&n.column<p.end.column)?(p.end.row=t,p.end.column=n.column):p.end.row==r?p.end.column<=e.column?(C||p.end.column>n.column)&&(p.end.column=n.column,p.end.row=n.row):(p.end.column+=E,p.end.row+=C):p.end.row>r&&(p.end.row+=C),p.start.row<r&&(t<p.start.row||t==p.start.row&&n.column<p.start.column)?(p.start.row=t,p.start.column=n.column):p.start.row==r?p.start.column<=e.column?(C||p.start.column>n.column)&&(p.start.column=n.column,p.start.row=n.row):(p.start.column+=E,p.start.row+=C):p.start.row>r&&(p.start.row+=C);}if(C!=0&&s<c)for(;s<c;s++){var p=i[s];p.start.row+=C,p.end.row+=C;}},a}();f.prototype.comparePoints=m,h.RangeList=f;});ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(o,h,_){var y=this&&this.__extends||function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c;}||function(s,c){for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(s[p]=c[p]);},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function s(){this.constructor=r;}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s);}}(),m=o("../range_list").RangeList,f=function(t){y(r,t);function r(i,s){var c=t.call(this)||this;return c.foldLine=null,c.placeholder=s,c.range=i,c.start=i.start,c.end=i.end,c.sameRow=i.start.row==i.end.row,c.subFolds=c.ranges=[],c}return r.prototype.toString=function(){return '"'+this.placeholder+'" '+this.range.toString()},r.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(s){s.setFoldLine(i);});},r.prototype.clone=function(){var i=this.range.clone(),s=new r(i,this.placeholder);return this.subFolds.forEach(function(c){s.subFolds.push(c.clone());}),s.collapseChildren=this.collapseChildren,s},r.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){l(i,this.start);for(var E=i.start.row,S=i.start.column,s=0,c=-1;s<this.subFolds.length&&(c=this.subFolds[s].range.compare(E,S),c==1);s++);var p=this.subFolds[s],C=0;if(c==0){if(p.range.containsRange(i))return p.addSubFold(i);C=1;}for(var E=i.range.end.row,S=i.range.end.column,M=s,c=-1;M<this.subFolds.length&&(c=this.subFolds[M].range.compare(E,S),c==1);M++);c==0&&M++;for(var g=this.subFolds.splice(s,M-s,i),d=c==0?g.length-1:g.length,A=C;A<d;A++)i.addSubFold(g[A]);return i.setFoldLine(this.foldLine),i}},r.prototype.restoreRange=function(i){return e(i,this.start)},r}(m);function a(t,r){t.row-=r.row,t.row==0&&(t.column-=r.column);}function l(t,r){a(t.start,r),a(t.end,r);}function n(t,r){t.row==0&&(t.column+=r.column),t.row+=r.row;}function e(t,r){n(t.start,r),n(t.end,r);}h.Fold=f;});ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(o,h,_){var y=o("../range").Range,m=o("./fold_line").FoldLine,f=o("./fold").Fold,a=o("../token_iterator").TokenIterator,l=o("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(e,t,r){var i=this.getFoldLine(e);if(!i)return null;for(var s=i.folds,c=0;c<s.length;c++){var p=s[c].range;if(p.contains(e,t)){if(r==1&&p.isEnd(e,t)&&!p.isEmpty())continue;if(r==-1&&p.isStart(e,t)&&!p.isEmpty())continue;return s[c]}}},this.getFoldsInRange=function(e){var t=e.start,r=e.end,i=this.$foldData,s=[];t.column+=1,r.column-=1;for(var c=0;c<i.length;c++){var p=i[c].range.compareRange(e);if(p!=2){if(p==-2)break;for(var C=i[c].folds,E=0;E<C.length;E++){var S=C[E];if(p=S.range.compareRange(e),p==-2)break;if(p==2)continue;if(p==42)break;s.push(S);}}}return t.column-=1,r.column+=1,s},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(r){t=t.concat(this.getFoldsInRange(r));},this);}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,r=0;r<t.length;r++)for(var i=0;i<t[r].folds.length;i++)e.push(t[r].folds[i]);return e},this.getFoldStringAt=function(e,t,r,i){if(i=i||this.getFoldLine(e),!i)return null;for(var s={end:{column:0}},c,p,C=0;C<i.folds.length;C++){p=i.folds[C];var E=p.range.compareEnd(e,t);if(E==-1){c=this.getLine(p.start.row).substring(s.end.column,p.start.column);break}else if(E===0)return null;s=p;}return c||(c=this.getLine(p.start.row).substring(s.end.column)),r==-1?c.substring(0,t-s.end.column):r==1?c.substring(t-s.end.column):c},this.getFoldLine=function(e,t){var r=this.$foldData,i=0;for(t&&(i=r.indexOf(t)),i==-1&&(i=0),i;i<r.length;i++){var s=r[i];if(s.start.row<=e&&s.end.row>=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var r=this.$foldData,i=0;for(t&&(i=r.indexOf(t)),i==-1&&(i=0),i;i<r.length;i++){var s=r[i];if(s.end.row>=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var r=this.$foldData,i=t-e+1,s=0;s<r.length;s++){var c=r[s],p=c.end.row,C=c.start.row;if(p>=t){C<t&&(C>=e?i-=t-C:i=0);break}else p>=e&&(C>=e?i-=p-C:i-=p-e+1);}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(t,r){return t.start.row-r.start.row}),e},this.addFold=function(e,t){var r=this.$foldData,i=!1,s;e instanceof f?s=e:(s=new f(t,e),s.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(s.range);var c=s.start.row,p=s.start.column,C=s.end.row,E=s.end.column,S=this.getFoldAt(c,p,1),M=this.getFoldAt(C,E,-1);if(S&&M==S)return S.addSubFold(s);S&&!S.range.isStart(c,p)&&this.removeFold(S),M&&!M.range.isEnd(C,E)&&this.removeFold(M);var g=this.getFoldsInRange(s.range);g.length>0&&(this.removeFolds(g),s.collapseChildren||g.forEach(function($){s.addSubFold($);}));for(var d=0;d<r.length;d++){var A=r[d];if(C==A.start.row){A.addFold(s),i=!0;break}else if(c==A.end.row){if(A.addFold(s),i=!0,!s.sameRow){var L=r[d+1];if(L&&L.start.row==C){A.merge(L);break}}break}else if(C<=A.start.row)break}return i||(A=this.$addFoldLine(new m(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(A.start.row,A.start.row):this.$updateRowLengthCache(A.start.row,A.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(e){e.forEach(function(t){this.addFold(t);},this);},this.removeFold=function(e){var t=e.foldLine,r=t.start.row,i=t.end.row,s=this.$foldData,c=t.folds;if(c.length==1)s.splice(s.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))c.pop(),t.end.row=c[c.length-1].end.row,t.end.column=c[c.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))c.shift(),t.start.row=c[0].start.row,t.start.column=c[0].start.column;else if(e.sameRow)c.splice(c.indexOf(e),1);else {var p=t.split(e.start.row,e.start.column);c=p.folds,c.shift(),p.start.row=c[0].start.row,p.start.column=c[0].start.column;}this.$updating||(this.$useWrapMode?this.$updateWrapData(r,i):this.$updateRowLengthCache(r,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"});},this.removeFolds=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);t.forEach(function(i){this.removeFold(i);},this),this.$modified=!0;},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t);},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[];},this.expandFolds=function(e){e.forEach(function(t){this.expandFold(t);},this);},this.unfold=function(e,t){var r,i;if(e==null)r=new y(0,0,this.getLength(),0),t==null&&(t=!0);else if(typeof e=="number")r=new y(e,0,e,this.getLine(e).length);else if("row"in e)r=y.fromPoints(e,e);else {if(Array.isArray(e))return i=[],e.forEach(function(c){i=i.concat(this.unfold(c));},this),i;r=e;}i=this.getFoldsInRangeList(r);for(var s=i;i.length==1&&y.comparePoints(i[0].start,r.start)<0&&y.comparePoints(i[0].end,r.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(r);if(t!=!1?this.removeFolds(i):this.expandFolds(i),s.length)return s},this.isRowFolded=function(e,t){return !!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var r=this.getFoldLine(e,t);return r?r.end.row:e},this.getRowFoldStart=function(e,t){var r=this.getFoldLine(e,t);return r?r.start.row:e},this.getFoldDisplayLine=function(e,t,r,i,s){i==null&&(i=e.start.row),s==null&&(s=0),t==null&&(t=e.end.row),r==null&&(r=this.getLine(t).length);var c=this.doc,p="";return e.walk(function(C,E,S,M){if(!(E<i)){if(E==i){if(S<s)return;M=Math.max(s,M);}C!=null?p+=C:p+=c.getLine(E).substring(M,S);}},t,r),p},this.getDisplayLine=function(e,t,r,i){var s=this.getFoldLine(e);if(s)return this.getFoldDisplayLine(s,e,t,r,i);var c;return c=this.doc.getLine(e),c.substring(i||0,t||c.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var r=t.folds.map(function(i){return i.clone()});return new m(e,r)}),e},this.toggleFold=function(e){var t=this.selection,r=t.getRange(),i,s;if(r.isEmpty()){var c=r.start;if(i=this.getFoldAt(c.row,c.column),i){this.expandFold(i);return}else (s=this.findMatchingBracket(c))?r.comparePoint(s)==1?r.end=s:(r.start=s,r.start.column++,r.end.column--):(s=this.findMatchingBracket({row:c.row,column:c.column+1}))?(r.comparePoint(s)==1?r.end=s:r.start=s,r.start.column++):r=this.getCommentFoldRange(c.row,c.column)||r;}else {var p=this.getFoldsInRange(r);if(e&&p.length){this.expandFolds(p);return}else p.length==1&&(i=p[0]);}if(i||(i=this.getFoldAt(r.start.row,r.start.column)),i&&i.range.toString()==r.toString()){this.expandFold(i);return}var C="...";if(!r.isMultiLine()){if(C=this.getTextRange(r),C.length<4)return;C=C.trim().substring(0,2)+"..";}this.addFold(C,r);},this.getCommentFoldRange=function(e,t,r){var i=new a(this,e,t),s=i.getCurrentToken(),c=s&&s.type;if(s&&/^comment|string/.test(c)){c=c.match(/comment|string/)[0],c=="comment"&&(c+="|doc-start|\\.doc");var p=new RegExp(c),C=new y;if(r!=1){do s=i.stepBackward();while(s&&p.test(s.type));s=i.stepForward();}C.start.row=i.getCurrentTokenRow(),C.start.column=i.getCurrentTokenColumn()+s.value.length,i=new a(this,e,t);var E=this.getState(i.$row);if(r!=-1){var S=-1;do if(s=i.stepForward(),S==-1){var M=this.getState(i.$row);E.toString()!==M.toString()&&(S=i.$row);}else if(i.$row>S)break;while(s&&p.test(s.type));s=i.stepBackward();}else s=i.getCurrentToken();return C.end.row=i.getCurrentTokenRow(),C.end.column=i.getCurrentTokenColumn(),C}},this.foldAll=function(e,t,r,i){r==null&&(r=1e5);var s=this.foldWidgets;if(s){t=t||this.getLength(),e=e||0;for(var c=e;c<t;c++)if(s[c]==null&&(s[c]=this.getFoldWidget(c)),s[c]=="start"&&!(i&&!i(c))){var p=this.getFoldWidgetRange(c);p&&p.isMultiLine()&&p.end.row<=t&&p.start.row>=e&&(c=p.end.row,p.collapseChildren=r,this.addFold("...",p));}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1);},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var r=e.getTokens(t),i=0;i<r.length;i++){var s=r[i];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return !!/comment/.test(s.type)}});},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t);}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets);}},this.getParentFoldRangeData=function(e,t){var r=this.foldWidgets;if(!r||t&&r[e])return {};for(var i=e-1,s;i>=0;){var c=r[i];if(c==null&&(c=r[i]=this.getFoldWidget(i)),c=="start"){var p=this.getFoldWidgetRange(i);if(s||(s=p),p&&p.end.row>=e)break}i--;}return {range:i!==-1&&p,firstRange:s}},this.onFoldWidgetClick=function(e,t){t instanceof l&&(t=t.domEvent);var r={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},i=this.$toggleFoldWidget(e,r);if(!i){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid");}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var r=this.getFoldWidget(e),i=this.getLine(e),s=r==="end"?-1:1,c=this.getFoldAt(e,s===-1?0:i.length,s);if(c)return t.children||t.all?this.removeFold(c):this.expandFold(c),c;var p=this.getFoldWidgetRange(e,!0);if(p&&!p.isMultiLine()&&(c=this.getFoldAt(p.start.row,p.start.column,1),c&&p.isEqual(c.range)))return this.removeFold(c),c;if(t.siblings){var C=this.getParentFoldRangeData(e);if(C.range)var E=C.range.start.row+1,S=C.range.end.row;this.foldAll(E,S,t.all?1e4:0);}else t.children?(S=p?p.end.row:this.getLength(),this.foldAll(e+1,S,t.all?1e4:0)):p&&(t.all&&(p.collapseChildren=1e4),this.addFold("...",p));return p}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var r=this.$toggleFoldWidget(t,{});if(!r){var i=this.getParentFoldRangeData(t,!0);if(r=i.range||i.firstRange,r){t=r.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",r);}}},this.updateFoldWidgets=function(e){var t=e.start.row,r=e.end.row-t;if(r===0)this.foldWidgets[t]=null;else if(e.action=="remove")this.foldWidgets.splice(t,r+1,null);else {var i=Array(r+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i);}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length);};}h.Folding=n;});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(o,h,_){var y=o("../token_iterator").TokenIterator,m=o("../range").Range;function f(){this.findMatchingBracket=function(a,l){if(a.column==0)return null;var n=l||this.getLine(a.row).charAt(a.column-1);if(n=="")return null;var e=n.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],a):this.$findOpeningBracket(e[2],a):null},this.getBracketRange=function(a){var l=this.getLine(a.row),n=!0,e,t=l.charAt(a.column-1),r=t&&t.match(/([\(\[\{])|([\)\]\}])/);if(r||(t=l.charAt(a.column),a={row:a.row,column:a.column+1},r=t&&t.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){var i=this.$findClosingBracket(r[1],a);if(!i)return null;e=m.fromPoints(a,i),n||(e.end.column++,e.start.column--),e.cursor=e.end;}else {var i=this.$findOpeningBracket(r[2],a);if(!i)return null;e=m.fromPoints(i,a),n||(e.start.column++,e.end.column--),e.cursor=e.start;}return e},this.getMatchingBracketRanges=function(a,l){var n=this.getLine(a.row),e=/([\(\[\{])|([\)\]\}])/,t=!l&&n.charAt(a.column-1),r=t&&t.match(e);if(r||(t=(l===void 0||l)&&n.charAt(a.column),a={row:a.row,column:a.column+1},r=t&&t.match(e)),!r)return null;var i=new m(a.row,a.column-1,a.row,a.column),s=r[1]?this.$findClosingBracket(r[1],a):this.$findOpeningBracket(r[2],a);if(!s)return [i];var c=new m(s.row,s.column,s.row,s.column+1);return [i,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,l,n){var e=this.$brackets[a],t=1,r=new y(this,l.row,l.column),i=r.getCurrentToken();if(i||(i=r.stepForward()),!!i){n||(n=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=l.column-r.getCurrentTokenColumn()-2,c=i.value;;){for(;s>=0;){var p=c.charAt(s);if(p==e){if(t-=1,t==0)return {row:r.getCurrentTokenRow(),column:s+r.getCurrentTokenColumn()}}else p==a&&(t+=1);s-=1;}do i=r.stepBackward();while(i&&!n.test(i.type));if(i==null)break;c=i.value,s=c.length-1;}return null}},this.$findClosingBracket=function(a,l,n){var e=this.$brackets[a],t=1,r=new y(this,l.row,l.column),i=r.getCurrentToken();if(i||(i=r.stepForward()),!!i){n||(n=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=l.column-r.getCurrentTokenColumn();;){for(var c=i.value,p=c.length;s<p;){var C=c.charAt(s);if(C==e){if(t-=1,t==0)return {row:r.getCurrentTokenRow(),column:s+r.getCurrentTokenColumn()}}else C==a&&(t+=1);s+=1;}do i=r.stepForward();while(i&&!n.test(i.type));if(i==null)break;s=0;}return null}},this.getMatchingTags=function(a){var l=new y(this,a.row,a.column),n=this.$findTagName(l);if(n){var e=l.stepBackward();return e.value==="<"?this.$findClosingTag(l,n):this.$findOpeningTag(l,n)}},this.$findTagName=function(a){var l=a.getCurrentToken(),n=!1,e=!1;if(l&&l.type.indexOf("tag-name")===-1)do e?l=a.stepBackward():l=a.stepForward(),l&&(l.value==="/>"?e=!0:l.type.indexOf("tag-name")!==-1&&(n=!0));while(l&&!n);return l},this.$findClosingTag=function(a,l){var n,e=l.value,t=l.value,r=0,i=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);l=a.stepForward();var s=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length),c=!1;do{if(n=l,n.type.indexOf("tag-close")!==-1&&!c){var p=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0;}if(l=a.stepForward(),l){if(l.value===">"&&!c){var p=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0;}if(l.type.indexOf("tag-name")!==-1){if(e=l.value,t===e){if(n.value==="<")r++;else if(n.value==="</"&&(r--,r<0)){a.stepBackward();var C=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);l=a.stepForward();var E=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),l&&l.value===">")var S=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(t===e&&l.value==="/>"&&(r--,r<0))var C=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),E=C,S=E,p=new m(s.end.row,s.end.column,s.end.row,s.end.column+1);}}while(l&&r>=0);if(i&&p&&C&&S&&s&&E)return {openTag:new m(i.start.row,i.start.column,p.end.row,p.end.column),closeTag:new m(C.start.row,C.start.column,S.end.row,S.end.column),openTagName:s,closeTagName:E}},this.$findOpeningTag=function(a,l){var n=a.getCurrentToken(),e=l.value,t=0,r=a.getCurrentTokenRow(),i=a.getCurrentTokenColumn(),s=i+2,c=new m(r,i,r,s);a.stepForward();var p=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),!(!l||l.value!==">")){var C=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(l=n,r=a.getCurrentTokenRow(),i=a.getCurrentTokenColumn(),s=i+l.value.length,n=a.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(e===l.value)if(n.value==="<"){if(t++,t>0){var E=new m(r,i,r,s),S=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do l=a.stepForward();while(l&&l.value!==">");var M=new m(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);}}else n.value==="</"&&t--;}else if(l.value==="/>"){for(var g=0,d=n;d;){if(d.type.indexOf("tag-name")!==-1&&d.value===e){t--;break}else if(d.value==="<")break;d=a.stepBackward(),g++;}for(var A=0;A<g;A++)a.stepForward();}}while(n&&t<=0);if(S&&M&&c&&C&&E&&p)return {openTag:new m(S.start.row,S.start.column,M.end.row,M.end.column),closeTag:new m(c.start.row,c.start.column,C.end.row,C.end.column),openTagName:E,closeTagName:p}}};}h.BracketMatch=f;});ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(o,h,_){var y=o("./lib/oop"),m=o("./lib/lang"),f=o("./bidihandler").BidiHandler,a=o("./config"),l=o("./lib/event_emitter").EventEmitter,n=o("./selection").Selection,e=o("./mode/text").Mode,t=o("./range").Range,r=o("./document").Document,i=o("./background_tokenizer").BackgroundTokenizer,s=o("./search_highlight").SearchHighlight,c=o("./undomanager").UndoManager,p=function(){function T(w,b){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++T.$uid,this.$foldData.toString=function(){return this.join(`
216
+ `)},this.bgTokenizer=new i(new e().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(v){u._signal("tokenizerUpdate",v);}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof w!="object"||!w.getLine)&&(w=new r(w)),this.setDocument(w),this.selection=new n(this),this.$bidiHandler=new f(this),a.resetOptions(this),this.setMode(b),a._signal("session",this),this.destroyed=!1;}return T.prototype.setDocument=function(w){this.doc&&this.doc.off("change",this.$onChange),this.doc=w,w.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches();},T.prototype.getDocument=function(){return this.doc},T.prototype.$resetRowCache=function(w){if(!w){this.$docRowCache=[],this.$screenRowCache=[];return}var b=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,w)+1;b>u&&(this.$docRowCache.splice(u,b),this.$screenRowCache.splice(u,b));},T.prototype.$getRowCacheIndex=function(w,b){for(var u=0,v=w.length-1;u<=v;){var x=u+v>>1,k=w[x];if(b>k)u=x+1;else if(b<k)v=x-1;else return x}return u-1},T.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0);},T.prototype.onChangeFold=function(w){var b=w.data;this.$resetRowCache(b.start.row);},T.prototype.onChange=function(w){this.$modified=!0,this.$bidiHandler.onChange(w),this.$resetRowCache(w.start.row);var b=this.$updateInternalDataOnChange(w);!this.$fromUndo&&this.$undoManager&&(b&&b.length&&(this.$undoManager.add({action:"removeFolds",folds:b},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(w,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(w),this._signal("change",w);},T.prototype.setValue=function(w){this.doc.setValue(w),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset();},T.fromJSON=function(w){typeof w=="string"&&(w=JSON.parse(w));var b=new c;b.$undoStack=w.history.undo,b.$redoStack=w.history.redo,b.mark=w.history.mark,b.$rev=w.history.rev;var u=new T(w.value);return w.folds.forEach(function(v){u.addFold("...",t.fromPoints(v.start,v.end));}),u.setAnnotations(w.annotations),u.setBreakpoints(w.breakpoints),u.setMode(w.mode),u.setScrollLeft(w.scrollLeft),u.setScrollTop(w.scrollTop),u.setUndoManager(b),u.selection.fromJSON(w.selection),u},T.prototype.toJSON=function(){return {annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(w){return w.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},T.prototype.toString=function(){return this.doc.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.getState=function(w){return this.bgTokenizer.getState(w)},T.prototype.getTokens=function(w){return this.bgTokenizer.getTokens(w)},T.prototype.getTokenAt=function(w,b){var u=this.bgTokenizer.getTokens(w),v,x=0;if(b==null){var k=u.length-1;x=this.getLine(w).length;}else for(var k=0;k<u.length&&(x+=u[k].value.length,!(x>=b));k++);return v=u[k],v?(v.index=k,v.start=x-v.value.length,v):null},T.prototype.setUndoManager=function(w){if(this.$undoManager=w,this.$informUndoManager&&this.$informUndoManager.cancel(),w){var b=this;w.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1;},this.$informUndoManager=m.delayedCall(this.$syncInformUndoManager);}else this.$syncInformUndoManager=function(){};},T.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager();},T.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},T.prototype.getTabString=function(){return this.getUseSoftTabs()?m.stringRepeat(" ",this.getTabSize()):" "},T.prototype.setUseSoftTabs=function(w){this.setOption("useSoftTabs",w);},T.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},T.prototype.setTabSize=function(w){this.setOption("tabSize",w);},T.prototype.getTabSize=function(){return this.$tabSize},T.prototype.isTabStop=function(w){return this.$useSoftTabs&&w.column%this.$tabSize===0},T.prototype.setNavigateWithinSoftTabs=function(w){this.setOption("navigateWithinSoftTabs",w);},T.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},T.prototype.setOverwrite=function(w){this.setOption("overwrite",w);},T.prototype.getOverwrite=function(){return this.$overwrite},T.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite);},T.prototype.addGutterDecoration=function(w,b){this.$decorations[w]||(this.$decorations[w]=""),this.$decorations[w]+=" "+b,this._signal("changeBreakpoint",{});},T.prototype.removeGutterDecoration=function(w,b){this.$decorations[w]=(this.$decorations[w]||"").replace(" "+b,""),this._signal("changeBreakpoint",{});},T.prototype.getBreakpoints=function(){return this.$breakpoints},T.prototype.setBreakpoints=function(w){this.$breakpoints=[];for(var b=0;b<w.length;b++)this.$breakpoints[w[b]]="ace_breakpoint";this._signal("changeBreakpoint",{});},T.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{});},T.prototype.setBreakpoint=function(w,b){b===void 0&&(b="ace_breakpoint"),b?this.$breakpoints[w]=b:delete this.$breakpoints[w],this._signal("changeBreakpoint",{});},T.prototype.clearBreakpoint=function(w){delete this.$breakpoints[w],this._signal("changeBreakpoint",{});},T.prototype.addMarker=function(w,b,u,v){var x=this.$markerId++,k={range:w,type:u||"line",renderer:typeof u=="function"?u:null,clazz:b,inFront:!!v,id:x};return v?(this.$frontMarkers[x]=k,this._signal("changeFrontMarker")):(this.$backMarkers[x]=k,this._signal("changeBackMarker")),x},T.prototype.addDynamicMarker=function(w,b){if(w.update){var u=this.$markerId++;return w.id=u,w.inFront=!!b,b?(this.$frontMarkers[u]=w,this._signal("changeFrontMarker")):(this.$backMarkers[u]=w,this._signal("changeBackMarker")),w}},T.prototype.removeMarker=function(w){var b=this.$frontMarkers[w]||this.$backMarkers[w];if(b){var u=b.inFront?this.$frontMarkers:this.$backMarkers;delete u[w],this._signal(b.inFront?"changeFrontMarker":"changeBackMarker");}},T.prototype.getMarkers=function(w){return w?this.$frontMarkers:this.$backMarkers},T.prototype.highlight=function(w){if(!this.$searchHighlight){var b=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b);}this.$searchHighlight.setRegexp(w);},T.prototype.highlightLines=function(w,b,u,v){typeof b!="number"&&(u=b,b=w),u||(u="ace_step");var x=new t(w,0,b,1/0);return x.id=this.addMarker(x,u,"fullLine",v),x},T.prototype.setAnnotations=function(w){this.$annotations=w,this._signal("changeAnnotation",{});},T.prototype.getAnnotations=function(){return this.$annotations||[]},T.prototype.clearAnnotations=function(){this.setAnnotations([]);},T.prototype.$detectNewLine=function(w){var b=w.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine=`
217
+ `;},T.prototype.getWordRange=function(w,b){var u=this.getLine(w),v=!1;if(b>0&&(v=!!u.charAt(b-1).match(this.tokenRe)),v||(v=!!u.charAt(b).match(this.tokenRe)),v)var x=this.tokenRe;else if(/^\s+$/.test(u.slice(b-1,b+1)))var x=/\s/;else var x=this.nonTokenRe;var k=b;if(k>0){do k--;while(k>=0&&u.charAt(k).match(x));k++;}for(var R=b;R<u.length&&u.charAt(R).match(x);)R++;return new t(w,k,w,R)},T.prototype.getAWordRange=function(w,b){for(var u=this.getWordRange(w,b),v=this.getLine(u.end.row);v.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},T.prototype.setNewLineMode=function(w){this.doc.setNewLineMode(w);},T.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},T.prototype.setUseWorker=function(w){this.setOption("useWorker",w);},T.prototype.getUseWorker=function(){return this.$useWorker},T.prototype.onReloadTokenizer=function(w){var b=w.data;this.bgTokenizer.start(b.first),this._signal("tokenizerUpdate",w);},T.prototype.setMode=function(w,b){if(w&&typeof w=="object"){if(w.getTokenizer)return this.$onChangeMode(w);var u=w,v=u.path;}else v=w||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new e),this.$modes[v]&&!u){this.$onChangeMode(this.$modes[v]),b&&b();return}this.$modeId=v,a.loadModule(["mode",v],function(x){if(this.$modeId!==v)return b&&b();this.$modes[v]&&!u?this.$onChangeMode(this.$modes[v]):x&&x.Mode&&(x=new x.Mode(u),u||(this.$modes[v]=x,x.$id=v),this.$onChangeMode(x)),b&&b();}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0);},T.prototype.$onChangeMode=function(w,b){if(b||(this.$modeId=w.$id),this.$mode!==w){var u=this.$mode;this.$mode=w,this.$stopWorker(),this.$useWorker&&this.$startWorker();var v=w.getTokenizer();if(v.on!==void 0){var x=this.onReloadTokenizer.bind(this);v.on("update",x);}this.bgTokenizer.setTokenizer(v),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=w.tokenRe,this.nonTokenRe=w.nonTokenRe,b||(w.attachToSession&&w.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(w.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:w}));}},T.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null);},T.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this);}catch(w){a.warn("Could not load worker",w),this.$worker=null;}},T.prototype.getMode=function(){return this.$mode},T.prototype.setScrollTop=function(w){this.$scrollTop===w||isNaN(w)||(this.$scrollTop=w,this._signal("changeScrollTop",w));},T.prototype.getScrollTop=function(){return this.$scrollTop},T.prototype.setScrollLeft=function(w){this.$scrollLeft===w||isNaN(w)||(this.$scrollLeft=w,this._signal("changeScrollLeft",w));},T.prototype.getScrollLeft=function(){return this.$scrollLeft},T.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},T.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var w=0;return this.lineWidgets.forEach(function(b){b&&b.screenWidth>w&&(w=b.screenWidth);}),this.lineWidgetWidth=w},T.prototype.$computeWidth=function(w){if(this.$modified||w){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),u=this.$rowLengthCache,v=0,x=0,k=this.$foldData[x],R=k?k.start.row:1/0,I=b.length,D=0;D<I;D++){if(D>R){if(D=k.end.row+1,D>=I)break;k=this.$foldData[x++],R=k?k.start.row:1/0;}u[D]==null&&(u[D]=this.$getStringScreenWidth(b[D])[0]),u[D]>v&&(v=u[D]);}this.screenWidth=v;}},T.prototype.getLine=function(w){return this.doc.getLine(w)},T.prototype.getLines=function(w,b){return this.doc.getLines(w,b)},T.prototype.getLength=function(){return this.doc.getLength()},T.prototype.getTextRange=function(w){return this.doc.getTextRange(w||this.selection.getRange())},T.prototype.insert=function(w,b){return this.doc.insert(w,b)},T.prototype.remove=function(w){return this.doc.remove(w)},T.prototype.removeFullLines=function(w,b){return this.doc.removeFullLines(w,b)},T.prototype.undoChanges=function(w,b){if(w.length){this.$fromUndo=!0;for(var u=w.length-1;u!=-1;u--){var v=w[u];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds);}!b&&this.$undoSelect&&(w.selectionBefore?this.selection.fromJSON(w.selectionBefore):this.selection.setRange(this.$getUndoSelection(w,!0))),this.$fromUndo=!1;}},T.prototype.redoChanges=function(w,b){if(w.length){this.$fromUndo=!0;for(var u=0;u<w.length;u++){var v=w[u];(v.action=="insert"||v.action=="remove")&&this.doc.$safeApplyDelta(v);}!b&&this.$undoSelect&&(w.selectionAfter?this.selection.fromJSON(w.selectionAfter):this.selection.setRange(this.$getUndoSelection(w,!1))),this.$fromUndo=!1;}},T.prototype.setUndoSelect=function(w){this.$undoSelect=w;},T.prototype.$getUndoSelection=function(w,b){function u(I){return b?I.action!=="insert":I.action==="insert"}for(var v,x,k=0;k<w.length;k++){var R=w[k];if(R.start){if(!v){u(R)?v=t.fromPoints(R.start,R.end):v=t.fromPoints(R.start,R.start);continue}u(R)?(x=R.start,v.compare(x.row,x.column)==-1&&v.setStart(x),x=R.end,v.compare(x.row,x.column)==1&&v.setEnd(x)):(x=R.start,v.compare(x.row,x.column)==-1&&(v=t.fromPoints(R.start,R.start)));}}return v},T.prototype.replace=function(w,b){return this.doc.replace(w,b)},T.prototype.moveText=function(w,b,u){var v=this.getTextRange(w),x=this.getFoldsInRange(w),k=t.fromPoints(b,b);if(!u){this.remove(w);var R=w.start.row-w.end.row,I=R?-w.end.column:w.start.column-w.end.column;I&&(k.start.row==w.end.row&&k.start.column>w.end.column&&(k.start.column+=I),k.end.row==w.end.row&&k.end.column>w.end.column&&(k.end.column+=I)),R&&k.start.row>=w.end.row&&(k.start.row+=R,k.end.row+=R);}if(k.end=this.insert(k.start,v),x.length){var D=w.start,O=k.start,R=O.row-D.row,I=O.column-D.column;this.addFolds(x.map(function(P){return P=P.clone(),P.start.row==D.row&&(P.start.column+=I),P.end.row==D.row&&(P.end.column+=I),P.start.row+=R,P.end.row+=R,P}));}return k},T.prototype.indentRows=function(w,b,u){u=u.replace(/\t/g,this.getTabString());for(var v=w;v<=b;v++)this.doc.insertInLine({row:v,column:0},u);},T.prototype.outdentRows=function(w){for(var b=w.collapseRows(),u=new t(0,0,0,0),v=this.getTabSize(),x=b.start.row;x<=b.end.row;++x){var k=this.getLine(x);u.start.row=x,u.end.row=x;for(var R=0;R<v&&k.charAt(R)==" ";++R);R<v&&k.charAt(R)==" "?(u.start.column=R,u.end.column=R+1):(u.start.column=0,u.end.column=R),this.remove(u);}},T.prototype.$moveLines=function(w,b,u){if(w=this.getRowFoldStart(w),b=this.getRowFoldEnd(b),u<0){var v=this.getRowFoldStart(w+u);if(v<0)return 0;var x=v-w;}else if(u>0){var v=this.getRowFoldEnd(b+u);if(v>this.doc.getLength()-1)return 0;var x=v-b;}else {w=this.$clipRowToDocument(w),b=this.$clipRowToDocument(b);var x=b-w+1;}var k=new t(w,0,b,Number.MAX_VALUE),R=this.getFoldsInRange(k).map(function(D){return D=D.clone(),D.start.row+=x,D.end.row+=x,D}),I=u==0?this.doc.getLines(w,b):this.doc.removeFullLines(w,b);return this.doc.insertFullLines(w+x,I),R.length&&this.addFolds(R),x},T.prototype.moveLinesUp=function(w,b){return this.$moveLines(w,b,-1)},T.prototype.moveLinesDown=function(w,b){return this.$moveLines(w,b,1)},T.prototype.duplicateLines=function(w,b){return this.$moveLines(w,b,0)},T.prototype.$clipRowToDocument=function(w){return Math.max(0,Math.min(w,this.doc.getLength()-1))},T.prototype.$clipColumnToRow=function(w,b){return b<0?0:Math.min(this.doc.getLine(w).length,b)},T.prototype.$clipPositionToDocument=function(w,b){if(b=Math.max(0,b),w<0)w=0,b=0;else {var u=this.doc.getLength();w>=u?(w=u-1,b=this.doc.getLine(u-1).length):b=Math.min(this.doc.getLine(w).length,b);}return {row:w,column:b}},T.prototype.$clipRangeToDocument=function(w){w.start.row<0?(w.start.row=0,w.start.column=0):w.start.column=this.$clipColumnToRow(w.start.row,w.start.column);var b=this.doc.getLength()-1;return w.end.row>b?(w.end.row=b,w.end.column=this.doc.getLine(b).length):w.end.column=this.$clipColumnToRow(w.end.row,w.end.column),w},T.prototype.setUseWrapMode=function(w){if(w!=this.$useWrapMode){if(this.$useWrapMode=w,this.$modified=!0,this.$resetRowCache(0),w){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1);}this._signal("changeWrapMode");}},T.prototype.getUseWrapMode=function(){return this.$useWrapMode},T.prototype.setWrapLimitRange=function(w,b){(this.$wrapLimitRange.min!==w||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:w,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"));},T.prototype.adjustWrapLimit=function(w,b){var u=this.$wrapLimitRange;u.max<0&&(u={min:b,max:b});var v=this.$constrainWrapLimit(w,u.min,u.max);return v!=this.$wrapLimit&&v>1?(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},T.prototype.$constrainWrapLimit=function(w,b,u){return b&&(w=Math.max(b,w)),u&&(w=Math.min(u,w)),w},T.prototype.getWrapLimit=function(){return this.$wrapLimit},T.prototype.setWrapLimit=function(w){this.setWrapLimitRange(w,w);},T.prototype.getWrapLimitRange=function(){return {min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},T.prototype.$updateInternalDataOnChange=function(w){var b=this.$useWrapMode,u=w.action,v=w.start,x=w.end,k=v.row,R=x.row,I=R-k,D=null;if(this.$updating=!0,I!=0)if(u==="remove"){this[b?"$wrapData":"$rowLengthCache"].splice(k,I);var O=this.$foldData;D=this.getFoldsInRange(w),this.removeFolds(D);var F=this.getFoldLine(x.row),N=0;if(F){F.addRemoveChars(x.row,x.column,v.column-x.column),F.shiftRow(-I);var P=this.getFoldLine(k);P&&P!==F&&(P.merge(F),F=P),N=O.indexOf(F)+1;}for(N;N<O.length;N++){var F=O[N];F.start.row>=x.row&&F.shiftRow(-I);}R=k;}else {var W=Array(I);W.unshift(k,0);var B=b?this.$wrapData:this.$rowLengthCache;B.splice.apply(B,W);var O=this.$foldData,F=this.getFoldLine(k),N=0;if(F){var H=F.range.compareInside(v.row,v.column);H==0?(F=F.split(v.row,v.column),F&&(F.shiftRow(I),F.addRemoveChars(R,0,x.column-v.column))):H==-1&&(F.addRemoveChars(k,0,x.column-v.column),F.shiftRow(I)),N=O.indexOf(F)+1;}for(N;N<O.length;N++){var F=O[N];F.start.row>=k&&F.shiftRow(I);}}else {I=Math.abs(w.start.column-w.end.column),u==="remove"&&(D=this.getFoldsInRange(w),this.removeFolds(D),I=-I);var F=this.getFoldLine(k);F&&F.addRemoveChars(k,v.column,I);}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(k,R):this.$updateRowLengthCache(k,R),D},T.prototype.$updateRowLengthCache=function(w,b){this.$rowLengthCache[w]=null,this.$rowLengthCache[b]=null;},T.prototype.$updateWrapData=function(w,b){var u=this.doc.getAllLines(),v=this.getTabSize(),x=this.$wrapData,k=this.$wrapLimit,R,I,D=w;for(b=Math.min(b,u.length-1);D<=b;)I=this.getFoldLine(D,I),I?(R=[],I.walk(function(O,F,N,P){var W;if(O!=null){W=this.$getDisplayTokens(O,R.length),W[0]=S;for(var B=1;B<W.length;B++)W[B]=M;}else W=this.$getDisplayTokens(u[F].substring(P,N),R.length);R=R.concat(W);}.bind(this),I.end.row,u[I.end.row].length+1),x[I.start.row]=this.$computeWrapSplits(R,k,v),D=I.end.row+1):(R=this.$getDisplayTokens(u[D]),x[D]=this.$computeWrapSplits(R,k,v),D++);},T.prototype.$computeWrapSplits=function(w,b,u){if(w.length==0)return [];var v=[],x=w.length,k=0,R=0,I=this.$wrapAsCode,D=this.$indentedSoftWrap,O=b<=Math.max(2*u,8)||D===!1?0:Math.floor(b/2);function F(){var H=0;if(O===0)return H;if(D)for(var V=0;V<w.length;V++){var U=w[V];if(U==d)H+=1;else if(U==A)H+=u;else {if(U==L)continue;break}}return I&&D!==!1&&(H+=u),Math.min(H,O)}function N(H){for(var V=H-k,U=k;U<H;U++){var K=w[U];(K===12||K===2)&&(V-=1);}v.length||(P=F(),v.indent=P),R+=V,v.push(R),k=H;}for(var P=0;x-k>b-P;){var W=k+b-P;if(w[W-1]>=d&&w[W]>=d){N(W);continue}if(w[W]==S||w[W]==M){for(W;W!=k-1&&w[W]!=S;W--);if(W>k){N(W);continue}for(W=k+b,W;W<w.length&&w[W]==M;W++);if(W==w.length)break;N(W);continue}for(var B=Math.max(W-(b-(b>>2)),k-1);W>B&&w[W]<S;)W--;if(I){for(;W>B&&w[W]<S;)W--;for(;W>B&&w[W]==g;)W--;}else for(;W>B&&w[W]<d;)W--;if(W>B){N(++W);continue}W=k+b,w[W]==E&&W--,N(W-P);}return v},T.prototype.$getDisplayTokens=function(w,b){var u=[],v;b=b||0;for(var x=0;x<w.length;x++){var k=w.charCodeAt(x);if(k==9){v=this.getScreenTabSize(u.length+b),u.push(A);for(var R=1;R<v;R++)u.push(L);}else k==32?u.push(d):k>39&&k<48||k>57&&k<64?u.push(g):k>=4352&&$(k)?u.push(C,E):u.push(C);}return u},T.prototype.$getStringScreenWidth=function(w,b,u){if(b==0)return [0,0];b==null&&(b=1/0),u=u||0;var v,x;for(x=0;x<w.length&&(v=w.charCodeAt(x),v==9?u+=this.getScreenTabSize(u):v>=4352&&$(v)?u+=2:u+=1,!(u>b));x++);return [u,x]},T.prototype.getRowLength=function(w){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[w]&&this.lineWidgets[w].rowCount||0),!this.$useWrapMode||!this.$wrapData[w]?b:this.$wrapData[w].length+b},T.prototype.getRowLineCount=function(w){return !this.$useWrapMode||!this.$wrapData[w]?1:this.$wrapData[w].length+1},T.prototype.getRowWrapIndent=function(w){if(this.$useWrapMode){var b=this.screenToDocumentPosition(w,Number.MAX_VALUE),u=this.$wrapData[b.row];return u.length&&u[0]<b.column?u.indent:0}else return 0},T.prototype.getScreenLastRowColumn=function(w){var b=this.screenToDocumentPosition(w,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},T.prototype.getDocumentLastRowColumn=function(w,b){var u=this.documentToScreenRow(w,b);return this.getScreenLastRowColumn(u)},T.prototype.getDocumentLastRowColumnPosition=function(w,b){var u=this.documentToScreenRow(w,b);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},T.prototype.getRowSplitData=function(w){if(this.$useWrapMode)return this.$wrapData[w]},T.prototype.getScreenTabSize=function(w){return this.$tabSize-(w%this.$tabSize|0)},T.prototype.screenToDocumentRow=function(w,b){return this.screenToDocumentPosition(w,b).row},T.prototype.screenToDocumentColumn=function(w,b){return this.screenToDocumentPosition(w,b).column},T.prototype.screenToDocumentPosition=function(w,b,u){if(w<0)return {row:0,column:0};var v,x=0,k=0,R,I=0,D=0,O=this.$screenRowCache,F=this.$getRowCacheIndex(O,w),N=O.length;if(N&&F>=0)var I=O[F],x=this.$docRowCache[F],P=w>O[N-1];else var P=!N;for(var W=this.getLength()-1,B=this.getNextFoldLine(x),H=B?B.start.row:1/0;I<=w&&(D=this.getRowLength(x),!(I+D>w||x>=W));)I+=D,x++,x>H&&(x=B.end.row+1,B=this.getNextFoldLine(x,B),H=B?B.start.row:1/0),P&&(this.$docRowCache.push(x),this.$screenRowCache.push(I));if(B&&B.start.row<=x)v=this.getFoldDisplayLine(B),x=B.start.row;else {if(I+D<=w||x>W)return {row:W,column:this.getLine(W).length};v=this.getLine(x),B=null;}var V=0,U=Math.floor(w-I);if(this.$useWrapMode){var K=this.$wrapData[x];K&&(R=K[U],U>0&&K.length&&(V=K.indent,k=K[U-1]||K[K.length-1],v=v.substring(k)));}return u!==void 0&&this.$bidiHandler.isBidiRow(I+U,x,U)&&(b=this.$bidiHandler.offsetToCol(u)),k+=this.$getStringScreenWidth(v,b-V)[1],this.$useWrapMode&&k>=R&&(k=R-1),B?B.idxToPosition(k):{row:x,column:k}},T.prototype.documentToScreenPosition=function(w,b){if(typeof b>"u")var u=this.$clipPositionToDocument(w.row,w.column);else u=this.$clipPositionToDocument(w,b);w=u.row,b=u.column;var v=0,x=null,k=null;k=this.getFoldAt(w,b,1),k&&(w=k.start.row,b=k.start.column);var R,I=0,D=this.$docRowCache,O=this.$getRowCacheIndex(D,w),F=D.length;if(F&&O>=0)var I=D[O],v=this.$screenRowCache[O],N=w>D[F-1];else var N=!F;for(var P=this.getNextFoldLine(I),W=P?P.start.row:1/0;I<w;){if(I>=W){if(R=P.end.row+1,R>w)break;P=this.getNextFoldLine(R,P),W=P?P.start.row:1/0;}else R=I+1;v+=this.getRowLength(I),I=R,N&&(this.$docRowCache.push(I),this.$screenRowCache.push(v));}var B="";P&&I>=W?(B=this.getFoldDisplayLine(P,w,b),x=P.start.row):(B=this.getLine(w).substring(0,b),x=w);var H=0;if(this.$useWrapMode){var V=this.$wrapData[x];if(V){for(var U=0;B.length>=V[U];)v++,U++;B=B.substring(V[U-1]||0,B.length),H=U>0?V.indent:0;}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(v+=this.lineWidgets[I].rowsAbove),{row:v,column:H+this.$getStringScreenWidth(B)[0]}},T.prototype.documentToScreenColumn=function(w,b){return this.documentToScreenPosition(w,b).column},T.prototype.documentToScreenRow=function(w,b){return this.documentToScreenPosition(w,b).row},T.prototype.getScreenLength=function(){var w=0,b=null;if(this.$useWrapMode)for(var x=this.$wrapData.length,k=0,v=0,b=this.$foldData[v++],R=b?b.start.row:1/0;k<x;){var I=this.$wrapData[k];w+=I?I.length+1:1,k++,k>R&&(k=b.end.row+1,b=this.$foldData[v++],R=b?b.start.row:1/0);}else {w=this.getLength();for(var u=this.$foldData,v=0;v<u.length;v++)b=u[v],w-=b.end.row-b.start.row;}return this.lineWidgets&&(w+=this.$getWidgetScreenLength()),w},T.prototype.$setFontMetrics=function(w){this.$enableVarChar&&(this.$getStringScreenWidth=function(b,u,v){if(u===0)return [0,0];u||(u=1/0),v=v||0;var x,k;for(k=0;k<b.length&&(x=b.charAt(k),x===" "?v+=this.getScreenTabSize(v):v+=w.getCharacterWidth(x),!(v>u));k++);return [v,k]});},T.prototype.getPrecedingCharacter=function(){var w=this.selection.getCursor();if(w.column===0)return w.row===0?"":this.doc.getNewLineCharacter();var b=this.getLine(w.row);return b[w.column-1]},T.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();},T}();p.$uid=0,p.prototype.$modes=a.$modes,p.prototype.getValue=p.prototype.toString,p.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},p.prototype.$overwrite=!1,p.prototype.$mode=null,p.prototype.$modeId=null,p.prototype.$scrollTop=0,p.prototype.$scrollLeft=0,p.prototype.$wrapLimit=80,p.prototype.$useWrapMode=!1,p.prototype.$wrapLimitRange={min:null,max:null},p.prototype.lineWidgets=null,p.prototype.isFullWidth=$,y.implement(p.prototype,l);var C=1,E=2,S=3,M=4,g=9,d=10,A=11,L=12;function $(T){return T<4352?!1:T>=4352&&T<=4447||T>=4515&&T<=4519||T>=4602&&T<=4607||T>=9001&&T<=9002||T>=11904&&T<=11929||T>=11931&&T<=12019||T>=12032&&T<=12245||T>=12272&&T<=12283||T>=12288&&T<=12350||T>=12353&&T<=12438||T>=12441&&T<=12543||T>=12549&&T<=12589||T>=12593&&T<=12686||T>=12688&&T<=12730||T>=12736&&T<=12771||T>=12784&&T<=12830||T>=12832&&T<=12871||T>=12880&&T<=13054||T>=13056&&T<=19903||T>=19968&&T<=42124||T>=42128&&T<=42182||T>=43360&&T<=43388||T>=44032&&T<=55203||T>=55216&&T<=55238||T>=55243&&T<=55291||T>=63744&&T<=64255||T>=65040&&T<=65049||T>=65072&&T<=65106||T>=65108&&T<=65126||T>=65128&&T<=65131||T>=65281&&T<=65376||T>=65504&&T<=65510}o("./edit_session/folding").Folding.call(p.prototype),o("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(T){if(!T||T=="off"?T=!1:T=="free"?T=!0:T=="printMargin"?T=-1:typeof T=="string"&&(T=parseInt(T,10)||!1),this.$wrap!=T)if(this.$wrap=T,!T)this.setUseWrapMode(!1);else {var w=typeof T=="number"?T:null;this.setWrapLimitRange(w,w),this.setUseWrapMode(!0);}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(T){T=T=="auto"?this.$mode.type!="text":T!="text",T!=this.$wrapAsCode&&(this.$wrapAsCode=T,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(T){this.$useWorker=T,this.$stopWorker(),T&&this.$startWorker();},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(T){T=parseInt(T),T>0&&this.$tabSize!==T&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=T,this._signal("changeTabSize"));},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(T){this.setFoldStyle(T);},handlesSet:!0},overwrite:{set:function(T){this._signal("changeOverwrite");},initialValue:!1},newLineMode:{set:function(T){this.doc.setNewLineMode(T);},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(T){this.setMode(T);},get:function(){return this.$modeId},handlesSet:!0}}),h.EditSession=p;});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(o,h,_){var y=o("./lib/lang"),m=o("./lib/oop"),f=o("./range").Range,a=function(){function n(){this.$options={};}return n.prototype.set=function(e){return m.mixin(this.$options,e),this},n.prototype.getOptions=function(){return y.copyObject(this.$options)},n.prototype.setOptions=function(e){this.$options=e;},n.prototype.find=function(e){var t=this.$options,r=this.$matchIterator(e,t);if(!r)return !1;var i=null;return r.forEach(function(s,c,p,C){return i=new f(s,c,p,C),c==C&&t.start&&t.start.start&&t.skipCurrent!=!1&&i.isEqual(t.start)?(i=null,!1):!0}),i},n.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return [];this.$assembleRegExp(t);var r=t.range,i=r?e.getLines(r.start.row,r.end.row):e.doc.getAllLines(),s=[],c=t.re;if(t.$isMultiLine){var p=c.length,C=i.length-p,E;e:for(var S=c.offset||0;S<=C;S++){for(var M=0;M<p;M++)if(i[S+M].search(c[M])==-1)continue e;var g=i[S],d=i[S+p-1],A=g.length-g.match(c[0])[0].length,L=d.match(c[p-1])[0].length;E&&E.end.row===S&&E.end.column>A||(s.push(E=new f(S,A,S+p-1,L)),p>2&&(S=S+p-2));}}else for(var $=0;$<i.length;$++)for(var T=y.getMatchOffsets(i[$],c),M=0;M<T.length;M++){var w=T[M];s.push(new f($,w.offset,$,w.offset+w.length));}if(r){for(var b=r.start.column,u=r.end.column,$=0,M=s.length-1;$<M&&s[$].start.column<b&&s[$].start.row==0;)$++;for(var v=r.end.row-r.start.row;$<M&&s[M].end.column>u&&s[M].end.row==v;)M--;for(s=s.slice($,M+1),$=0,M=s.length;$<M;$++)s[$].start.row+=r.start.row,s[$].end.row+=r.start.row;}return s},n.prototype.replace=function(e,t){var r=this.$options,i=this.$assembleRegExp(r);if(r.$isMultiLine)return t;if(i){var s=i.exec(e);if(!s||s[0].length!=e.length)return null;if(r.regExp||(t=t.replace(/\$/g,"$$$$")),t=e.replace(i,t),r.preserveCase){t=t.split("");for(var c=Math.min(e.length,e.length);c--;){var p=e[c];p&&p.toLowerCase()!=p?t[c]=t[c].toUpperCase():t[c]=t[c].toLowerCase();}t=t.join("");}return t}},n.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var r=e.needle;if(!e.needle)return e.re=!1;e.regExp||(r=y.escapeRegExp(r));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(r,"u"),e.$supportsUnicodeFlag=!0,i+="u";}catch{e.$supportsUnicodeFlag=!1;}if(e.wholeWord&&(r=l(r,e)),e.$isMultiLine=!t&&/[\n\r]/.test(r),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(r,i);try{var s=new RegExp(r,i);}catch{s=!1;}return e.re=s},n.prototype.$assembleMultilineRegExp=function(e,t){for(var r=e.replace(/\r\n|\r|\n/g,`$
218
+ ^`).split(`
219
+ `),i=[],s=0;s<r.length;s++)try{i.push(new RegExp(r[s],t));}catch{return !1}return i},n.prototype.$matchIterator=function(e,t){var r=this.$assembleRegExp(t);if(!r)return !1;var i=t.backwards==!0,s=t.skipCurrent!=!1,c=r.unicode,p=t.range,C=t.start;C||(C=p?p[i?"end":"start"]:e.selection.getRange()),C.start&&(C=C[s!=i?"end":"start"]);var E=p?p.start.row:0,S=p?p.end.row:e.getLength()-1;if(i)var M=function(A){var L=C.row;if(!d(L,C.column,A)){for(L--;L>=E;L--)if(d(L,Number.MAX_VALUE,A))return;if(t.wrap!=!1){for(L=S,E=C.row;L>=E;L--)if(d(L,Number.MAX_VALUE,A))return}}};else var M=function(L){var $=C.row;if(!d($,C.column,L)){for($=$+1;$<=S;$++)if(d($,0,L))return;if(t.wrap!=!1){for($=E,S=C.row;$<=S;$++)if(d($,0,L))return}}};if(t.$isMultiLine)var g=r.length,d=function(A,L,$){var T=i?A-g+1:A;if(!(T<0||T+g>e.getLength())){var w=e.getLine(T),b=w.search(r[0]);if(!(!i&&b<L||b===-1)){for(var u=1;u<g;u++)if(w=e.getLine(T+u),w.search(r[u])==-1)return;var v=w.match(r[g-1])[0].length;if(!(i&&v>L)&&$(T,b,T+g-1,v))return !0}}};else if(i)var d=function(L,$,T){var w=e.getLine(L),b=[],u,v=0;for(r.lastIndex=0;u=r.exec(w);){var x=u[0].length;if(v=u.index,!x){if(v>=w.length)break;r.lastIndex=v+=y.skipEmptyMatch(w,v,c);}if(u.index+x>$)break;b.push(u.index,x);}for(var k=b.length-1;k>=0;k-=2){var R=b[k-1],x=b[k];if(T(L,R,L,R+x))return !0}};else var d=function(L,$,T){var w=e.getLine(L),b,u;for(r.lastIndex=$;u=r.exec(w);){var v=u[0].length;if(b=u.index,T(L,b,L,b+v))return !0;if(!v&&(r.lastIndex=b+=y.skipEmptyMatch(w,b,c),b>=w.length))return !1}};return {forEach:M}},n}();function l(n,e){var t=y.supportsLookbehind();function r(p,C){C===void 0&&(C=!0);var E=t&&e.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(p)||e.regExp?t&&e.$supportsUnicodeFlag?C?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var i=Array.from(n),s=i[0],c=i[i.length-1];return r(s)+n+r(c,!1)}h.Search=a;});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(o,h,_){var y=this&&this.__extends||function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c;}||function(s,c){for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(s[p]=c[p]);},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function s(){this.constructor=r;}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s);}}(),m=o("../lib/keys"),f=o("../lib/useragent"),a=m.KEY_MODS,l=function(){function t(r,i){this.$init(r,i,!1);}return t.prototype.$init=function(r,i,s){this.platform=i||(f.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=s;},t.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r);},t.prototype.removeCommand=function(r,i){var s=r&&(typeof r=="string"?r:r.name);r=this.commands[s],i||delete this.commands[s];var c=this.commandKeyBinding;for(var p in c){var C=c[p];if(C==r)delete c[p];else if(Array.isArray(C)){var E=C.indexOf(r);E!=-1&&(C.splice(E,1),C.length==1&&(c[p]=C[0]));}}},t.prototype.bindKey=function(r,i,s){if(typeof r=="object"&&r&&(s==null&&(s=r.position),r=r[this.platform]),!!r){if(typeof i=="function")return this.addCommand({exec:i,bindKey:r,name:i.name||r});r.split("|").forEach(function(c){var p="";if(c.indexOf(" ")!=-1){var C=c.split(/\s+/);c=C.pop(),C.forEach(function(M){var g=this.parseKeys(M),d=a[g.hashId]+g.key;p+=(p?" ":"")+d,this._addCommandToBinding(p,"chainKeys");},this),p+=" ";}var E=this.parseKeys(c),S=a[E.hashId]+E.key;this._addCommandToBinding(p+S,i,s);},this);}},t.prototype._addCommandToBinding=function(r,i,s){var c=this.commandKeyBinding,p;if(!i)delete c[r];else if(!c[r]||this.$singleCommand)c[r]=i;else {Array.isArray(c[r])?(p=c[r].indexOf(i))!=-1&&c[r].splice(p,1):c[r]=[c[r]],typeof s!="number"&&(s=n(i));var C=c[r];for(p=0;p<C.length;p++){var E=C[p],S=n(E);if(S>s)break}C.splice(p,0,i);}},t.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(i){var s=r[i];if(s){if(typeof s=="string")return this.bindKey(s,i);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=i),this.addCommand(s));}},this);},t.prototype.removeCommands=function(r){Object.keys(r).forEach(function(i){this.removeCommand(r[i]);},this);},t.prototype.bindKeys=function(r){Object.keys(r).forEach(function(i){this.bindKey(i,r[i]);},this);},t.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r);},t.prototype.parseKeys=function(r){var i=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),s=i.pop(),c=m[s];if(m.FUNCTION_KEYS[c])s=m.FUNCTION_KEYS[c].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return {key:s.toUpperCase(),hashId:-1}}else return {key:s,hashId:-1};for(var p=0,C=i.length;C--;){var E=m.KEY_MODS[i[C]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+i[C]+" in "+r),!1;p|=E;}return {key:s,hashId:p}},t.prototype.findKeyCommand=function(r,i){var s=a[r]+i;return this.commandKeyBinding[s]},t.prototype.handleKeyboard=function(r,i,s,c){if(!(c<0)){var p=a[i]+s,C=this.commandKeyBinding[p];return r.$keyChain&&(r.$keyChain+=" "+p,C=this.commandKeyBinding[r.$keyChain]||C),C&&(C=="chainKeys"||C[C.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||p,{command:"null"}):(r.$keyChain&&((!i||i==4)&&s.length==1?r.$keyChain=r.$keyChain.slice(0,-p.length-1):(i==-1||c>0)&&(r.$keyChain="")),{command:C})}},t.prototype.getStatusText=function(r,i){return i.$keyChain||""},t}();function n(t){return typeof t=="object"&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}var e=function(t){y(r,t);function r(i,s){var c=t.call(this,i,s)||this;return c.$singleCommand=!0,c}return r}(l);e.call=function(t,r,i){l.prototype.$init.call(t,r,i,!0);},l.call=function(t,r,i){l.prototype.$init.call(t,r,i,!1);},h.HashHandler=e,h.MultiHashHandler=l;});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(o,h,_){var y=this&&this.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i;}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s]);},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e;}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r);}}(),m=o("../lib/oop"),f=o("../keyboard/hash_handler").MultiHashHandler,a=o("../lib/event_emitter").EventEmitter,l=function(n){y(e,n);function e(t,r){var i=n.call(this,r,t)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),i}return e.prototype.exec=function(t,r,i){if(Array.isArray(t)){for(var s=t.length;s--;)if(this.exec(t[s],r,i))return !0;return !1}if(typeof t=="string"&&(t=this.commands[t]),!this.canExecute(t,r))return !1;var c={editor:r,command:t,args:i};return c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1},e.prototype.canExecute=function(t,r){return typeof t=="string"&&(t=this.commands[t]),!(!t||r&&r.$readOnly&&!t.readOnly||this.$checkCommandState!=!1&&t.isAvailable&&!t.isAvailable(r))},e.prototype.toggleRecording=function(t){if(!this.$inReplay)return t&&t._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(r){this.macro.push([r.command,r.args]);}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},e.prototype.replay=function(t){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,t):this.exec(r[0],t,r[1]);},this);}finally{this.$inReplay=!1;}}},e.prototype.trimMacro=function(t){return t.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},e}(f);m.implement(l.prototype,a),h.CommandManager=l;});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(o,h,_){var y=o("../lib/lang"),m=o("../config"),f=o("../range").Range;function a(n,e){return {win:n,mac:e}}h.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(n){m.loadModule("ace/ext/settings_menu",function(e){e.init(n),n.showSettingsMenu();});},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(n){m.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(n,1);});},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(n){m.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(n,-1);});},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(n){n.selectAll();},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(n){n.centerSelection();},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(n,e){typeof e=="number"&&!isNaN(e)&&n.gotoLine(e),n.prompt({$type:"gotoLine"});},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(n){n.session.toggleFoldWidget();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll();},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments();},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges());},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold();},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(n){n.findNext();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext();},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious();},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(n){m.loadModule("ace/ext/searchbox",function(e){e.Search(n);});},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite();},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(n,e){n.navigateUp(e.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(n,e){n.navigateDown(e.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(n,e){n.navigateLeft(e.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(n,e){n.navigateRight(e.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown();},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(n){n.scrollPageDown();},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown();},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp();},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(n){n.scrollPageUp();},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp();},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight);},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight);},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n);},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n);},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching();},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0);},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0);},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var e=n.$copyWithEmptySelection&&n.selection.isEmpty(),t=e?n.selection.getLineRange():n.selection.getRange();n._emit("cut",t),t.isEmpty()||n.session.remove(t),n.clearSelection();},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,e){n.$handlePaste(e);},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(n){n.removeLines();},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection();},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines();},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1);},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1);},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(n){m.loadModule("ace/ext/searchbox",function(e){e.Search(n,!0);});}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(n){n.undo();}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo();}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp();},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp();},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown();},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown();},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right");},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left");},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return !1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(n){var e=n.selection.getRange();e.start.column=0,n.session.remove(e);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(n){var e=n.selection.getRange();e.end.column=Number.MAX_VALUE,n.session.remove(e);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(n){n.indent();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,e){n.insert(e);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,e){n.insert(y.stringRepeat(e.text||"",e.times||1));},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(n){n.splitLine();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters();},multiSelectAction:function(n){n.transposeSelections(1);},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(n){n.autoIndent();},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var e=n.selection.getRange();e.start.column=e.end.column=0,e.end.row++,n.selection.setRange(e,!1);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(n){n.openLink();}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(n){for(var e=n.selection.isBackwards(),t=e?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),r=e?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),i=n.session.doc.getLine(t.row).length,s=n.session.doc.getTextRange(n.selection.getRange()),c=s.replace(/\n\s*/," ").length,p=n.session.doc.getLine(t.row),C=t.row+1;C<=r.row+1;C++){var E=y.stringTrimLeft(y.stringTrimRight(n.session.doc.getLine(C)));E.length!==0&&(E=" "+E),p+=E;}r.row+1<n.session.doc.getLength()-1&&(p+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new f(t.row,0,r.row+2,0),p),c>0?(n.selection.moveCursorTo(t.row,t.column),n.selection.selectTo(t.row,t.column+c)):(i=n.session.doc.getLine(t.row).length>i?i+1:i,n.selection.moveCursorTo(t.row,i));},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(n){var e=n.session.doc.getLength()-1,t=n.session.doc.getLine(e).length,r=n.selection.rangeList.ranges,i=[];r.length<1&&(r=[n.selection.getRange()]);for(var s=0;s<r.length;s++)s==r.length-1&&(r[s].end.row===e&&r[s].end.column===t||i.push(new f(r[s].end.row,r[s].end.column,e,t))),s===0?r[s].start.row===0&&r[s].start.column===0||i.push(new f(0,0,r[s].start.row,r[s].start.column)):i.push(new f(r[s-1].end.row,r[s-1].end.column,r[s].start.row,r[s].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var s=0;s<i.length;s++)n.selection.addRange(i[s],!1);},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
220
+ `);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var e=n.getCursorPosition();n.selection.moveTo(e.row-1,Number.MAX_VALUE),n.insert(`
221
+ `),e.row===0&&n.navigateUp();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"});},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(n){n.prompt({$type:"commands"});},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(n){n.prompt({$type:"modes"});},readOnly:!0}];for(var l=1;l<9;l++)h.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(n){n.session.foldToLevel(this.level);},scrollIntoView:"center",readOnly:!0});});ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(o,h,_){var y=o("./lib/dom"),m=function(){function f(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor);}return f.prototype.getRowLength=function(a){var l;return this.lineWidgets?l=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:l=0,!this.$useWrapMode||!this.$wrapData[a]?1+l:this.$wrapData[a].length+1+l},f.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(a+=l.rowCount);}),a},f.prototype.$onChangeEditor=function(a){this.attach(a.editor);},f.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)));},f.prototype.detach=function(a){var l=this.editor;if(l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el));});}},f.prototype.updateOnFold=function(a,l){var n=l.lineWidgets;if(!(!n||!a.action)){for(var e=a.data,t=e.start.row,r=e.end.row,i=a.action=="add",s=t+1;s<r;s++)n[s]&&(n[s].hidden=i);n[r]&&(i?n[t]?n[r].hidden=i:n[t]=n[r]:(n[t]==n[r]&&(n[t]=void 0),n[r].hidden=i));}},f.prototype.updateOnChange=function(a){var l=this.session.lineWidgets;if(l){var n=a.start.row,e=a.end.row-n;if(e!==0)if(a.action=="remove"){var t=l.splice(n+1,e);!l[n]&&t[t.length-1]&&(l[n]=t.pop()),t.forEach(function(i){i&&this.removeLineWidget(i);},this),this.$updateRows();}else {var r=new Array(e);l[n]&&l[n].column!=null&&a.start.column>l[n].column&&n++,r.unshift(n,0),l.splice.apply(l,r),this.$updateRows();}}},f.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var l=!0;a.forEach(function(n,e){if(n)for(l=!1,n.row=e;n.$oldWidget;)n.$oldWidget.row=e,n=n.$oldWidget;}),l&&(this.session.lineWidgets=null);}},f.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[a.row];return l&&(a.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},f.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var l=this.editor.renderer;a.html&&!a.el&&(a.el=y.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=y.createElement("div"),a.el.textContent=a.text),a.el&&(y.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&y.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",l.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/l.layerConfig.lineHeight);var n=this.session.getFoldAt(a.row,0);if(a.$fold=n,n){var e=this.session.lineWidgets;a.row==n.end.row&&!e[n.start.row]?e[n.start.row]=a:a.hidden=!0;}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(a),a},f.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy();}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[a.row];if(l==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;l;){if(l.$oldWidget==a){l.$oldWidget=a.$oldWidget;break}l=l.$oldWidget;}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows();},f.prototype.getWidgetsAtRow=function(a){for(var l=this.session.lineWidgets,n=l&&l[a],e=[];n;)e.push(n),n=n.$oldWidget;return e},f.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull();},f.prototype.measureWidgets=function(a,l){var n=this.session._changedWidgets,e=l.layerConfig;if(!(!n||!n.length)){for(var t=1/0,r=0;r<n.length;r++){var i=n[r];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,l.container.appendChild(i.el);}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/e.characterWidth));var s=i.h/e.lineHeight;i.coverLine&&(s-=this.session.getRowLineCount(i.row),s<0&&(s=0)),i.rowCount!=s&&(i.rowCount=s,i.row<t&&(t=i.row));}}t!=1/0&&(this.session._emit("changeFold",{data:{start:{row:t}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[];}},f.prototype.renderWidgets=function(a,l){var n=l.layerConfig,e=this.session.lineWidgets;if(e){for(var t=Math.min(this.firstRow,n.firstRow),r=Math.max(this.lastRow,n.lastRow,e.length);t>0&&!e[t];)t--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,l.$cursorLayer.config=n;for(var i=t;i<=r;i++){var s=e[i];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,l.container.appendChild(s.el));var c=l.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+"px";var p=s.coverGutter?0:l.gutterWidth;s.fixedWidth||(p-=l.scrollLeft),s.el.style.left=p+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=l.scrollBar.getWidth()+"px":s.el.style.right="";}}}},f}();h.LineWidgets=m;});ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(o,h,_){var y=o("../lib/keys"),m=o("../mouse/default_gutter_handler").GutterTooltip,f=function(){function l(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new m(this.editor);}return l.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this));},l.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this));},l.prototype.$onGutterKeyDown=function(n){if(this.annotationTooltip.isOpen){n.preventDefault(),n.keyCode===y.escape&&this.annotationTooltip.hideTooltip();return}if(n.target===this.element){if(n.keyCode!=y.enter)return;n.preventDefault();var e=this.editor.getCursorPosition().row;this.editor.isRowVisible(e)||this.editor.scrollToLine(e,!0,!0),setTimeout(function(){var t=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),r=this.$findNearestFoldWidget(t),i=this.$findNearestAnnotation(t);if(!(r===null&&i===null)){if(r===null&&i!==null){this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(r!==null&&i===null){this.activeRowIndex=r,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(i-t)<Math.abs(r-t)){this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else {this.activeRowIndex=r,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(n),setTimeout(function(){this.editor._signal("gutterkeydown",new a(n,this));}.bind(this),10);},l.prototype.$handleGutterKeyboardInteraction=function(n){if(n.keyCode===y.tab){n.preventDefault();return}if(n.keyCode===y.escape){n.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(n.keyCode===y.up){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(n.keyCode===y.down){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(n.keyCode===y.left){n.preventDefault(),this.$switchLane("annotation");return}if(n.keyCode===y.right){n.preventDefault(),this.$switchLane("fold");return}if(n.keyCode===y.enter||n.keyCode===y.space){switch(n.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var e=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),n),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==e&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(e),this.$focusFoldWidget(this.activeRowIndex));}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var t=this.lines.cells[this.activeRowIndex].element.childNodes[2],r=t.getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=r.right+"px",i.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},l.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip();},l.prototype.$isFoldWidgetVisible=function(n){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),t=this.$getFoldWidget(n).style.display!=="none";return e&&t},l.prototype.$isAnnotationVisible=function(n){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),t=this.$getAnnotation(n).style.display!=="none";return e&&t},l.prototype.$getFoldWidget=function(n){var e=this.lines.get(n),t=e.element;return t.childNodes[1]},l.prototype.$getAnnotation=function(n){var e=this.lines.get(n),t=e.element;return t.childNodes[2]},l.prototype.$findNearestFoldWidget=function(n){if(this.$isFoldWidgetVisible(n))return n;for(var e=0;n-e>0||n+e<this.lines.getLength()-1;){if(e++,n-e>=0&&this.$isFoldWidgetVisible(n-e))return n-e;if(n+e<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+e))return n+e}return null},l.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var e=0;n-e>0||n+e<this.lines.getLength()-1;){if(e++,n-e>=0&&this.$isAnnotationVisible(n-e))return n-e;if(n+e<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+e))return n+e}return null},l.prototype.$focusFoldWidget=function(n){if(n!=null){var e=this.$getFoldWidget(n);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus();}},l.prototype.$focusAnnotation=function(n){if(n!=null){var e=this.$getAnnotation(n);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus();}},l.prototype.$blurFoldWidget=function(n){var e=this.$getFoldWidget(n);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur();},l.prototype.$blurAnnotation=function(n){var e=this.$getAnnotation(n);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur();},l.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isFoldWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);return}},l.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isFoldWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);return}},l.prototype.$moveAnnotationUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$switchLane=function(n){switch(n){case"annotation":if(this.activeLane==="annotation")break;var e=this.$findNearestAnnotation(this.activeRowIndex);if(e==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var t=this.$findNearestFoldWidget(this.activeRowIndex);if(t==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusFoldWidget(this.activeRowIndex);break}},l.prototype.$rowIndexToRow=function(n){var e=this.lines.get(n);return e?e.row:null},l.prototype.$rowToRowIndex=function(n){for(var e=0;e<this.lines.getLength();e++){var t=this.lines.get(e);if(t.row==n)return e}return null},l}();h.GutterKeyboardHandler=f;var a=function(){function l(n,e){this.gutterKeyboardHandler=e,this.domEvent=n;}return l.prototype.getKey=function(){return y.keyCodeToString(this.domEvent.keyCode)},l.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},l.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},l.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},l}();h.GutterKeyboardEvent=a;});ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(o,h,_){var y=this&&this.__values||function(b){var u=typeof Symbol=="function"&&Symbol.iterator,v=u&&b[u],x=0;if(v)return v.call(b);if(b&&typeof b.length=="number")return {next:function(){return b&&x>=b.length&&(b=void 0),{value:b&&b[x++],done:!b}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},m=o("./lib/oop"),f=o("./lib/dom"),a=o("./lib/lang"),l=o("./lib/useragent"),n=o("./keyboard/textinput").TextInput,e=o("./mouse/mouse_handler").MouseHandler,t=o("./mouse/fold_handler").FoldHandler,r=o("./keyboard/keybinding").KeyBinding,i=o("./edit_session").EditSession,s=o("./search").Search,c=o("./range").Range,p=o("./lib/event_emitter").EventEmitter,C=o("./commands/command_manager").CommandManager,E=o("./commands/default_commands").commands,S=o("./config"),M=o("./token_iterator").TokenIterator,g=o("./line_widgets").LineWidgets,d=o("./keyboard/gutter_handler").GutterKeyboardHandler,A=o("./config").nls,L=o("./clipboard"),$=o("./lib/keys"),T=function(){function b(u,v,x){this.session,this.$toDestroy=[];var k=u.getContainerElement();this.container=k,this.renderer=u,this.id="editor"+ ++b.$uid,this.commands=new C(l.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new n(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new e(this),new t(this)),this.keyBinding=new r(this),this.$search=new s().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart();}.bind(this)),this.on("change",function(R,I){I._$emitInputEvent.schedule(31);}),this.setSession(v||x&&x.session||new i("")),S.resetOptions(this),x&&this.setOptions(x),S._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=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0;}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0;}.bind(this),!0);},b.prototype.startOperation=function(u){if(this.curOp){if(!u||this.curOp.command)return;this.prevOp=this.curOp;}u||(this.previousCommand=null,u={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:u.command||{},args:u.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON();},b.prototype.endOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1||!this.session)return this.curOp=null;if(u==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var v=this.curOp.command,x=v&&v.scrollIntoView;if(x){switch(x){case"center-animate":x="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var k=this.selection.getRange(),R=this.renderer.layerConfig;(k.start.row>=R.lastRow||k.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;}x=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop);}var I=this.selection.toJSON();this.curOp.selectionAfter=I,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(I),this.prevOp=this.curOp,this.curOp=null;}},b.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var v=this.prevOp,x=this.$mergeableCommands,k=v.command&&u.command.name==v.command.name;if(u.command.name=="insertstring"){var R=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),k=k&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(v.args)),this.mergeNextCommand=!0;}else k=k&&x.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(k=!1),k?this.session.mergeUndoDeltas=!0:x.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now());}},b.prototype.setKeyboardHandler=function(u,v){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var x=this;S.loadModule(["keybinding",u],function(k){x.$keybindingId==u&&x.keyBinding.setKeyboardHandler(k&&k.handler),v&&v();});}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),v&&v();},b.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},b.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var v=this.session;if(v){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 x=this.session.getSelection();x.off("changeCursor",this.$onCursorChange),x.off("changeSelection",this.$onSelectionChange);}this.session=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.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=u.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(u)),this._signal("changeSession",{session:u,oldSession:v}),this.curOp=null,v&&v._signal("changeEditor",{oldEditor:this}),u&&u._signal("changeEditor",{editor:this}),u&&!u.destroyed&&u.bgTokenizer.scheduleStart();}},b.prototype.getSession=function(){return this.session},b.prototype.setValue=function(u,v){return this.session.doc.setValue(u),v?v==1?this.navigateFileEnd():v==-1&&this.navigateFileStart():this.selectAll(),u},b.prototype.getValue=function(){return this.session.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.resize=function(u){this.renderer.onResize(u);},b.prototype.setTheme=function(u,v){this.renderer.setTheme(u,v);},b.prototype.getTheme=function(){return this.renderer.getTheme()},b.prototype.setStyle=function(u){this.renderer.setStyle(u);},b.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u);},b.prototype.getFontSize=function(){return this.getOption("fontSize")||f.computedStyle(this.container).fontSize},b.prototype.setFontSize=function(u){this.setOption("fontSize",u);},b.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var v=u.session;if(!(!v||v.destroyed)){v.$bracketHighlight&&(v.$bracketHighlight.markerIds.forEach(function(P){v.removeMarker(P);}),v.$bracketHighlight=null);var x=u.getCursorPosition(),k=u.getKeyboardHandler(),R=k&&k.$getDirectionForHighlight&&k.$getDirectionForHighlight(u),I=v.getMatchingBracketRanges(x,R);if(!I){var D=new M(v,x.row,x.column),O=D.getCurrentToken();if(O&&/\b(?:tag-open|tag-name)/.test(O.type)){var F=v.getMatchingTags(x);F&&(I=[F.openTagName.isEmpty()?F.openTag:F.openTagName,F.closeTagName.isEmpty()?F.closeTag:F.closeTagName]);}}if(!I&&v.$mode.getMatching&&(I=v.$mode.getMatching(u.session)),!I){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var N="ace_bracket";Array.isArray(I)?I.length==1&&(N="ace_error_bracket"):I=[I],I.length==2&&(c.comparePoints(I[0].end,I[1].start)==0?I=[c.fromPoints(I[0].start,I[1].end)]:c.comparePoints(I[0].start,I[1].end)==0&&(I=[c.fromPoints(I[1].start,I[0].end)])),v.$bracketHighlight={ranges:I,markerIds:I.map(function(P){return v.addMarker(P,N,"text")})},u.getHighlightIndentGuides()&&u.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(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u));},b.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u));},b.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine();},b.prototype.onDocumentChange=function(u){var v=this.session.$useWrapMode,x=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,x,v),this._signal("change",u),this.$cursorChange();},b.prototype.onTokenizerUpdate=function(u){var v=u.data;this.renderer.updateLines(v.first,v.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 u=this.getSession(),v;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(v=!1)),u.$highlightLineMarker&&!v)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&v){var x=new c(v.row,v.column,v.row,1/0);x.id=u.addMarker(x,"ace_active-line","screenLine"),u.$highlightLineMarker=x;}else v&&(u.$highlightLineMarker.start.row=v.row,u.$highlightLineMarker.end.row=v.row,u.$highlightLineMarker.start.column=v.column,u._signal("changeBackMarker"));},b.prototype.onSelectionChange=function(u){var v=this.session;if(v.$selectionMarker&&v.removeMarker(v.$selectionMarker),v.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else {var x=this.selection.getRange(),k=this.getSelectionStyle();v.$selectionMarker=v.addMarker(x,"ace_selection",k);}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection");},b.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,v=this.getSelectionRange();if(!(v.isEmpty()||v.isMultiLine())){var x=v.start.column,k=v.end.column,R=u.getLine(v.start.row),I=R.substring(x,k);if(!(I.length>5e3||!/[\w\d]/.test(I))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),O=R.substring(x-1,k+1);if(D.test(O))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(u){this.renderer.updateText(),this._emit("changeMode",u);},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 u=this.getSelectedText(),v=this.session.doc.getNewLineCharacter(),x=!1;if(!u&&this.$copyWithEmptySelection){x=!0;for(var k=this.selection.getAllRanges(),R=0;R<k.length;R++){var I=k[R];R&&k[R-1].start.row==I.start.row||(u+=this.session.getLine(I.start.row)+v);}}var D={text:u};return this._signal("copy",D),L.lineMode=x?D.text:!1,D.text},b.prototype.onCopy=function(){this.commands.exec("copy",this);},b.prototype.onCut=function(){this.commands.exec("cut",this);},b.prototype.onPaste=function(u,v){var x={text:u,event:v};this.commands.exec("paste",this,x);},b.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var v=u.text,x=v===L.lineMode,k=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)x?k.insert({row:this.selection.lead.row,column:0},v):this.insert(v);else if(x)this.selection.rangeList.ranges.forEach(function(N){k.insert({row:N.start.row,column:0},v);});else {var R=v.split(/\r\n|\r|\n/),I=this.selection.rangeList.ranges,D=R.length==2&&(!R[0]||!R[1]);if(R.length!=I.length||D)return this.commands.exec("insertstring",this,v);for(var O=I.length;O--;){var F=I[O];F.isEmpty()||k.remove(F),k.insert(F.start,R[O]);}}},b.prototype.execCommand=function(u,v){return this.commands.exec(u,this,v)},b.prototype.insert=function(u,v){var x=this.session,k=x.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!v){var I=k.transformAction(x.getState(R.row),"insertion",this,x,u);I&&(u!==I.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=I.text);}if(u==" "&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(`
222
+ `)==-1){var D=c.fromPoints(R,R);D.end.column+=u.length,this.session.remove(D);}}else {var D=this.getSelectionRange();R=this.session.remove(D),this.clearSelection();}if(u==`
223
+ `||u==`\r
224
+ `){var P=x.getLine(R.row);if(R.column>P.search(/\S|$/)){var O=P.substr(R.column).search(/\S|$/);x.doc.removeInLine(R.row,R.column,R.column+O);}}this.clearSelection();var F=R.column,N=x.getState(R.row),P=x.getLine(R.row),W=k.checkOutdent(N,P,u);if(x.insert(R,u),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new c(R.row,F+I.selection[0],R.row,F+I.selection[1])):this.selection.setSelectionRange(new c(R.row+I.selection[0],I.selection[1],R.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(x.getDocument().isNewLine(u)){var B=k.getNextLineIndent(N,P.slice(0,R.column),x.getTabString());x.insert({row:R.row+1,column:0},B);}W&&k.autoOutdent(N,x,R.row);}},b.prototype.autoIndent=function(){for(var u=this.session,v=u.getMode(),x=this.selection.isEmpty()?[new c(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),k="",R="",I="",D=u.getTabString(),O=0;O<x.length;O++)for(var F=x[O].start.row,N=x[O].end.row,P=F;P<=N;P++){P>0&&(k=u.getState(P-1),R=u.getLine(P-1),I=v.getNextLineIndent(k,R,D));var W=u.getLine(P),B=v.$getIndent(W);if(I!==B){if(B.length>0){var H=new c(P,0,P,B.length);u.remove(H);}I.length>0&&u.insert({row:P,column:0},I);}v.autoOutdent(k,u,P);}},b.prototype.onTextInput=function(u,v){if(!v)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var x=this.applyComposition.bind(this,u,v);this.selection.rangeCount?this.forEachSelection(x):x(),this.endOperation();},b.prototype.applyComposition=function(u,v){if(v.extendLeft||v.extendRight){var x=this.selection.getRange();x.start.column-=v.extendLeft,x.end.column+=v.extendRight,x.start.column<0&&(x.start.row--,x.start.column+=this.session.getLine(x.start.row).length+1),this.selection.setRange(x),!u&&!x.isEmpty()&&this.remove();}if((u||!this.selection.isEmpty())&&this.insert(u,!0),v.restoreStart||v.restoreEnd){var x=this.selection.getRange();x.start.column-=v.restoreStart,x.end.column-=v.restoreEnd,this.selection.setRange(x);}},b.prototype.onCommandKey=function(u,v,x){return this.keyBinding.onCommandKey(u,v,x)},b.prototype.setOverwrite=function(u){this.session.setOverwrite(u);},b.prototype.getOverwrite=function(){return this.session.getOverwrite()},b.prototype.toggleOverwrite=function(){this.session.toggleOverwrite();},b.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u);},b.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},b.prototype.setDragDelay=function(u){this.setOption("dragDelay",u);},b.prototype.getDragDelay=function(){return this.getOption("dragDelay")},b.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u);},b.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},b.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u);},b.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},b.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u);},b.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},b.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u);},b.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},b.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u);},b.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},b.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u);},b.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},b.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u);},b.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},b.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u);},b.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},b.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u);},b.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},b.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u);},b.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},b.prototype.setReadOnly=function(u){this.setOption("readOnly",u);},b.prototype.getReadOnly=function(){return this.getOption("readOnly")},b.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u);},b.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},b.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u);},b.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},b.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u);},b.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},b.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u);},b.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},b.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var v=this.getSelectionRange();if(this.getBehavioursEnabled()){var x=this.session,k=x.getState(v.start.row),R=x.getMode().transformAction(k,"deletion",this,x,v);if(v.end.column===0){var I=x.getTextRange(v);if(I[I.length-1]==`
225
+ `){var D=x.getLine(v.end.row);/^\s+$/.test(D)&&(v.end.column=D.length);}}R&&(v=R);}this.session.remove(v),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 u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection();},b.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(`
226
+ `),this.moveCursorToPosition(u);},b.prototype.setGhostText=function(u,v){this.session.widgetManager||(this.session.widgetManager=new g(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(u,v);},b.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText();},b.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),v=u.column;if(v!==0){var x=this.session.getLine(u.row),k,R;v<x.length?(k=x.charAt(v)+x.charAt(v-1),R=new c(u.row,v-1,u.row,v+1)):(k=x.charAt(v-1)+x.charAt(v-2),R=new c(u.row,v-2,u.row,v)),this.session.replace(R,k),this.session.selection.moveToPosition(R.end);}}},b.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),x=this.session.getTextRange(v);this.session.replace(v,x.toLowerCase()),this.selection.setSelectionRange(u);},b.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),x=this.session.getTextRange(v);this.session.replace(v,x.toUpperCase()),this.selection.setSelectionRange(u);},b.prototype.indent=function(){var u=this.session,v=this.getSelectionRange();if(v.start.row<v.end.row){var x=this.$getSelectedRows();u.indentRows(x.first,x.last," ");return}else if(v.start.column<v.end.column){var k=u.getTextRange(v);if(!/^\s+$/.test(k)){var x=this.$getSelectedRows();u.indentRows(x.first,x.last," ");return}}var R=u.getLine(v.start.row),I=v.start,D=u.getTabSize(),O=u.documentToScreenColumn(I.row,I.column);if(this.session.getUseSoftTabs())var F=D-O%D,N=a.stringRepeat(" ",F);else {for(var F=O%D;R[v.start.column-1]==" "&&F;)v.start.column--,F--;this.selection.setSelectionRange(v),N=" ";}return this.insert(N)},b.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ");},b.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange());},b.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),v=this.session,x=[],k=u.first;k<=u.last;k++)x.push(v.getLine(k));x.sort(function(D,O){return D.toLowerCase()<O.toLowerCase()?-1:D.toLowerCase()>O.toLowerCase()?1:0});for(var R=new c(0,0,0,0),k=u.first;k<=u.last;k++){var I=v.getLine(k);R.start.row=k,R.end.row=k,R.end.column=I.length,v.replace(R,x[k-u.first]);}},b.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),v=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,v.first,v.last);},b.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),v=this.session.getState(u.row),x=this.getSelectionRange();this.session.getMode().toggleBlockComment(v,this.session,x,u);},b.prototype.getNumberAt=function(u,v){var x=/[\-]?[0-9]+(?:\.[0-9]+)?/g;x.lastIndex=0;for(var k=this.session.getLine(u);x.lastIndex<v;){var R=x.exec(k);if(R.index<=v&&R.index+R[0].length>=v){var I={value:R[0],start:R.index,end:R.index+R[0].length};return I}}return null},b.prototype.modifyNumber=function(u){var v=this.selection.getCursor().row,x=this.selection.getCursor().column,k=new c(v,x-1,v,x),R=this.session.getTextRange(k);if(!isNaN(parseFloat(R))&&isFinite(R)){var I=this.getNumberAt(v,x);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,O=I.start+I.value.length-D,F=parseFloat(I.value);F*=Math.pow(10,O),D!==I.end&&x<D?u*=Math.pow(10,I.end-x-1):u*=Math.pow(10,I.end-x),F+=u,F/=Math.pow(10,O);var N=F.toFixed(O),P=new c(v,I.start,v,I.end);this.session.replace(P,N),this.moveCursorTo(v,Math.max(I.start+1,x+N.length-I.value.length));}}else this.toggleWord();},b.prototype.toggleWord=function(){var u=this.selection.getCursor().row,v=this.selection.getCursor().column;this.selection.selectWord();var x=this.getSelectedText(),k=this.selection.getWordRange().start.column,R=x.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),I=v-k-1;I<0&&(I=0);var D=0,O=0,F=this;x.match(/[A-Za-z0-9_]+/)&&R.forEach(function(Z,Y){O=D+Z.length,I>=D&&I<=O&&(x=Z,F.selection.clearSelection(),F.moveCursorTo(u,D+k),F.selection.selectTo(u,O+k)),D=O;});for(var N=this.$toggleWordPairs,P,W=0;W<N.length;W++)for(var B=N[W],H=0;H<=1;H++){var V=+!H,U=x.match(new RegExp("^\\s?_?("+a.escapeRegExp(B[H])+")\\s?$","i"));if(U){var K=x.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(U[1])+")($|\\s)","g"));K&&(P=x.replace(new RegExp(a.escapeRegExp(B[H]),"i"),function(Z){var Y=B[V];return Z.toUpperCase()==Z?Y=Y.toUpperCase():Z.charAt(0).toUpperCase()==Z.charAt(0)&&(Y=Y.substr(0,0)+B[V].charAt(0).toUpperCase()+Y.substr(1)),Y}),this.insert(P),P="");}}},b.prototype.findLinkAt=function(u,v){var x,k,R=this.session.getLine(u),I=R.split(/((?:https?|ftp):\/\/[\S]+)/),D=v;D<0&&(D=0);var O=0,F=0,N;try{for(var P=y(I),W=P.next();!W.done;W=P.next()){var B=W.value;if(F=O+B.length,D>=O&&D<=F&&B.match(/((?:https?|ftp):\/\/[\S]+)/)){N=B.replace(/[\s:.,'";}\]]+$/,"");break}O=F;}}catch(H){x={error:H};}finally{try{W&&!W.done&&(k=P.return)&&k.call(P);}finally{if(x)throw x.error}}return N},b.prototype.openLink=function(){var u=this.selection.getCursor(),v=this.findLinkAt(u.row,u.column);return v&&window.open(v,"_blank"),v!=null},b.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection();},b.prototype.duplicateSelection=function(){var u=this.selection,v=this.session,x=u.getRange(),k=u.isBackwards();if(x.isEmpty()){var R=x.start.row;v.duplicateLines(R,R);}else {var I=k?x.start:x.end,D=v.insert(I,v.getTextRange(x));x.start=I,x.end=D,u.setSelectionRange(x,k);}},b.prototype.moveLinesDown=function(){this.$moveLines(1,!1);},b.prototype.moveLinesUp=function(){this.$moveLines(-1,!1);},b.prototype.moveText=function(u,v,x){return this.session.moveText(u,v,x)},b.prototype.copyLinesUp=function(){this.$moveLines(-1,!0);},b.prototype.copyLinesDown=function(){this.$moveLines(1,!0);},b.prototype.$moveLines=function(u,v){var x,k,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var I=R.toOrientedRange();x=this.$getSelectedRows(I),k=this.session.$moveLines(x.first,x.last,v?0:u),v&&u==-1&&(k=0),I.moveBy(k,0),R.fromOrientedRange(I);}else {var D=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var O=0,F=0,N=D.length,P=0;P<N;P++){var W=P;D[P].moveBy(O,0),x=this.$getSelectedRows(D[P]);for(var B=x.first,H=x.last;++P<N;){F&&D[P].moveBy(F,0);var V=this.$getSelectedRows(D[P]);if(v&&V.first!=H)break;if(!v&&V.first>H+1)break;H=V.last;}for(P--,O=this.session.$moveLines(B,H,v?0:u),v&&u==-1&&(W=P+1);W<=P;)D[W].moveBy(O,0),W++;v||(O=0),F+=O;}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1;}},b.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},b.prototype.onCompositionStart=function(u){this.renderer.showComposition(u);},b.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u);},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(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},b.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},b.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},b.prototype.$moveByPage=function(u,v){var x=this.renderer,k=this.renderer.layerConfig,R=u*Math.floor(k.height/k.lineHeight);v===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0);}):v===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var I=x.scrollTop;x.scrollBy(0,R*k.lineHeight),v!=null&&x.scrollCursorIntoView(null,.5),x.animateScrolling(I);},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(u){this.renderer.scrollToRow(u);},b.prototype.scrollToLine=function(u,v,x,k){this.renderer.scrollToLine(u,v,x,k);},b.prototype.centerSelection=function(){var u=this.getSelectionRange(),v={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(v,.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(u,v){this.selection.moveCursorTo(u,v);},b.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u);},b.prototype.jumpToMatching=function(u,v){var x=this.getCursorPosition(),k=new M(this.session,x.row,x.column),R=k.getCurrentToken(),I=0;R&&R.type.indexOf("tag-name")!==-1&&(R=k.stepBackward());var D=R||k.stepForward();if(D){var O,F=!1,N={},P=x.column-D.start,W,B={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;P<D.value.length&&!F;P++)if(B[D.value[P]])switch(W=B[D.value[P]]+"."+D.type.replace("rparen","lparen"),isNaN(N[W])&&(N[W]=0),D.value[P]){case"(":case"[":case"{":N[W]++;break;case")":case"]":case"}":N[W]--,N[W]===-1&&(O="bracket",F=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(N[D.value])&&(N[D.value]=0),R.value==="<"&&I>1?N[D.value]++:R.value==="</"&&N[D.value]--,N[D.value]===-1&&(O="tag",F=!0));F||(R=D,I++,D=k.stepForward(),P=0);}while(D&&!F);if(O){var H,V;if(O==="bracket")H=this.session.getBracketRange(x),H||(H=new c(k.getCurrentTokenRow(),k.getCurrentTokenColumn()+P-1,k.getCurrentTokenRow(),k.getCurrentTokenColumn()+P-1),V=H.start,(v||V.row===x.row&&Math.abs(V.column-x.column)<2)&&(H=this.session.getBracketRange(V)));else if(O==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(H=new c(k.getCurrentTokenRow(),k.getCurrentTokenColumn()-2,k.getCurrentTokenRow(),k.getCurrentTokenColumn()-2),H.compare(x.row,x.column)===0){var U=this.session.getMatchingTags(x);U&&(U.openTag.contains(x.row,x.column)?(H=U.closeTag,V=H.start):(H=U.openTag,U.closeTag.start.row===x.row&&U.closeTag.start.column===x.column?V=H.end:V=H.start));}V=V||H.start;}V=H&&H.cursor||V,V&&(u?H&&v?this.selection.setRange(H):H&&H.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(V.row,V.column):this.selection.moveTo(V.row,V.column));}}},b.prototype.gotoLine=function(u,v,x){this.selection.clearSelection(),this.session.unfold({row:u-1,column:v||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,v||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,x);},b.prototype.navigateTo=function(u,v){this.selection.moveTo(u,v);},b.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0);},b.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0);},b.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else {var v=this.getSelectionRange().start;this.moveCursorToPosition(v);}this.clearSelection();},b.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else {var v=this.getSelectionRange().end;this.moveCursorToPosition(v);}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(u,v){v&&this.$search.set(v);var x=this.$search.find(this.session),k=0;return x&&(this.$tryReplace(x,u)&&(k=1),this.selection.setSelectionRange(x),this.renderer.scrollSelectionIntoView(x.start,x.end)),k},b.prototype.replaceAll=function(u,v){v&&this.$search.set(v);var x=this.$search.findAll(this.session),k=0;if(!x.length)return k;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var I=x.length-1;I>=0;--I)this.$tryReplace(x[I],u)&&k++;return this.selection.setSelectionRange(R),k},b.prototype.$tryReplace=function(u,v){var x=this.session.getTextRange(u);return v=this.$search.replace(x,v),v!==null?(u.end=this.session.replace(u,v),u):null},b.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},b.prototype.find=function(u,v,x){v||(v={}),typeof u=="string"||u instanceof RegExp?v.needle=u:typeof u=="object"&&m.mixin(v,u);var k=this.selection.getRange();v.needle==null&&(u=this.session.getTextRange(k)||this.$search.$options.needle,u||(k=this.session.getWordRange(k.start.row,k.start.column),u=this.session.getTextRange(k)),this.$search.set({needle:u})),this.$search.set(v),v.start||this.$search.set({start:k});var R=this.$search.find(this.session);if(v.preventScroll)return R;if(R)return this.revealRange(R,x),R;v.backwards?k.start=k.end:k.end=k.start,this.selection.setRange(k);},b.prototype.findNext=function(u,v){this.find({skipCurrent:!0,backwards:!1},u,v);},b.prototype.findPrevious=function(u,v){this.find(u,{skipCurrent:!0,backwards:!0},v);},b.prototype.revealRange=function(u,v){this.session.unfold(u),this.selection.setSelectionRange(u);var x=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),v!==!1&&this.renderer.animateScrolling(x);},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(u){u.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(u){if(u){var v,x=this,k=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var I=this.on("changeSelection",function(){k=!0;}),D=this.renderer.on("beforeRender",function(){k&&(v=x.renderer.container.getBoundingClientRect());}),O=this.renderer.on("afterRender",function(){if(k&&v&&(x.isFocused()||x.searchBox&&x.searchBox.isFocused())){var F=x.renderer,N=F.$cursorLayer.$pixelPos,P=F.layerConfig,W=N.top-P.offset;N.top>=0&&W+v.top<0?k=!0:N.top<P.height&&N.top+v.top+P.lineHeight>window.innerHeight?k=!1:k=null,k!=null&&(R.style.top=W+"px",R.style.left=N.left+"px",R.style.height=P.lineHeight+"px",R.scrollIntoView(k)),k=v=null;}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",O),this.renderer.off("beforeRender",D));};}},b.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",v=this.renderer.$cursorLayer;v&&(v.setSmoothBlinking(/smooth/.test(u)),v.isBlinking=!this.$readOnly&&u!="wide",f.setCssClass(v.element,"ace_slim-cursors",/slim/.test(u)));},b.prototype.prompt=function(u,v,x){var k=this;S.loadModule("ace/ext/prompt",function(R){R.prompt(k,u,v,x);});},b}();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.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"],["&&","||"],["==","!="]],m.implement(T.prototype,p),S.defineOptions(T.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?w.attach(this):w.detach(this);},initialValue:!0},relativeLineNumbers:{set:function(b){this.$showLineNumbers&&b?w.attach(this):w.detach(this);}},placeholder:{set:function(b){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),f.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),f.addCssClass(this.container,"ace_hasPlaceholder");var v=f.createElement("div");v.className="ace_placeholder",v.textContent=this.$placeholder||"",this.renderer.placeholderNode=v,this.renderer.content.appendChild(this.renderer.placeholderNode);}else !u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder();}},enableKeyboardAccessibility:{set:function(b){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(k){k.blur(),k.renderer.scroller.focus();},readOnly:!0},v=function(k){if(k.target==this.renderer.scroller&&k.keyCode===$.enter){k.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus();}},x;b?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",v.bind(this)),this.commands.addCommand(u),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",A("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),x||(x=new d(this)),x.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",v.bind(this)),this.commands.removeCommand(u),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),x&&x.removeListener());},initialValue:!1},textInputAriaLabel:{set:function(b){this.$textInputAriaLabel=b;},initialValue:""},enableMobileMenu:{set:function(b){this.$enableMobileMenu=b;},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(b,u){return (Math.abs(b.selection.lead.row-u)||u+1+(u<9?"\xB7":""))+""},getWidth:function(b,u,v){return Math.max(u.toString().length,(v.lastRow+1).toString().length,2)*v.characterWidth},update:function(b,u){u.renderer.$loop.schedule(u.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=T;});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(o,h,_){var y=o("../lib/dom"),m=function(){function f(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0;}return f.prototype.moveContainer=function(a){y.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient);},f.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},f.prototype.computeLineTop=function(a,l,n){var e=l.firstRowScreen*l.lineHeight,t=Math.floor(e/this.canvasHeight),r=n.documentToScreenRow(a,0)*l.lineHeight;return r-t*this.canvasHeight},f.prototype.computeLineHeight=function(a,l,n){return l.lineHeight*n.getRowLineCount(a)},f.prototype.getLength=function(){return this.cells.length},f.prototype.get=function(a){return this.cells[a]},f.prototype.shift=function(){this.$cacheCell(this.cells.shift());},f.prototype.pop=function(){this.$cacheCell(this.cells.pop());},f.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=y.createFragment(this.element),n=0;n<a.length;n++)l.appendChild(a[n].element);this.element.appendChild(l);}else this.cells.push(a),this.element.appendChild(a.element);},f.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var l=y.createFragment(this.element),n=0;n<a.length;n++)l.appendChild(a[n].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l);}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element);},f.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},f.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a));},f.prototype.createCell=function(a,l,n,e){var t=this.cellCache.pop();if(!t){var r=y.createElement("div");e&&e(r),this.element.appendChild(r),t={element:r,text:"",row:a};}return t.row=a,t},f}();h.Lines=m;});ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(o,h,_){var y=o("../lib/dom"),m=o("../lib/oop"),f=o("../lib/lang"),a=o("../lib/event_emitter").EventEmitter,l=o("./lines").Lines,n=o("../config").nls,e=function(){function r(i){this.element=y.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1;}return r.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations);},r.prototype.addGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,s);},r.prototype.removeGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,s);},r.prototype.setAnnotations=function(i){this.$annotations=[];for(var s=0;s<i.length;s++){var c=i[s],p=c.row,C=this.$annotations[p];C||(C=this.$annotations[p]={text:[],type:[],displayText:[]});var E=c.text,S=c.text,M=c.type;E=E?f.escapeHTML(E):c.html||"",S=S||c.html||"",C.text.indexOf(E)===-1&&(C.text.push(E),C.type.push(M),C.displayText.push(S));var g=c.className;g?C.className=g:M==="error"?C.className=" ace_error":M==="security"&&!/\bace_error\b/.test(C.className)?C.className=" ace_security":M==="warning"&&!/\bace_(error|security)\b/.test(C.className)?C.className=" ace_warning":M==="info"&&!C.className?C.className=" ace_info":M==="hint"&&!C.className&&(C.className=" ace_hint");}},r.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var s=i.start.row,c=i.end.row-s;if(c!==0)if(i.action=="remove")this.$annotations.splice(s,c+1,null);else {var p=new Array(c+1);p.unshift(s,1),this.$annotations.splice.apply(this.$annotations,p);}}},r.prototype.update=function(i){this.config=i;var s=this.session,c=i.firstRow,p=Math.min(i.lastRow+i.gutterOffset,s.getLength()-1);this.oldLastRow=p,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var C=s.getNextFoldLine(c),E=C?C.start.row:1/0,S=null,M=-1,g=c;;){if(g>E&&(g=C.end.row+1,C=s.getNextFoldLine(g,C),E=C?C.start.row:1/0),g>p){for(;this.$lines.getLength()>M+1;)this.$lines.pop();break}S=this.$lines.get(++M),S?S.row=g:(S=this.$lines.createCell(g,i,this.session,t),this.$lines.push(S)),this.$renderCell(S,i,C,g),g++;}this._signal("afterRender"),this.$updateGutterWidth(i);},r.prototype.$updateGutterWidth=function(i){var s=this.session,c=s.gutterRenderer||this.$renderer,p=s.$firstLineNumber,C=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(C=s.getLength()+p-1);var E=c?c.getWidth(s,C,i):C.toString().length*i.characterWidth,S=this.$padding||this.$computePadding();E+=S.left+S.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E));},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row);}},r.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var s=this.$lines.cells;this.$cursorCell=null;for(var c=0;c<s.length;c++){var p=s[c];if(p.row>=this.$cursorRow){if(p.row>this.$cursorRow){var C=this.session.getFoldLine(this.$cursorRow);if(c>0&&C&&C.start.row==s[c-1].row)p=s[c-1];else break}p.element.className="ace_gutter-active-line "+p.element.className,this.$cursorCell=p;break}}}}},r.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var c=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),p=this.oldLastRow;if(this.oldLastRow=c,!s||p<i.firstRow)return this.update(i);if(c<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var C=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);C>0;C--)this.$lines.shift();if(p>c)for(var C=this.session.getFoldedRowCount(c+1,p);C>0;C--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,s.firstRow-1)),c>p&&this.$lines.push(this.$renderLines(i,p+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i);},r.prototype.$renderLines=function(i,s,c){for(var p=[],C=s,E=this.session.getNextFoldLine(C),S=E?E.start.row:1/0;C>S&&(C=E.end.row+1,E=this.session.getNextFoldLine(C,E),S=E?E.start.row:1/0),!(C>c);){var M=this.$lines.createCell(C,i,this.session,t);this.$renderCell(M,i,E,C),p.push(M),C++;}return p},r.prototype.$renderCell=function(i,s,c,p){var C=i.element,E=this.session,S=C.childNodes[0],M=C.childNodes[1],g=C.childNodes[2],d=g.firstChild,A=E.$firstLineNumber,L=E.$breakpoints,$=E.$decorations,T=E.gutterRenderer||this.$renderer,w=this.$showFoldWidgets&&E.foldWidgets,b=c?c.start.row:Number.MAX_VALUE,u=s.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(T?T.getText(E,p):p+A).toString();if(this.$highlightGutterLine&&(p==this.$cursorRow||c&&p<this.$cursorRow&&p>=b&&this.$cursorRow<=c.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),L[p]&&(v+=L[p]),$[p]&&(v+=$[p]),this.$annotations[p]&&p!==b&&(v+=this.$annotations[p].className),w){var R=w[p];R==null&&(R=w[p]=E.getFoldWidget(p));}if(R){var I="ace_fold-widget ace_"+R,D=R=="start"&&p==b&&p<c.end.row;if(D){I+=" ace_closed";for(var O="",F=!1,N=p+1;N<=c.end.row;N++)if(this.$annotations[N]){if(this.$annotations[N].className===" ace_error"){F=!0,O=" ace_error_fold";break}this.$annotations[N].className===" ace_security"?(F=!0,O=" ace_security_fold"):this.$annotations[N].className===" ace_warning"&&O!==" ace_security_fold"&&(F=!0,O=" ace_warning_fold");}v+=O;}else I+=" ace_open";M.className!=I&&(M.className=I),y.setStyle(M.style,"height",u),y.setStyle(M.style,"display","inline-block"),M.setAttribute("role","button"),M.setAttribute("tabindex","-1");var P=E.getFoldWidgetRange(p);P?M.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[P.start.row+1,P.end.row+1])):c?M.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[c.start.row+1,c.end.row+1])):M.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[p+1])),D?(M.setAttribute("aria-expanded","false"),M.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(M.setAttribute("aria-expanded","true"),M.setAttribute("title",n("gutter.code-folding.open.title","Fold code")));}else M&&(y.setStyle(M.style,"display","none"),M.setAttribute("tabindex","0"),M.removeAttribute("role"),M.removeAttribute("aria-label"));if(F&&this.$showFoldedAnnotations){g.className="ace_gutter_annotation",d.className=x,d.className+=O,y.setStyle(d.style,"height",u),y.setStyle(g.style,"display","block"),y.setStyle(g.style,"height",u);var W;switch(O){case" ace_error_fold":W=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security_fold":W=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning_fold":W=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break}g.setAttribute("aria-label",W),g.setAttribute("tabindex","-1"),g.setAttribute("role","button");}else if(this.$annotations[p]){g.className="ace_gutter_annotation",d.className=x,this.$useSvgGutterIcons?d.className+=this.$annotations[p].className:C.classList.add(this.$annotations[p].className.replace(" ","")),y.setStyle(d.style,"height",u),y.setStyle(g.style,"display","block"),y.setStyle(g.style,"height",u);var W;switch(this.$annotations[p].className){case" ace_error":W=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security":W=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning":W=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break;case" ace_info":W=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[k]);break;case" ace_hint":W=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[k]);break}g.setAttribute("aria-label",W),g.setAttribute("tabindex","-1"),g.setAttribute("role","button");}else y.setStyle(g.style,"display","none"),g.removeAttribute("aria-label"),g.removeAttribute("role"),g.setAttribute("tabindex","0");return k!==S.data&&(S.data=k),C.className!=v&&(C.className=v),y.setStyle(i.element.style,"height",this.$lines.computeLineHeight(p,s,E)+"px"),y.setStyle(i.element.style,"top",this.$lines.computeLineTop(p,s,E)+"px"),i.text=k,g.style.display==="none"&&M.style.display==="none"?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},r.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i;},r.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return ""}};},r.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},r.prototype.setShowFoldWidgets=function(i){i?y.addCssClass(this.element,"ace_folding-enabled"):y.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null;},r.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},r.prototype.$computePadding=function(){if(!this.element.firstChild)return {left:0,right:0};var i=y.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},r.prototype.getRegion=function(i){var s=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();if(i.x<s.left+c.left)return "markers";if(this.$showFoldWidgets&&i.x>c.right-s.right)return "foldWidgets"},r}();e.prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,m.implement(e.prototype,a);function t(r){var i=document.createTextNode("");r.appendChild(i);var s=y.createElement("span");r.appendChild(s);var c=y.createElement("span");r.appendChild(c);var p=y.createElement("span");return c.appendChild(p),r}h.Gutter=e;});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(o,h,_){var y=o("../range").Range,m=o("../lib/dom"),f=function(){function l(n){this.element=m.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element);}return l.prototype.setPadding=function(n){this.$padding=n;},l.prototype.setSession=function(n){this.session=n;},l.prototype.setMarkers=function(n){this.markers=n;},l.prototype.elt=function(n,e){var t=this.i!=-1&&this.element.childNodes[this.i];t?this.i++:(t=document.createElement("div"),this.element.appendChild(t),this.i=-1),t.style.cssText=e,t.className=n;},l.prototype.update=function(n){if(n){this.config=n,this.i=0;var e;for(var t in this.markers){var r=this.markers[t];if(!r.range){r.update(e,this,this.session,n);continue}var i=r.range.clipRows(n.firstRow,n.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var s=this.$getTop(i.start.row,n),c=this.$padding+i.start.column*n.characterWidth;r.renderer(e,i,c,s,n);}else r.type=="fullLine"?this.drawFullLineMarker(e,i,r.clazz,n):r.type=="screenLine"?this.drawScreenLineMarker(e,i,r.clazz,n):i.isMultiLine()?r.type=="text"?this.drawTextMarker(e,i,r.clazz,n):this.drawMultiLineMarker(e,i,r.clazz,n):this.drawSingleLineMarker(e,i,r.clazz+" ace_start ace_br15",n);}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild);}},l.prototype.$getTop=function(n,e){return (n-e.firstRowScreen)*e.lineHeight},l.prototype.drawTextMarker=function(n,e,t,r,i){for(var s=this.session,c=e.start.row,p=e.end.row,C=c,E=0,S=0,M=s.getScreenLastRowColumn(C),g=new y(C,e.start.column,C,S);C<=p;C++)g.start.row=g.end.row=C,g.start.column=C==c?e.start.column:s.getRowWrapIndent(C),g.end.column=M,E=S,S=M,M=C+1<p?s.getScreenLastRowColumn(C+1):C==p?0:e.end.column,this.drawSingleLineMarker(n,g,t+(C==c?" ace_start":"")+" ace_br"+a(C==c||C==c+1&&e.start.column,E<S,S>M,C==p),r,C==p?0:1,i);},l.prototype.drawMultiLineMarker=function(n,e,t,r,i){var s=this.$padding,c=r.lineHeight,p=this.$getTop(e.start.row,r),C=s+e.start.column*r.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(e.start.row)){var E=e.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(n,E,t+" ace_br1 ace_start",r,null,i);}else this.elt(t+" ace_br1 ace_start","height:"+c+"px;right:0;top:"+p+"px;left:"+C+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(e.end.row)){var E=e.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(n,E,t+" ace_br12",r,null,i);}else {p=this.$getTop(e.end.row,r);var S=e.end.column*r.characterWidth;this.elt(t+" ace_br12","height:"+c+"px;width:"+S+"px;top:"+p+"px;left:"+s+"px;"+(i||""));}if(c=(e.end.row-e.start.row-1)*r.lineHeight,!(c<=0)){p=this.$getTop(e.start.row+1,r);var M=(e.start.column?1:0)|(e.end.column?0:8);this.elt(t+(M?" ace_br"+M:""),"height:"+c+"px;right:0;top:"+p+"px;left:"+s+"px;"+(i||""));}},l.prototype.drawSingleLineMarker=function(n,e,t,r,i,s){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(n,e,t,r,i,s);var c=r.lineHeight,p=(e.end.column+(i||0)-e.start.column)*r.characterWidth,C=this.$getTop(e.start.row,r),E=this.$padding+e.start.column*r.characterWidth;this.elt(t,"height:"+c+"px;width:"+p+"px;top:"+C+"px;left:"+E+"px;"+(s||""));},l.prototype.drawBidiSingleLineMarker=function(n,e,t,r,i,s){var c=r.lineHeight,p=this.$getTop(e.start.row,r),C=this.$padding,E=this.session.$bidiHandler.getSelections(e.start.column,e.end.column);E.forEach(function(S){this.elt(t,"height:"+c+"px;width:"+(S.width+(i||0))+"px;top:"+p+"px;left:"+(C+S.left)+"px;"+(s||""));},this);},l.prototype.drawFullLineMarker=function(n,e,t,r,i){var s=this.$getTop(e.start.row,r),c=r.lineHeight;e.start.row!=e.end.row&&(c+=this.$getTop(e.end.row,r)-s),this.elt(t,"height:"+c+"px;top:"+s+"px;left:0;right:0;"+(i||""));},l.prototype.drawScreenLineMarker=function(n,e,t,r,i){var s=this.$getTop(e.start.row,r),c=r.lineHeight;this.elt(t,"height:"+c+"px;top:"+s+"px;left:0;right:0;"+(i||""));},l}();f.prototype.$padding=0;function a(l,n,e,t){return (l?1:0)|(n?2:0)|(e?4:0)|(t?8:0)}h.Marker=f;});ace.define("ace/layer/text_util",["require","exports","module"],function(o,h,_){var y=new Set(["text","rparen","lparen"]);h.isTextToken=function(m){return y.has(m)};});ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(o,h,_){var y=o("../lib/oop"),m=o("../lib/dom"),f=o("../lib/lang"),a=o("./lines").Lines,l=o("../lib/event_emitter").EventEmitter,n=o("../config").nls,e=o("./text_util").isTextToken,t=function(){function r(i){this.dom=m,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element);}return r.prototype.$updateEolChar=function(){var i=this.session.doc,s=i.getNewLineCharacter()==`
227
+ `&&i.getNewLineMode()!="windows",c=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},r.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px";},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",function(s){this._signal("changeCharacterSize",s);}.bind(this)),this.$pollSizeChanges();},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges();},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString();},r.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},r.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},r.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var s=this.$tabStrings=[0],c=1;c<i+1;c++)if(this.showTabs){var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_tab",p.textContent=f.stringRepeat(this.TAB_CHAR,c),s.push(p);}else s.push(this.dom.createTextNode(f.stringRepeat(" ",c),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var C="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?f.stringRepeat(this.SPACE_CHAR,this.tabSize):f.stringRepeat(" ",this.tabSize),M=this.showTabs?" ace_invisible ace_invisible_tab":"",g=this.showTabs?f.stringRepeat(this.TAB_CHAR,this.tabSize):S,p=this.dom.createElement("span");p.className=C+E,p.textContent=S,this.$tabStrings[" "]=p;var p=this.dom.createElement("span");p.className=C+M,p.textContent=g,this.$tabStrings[" "]=p;}},r.prototype.updateLines=function(i,s,c){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var p=Math.max(s,i.firstRow),C=Math.min(c,i.lastRow),E=this.element.childNodes,S=0,g=i.firstRow;g<p;g++){var d=this.session.getFoldLine(g);if(d)if(d.containsRow(p)){p=d.start.row;break}else g=d.end.row;S++;}for(var M=!1,g=p,d=this.session.getNextFoldLine(g),A=d?d.start.row:1/0;g>A&&(g=d.end.row+1,d=this.session.getNextFoldLine(g,d),A=d?d.start.row:1/0),!(g>C);){var L=E[S++];if(L){this.dom.removeChildren(L),this.$renderLine(L,g,g==A?d:!1),M&&(L.style.top=this.$lines.computeLineTop(g,i,this.session)+"px");var $=i.lineHeight*this.session.getRowLength(g)+"px";L.style.height!=$&&(M=!0,L.style.height=$);}g++;}if(M)for(;S<this.$lines.cells.length;){var T=this.$lines.cells[S++];T.element.style.top=this.$lines.computeLineTop(T.row,i,this.session)+"px";}},r.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var c=i.lastRow,p=s?s.lastRow:-1;if(!s||p<i.firstRow)return this.update(i);if(c<s.firstRow)return this.update(i);if(!s||s.lastRow<i.firstRow)return this.update(i);if(i.lastRow<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var C=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);C>0;C--)this.$lines.shift();if(s.lastRow>i.lastRow)for(var C=this.session.getFoldedRowCount(i.lastRow+1,s.lastRow);C>0;C--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,s.firstRow-1)),i.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(i,s.lastRow+1,i.lastRow)),this.$highlightIndentGuide();},r.prototype.$renderLinesFragment=function(i,s,c){for(var p=[],C=s,E=this.session.getNextFoldLine(C),S=E?E.start.row:1/0;C>S&&(C=E.end.row+1,E=this.session.getNextFoldLine(C,E),S=E?E.start.row:1/0),!(C>c);){var M=this.$lines.createCell(C,i,this.session),g=M.element;this.dom.removeChildren(g),m.setStyle(g.style,"height",this.$lines.computeLineHeight(C,i,this.session)+"px"),m.setStyle(g.style,"top",this.$lines.computeLineTop(C,i,this.session)+"px"),this.$renderLine(g,C,C==S?E:!1),this.$useLineGroups()?g.className="ace_line_group":g.className="ace_line",p.push(M),C++;}return p},r.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var s=i.firstRow,c=i.lastRow,p=this.$lines;p.getLength();)p.pop();p.push(this.$renderLinesFragment(i,s,c));},r.prototype.$renderToken=function(i,s,c,p){for(var C=this,E=/(\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,S=this.dom.createFragment(this.element),M,g=0;M=E.exec(p);){var d=M[1],A=M[2],L=M[3],$=M[4],T=M[5];if(!(!C.showSpaces&&A)){var w=g!=M.index?p.slice(g,M.index):"";if(g=M.index+M[0].length,w&&S.appendChild(this.dom.createTextNode(w,this.element)),d){var b=C.session.getScreenTabSize(s+M.index);S.appendChild(C.$tabStrings[b].cloneNode(!0)),s+=b-1;}else if(A)if(C.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=f.stringRepeat(C.SPACE_CHAR,A.length),S.appendChild(u);}else S.appendChild(this.dom.createTextNode(A,this.element));else if(L){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=f.stringRepeat(C.SPACE_CHAR,L.length),S.appendChild(u);}else if($){s+=1;var u=this.dom.createElement("span");u.style.width=C.config.characterWidth*2+"px",u.className=C.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=C.showSpaces?C.SPACE_CHAR:$,S.appendChild(u);}else if(T){s+=1;var u=this.dom.createElement("span");u.style.width=C.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=T,S.appendChild(u);}}}if(S.appendChild(this.dom.createTextNode(g?p.slice(g):p,this.element)),e(c.type))i.appendChild(S);else {var v="ace_"+c.type.replace(/\./g," ace_"),u=this.dom.createElement("span");c.type=="fold"&&(u.style.width=c.value.length*this.config.characterWidth+"px",u.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),u.className=v,u.appendChild(S),i.appendChild(u);}return s+p.length},r.prototype.renderIndentGuide=function(i,s,c){var p=s.search(this.$indentGuideRe);if(p<=0||p>=c)return s;if(s[0]==" "){p-=p%this.tabSize;for(var C=p/this.tabSize,E=0;E<C;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(p)}else if(s[0]==" "){for(var E=0;E<p;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(p)}return this.$highlightIndentGuide(),s},r.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var s=this.session.selection.getCursor(),c=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,p=Math.floor(c/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:p,start:s.row};var C=this.session.$bracketHighlight;if(C){for(var E=this.session.$bracketHighlight.ranges,S=0;S<E.length;S++)if(s.row!==E[S].start.row){this.$highlightIndentGuideMarker.end=E[S].start.row,s.row>E[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[s.row]!==""&&s.column===i[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=s.row+1;S<i.length;S++){var M=i[S],g=/^\s*/.exec(M)[0].length;if(M!==""&&(this.$highlightIndentGuideMarker.end=S,g<=c))break}}this.$renderHighlightIndentGuide();}}},r.prototype.$clearActiveIndentGuide=function(){for(var i=this.$lines.cells,s=0;s<i.length;s++){var c=i[s],p=c.element.childNodes;if(p.length>0){for(var C=0;C<p.length;C++)if(p[C].classList&&p[C].classList.contains("ace_indent-guide-active")){p[C].classList.remove("ace_indent-guide-active");break}}}},r.prototype.$setIndentGuideActive=function(i,s){var c=this.session.doc.getLine(i.row);if(c!==""){var p=i.element.childNodes;if(p){var C=p[s-1];C&&C.classList&&C.classList.contains("ace_indent-guide")&&C.classList.add("ace_indent-guide-active");}}},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var c=0;c<i.length;c++){var p=i[c];if(this.$highlightIndentGuideMarker.end&&p.row>=this.$highlightIndentGuideMarker.start+1){if(p.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,s);}}else for(var c=i.length-1;c>=0;c--){var p=i[c];if(this.$highlightIndentGuideMarker.end&&p.row<this.$highlightIndentGuideMarker.start){if(p.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,s);}}}},r.prototype.$createLineElement=function(i){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},r.prototype.$renderWrappedLine=function(i,s,c){var p=0,C=0,E=c[0],S=0,M=this.$createLineElement();i.appendChild(M);for(var g=0;g<s.length;g++){var d=s[g],A=d.value;if(g==0&&this.displayIndentGuides){if(p=A.length,A=this.renderIndentGuide(M,A,E),!A)continue;p-=A.length;}if(p+A.length<E)S=this.$renderToken(M,S,d,A),p+=A.length;else {for(;p+A.length>=E;)S=this.$renderToken(M,S,d,A.substring(0,E-p)),A=A.substring(E-p),p=E,M=this.$createLineElement(),i.appendChild(M),M.appendChild(this.dom.createTextNode(f.stringRepeat("\xA0",c.indent),this.element)),C++,S=0,E=c[C]||Number.MAX_VALUE;A.length!=0&&(p+=A.length,S=this.$renderToken(M,S,d,A));}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(M,S,null,"",!0);},r.prototype.$renderSimpleLine=function(i,s){for(var c=0,p=0;p<s.length;p++){var C=s[p],E=C.value;if(!(p==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(i,E),!E))){if(c+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,c,C,E);c=this.$renderToken(i,c,C,E);}}},r.prototype.$renderOverflowMessage=function(i,s,c,p,C){c&&this.$renderToken(i,s,c,p.slice(0,this.MAX_LINE_LENGTH-s));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=C?"<hide>":"<click to see more...>",i.appendChild(E);},r.prototype.$renderLine=function(i,s,c){if(!c&&c!=!1&&(c=this.session.getFoldLine(s)),c)var p=this.$getFoldLineTokens(s,c);else var p=this.session.getTokens(s);var C=i;if(p.length){var E=this.session.getRowSplitData(s);if(E&&E.length){this.$renderWrappedLine(i,p,E);var C=i.lastChild;}else {var C=i;this.$useLineGroups()&&(C=this.$createLineElement(),i.appendChild(C)),this.$renderSimpleLine(C,p);}}else this.$useLineGroups()&&(C=this.$createLineElement(),i.appendChild(C));if(this.showEOL&&C){c&&(s=c.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,C.appendChild(S);}},r.prototype.$getFoldLineTokens=function(i,s){var c=this.session,p=[];function C(S,M,g){for(var d=0,A=0;A+S[d].value.length<M;)if(A+=S[d].value.length,d++,d==S.length)return;if(A!=M){var L=S[d].value.substring(M-A);L.length>g-M&&(L=L.substring(0,g-M)),p.push({type:S[d].type,value:L}),A=M+L.length,d+=1;}for(;A<g&&d<S.length;){var L=S[d].value;L.length+A>g?p.push({type:S[d].type,value:L.substring(0,g-A)}):p.push(S[d]),A+=L.length,d+=1;}}var E=c.getTokens(i);return s.walk(function(S,M,g,d,A){S!=null?p.push({type:"fold",value:S}):(A&&(E=c.getTokens(M)),E.length&&C(E,d,g));},s.end.row,this.session.getLine(s.end.row).length),p},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r}();t.prototype.EOF_CHAR="\xB6",t.prototype.EOL_CHAR_LF="\xAC",t.prototype.EOL_CHAR_CRLF="\xA4",t.prototype.EOL_CHAR=t.prototype.EOL_CHAR_LF,t.prototype.TAB_CHAR="\u2014",t.prototype.SPACE_CHAR="\xB7",t.prototype.$padding=0,t.prototype.MAX_LINE_LENGTH=1e4,t.prototype.showInvisibles=!1,t.prototype.showSpaces=!1,t.prototype.showTabs=!1,t.prototype.showEOL=!1,t.prototype.displayIndentGuides=!0,t.prototype.$highlightIndentGuides=!0,t.prototype.$tabStrings=[],t.prototype.destroy={},t.prototype.onChangeTabSize=t.prototype.$computeTabString,y.implement(t.prototype,l),h.Text=t;});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(o,h,_){var y=o("../lib/dom"),m=function(){function f(a){this.element=y.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),y.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this);}return f.prototype.$updateOpacity=function(a){for(var l=this.cursors,n=l.length;n--;)y.setStyle(l[n].style,"opacity",a?"":"0");},f.prototype.$startCssAnimation=function(){for(var a=this.cursors,l=a.length;l--;)a[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&y.addCssClass(this.element,"ace_animate-blinking");}.bind(this));},f.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,y.removeCssClass(this.element,"ace_animate-blinking");},f.prototype.setPadding=function(a){this.$padding=a;},f.prototype.setSession=function(a){this.session=a;},f.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer());},f.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer());},f.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,y.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer());},f.prototype.addCursor=function(){var a=y.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},f.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},f.prototype.hideCursor=function(){this.isVisible=!1,y.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer();},f.prototype.showCursor=function(){this.isVisible=!0,y.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer();},f.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,y.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&y.addCssClass(this.element,"ace_smooth-blinking");}.bind(this))),y.HAS_CSS_ANIMATION)this.$startCssAnimation();else {var l=function(){this.timeoutId=setTimeout(function(){a(!1);},.6*this.blinkInterval);}.bind(this);this.intervalId=setInterval(function(){a(!0),l();},this.blinkInterval),l();}},f.prototype.getPixelPosition=function(a,l){if(!this.config||!this.session)return {left:0,top:0};a||(a=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(a),e=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,a.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),t=(n.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return {left:e,top:t}},f.prototype.isCursorInView=function(a,l){return a.top>=0&&a.top<l.maxHeight},f.prototype.update=function(a){this.config=a;var l=this.session.$selectionMarkers,n=0,e=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var n=0,t=l.length;n<t;n++){var r=this.getPixelPosition(l[n].cursor,!0);if(!((r.top>a.height+a.offset||r.top<0)&&n>1)){var i=this.cursors[e++]||this.addCursor(),s=i.style;this.drawCursor?this.drawCursor(i,r,a,l[n],this.session):this.isCursorInView(r,a)?(y.setStyle(s,"display","block"),y.translate(i,r.left,r.top),y.setStyle(s,"width",Math.round(a.characterWidth)+"px"),y.setStyle(s,"height",a.lineHeight+"px")):y.setStyle(s,"display","none");}}for(;this.cursors.length>e;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=r,this.restartTimer();},f.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?y.addCssClass(this.element,"ace_overwrite-cursors"):y.removeCssClass(this.element,"ace_overwrite-cursors"));},f.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId);},f}();m.prototype.$padding=0,m.prototype.drawCursor=null,h.Cursor=m;});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(o,h,_){var y=this&&this.__extends||function(){var i=function(s,c){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,C){p.__proto__=C;}||function(p,C){for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(p[E]=C[E]);},i(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");i(s,c);function p(){this.constructor=s;}s.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p);}}(),m=o("./lib/oop"),f=o("./lib/dom"),a=o("./lib/event"),l=o("./lib/event_emitter").EventEmitter,n=32768,e=function(){function i(s,c){this.element=f.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=f.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault);}return i.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1;},i}();m.implement(e.prototype,l);var t=function(i){y(s,i);function s(c,p){var C=i.call(this,c,"-v")||this;return C.scrollTop=0,C.scrollHeight=0,p.$scrollbarWidth=C.width=f.scrollbarWidth(c.ownerDocument),C.inner.style.width=C.element.style.width=(C.width||15)+5+"px",C.$minWidth=0,C}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c);}this._emit("scroll",{data:this.scrollTop});}this.skipEvent=!1;},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(c){this.element.style.height=c+"px";},s.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>n?(this.coeff=n/c,c=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px";},s.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff);},s}(e);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var r=function(i){y(s,i);function s(c,p){var C=i.call(this,c,"-h")||this;return C.scrollLeft=0,C.height=p.$scrollbarWidth,C.inner.style.height=C.element.style.height=(C.height||15)+5+"px",C}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1;},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(c){this.element.style.width=c+"px";},s.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px";},s.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px";},s.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c);},s}(e);h.ScrollBar=t,h.ScrollBarV=t,h.ScrollBarH=r,h.VScrollBar=t,h.HScrollBar=r;});ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(o,h,_){var y=this&&this.__extends||function(){var r=function(i,s){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p;}||function(c,p){for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(c[C]=p[C]);},r(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");r(i,s);function c(){this.constructor=i;}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c);}}(),m=o("./lib/oop"),f=o("./lib/dom"),a=o("./lib/event"),l=o("./lib/event_emitter").EventEmitter;f.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
228
+ position: absolute;
229
+ background: rgba(128, 128, 128, 0.6);
230
+ -moz-box-sizing: border-box;
231
+ box-sizing: border-box;
232
+ border: 1px solid #bbb;
233
+ border-radius: 2px;
234
+ z-index: 8;
235
+ }
236
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
237
+ position: absolute;
238
+ z-index: 6;
239
+ background: none;
240
+ overflow: hidden!important;
241
+ }
242
+ .ace_editor>.ace_sb-v {
243
+ z-index: 6;
244
+ right: 0;
245
+ top: 0;
246
+ width: 12px;
247
+ }
248
+ .ace_editor>.ace_sb-v div {
249
+ z-index: 8;
250
+ right: 0;
251
+ width: 100%;
252
+ }
253
+ .ace_editor>.ace_sb-h {
254
+ bottom: 0;
255
+ left: 0;
256
+ height: 12px;
257
+ }
258
+ .ace_editor>.ace_sb-h div {
259
+ bottom: 0;
260
+ height: 100%;
261
+ }
262
+ .ace_editor>.ace_sb_grabbed {
263
+ z-index: 8;
264
+ background: #000;
265
+ }`,"ace_scrollbar.css",!1);var n=function(){function r(i,s){this.element=f.createElement("div"),this.element.className="ace_sb"+s,this.inner=f.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown");}return r.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1;},r}();m.implement(n.prototype,l);var e=function(r){y(i,r);function i(s,c){var p=r.call(this,s,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,p.parent=s,p.width=p.VScrollWidth,p.renderer=c,p.inner.style.width=p.element.style.width=(p.width||15)+"px",p.$minWidth=0,p}return i.prototype.onMouseDown=function(s,c){if(s==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var p=this,C=c.clientY,E=function($){C=$.clientY;},S=function(){clearInterval(A);},M=c.clientY,g=this.thumbTop,d=function(){if(C!==void 0){var $=p.scrollTopFromThumbTop(g+C-M);$!==p.scrollTop&&p._emit("scroll",{data:$});}};a.capture(this.inner,E,S);var A=setInterval(d,20);return a.preventDefault(c)}var L=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),a.preventDefault(c)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(s){var c=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0);},i.prototype.setScrollHeight=function(s,c){this.pageHeight===s&&!c||(this.pageHeight=s,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})));},i.prototype.setScrollTop=function(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px";},i}(n);e.prototype.setInnerHeight=e.prototype.setScrollHeight;var t=function(r){y(i,r);function i(s,c){var p=r.call(this,s,"-h")||this;return p.scrollLeft=0,p.scrollWidth=0,p.height=p.HScrollHeight,p.inner.style.height=p.element.style.height=(p.height||12)+"px",p.renderer=c,p}return i.prototype.onMouseDown=function(s,c){if(s==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var p=this,C=c.clientX,E=function($){C=$.clientX;},S=function(){clearInterval(A);},M=c.clientX,g=this.thumbLeft,d=function(){if(C!==void 0){var $=p.scrollLeftFromThumbLeft(g+C-M);$!==p.scrollLeft&&p._emit("scroll",{data:$});}};a.capture(this.inner,E,S);var A=setInterval(d,20);return a.preventDefault(c)}var L=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),a.preventDefault(c)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(s){var c=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},i.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0);},i.prototype.setScrollWidth=function(s,c){this.pageWidth===s&&!c||(this.pageWidth=s,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})));},i.prototype.setScrollLeft=function(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px";},i}(n);t.prototype.setInnerWidth=t.prototype.setScrollWidth,h.ScrollBar=e,h.ScrollBarV=e,h.ScrollBarH=t,h.VScrollBar=e,h.HScrollBar=t;});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(o,h,_){var y=o("./lib/event"),m=function(){function f(a,l){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(y.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule();}else n.$recursionLimit=2;};}return f.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(y.nextFrame(this._flush),this.pending=!0);},f.prototype.clear=function(a){var l=this.changes;return this.changes=0,l},f}();h.RenderLoop=m;});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(o,h,_){var y=o("../lib/oop"),m=o("../lib/dom"),f=o("../lib/lang"),a=o("../lib/event"),l=o("../lib/useragent"),n=o("../lib/event_emitter").EventEmitter,e=512,t=typeof ResizeObserver=="function",r=200,i=function(){function s(c){this.el=m.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=m.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=m.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=f.stringRepeat("X",e),this.$characterSize={width:0,height:0},t?this.$addObserver():this.checkForSizeChanges();}return s.prototype.$setMeasureNodeStyles=function(c,p){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",l.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=p?"hidden":"visible";},s.prototype.checkForSizeChanges=function(c){if(c===void 0&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var p=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=p&&p.width===c.width&&p.height===c.height,this._emit("changeCharacterSize",{data:c});}},s.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(p){c.checkForSizeChanges();}),this.$observer.observe(this.$measureNode);},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=a.onIdle(function p(){c.checkForSizeChanges(),a.onIdle(p,500);},500)},s.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0);},s.prototype.$measureSizes=function(c){var p={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/e};return p.width===0||p.height===0?null:p},s.prototype.$measureCharWidth=function(c){this.$main.textContent=f.stringRepeat(c,e);var p=this.$main.getBoundingClientRect();return p.width/e},s.prototype.getCharacterWidth=function(c){var p=this.charSizes[c];return p===void 0&&(p=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),p},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);},s.prototype.$getZoom=function(c){return !c||!c.parentElement?1:(Number(window.getComputedStyle(c).zoom)||1)*this.$getZoom(c.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var c=function(p,C){return ["div",{style:"position: absolute;top:"+p+"px;left:"+C+"px;"}]};this.els=m.buildDom([c(0,0),c(r,0),c(0,r),c(r,r)],this.el);},s.prototype.transformCoordinates=function(c,p){if(c){var C=this.$getZoom(this.el);c=g(1/C,c);}function E(D,O,F){var N=D[1]*O[0]-D[0]*O[1];return [(-O[1]*F[0]+O[0]*F[1])/N,(+D[1]*F[0]-D[0]*F[1])/N]}function S(D,O){return [D[0]-O[0],D[1]-O[1]]}function M(D,O){return [D[0]+O[0],D[1]+O[1]]}function g(D,O){return [D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function d(D){var O=D.getBoundingClientRect();return [O.left,O.top]}var A=d(this.els[0]),L=d(this.els[1]),$=d(this.els[2]),T=d(this.els[3]),w=E(S(T,L),S(T,$),S(M(L,$),M(T,A))),b=g(1+w[0],S(L,A)),u=g(1+w[1],S($,A));if(p){var v=p,x=w[0]*v[0]/r+w[1]*v[1]/r+1,k=M(g(v[0],b),g(v[1],u));return M(g(1/x/r,k),A)}var R=S(c,A),I=E(S(b,g(w[0],R)),S(u,g(w[1],R)),R);return g(r,I)},s}();i.prototype.$characterSize={width:0,height:0},y.implement(i.prototype,n),h.FontMetrics=i;});ace.define("ace/css/editor-css",["require","exports","module"],function(o,h,_){_.exports=`
266
+ .ace_br1 {border-top-left-radius : 3px;}
267
+ .ace_br2 {border-top-right-radius : 3px;}
268
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
269
+ .ace_br4 {border-bottom-right-radius: 3px;}
270
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
271
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
272
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
273
+ .ace_br8 {border-bottom-left-radius : 3px;}
274
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
275
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
276
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
277
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
278
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
279
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
280
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
281
+
282
+
283
+ .ace_editor {
284
+ position: relative;
285
+ overflow: hidden;
286
+ padding: 0;
287
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
288
+ direction: ltr;
289
+ text-align: left;
290
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
291
+ forced-color-adjust: none;
292
+ }
293
+
294
+ .ace_scroller {
295
+ position: absolute;
296
+ overflow: hidden;
297
+ top: 0;
298
+ bottom: 0;
299
+ background-color: inherit;
300
+ -ms-user-select: none;
301
+ -moz-user-select: none;
302
+ -webkit-user-select: none;
303
+ user-select: none;
304
+ cursor: text;
305
+ }
306
+
307
+ .ace_content {
308
+ position: absolute;
309
+ box-sizing: border-box;
310
+ min-width: 100%;
311
+ contain: style size layout;
312
+ font-variant-ligatures: no-common-ligatures;
313
+ }
314
+
315
+ .ace_keyboard-focus:focus {
316
+ box-shadow: inset 0 0 0 2px #5E9ED6;
317
+ outline: none;
318
+ }
319
+
320
+ .ace_dragging .ace_scroller:before{
321
+ position: absolute;
322
+ top: 0;
323
+ left: 0;
324
+ right: 0;
325
+ bottom: 0;
326
+ content: '';
327
+ background: rgba(250, 250, 250, 0.01);
328
+ z-index: 1000;
329
+ }
330
+ .ace_dragging.ace_dark .ace_scroller:before{
331
+ background: rgba(0, 0, 0, 0.01);
332
+ }
333
+
334
+ .ace_gutter {
335
+ position: absolute;
336
+ overflow : hidden;
337
+ width: auto;
338
+ top: 0;
339
+ bottom: 0;
340
+ left: 0;
341
+ cursor: default;
342
+ z-index: 4;
343
+ -ms-user-select: none;
344
+ -moz-user-select: none;
345
+ -webkit-user-select: none;
346
+ user-select: none;
347
+ contain: style size layout;
348
+ }
349
+
350
+ .ace_gutter-active-line {
351
+ position: absolute;
352
+ left: 0;
353
+ right: 0;
354
+ }
355
+
356
+ .ace_scroller.ace_scroll-left:after {
357
+ content: "";
358
+ position: absolute;
359
+ top: 0;
360
+ right: 0;
361
+ bottom: 0;
362
+ left: 0;
363
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
364
+ pointer-events: none;
365
+ }
366
+
367
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
368
+ position: absolute;
369
+ top: 0;
370
+ left: 0;
371
+ right: 0;
372
+ padding-left: 19px;
373
+ padding-right: 6px;
374
+ background-repeat: no-repeat;
375
+ }
376
+
377
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
378
+ margin-left: -14px;
379
+ float: left;
380
+ }
381
+
382
+ .ace_gutter-cell .ace_gutter_annotation {
383
+ margin-left: -19px;
384
+ float: left;
385
+ }
386
+
387
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
388
+ 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==");
389
+ background-repeat: no-repeat;
390
+ background-position: 2px center;
391
+ }
392
+
393
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
394
+ 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==");
395
+ background-repeat: no-repeat;
396
+ background-position: 2px center;
397
+ }
398
+
399
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
400
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
401
+ background-repeat: no-repeat;
402
+ background-position: 2px center;
403
+ }
404
+
405
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
406
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
407
+ }
408
+
409
+ .ace_icon_svg.ace_error {
410
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
411
+ background-color: crimson;
412
+ }
413
+ .ace_icon_svg.ace_security {
414
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
415
+ background-color: crimson;
416
+ }
417
+ .ace_icon_svg.ace_warning {
418
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
419
+ background-color: darkorange;
420
+ }
421
+ .ace_icon_svg.ace_info {
422
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
423
+ background-color: royalblue;
424
+ }
425
+ .ace_icon_svg.ace_hint {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
427
+ background-color: silver;
428
+ }
429
+
430
+ .ace_icon_svg.ace_error_fold {
431
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
432
+ background-color: crimson;
433
+ }
434
+ .ace_icon_svg.ace_security_fold {
435
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
436
+ background-color: crimson;
437
+ }
438
+ .ace_icon_svg.ace_warning_fold {
439
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
440
+ background-color: darkorange;
441
+ }
442
+
443
+ .ace_scrollbar {
444
+ contain: strict;
445
+ position: absolute;
446
+ right: 0;
447
+ bottom: 0;
448
+ z-index: 6;
449
+ }
450
+
451
+ .ace_scrollbar-inner {
452
+ position: absolute;
453
+ cursor: text;
454
+ left: 0;
455
+ top: 0;
456
+ }
457
+
458
+ .ace_scrollbar-v{
459
+ overflow-x: hidden;
460
+ overflow-y: scroll;
461
+ top: 0;
462
+ }
463
+
464
+ .ace_scrollbar-h {
465
+ overflow-x: scroll;
466
+ overflow-y: hidden;
467
+ left: 0;
468
+ }
469
+
470
+ .ace_print-margin {
471
+ position: absolute;
472
+ height: 100%;
473
+ }
474
+
475
+ .ace_text-input {
476
+ position: absolute;
477
+ z-index: 0;
478
+ width: 0.5em;
479
+ height: 1em;
480
+ opacity: 0;
481
+ background: transparent;
482
+ -moz-appearance: none;
483
+ appearance: none;
484
+ border: none;
485
+ resize: none;
486
+ outline: none;
487
+ overflow: hidden;
488
+ font: inherit;
489
+ padding: 0 1px;
490
+ margin: 0 -1px;
491
+ contain: strict;
492
+ -ms-user-select: text;
493
+ -moz-user-select: text;
494
+ -webkit-user-select: text;
495
+ user-select: text;
496
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
497
+ white-space: pre!important;
498
+ }
499
+ .ace_text-input.ace_composition {
500
+ background: transparent;
501
+ color: inherit;
502
+ z-index: 1000;
503
+ opacity: 1;
504
+ }
505
+ .ace_composition_placeholder { color: transparent }
506
+ .ace_composition_marker {
507
+ border-bottom: 1px solid;
508
+ position: absolute;
509
+ border-radius: 0;
510
+ margin-top: 1px;
511
+ }
512
+
513
+ [ace_nocontext=true] {
514
+ transform: none!important;
515
+ filter: none!important;
516
+ clip-path: none!important;
517
+ mask : none!important;
518
+ contain: none!important;
519
+ perspective: none!important;
520
+ mix-blend-mode: initial!important;
521
+ z-index: auto;
522
+ }
523
+
524
+ .ace_layer {
525
+ z-index: 1;
526
+ position: absolute;
527
+ overflow: hidden;
528
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
529
+ word-wrap: normal;
530
+ white-space: pre;
531
+ height: 100%;
532
+ width: 100%;
533
+ box-sizing: border-box;
534
+ /* setting pointer-events: auto; on node under the mouse, which changes
535
+ during scroll, will break mouse wheel scrolling in Safari */
536
+ pointer-events: none;
537
+ }
538
+
539
+ .ace_gutter-layer {
540
+ position: relative;
541
+ width: auto;
542
+ text-align: right;
543
+ pointer-events: auto;
544
+ height: 1000000px;
545
+ contain: style size layout;
546
+ }
547
+
548
+ .ace_text-layer {
549
+ font: inherit !important;
550
+ position: absolute;
551
+ height: 1000000px;
552
+ width: 1000000px;
553
+ contain: style size layout;
554
+ }
555
+
556
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
557
+ contain: style size layout;
558
+ position: absolute;
559
+ top: 0;
560
+ left: 0;
561
+ right: 0;
562
+ }
563
+
564
+ .ace_hidpi .ace_text-layer,
565
+ .ace_hidpi .ace_gutter-layer,
566
+ .ace_hidpi .ace_content,
567
+ .ace_hidpi .ace_gutter {
568
+ contain: strict;
569
+ }
570
+ .ace_hidpi .ace_text-layer > .ace_line,
571
+ .ace_hidpi .ace_text-layer > .ace_line_group {
572
+ contain: strict;
573
+ }
574
+
575
+ .ace_cjk {
576
+ display: inline-block;
577
+ text-align: center;
578
+ }
579
+
580
+ .ace_cursor-layer {
581
+ z-index: 4;
582
+ }
583
+
584
+ .ace_cursor {
585
+ z-index: 4;
586
+ position: absolute;
587
+ box-sizing: border-box;
588
+ border-left: 2px solid;
589
+ /* workaround for smooth cursor repaintng whole screen in chrome */
590
+ transform: translatez(0);
591
+ }
592
+
593
+ .ace_multiselect .ace_cursor {
594
+ border-left-width: 1px;
595
+ }
596
+
597
+ .ace_slim-cursors .ace_cursor {
598
+ border-left-width: 1px;
599
+ }
600
+
601
+ .ace_overwrite-cursors .ace_cursor {
602
+ border-left-width: 0;
603
+ border-bottom: 1px solid;
604
+ }
605
+
606
+ .ace_hidden-cursors .ace_cursor {
607
+ opacity: 0.2;
608
+ }
609
+
610
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
611
+ opacity: 0;
612
+ }
613
+
614
+ .ace_smooth-blinking .ace_cursor {
615
+ transition: opacity 0.18s;
616
+ }
617
+
618
+ .ace_animate-blinking .ace_cursor {
619
+ animation-duration: 1000ms;
620
+ animation-timing-function: step-end;
621
+ animation-name: blink-ace-animate;
622
+ animation-iteration-count: infinite;
623
+ }
624
+
625
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
626
+ animation-duration: 1000ms;
627
+ animation-timing-function: ease-in-out;
628
+ animation-name: blink-ace-animate-smooth;
629
+ }
630
+
631
+ @keyframes blink-ace-animate {
632
+ from, to { opacity: 1; }
633
+ 60% { opacity: 0; }
634
+ }
635
+
636
+ @keyframes blink-ace-animate-smooth {
637
+ from, to { opacity: 1; }
638
+ 45% { opacity: 1; }
639
+ 60% { opacity: 0; }
640
+ 85% { opacity: 0; }
641
+ }
642
+
643
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
644
+ position: absolute;
645
+ z-index: 3;
646
+ }
647
+
648
+ .ace_marker-layer .ace_selection {
649
+ position: absolute;
650
+ z-index: 5;
651
+ }
652
+
653
+ .ace_marker-layer .ace_bracket {
654
+ position: absolute;
655
+ z-index: 6;
656
+ }
657
+
658
+ .ace_marker-layer .ace_error_bracket {
659
+ position: absolute;
660
+ border-bottom: 1px solid #DE5555;
661
+ border-radius: 0;
662
+ }
663
+
664
+ .ace_marker-layer .ace_active-line {
665
+ position: absolute;
666
+ z-index: 2;
667
+ }
668
+
669
+ .ace_marker-layer .ace_selected-word {
670
+ position: absolute;
671
+ z-index: 4;
672
+ box-sizing: border-box;
673
+ }
674
+
675
+ .ace_line .ace_fold {
676
+ box-sizing: border-box;
677
+
678
+ display: inline-block;
679
+ height: 11px;
680
+ margin-top: -2px;
681
+ vertical-align: middle;
682
+
683
+ background-image:
684
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
685
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
686
+ background-repeat: no-repeat, repeat-x;
687
+ background-position: center center, top left;
688
+ color: transparent;
689
+
690
+ border: 1px solid black;
691
+ border-radius: 2px;
692
+
693
+ cursor: pointer;
694
+ pointer-events: auto;
695
+ }
696
+
697
+ .ace_dark .ace_fold {
698
+ }
699
+
700
+ .ace_fold:hover{
701
+ background-image:
702
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
703
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
704
+ }
705
+
706
+ .ace_tooltip {
707
+ background-color: #f5f5f5;
708
+ border: 1px solid gray;
709
+ border-radius: 1px;
710
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
711
+ color: black;
712
+ max-width: 100%;
713
+ padding: 3px 4px;
714
+ position: fixed;
715
+ z-index: 999999;
716
+ box-sizing: border-box;
717
+ cursor: default;
718
+ white-space: pre-wrap;
719
+ word-wrap: break-word;
720
+ line-height: normal;
721
+ font-style: normal;
722
+ font-weight: normal;
723
+ letter-spacing: normal;
724
+ pointer-events: none;
725
+ overflow: auto;
726
+ max-width: min(60em, 66vw);
727
+ overscroll-behavior: contain;
728
+ }
729
+ .ace_tooltip pre {
730
+ white-space: pre-wrap;
731
+ }
732
+
733
+ .ace_tooltip.ace_dark {
734
+ background-color: #636363;
735
+ color: #fff;
736
+ }
737
+
738
+ .ace_tooltip:focus {
739
+ outline: 1px solid #5E9ED6;
740
+ }
741
+
742
+ .ace_icon {
743
+ display: inline-block;
744
+ width: 18px;
745
+ vertical-align: top;
746
+ }
747
+
748
+ .ace_icon_svg {
749
+ display: inline-block;
750
+ width: 12px;
751
+ vertical-align: top;
752
+ -webkit-mask-repeat: no-repeat;
753
+ -webkit-mask-size: 12px;
754
+ -webkit-mask-position: center;
755
+ }
756
+
757
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
758
+ padding-right: 13px;
759
+ }
760
+
761
+ .ace_fold-widget {
762
+ box-sizing: border-box;
763
+
764
+ margin: 0 -12px 0 1px;
765
+ display: none;
766
+ width: 11px;
767
+ vertical-align: top;
768
+
769
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
770
+ background-repeat: no-repeat;
771
+ background-position: center;
772
+
773
+ border-radius: 3px;
774
+
775
+ border: 1px solid transparent;
776
+ cursor: pointer;
777
+ }
778
+
779
+ .ace_folding-enabled .ace_fold-widget {
780
+ display: inline-block;
781
+ }
782
+
783
+ .ace_fold-widget.ace_end {
784
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
785
+ }
786
+
787
+ .ace_fold-widget.ace_closed {
788
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
789
+ }
790
+
791
+ .ace_fold-widget:hover {
792
+ border: 1px solid rgba(0, 0, 0, 0.3);
793
+ background-color: rgba(255, 255, 255, 0.2);
794
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
795
+ }
796
+
797
+ .ace_fold-widget:active {
798
+ border: 1px solid rgba(0, 0, 0, 0.4);
799
+ background-color: rgba(0, 0, 0, 0.05);
800
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
801
+ }
802
+ /**
803
+ * Dark version for fold widgets
804
+ */
805
+ .ace_dark .ace_fold-widget {
806
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
807
+ }
808
+ .ace_dark .ace_fold-widget.ace_end {
809
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
810
+ }
811
+ .ace_dark .ace_fold-widget.ace_closed {
812
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
813
+ }
814
+ .ace_dark .ace_fold-widget:hover {
815
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
816
+ background-color: rgba(255, 255, 255, 0.1);
817
+ }
818
+ .ace_dark .ace_fold-widget:active {
819
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
820
+ }
821
+
822
+ .ace_inline_button {
823
+ border: 1px solid lightgray;
824
+ display: inline-block;
825
+ margin: -1px 8px;
826
+ padding: 0 5px;
827
+ pointer-events: auto;
828
+ cursor: pointer;
829
+ }
830
+ .ace_inline_button:hover {
831
+ border-color: gray;
832
+ background: rgba(200,200,200,0.2);
833
+ display: inline-block;
834
+ pointer-events: auto;
835
+ }
836
+
837
+ .ace_fold-widget.ace_invalid {
838
+ background-color: #FFB4B4;
839
+ border-color: #DE5555;
840
+ }
841
+
842
+ .ace_fade-fold-widgets .ace_fold-widget {
843
+ transition: opacity 0.4s ease 0.05s;
844
+ opacity: 0;
845
+ }
846
+
847
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
848
+ transition: opacity 0.05s ease 0.05s;
849
+ opacity:1;
850
+ }
851
+
852
+ .ace_underline {
853
+ text-decoration: underline;
854
+ }
855
+
856
+ .ace_bold {
857
+ font-weight: bold;
858
+ }
859
+
860
+ .ace_nobold .ace_bold {
861
+ font-weight: normal;
862
+ }
863
+
864
+ .ace_italic {
865
+ font-style: italic;
866
+ }
867
+
868
+
869
+ .ace_error-marker {
870
+ background-color: rgba(255, 0, 0,0.2);
871
+ position: absolute;
872
+ z-index: 9;
873
+ }
874
+
875
+ .ace_highlight-marker {
876
+ background-color: rgba(255, 255, 0,0.2);
877
+ position: absolute;
878
+ z-index: 8;
879
+ }
880
+
881
+ .ace_mobile-menu {
882
+ position: absolute;
883
+ line-height: 1.5;
884
+ border-radius: 4px;
885
+ -ms-user-select: none;
886
+ -moz-user-select: none;
887
+ -webkit-user-select: none;
888
+ user-select: none;
889
+ background: white;
890
+ box-shadow: 1px 3px 2px grey;
891
+ border: 1px solid #dcdcdc;
892
+ color: black;
893
+ }
894
+ .ace_dark > .ace_mobile-menu {
895
+ background: #333;
896
+ color: #ccc;
897
+ box-shadow: 1px 3px 2px grey;
898
+ border: 1px solid #444;
899
+
900
+ }
901
+ .ace_mobile-button {
902
+ padding: 2px;
903
+ cursor: pointer;
904
+ overflow: hidden;
905
+ }
906
+ .ace_mobile-button:hover {
907
+ background-color: #eee;
908
+ opacity:1;
909
+ }
910
+ .ace_mobile-button:active {
911
+ background-color: #ddd;
912
+ }
913
+
914
+ .ace_placeholder {
915
+ position: relative;
916
+ font-family: arial;
917
+ transform: scale(0.9);
918
+ transform-origin: left;
919
+ white-space: pre;
920
+ opacity: 0.7;
921
+ margin: 0 10px;
922
+ z-index: 1;
923
+ }
924
+
925
+ .ace_ghost_text {
926
+ opacity: 0.5;
927
+ font-style: italic;
928
+ }
929
+
930
+ .ace_ghost_text_container > div {
931
+ white-space: pre;
932
+ }
933
+
934
+ .ghost_text_line_wrapped::after {
935
+ content: "\u21A9";
936
+ position: absolute;
937
+ }
938
+
939
+ .ace_lineWidgetContainer.ace_ghost_text {
940
+ margin: 0px 4px
941
+ }
942
+
943
+ .ace_screenreader-only {
944
+ position:absolute;
945
+ left:-10000px;
946
+ top:auto;
947
+ width:1px;
948
+ height:1px;
949
+ overflow:hidden;
950
+ }
951
+
952
+ .ace_hidden_token {
953
+ display: none;
954
+ }`;});ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(o,h,_){var y=o("../lib/dom"),m=o("../lib/oop"),f=o("../lib/event_emitter").EventEmitter,a=function(){function l(n,e){this.canvas=y.createElement("canvas"),this.renderer=e,this.pixelRatio=1,this.maxHeight=e.layerConfig.maxHeight,this.lineHeight=e.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas);}return l.prototype.$updateDecorators=function(n){var e=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(n){this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height;var t=(n.lastRow+1)*this.lineHeight;t<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight;}var r=this.canvas.getContext("2d");function i(T,w){return T.priority<w.priority?-1:T.priority>w.priority?1:0}var s=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),s){var c={info:1,warning:2,error:3};s.forEach(function(T){T.priority=c[T.type]||null;}),s=s.sort(i);for(var p=this.renderer.session.$foldData,C=0;C<s.length;C++){var E=s[C].row,S=this.compensateFoldRows(E,p),M=Math.round((E-S)*this.lineHeight*this.heightRatio),g=Math.round((E-S)*this.lineHeight*this.heightRatio),d=Math.round(((E-S)*this.lineHeight+this.lineHeight)*this.heightRatio),A=d-g;if(A<this.minDecorationHeight){var L=(g+d)/2|0;L<this.halfMinDecorationHeight?L=this.halfMinDecorationHeight:L+this.halfMinDecorationHeight>this.canvasHeight&&(L=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(L-this.halfMinDecorationHeight),d=Math.round(L+this.halfMinDecorationHeight);}r.fillStyle=e[s[C].type]||null,r.fillRect(0,M,this.canvasWidth,d-g);}}var $=this.renderer.session.selection.getCursor();if($){var S=this.compensateFoldRows($.row,p),M=Math.round(($.row-S)*this.lineHeight*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,M,this.canvasWidth,2);}},l.prototype.compensateFoldRows=function(n,e){var t=0;if(e&&e.length>0)for(var r=0;r<e.length;r++)n>e[r].start.row&&n<e[r].end.row?t+=n-e[r].start.row:n>=e[r].end.row&&(t+=e[r].end.row-e[r].start.row);return t},l}();m.implement(a.prototype,f),h.Decorator=a;});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(o,h,_){var y=o("./lib/oop"),m=o("./lib/dom"),f=o("./lib/lang"),a=o("./config"),l=o("./layer/gutter").Gutter,n=o("./layer/marker").Marker,e=o("./layer/text").Text,t=o("./layer/cursor").Cursor,r=o("./scrollbar").HScrollBar,i=o("./scrollbar").VScrollBar,s=o("./scrollbar_custom").HScrollBar,c=o("./scrollbar_custom").VScrollBar,p=o("./renderloop").RenderLoop,C=o("./layer/font_metrics").FontMetrics,E=o("./lib/event_emitter").EventEmitter,S=o("./css/editor-css"),M=o("./layer/decorators").Decorator,g=o("./lib/useragent"),d=o("./layer/text_util").isTextToken;m.importCssString(S,"ace_editor.css",!1);var A=function(){function L($,T){var w=this;this.container=$||m.createElement("div"),m.addCssClass(this.container,"ace_editor"),m.HI_DPI&&m.addCssClass(this.container,"ace_hidpi"),this.setTheme(T),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=m.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=m.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=m.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new l(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content);var b=this.$textLayer=new e(this.content);this.canvas=b.element,this.$markerFront=new n(this.content),this.$cursorLayer=new t(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.on("scroll",function(u){w.$scrollAnimation||w.session.setScrollTop(u.data-w.scrollMargin.top);}),this.scrollBarH.on("scroll",function(u){w.$scrollAnimation||w.session.setScrollLeft(u.data-w.scrollMargin.left);}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new C(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(u){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",u);}),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=!g.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this);}return L.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(),m.setStyle(this.scroller.style,"line-height",this.lineHeight+"px");},L.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(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));},L.prototype.updateLines=function($,T,w){if(T===void 0&&(T=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRow<T&&(this.$changedLines.lastRow=T)):this.$changedLines={firstRow:$,lastRow:T},this.$changedLines.lastRow<this.layerConfig.firstRow)if(w)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES);},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize();},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT);},L.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL);},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges();},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize();},L.prototype.onResize=function($,T,w,b){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var u=this.container;b||(b=u.clientHeight||u.scrollHeight),!b&&this.$maxLines&&this.lineHeight>1&&(!u.style.height||u.style.height=="0px")&&(u.style.height="1px",b=u.clientHeight||u.scrollHeight),w||(w=u.clientWidth||u.scrollWidth);var v=this.$updateCachedSize($,T,w,b);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!w&&!b)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0);}},L.prototype.$updateCachedSize=function($,T,w,b){b-=this.$extraHeight||0;var u=0,v=this.$size,x={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(b&&($||v.height!=b)&&(v.height=b,u|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",u=u|this.CHANGE_SCROLL),w&&($||v.width!=w)){u|=this.CHANGE_SIZE,v.width=w,T==null&&(T=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=T,m.setStyle(this.scrollBarH.element.style,"left",T+"px"),m.setStyle(this.scroller.style,"left",T+this.margin.left+"px"),v.scrollerWidth=Math.max(0,w-T-this.scrollBarV.getWidth()-this.margin.h),m.setStyle(this.$gutter.style,"left",this.margin.left+"px");var k=this.scrollBarV.getWidth()+"px";m.setStyle(this.scrollBarH.element.style,"right",k),m.setStyle(this.scroller.style,"right",k),m.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(u|=this.CHANGE_FULL);}return v.$dirty=!w||!b,u&&this._signal("resize",x),u},L.prototype.onGutterResize=function($){var T=this.$showGutter?$:0;T!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,T,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();},L.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,T=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(T,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$);},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($);},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$);},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$);},L.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$);},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$);},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$);},L.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$);},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=m.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=m.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild);}var T=this.$printMarginEl.style;T.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",T.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit();}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,T=this.$composition;if(!this.$keepTextAreaAtCursor&&!T){m.translate(this.textarea,-100,0);return}var w=this.$cursorLayer.$pixelPos;if(w){T&&T.markerRange&&(w=this.$cursorLayer.getPixelPosition(T.markerRange.start,!0));var b=this.layerConfig,u=w.top,v=w.left;u-=b.offset;var x=T&&T.useTextareaForIME||g.isMobile?this.lineHeight:1;if(u<0||u>b.height-x){m.translate(this.textarea,0,0);return}var k=1,R=this.$size.height-x;if(!T)u+=this.lineHeight;else if(T.useTextareaForIME){var I=this.textarea.value;k=this.characterWidth*this.session.$getStringScreenWidth(I)[0];}else u+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-k&&(v=this.$size.scrollerWidth-k),v+=this.gutterWidth+this.margin.left,m.setStyle($,"height",x+"px"),m.setStyle($,"width",k+"px"),m.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-k),Math.min(u,R));}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,T=$.lastRow,w=this.session.documentToScreenRow(T,0)*$.lineHeight;return w-this.session.getScrollTop()>$.height-$.lineHeight?T-1:T},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin();},L.prototype.setScrollMargin=function($,T,w,b){var u=this.scrollMargin;u.top=$|0,u.bottom=T|0,u.right=b|0,u.left=w|0,u.v=u.top+u.bottom,u.h=u.left+u.right,u.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-u.top),this.updateFull();},L.prototype.setMargin=function($,T,w,b){var u=this.margin;u.top=$|0,u.bottom=T|0,u.right=b|0,u.left=w|0,u.v=u.top+u.bottom,u.h=u.left+u.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull();},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$);},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$);},L.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,T=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(T-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-T&&($=this.scrollTop+T,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top);},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left);},L.prototype.freeze=function(){this.$frozen=!0;},L.prototype.unfreeze=function(){this.$frozen=!1;},L.prototype.$renderChanges=function($,T){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!T){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var w=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),w.firstRow!=this.layerConfig.firstRow&&w.firstRowScreen==this.layerConfig.firstRowScreen){var b=this.scrollTop+(w.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;b>0&&(this.scrollTop=b,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear());}w=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),m.translate(this.content,-this.scrollLeft,-w.offset);var u=w.width+2*this.$padding+"px",v=w.minHeight+"px";m.setStyle(this.content.style,"width",u),m.setStyle(this.content.style,"height",v);}if($&this.CHANGE_H_SCROLL&&(m.translate(this.content,-this.scrollLeft,-w.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(w):this.$textLayer.scrollLines(w),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(w):this.$gutterLayer.scrollLines(w)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(w),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(w),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(w),this._signal("afterRender",$);},L.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,T=this.$maxLines*this.lineHeight,w=Math.min(T,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(w+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&w>this.$maxPixelHeight&&(w=this.$maxPixelHeight);var b=w<=2*this.lineHeight,u=!b&&$>T;if(w!=this.desiredHeight||this.$size.height!=this.desiredHeight||u!=this.$vScroll){u!=this.$vScroll&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var v=this.container.clientWidth;this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,w),this.desiredHeight=w,this._signal("autosize");}},L.prototype.$computeLayerConfig=function(){var $=this.session,T=this.$size,w=T.height<=2*this.lineHeight,b=this.session.getScreenLength(),u=b*this.lineHeight,v=this.$getLongestLine(),x=!w&&(this.$hScrollBarAlwaysVisible||T.scrollerWidth-v-2*this.$padding<0),k=this.$horizScroll!==x;k&&(this.$horizScroll=x,this.scrollBarH.setVisible(x));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=T.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(T.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;u+=D;var O=this.scrollMargin;this.session.setScrollTop(Math.max(-O.top,Math.min(this.scrollTop,u-T.scrollerHeight+O.bottom))),this.session.setScrollLeft(Math.max(-O.left,Math.min(this.scrollLeft,v+2*this.$padding-T.scrollerWidth+O.right)));var F=!w&&(this.$vScrollBarAlwaysVisible||T.scrollerHeight-u+D<0||this.scrollTop>O.top),N=R!==F;N&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var P=this.scrollTop%this.lineHeight,W=Math.ceil(I/this.lineHeight)-1,B=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),H=B+W,V,U,K=this.lineHeight;B=$.screenToDocumentRow(B,0);var Z=$.getFoldLine(B);Z&&(B=Z.start.row),V=$.documentToScreenRow(B,0),U=$.getRowLength(B)*K,H=Math.min($.screenToDocumentRow(H,0),$.getLength()-1),I=T.scrollerHeight+$.getRowLength(H)*K+U,P=this.scrollTop-V*K;var Y=0;return (this.layerConfig.width!=v||k)&&(Y=this.CHANGE_H_SCROLL),(k||N)&&(Y|=this.$updateCachedSize(!0,this.gutterWidth,T.width,T.height),this._signal("scrollbarVisibilityChanged"),N&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:B,firstRowScreen:V,lastRow:H,lineHeight:K,characterWidth:this.characterWidth,minHeight:I,maxHeight:u,offset:P,gutterOffset:K?Math.max(0,Math.ceil((P+T.height-T.scrollerHeight)/K)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),Y},L.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,T=this.$changedLines.lastRow;this.$changedLines=null;var w=this.layerConfig;if(!($>w.lastRow+1)&&!(T<w.firstRow)){if(T===1/0){this.$showGutter&&this.$gutterLayer.update(w),this.$textLayer.update(w);return}return this.$textLayer.updateLines(w,$,T),!0}}},L.prototype.$getLongestLine=function(){var $=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&($+=1),this.$textLayer&&$>this.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT);},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK);},L.prototype.addGutterDecoration=function($,T){this.$gutterLayer.addGutterDecoration($,T);},L.prototype.removeGutterDecoration=function($,T){this.$gutterLayer.removeGutterDecoration($,T);},L.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER);},L.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER);},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR);},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor();},L.prototype.showCursor=function(){this.$cursorLayer.showCursor();},L.prototype.scrollSelectionIntoView=function($,T,w){this.scrollCursorIntoView($,w),this.scrollCursorIntoView(T,w);},L.prototype.scrollCursorIntoView=function($,T,w){if(this.$size.scrollerHeight!==0){var b=this.$cursorLayer.getPixelPosition($),u=b.left,v=b.top,x=w&&w.top||0,k=w&&w.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+x>v?(T&&R+x>v+this.lineHeight&&(v-=T*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):R+this.$size.scrollerHeight-k<v+this.lineHeight&&(T&&R+this.$size.scrollerHeight-k<v-this.lineHeight&&(v+=T*this.$size.scrollerHeight),this.session.setScrollTop(v+this.lineHeight+k-this.$size.scrollerHeight));var I=this.scrollLeft,D=2*this.layerConfig.characterWidth;u-D<I?(u-=D,u<this.$padding+D&&(u=-this.scrollMargin.left),this.session.setScrollLeft(u)):(u+=D,I+this.$size.scrollerWidth<u+this.characterWidth?this.session.setScrollLeft(Math.round(u+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&u-I<this.characterWidth&&this.session.setScrollLeft(0));}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function($){this.session.setScrollTop($*this.lineHeight);},L.prototype.alignCursor=function($,T){typeof $=="number"&&($={row:$,column:0});var w=this.$cursorLayer.getPixelPosition($),b=this.$size.scrollerHeight-this.lineHeight,u=w.top-b*(T||0);return this.session.setScrollTop(u),u},L.prototype.$calcSteps=function($,T){var w=0,b=this.STEPS,u=[],v=function(x,k,R){return R*(Math.pow(x-1,3)+1)+k};for(w=0;w<b;++w)u.push(v(w/this.STEPS,$,T-$));return u},L.prototype.scrollToLine=function($,T,w,b){var u=this.$cursorLayer.getPixelPosition({row:$,column:0}),v=u.top;T&&(v-=this.$size.scrollerHeight/2);var x=this.scrollTop;this.session.setScrollTop(v),w!==!1&&this.animateScrolling(x,b);},L.prototype.animateScrolling=function($,T){var w=this.scrollTop;if(!this.$animatedScroll)return;var b=this;if($==w)return;if(this.$scrollAnimation){var u=this.$scrollAnimation.steps;if(u.length&&($=u[0],$==w))return}var v=b.$calcSteps($,w);this.$scrollAnimation={from:$,to:w,steps:v},clearInterval(this.$timer),b.session.setScrollTop(v.shift()),b.session.$scrollTop=w;function x(){b.$timer=clearInterval(b.$timer),b.$scrollAnimation=null,b.$stopAnimation=!1,T&&T();}this.$timer=setInterval(function(){if(b.$stopAnimation){x();return}if(!b.session)return clearInterval(b.$timer);v.length?(b.session.setScrollTop(v.shift()),b.session.$scrollTop=w):w!=null?(b.session.$scrollTop=-1,b.session.setScrollTop(w),w=null):x();},10);},L.prototype.scrollToY=function($){this.scrollTop!==$&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=$);},L.prototype.scrollToX=function($){this.scrollLeft!==$&&(this.scrollLeft=$),this.$loop.schedule(this.CHANGE_H_SCROLL);},L.prototype.scrollTo=function($,T){this.session.setScrollTop(T),this.session.setScrollLeft($);},L.prototype.scrollBy=function($,T){T&&this.session.setScrollTop(this.session.getScrollTop()+T),$&&this.session.setScrollLeft(this.session.getScrollLeft()+$);},L.prototype.isScrollableBy=function($,T){if(T<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||T>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return !0},L.prototype.pixelToScreenCoordinates=function($,T){var w;if(this.$hasCssTransforms){w={top:0,left:0};var b=this.$fontMetrics.transformCoordinates([$,T]);$=b[1]-this.gutterWidth-this.margin.left,T=b[0];}else w=this.scroller.getBoundingClientRect();var u=$+this.scrollLeft-w.left-this.$padding,v=u/this.characterWidth,x=Math.floor((T+this.scrollTop-w.top)/this.lineHeight),k=this.$blockCursor?Math.floor(v):Math.round(v);return {row:x,column:k,side:v-k>0?1:-1,offsetX:u}},L.prototype.screenToTextCoordinates=function($,T){var w;if(this.$hasCssTransforms){w={top:0,left:0};var b=this.$fontMetrics.transformCoordinates([$,T]);$=b[1]-this.gutterWidth-this.margin.left,T=b[0];}else w=this.scroller.getBoundingClientRect();var u=$+this.scrollLeft-w.left-this.$padding,v=u/this.characterWidth,x=this.$blockCursor?Math.floor(v):Math.round(v),k=Math.floor((T+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(k,Math.max(x,0),u)},L.prototype.textToScreenCoordinates=function($,T){var w=this.scroller.getBoundingClientRect(),b=this.session.documentToScreenPosition($,T),u=this.$padding+(this.session.$bidiHandler.isBidiRow(b.row,$)?this.session.$bidiHandler.getPosLeft(b.column):Math.round(b.column*this.characterWidth)),v=b.row*this.lineHeight;return {pageX:w.left+u-this.scrollLeft,pageY:w.top+v-this.scrollTop}},L.prototype.visualizeFocus=function(){m.addCssClass(this.container,"ace_focus");},L.prototype.visualizeBlur=function(){m.removeCssClass(this.container,"ace_focus");},L.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(m.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text");},L.prototype.setCompositionText=function($){var T=this.session.selection.cursor;this.addToken($,"composition_placeholder",T.row,T.column),this.$moveTextAreaToCursor();},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),m.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display="";}},L.prototype.setGhostText=function($,T){var w=this.session.selection.cursor,b=T||{row:w.row,column:w.column};this.removeGhostText();var u=this.$calculateWrappedTextChunks($,b);this.addToken(u[0].text,"ghost_text",b.row,b.column),this.$ghostText={text:$,position:{row:b.row,column:b.column}};var v=m.createElement("div");if(u.length>1){var x=this.hideTokensAfterPosition(b.row,b.column),k;u.slice(1).forEach(function(N){var P=m.createElement("div"),W=m.createElement("span");W.className="ace_ghost_text",N.wrapped&&(P.className="ghost_text_line_wrapped"),N.text.length===0&&(N.text=" "),W.appendChild(m.createTextNode(N.text)),P.appendChild(W),v.appendChild(P),k=P;}),x.forEach(function(N){var P=m.createElement("span");d(N.type)||(P.className="ace_"+N.type.replace(/\./g," ace_")),P.appendChild(m.createTextNode(N.value)),k.appendChild(P);}),this.$ghostTextWidget={el:v,row:b.row,column:b.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var R=this.$cursorLayer.getPixelPosition(b,!0),I=this.container,D=I.getBoundingClientRect().height,O=u.length*this.lineHeight,F=O<D-R.top;if(F)return;O<D?this.scrollBy(0,(u.length-1)*this.lineHeight):this.scrollToRow(b.row);}},L.prototype.$calculateWrappedTextChunks=function($,T){var w=this.$size.scrollerWidth-this.$padding*2,b=Math.floor(w/this.characterWidth)-2;b=b<=0?60:b;for(var u=$.split(/\r?\n/),v=[],x=0;x<u.length;x++){var k=this.session.$getDisplayTokens(u[x],T.column),R=this.session.$computeWrapSplits(k,b,this.session.$tabSize);if(R.length>0){var I=0;R.push(u[x].length);for(var D=0;D<R.length;D++){var O=u[x].slice(I,R[D]);v.push({text:O,wrapped:!0}),I=R[D];}}else v.push({text:u[x],wrapped:!1});}return v},L.prototype.removeGhostText=function(){if(this.$ghostText){var $=this.$ghostText.position;this.removeExtraToken($.row,$.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null;}},L.prototype.addToken=function($,T,w,b){var u=this.session;u.bgTokenizer.lines[w]=null;var v={type:T,value:$},x=u.getTokens(w);if(b==null||!x.length)x.push(v);else for(var k=0,R=0;R<x.length;R++){var I=x[R];if(k+=I.value.length,b<=k){var D=I.value.length-(k-b),O=I.value.slice(0,D),F=I.value.slice(D);x.splice(R,1,{type:I.type,value:O},v,{type:I.type,value:F});break}}this.updateLines(w,w);},L.prototype.hideTokensAfterPosition=function($,T){for(var w=this.session.getTokens($),b=0,u=!1,v=[],x=0;x<w.length;x++){var k=w[x];if(b+=k.value.length,k.type!=="ghost_text"){if(u){v.push({type:k.type,value:k.value}),k.type="hidden_token";continue}b===T&&(u=!0);}}return this.updateLines($,$),v},L.prototype.removeExtraToken=function($,T){this.session.bgTokenizer.lines[$]=null,this.updateLines($,$);},L.prototype.setTheme=function($,T){var w=this;if(this.$themeId=$,w._dispatchEvent("themeChange",{theme:$}),!$||typeof $=="string"){var b=$||this.$options.theme.initialValue;a.loadModule(["theme",b],u);}else u($);function u(v){if(w.$themeId!=$)return T&&T();if(!v||!v.cssClass)throw new Error("couldn't load module "+$+" or it didn't call define");v.$id&&(w.$themeId=v.$id),m.importCssString(v.cssText,v.cssClass,w.container),w.theme&&m.removeCssClass(w.container,w.theme.cssClass);var x="padding"in v?v.padding:"padding"in(w.theme||{})?4:w.$padding;w.$padding&&x!=w.$padding&&w.setPadding(x),w.$theme=v.cssClass,w.theme=v,m.addCssClass(w.container,v.cssClass),m.setCssClass(w.container,"ace_dark",v.isDark),w.$size&&(w.$size.width=0,w.$updateSizeAsync()),w._dispatchEvent("themeLoaded",{theme:v}),T&&T(),g.isSafari&&w.scroller&&(w.scroller.style.background="red",w.scroller.style.background="");}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function($,T){m.setCssClass(this.container,$,T!==!1);},L.prototype.unsetStyle=function($){m.removeCssClass(this.container,$);},L.prototype.setCursorStyle=function($){m.setStyle(this.scroller.style,"cursor",$);},L.prototype.setMouseCursor=function($){m.setStyle(this.scroller.style,"cursor",$);},L.prototype.attachToShadowRoot=function(){m.importCssString(S,"ace_editor.css",this.container);},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1);},L.prototype.$updateCustomScrollbar=function($){var T=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,$===!0?(this.scrollBarV=new c(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(w){T.$scrollAnimation||T.session.setScrollTop(w.data-T.scrollMargin.top);}),this.scrollBarH.addEventListener("scroll",function(w){T.$scrollAnimation||T.session.setScrollLeft(w.data-T.scrollMargin.left);}),this.$scrollDecorator=new M(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.addEventListener("scroll",function(w){T.$scrollAnimation||T.session.setScrollTop(w.data-T.scrollMargin.top);}),this.scrollBarH.addEventListener("scroll",function(w){T.$scrollAnimation||T.session.setScrollLeft(w.data-T.scrollMargin.left);}));},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var $=this;this.$resizeTimer=f.delayedCall(function(){$.destroyed||$.onResize();},50),this.$resizeObserver=new window.ResizeObserver(function(T){var w=T[0].contentRect.width,b=T[0].contentRect.height;Math.abs($.$size.width-w)>1||Math.abs($.$size.height-b)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel();}),this.$resizeObserver.observe(this.container);}},L}();A.prototype.CHANGE_CURSOR=1,A.prototype.CHANGE_MARKER=2,A.prototype.CHANGE_GUTTER=4,A.prototype.CHANGE_SCROLL=8,A.prototype.CHANGE_LINES=16,A.prototype.CHANGE_TEXT=32,A.prototype.CHANGE_SIZE=64,A.prototype.CHANGE_MARKER_BACK=128,A.prototype.CHANGE_MARKER_FRONT=256,A.prototype.CHANGE_FULL=512,A.prototype.CHANGE_H_SCROLL=1024,A.prototype.$changes=0,A.prototype.$padding=null,A.prototype.$frozen=!1,A.prototype.STEPS=8,y.implement(A.prototype,E),a.defineOptions(A.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver();}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&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(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin();},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize();},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L;},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L;},initialValue:!1},fadeFoldWidgets:{set:function(L){m.setCssClass(this.$gutter,"ace_fade-fold-widgets",L);},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER);},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT);},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells);},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER);},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL);},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL);},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize();},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize();}},maxLines:{set:function(L){this.updateFull();}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull();}},maxPixelHeight:{set:function(L){this.updateFull();},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL));},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER);}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L);},initialValue:!1},theme:{set:function(L){this.setTheme(L);},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),h.VirtualRenderer=A;});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(o,h,_){var y=o("../lib/oop"),m=o("../lib/net"),f=o("../lib/event_emitter").EventEmitter,a=o("../config");function l(r){var i="importScripts('"+m.qualifyURL(r)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new s;return c.append(i),c.getBlob("application/javascript")}}function n(r){if(typeof Worker>"u")return {postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var i=l(r),s=window.URL||window.webkitURL,c=s.createObjectURL(i);return new Worker(c)}return new Worker(r)}var e=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage;};(function(){y.implement(this,f),this.$createWorkerFromOldConfig=function(r,i,s,c,p){if(o.nameToUrl&&!o.toUrl&&(o.toUrl=o.nameToUrl),a.get("packaged")||!o.toUrl)c=c||a.moduleUrl(i,"worker");else {var C=this.$normalizePath;c=c||C(o.toUrl("ace/worker/worker.js",null,"_"));var E={};r.forEach(function(S){E[S]=C(o.toUrl(S,null,"_").replace(/(\.js)?(\?.*)?$/,""));});}return this.$worker=n(c),p&&this.send("importScripts",p),this.$worker.postMessage({init:!0,tlns:E,module:i,classname:s}),this.$worker},this.onMessage=function(r){var i=r.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var s=this.callbacks[i.id];s&&(s(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r);},this.$normalizePath=function(r){return m.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault();},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null;},this.send=function(r,i){this.$worker.postMessage({command:r,args:i});},this.call=function(r,i,s){if(s){var c=this.callbackId++;this.callbacks[c]=s,i.push(c);}this.send(r,i);},this.emit=function(r,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:i.data}});}catch(s){console.error(s.stack);}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0);},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end);},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}));};}).call(e.prototype);var t=function(r,i,s){var c=null,p=!1,C=Object.create(f),E=[],S=new e({messageBuffer:E,terminate:function(){},postMessage:function(g){E.push(g),c&&(p?setTimeout(M):M());}});S.setEmitSync=function(g){p=g;};var M=function(){var g=E.shift();g.command?c[g.command].apply(c,g.args):g.event&&C._signal(g.event,g.data);};return C.postMessage=function(g){S.onMessage({data:g});},C.callback=function(g,d){this.postMessage({type:"call",id:d,data:g});},C.emit=function(g,d){this.postMessage({type:"event",name:g,data:d});},a.loadModule(["worker",i],function(g){for(c=new g[s](C);E.length;)M();}),S};h.UIWorkerClient=t,h.WorkerClient=e,h.createWorker=n;});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(o,h,_){var y=o("./range").Range,m=o("./lib/event_emitter").EventEmitter,f=o("./lib/oop"),a=function(){function l(n,e,t,r,i,s){var c=this;this.length=e,this.session=n,this.doc=n.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange();});},this.$pos=t;var p=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=p.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange);}return l.prototype.setup=function(){var n=this,e=this.doc,t=this.session;this.selectionBefore=t.selection.toJSON(),t.selection.inMultiSelectMode&&t.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=t.addMarker(new y(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var s=e.createAnchor(i.row,i.column);s.$insertRight=!0,s.detach(),n.others.push(s);}),t.setUndoSelect(!1);},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,e=this;this.othersActive=!0,this.others.forEach(function(t){t.markerId=n.addMarker(new y(t.row,t.column,t.row,t.column+e.length),e.othersClass,null,!1);});}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId);}},l.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var e=n;if(e.start.row===e.end.row&&e.start.row===this.pos.row){this.$updating=!0;var t=n.action==="insert"?e.end.column-e.start.column:e.start.column-e.end.column,r=e.start.column>=this.pos.column&&e.start.column<=this.pos.column+this.length+1,i=e.start.column-this.pos.column;if(this.updateAnchors(n),r&&(this.length+=t),r&&!this.session.$fromUndo){if(n.action==="insert")for(var s=this.others.length-1;s>=0;s--){var c=this.others[s],p={row:c.row,column:c.column+i};this.doc.insertMergedLines(p,n.lines);}else if(n.action==="remove")for(var s=this.others.length-1;s>=0;s--){var c=this.others[s],p={row:c.row,column:c.column+i};this.doc.remove(new y(p.row,p.column,p.row,p.column-t));}}this.$updating=!1,this.updateMarkers();}},l.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var e=this.others.length;e--;)this.others[e].onChange(n);this.updateMarkers();},l.prototype.updateMarkers=function(){if(!this.$updating){var n=this,e=this.session,t=function(i,s){e.removeMarker(i.markerId),i.markerId=e.addMarker(new y(i.row,i.column,i.row,i.column+n.length),s,null,!1);};t(this.pos,this.mainClass);for(var r=this.others.length;r--;)t(this.others[r],this.othersClass);}},l.prototype.onCursorChange=function(n){if(!(this.$updating||!this.session)){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n));}},l.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;},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),e=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,t=0;t<e;t++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore);}},l}();f.implement(a.prototype,m),h.PlaceHolder=a;});ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(o,h,_){var y=o("../lib/event"),m=o("../lib/useragent");function f(l,n){return l.row==n.row&&l.column==n.column}function a(l){var n=l.domEvent,e=n.altKey,t=n.shiftKey,r=n.ctrlKey,i=l.getAccelKey(),s=l.getButton();if(r&&m.isMac&&(s=n.button),l.editor.inMultiSelectMode&&s==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!r&&!e&&!i){s===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(s===0){var c=l.editor,p=c.selection,C=c.inMultiSelectMode,E=l.getDocumentPosition(),S=p.getCursor(),M=l.inSelection()||p.isEmpty()&&f(E,S),g=l.x,d=l.y,A=function(O){g=O.clientX,d=O.clientY;},L=c.session,$=c.renderer.pixelToScreenCoordinates(g,d),T=$,w;if(c.$mouseHandler.$enableJumpToDef)r&&e||i&&e?w=t?"block":"add":e&&c.$blockSelectEnabled&&(w="block");else if(i&&!e){if(w="add",!C&&t)return}else e&&c.$blockSelectEnabled&&(w="block");if(w&&m.isMac&&n.ctrlKey&&c.$mouseHandler.cancelContextMenu(),w=="add"){if(!C&&M)return;if(!C){var b=p.toOrientedRange();c.addSelectionMarker(b);}var u=p.rangeList.rangeAtPoint(E);c.inVirtualSelectionMode=!0,t&&(u=null,b=p.ranges[0]||b,c.removeSelectionMarker(b)),c.once("mouseup",function(){var O=p.toOrientedRange();u&&O.isEmpty()&&f(u.cursor,O.cursor)?p.substractPoint(O.cursor):(t?p.substractPoint(b.cursor):b&&(c.removeSelectionMarker(b),p.addRange(b)),p.addRange(O)),c.inVirtualSelectionMode=!1;});}else if(w=="block"){l.stop(),c.inVirtualSelectionMode=!0;var v,x=[],k=function(){var O=c.renderer.pixelToScreenCoordinates(g,d),F=L.screenToDocumentPosition(O.row,O.column,O.offsetX);f(T,O)&&f(F,p.lead)||(T=O,c.selection.moveToPosition(F),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(x),x=p.rectangularRangeBlock(T,$),c.$mouseHandler.$clickSelection&&x.length==1&&x[0].isEmpty()&&(x[0]=c.$mouseHandler.$clickSelection.clone()),x.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers());};C&&!i?p.toSingleRange():!C&&i&&(v=p.toOrientedRange(),c.addSelectionMarker(v)),t?$=L.documentToScreenPosition(p.lead):p.moveToPosition(E),T={row:-1,column:-1};var R=function(O){k(),clearInterval(D),c.removeSelectionMarkers(x),x.length||(x=[p.toOrientedRange()]),v&&(c.removeSelectionMarker(v),p.toSingleRange(v));for(var F=0;F<x.length;F++)p.addRange(x[F]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null;},I=k;y.capture(c.container,A,R);var D=setInterval(function(){I();},20);return l.preventDefault()}}}h.onMouseDown=a;});ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(o,h,_){h.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(m){m.selectMoreLines(-1);},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(m){m.selectMoreLines(1);},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(m){m.selectMoreLines(-1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(m){m.selectMoreLines(1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(m){m.selectMore(-1);},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(m){m.selectMore(1);},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(m){m.selectMore(-1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(m){m.selectMore(1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(m){m.multiSelect.rangeCount>1?m.multiSelect.joinSelections():m.multiSelect.splitIntoLines();},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(m){m.multiSelect.splitIntoLines();},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(m){m.alignCursors();},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(m){m.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(m){m.exitMultiSelectMode();},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(m){return m&&m.inMultiSelectMode}}];var y=o("../keyboard/hash_handler").HashHandler;h.keyboardHandler=new y(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(o,h,_){var y=o("./range_list").RangeList,m=o("./range").Range,f=o("./selection").Selection,a=o("./mouse/multi_select_handler").onMouseDown,l=o("./lib/event"),n=o("./lib/lang"),e=o("./commands/multi_select_commands");h.commands=e.defaultCommands.concat(e.multiSelectCommands);var t=o("./search").Search,r=new t;function i(S,M,g){return r.$options.wrap=!0,r.$options.needle=M,r.$options.backwards=g==-1,r.find(S)}var s=o("./edit_session").EditSession;((function(){this.getSelectionMarkers=function(){return this.$selectionMarkers};})).call(s.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(S,M){if(S){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(S),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),M||this.fromOrientedRange(S);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g);}S.cursor||(S.cursor=S.end);var d=this.rangeList.add(S);return this.$onAddRange(S),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),M||this.fromOrientedRange(S)}},this.toSingleRange=function(S){S=S||this.ranges[0];var M=this.rangeList.removeAll();M.length&&this.$onRemoveRange(M),S&&this.fromOrientedRange(S);},this.substractPoint=function(S){var M=this.rangeList.substractPoint(S);if(M)return this.$onRemoveRange(M),M[0]},this.mergeOverlappingRanges=function(){var S=this.rangeList.merge();S.length&&this.$onRemoveRange(S);},this.$onAddRange=function(S){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(S),this._signal("addRange",{range:S});},this.$onRemoveRange=function(S){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var M=this.rangeList.ranges.pop();S.push(M),this.rangeCount=0;}for(var g=S.length;g--;){var d=this.ranges.indexOf(S[g]);this.ranges.splice(d,1);}this._signal("removeRange",{ranges:S}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),M=M||this.ranges[0],M&&!M.isEqual(this.getRange())&&this.fromOrientedRange(M);},this.$initRangeList=function(){this.rangeList||(this.rangeList=new y,this.ranges=[],this.rangeCount=0);},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var S=this.ranges.length?this.ranges:[this.getRange()],M=[],g=0;g<S.length;g++){var d=S[g],A=d.start.row,L=d.end.row;if(A===L)M.push(d.clone());else {for(M.push(new m(A,d.start.column,A,this.session.getLine(A).length));++A<L;)M.push(this.getLineRange(A,!0));M.push(new m(L,0,L,d.end.column));}g==0&&!this.isBackwards()&&(M=M.reverse());}this.toSingleRange();for(var g=M.length;g--;)this.addRange(M[g]);},this.joinSelections=function(){var S=this.rangeList.ranges,M=S[S.length-1],g=m.fromPoints(S[0].start,M.end);this.toSingleRange(),this.setSelectionRange(g,M.cursor==M.start);},this.toggleBlockSelection=function(){if(this.rangeCount>1){var S=this.rangeList.ranges,M=S[S.length-1],g=m.fromPoints(S[0].start,M.end);this.toSingleRange(),this.setSelectionRange(g,M.cursor==M.start);}else {var d=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(d,A);L.forEach(this.addRange,this);}},this.rectangularRangeBlock=function(S,M,g){var d=[],A=S.column<M.column;if(A)var L=S.column,$=M.column,T=S.offsetX,w=M.offsetX;else var L=M.column,$=S.column,T=M.offsetX,w=S.offsetX;var b=S.row<M.row;if(b)var u=S.row,v=M.row;else var u=M.row,v=S.row;L<0&&(L=0),u<0&&(u=0),u==v&&(g=!0);for(var x,k=u;k<=v;k++){var R=m.fromPoints(this.session.screenToDocumentPosition(k,L,T),this.session.screenToDocumentPosition(k,$,w));if(R.isEmpty()){if(x&&p(R.end,x))break;x=R.end;}R.cursor=A?R.start:R.end,d.push(R);}if(b&&d.reverse(),!g){for(var I=d.length-1;d[I].isEmpty()&&I>0;)I--;if(I>0)for(var D=0;d[D].isEmpty();)D++;for(var O=I;O>=D;O--)d[O].isEmpty()&&d.splice(O,1);}return d};}.call(f.prototype);var c=o("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.addSelectionMarker=function(S){S.cursor||(S.cursor=S.end);var M=this.getSelectionStyle();return S.marker=this.session.addMarker(S,"ace_selection",M),this.session.$selectionMarkers.push(S),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,S},this.removeSelectionMarker=function(S){if(S.marker){this.session.removeMarker(S.marker);var M=this.session.$selectionMarkers.indexOf(S);M!=-1&&this.session.$selectionMarkers.splice(M,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length;}},this.removeSelectionMarkers=function(S){for(var M=this.session.$selectionMarkers,g=S.length;g--;){var d=S[g];if(d.marker){this.session.removeMarker(d.marker);var A=M.indexOf(d);A!=-1&&M.splice(A,1);}}this.session.selectionMarkerCount=M.length;},this.$onAddRange=function(S){this.addSelectionMarker(S.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.$onRemoveRange=function(S){this.removeSelectionMarkers(S.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.$onMultiSelect=function(S){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers());},this.$onSingleSelect=function(S){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"));},this.$onMultiSelectExec=function(S){var M=S.command,g=S.editor;if(g.multiSelect){if(M.multiSelectAction)M.multiSelectAction=="forEach"?d=g.forEachSelection(M,S.args):M.multiSelectAction=="forEachLine"?d=g.forEachSelection(M,S.args,!0):M.multiSelectAction=="single"?(g.exitMultiSelectMode(),d=M.exec(g,S.args||{})):d=M.multiSelectAction(g,S.args||{});else {var d=M.exec(g,S.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges();}return d}},this.forEachSelection=function(S,M,g){if(!this.inVirtualSelectionMode){var d=g&&g.keepOrder,A=g==!0||g&&g.$byLines,L=this.session,$=this.selection,T=$.rangeList,w=(d?$:T).ranges,b;if(!w.length)return S.exec?S.exec(this,M||{}):S(this,M||{});var u=$._eventRegistry;$._eventRegistry={};var v=new f(L);this.inVirtualSelectionMode=!0;for(var x=w.length;x--;){if(A)for(;x>0&&w[x].start.row==w[x-1].end.row;)x--;v.fromOrientedRange(w[x]),v.index=x,this.selection=L.selection=v;var k=S.exec?S.exec(this,M||{}):S(this,M||{});!b&&k!==void 0&&(b=k),v.toOrientedRange(w[x]);}v.detach(),this.selection=L.selection=$,this.inVirtualSelectionMode=!1,$._eventRegistry=u,$.mergeOverlappingRanges(),$.ranges[0]&&$.fromOrientedRange($.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),b}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange();},this.getSelectedText=function(){var S="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var M=this.multiSelect.rangeList.ranges,g=[],d=0;d<M.length;d++)g.push(this.session.getTextRange(M[d]));var A=this.session.getDocument().getNewLineCharacter();S=g.join(A),S.length==(g.length-1)*A.length&&(S="");}else this.selection.isEmpty()||(S=this.session.getTextRange(this.getSelectionRange()));return S},this.$checkMultiselectChange=function(S,M){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var g=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&M==this.multiSelect.anchor)return;var d=M==this.multiSelect.anchor?g.cursor==g.start?g.end:g.start:g.cursor;d.row!=M.row||this.session.$clipPositionToDocument(d.row,d.column).column!=M.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges();}},this.findAll=function(S,M,g){if(M=M||{},M.needle=S||M.needle,M.needle==null){var d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();M.needle=this.session.getTextRange(d);}this.$search.set(M);var A=this.$search.findAll(this.session);if(!A.length)return 0;var L=this.multiSelect;g||L.toSingleRange(A[0]);for(var $=A.length;$--;)L.addRange(A[$],!0);return d&&L.rangeList.rangeAtPoint(d.start)&&L.addRange(d,!0),A.length},this.selectMoreLines=function(S,M){var g=this.selection.toOrientedRange(),d=g.cursor==g.end,A=this.session.documentToScreenPosition(g.cursor);this.selection.$desiredColumn&&(A.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(A.row+S,A.column);if(g.isEmpty())var T=L;else var $=this.session.documentToScreenPosition(d?g.end:g.start),T=this.session.screenToDocumentPosition($.row+S,$.column);if(d){var w=m.fromPoints(L,T);w.cursor=w.start;}else {var w=m.fromPoints(T,L);w.cursor=w.end;}if(w.desiredColumn=A.column,!this.selection.inMultiSelectMode)this.selection.addRange(g);else if(M)var b=g.cursor;this.selection.addRange(w),b&&this.selection.substractPoint(b);},this.transposeSelections=function(S){for(var M=this.session,g=M.multiSelect,d=g.ranges,A=d.length;A--;){var L=d[A];if(L.isEmpty()){var $=M.getWordRange(L.start.row,L.start.column);L.start.row=$.start.row,L.start.column=$.start.column,L.end.row=$.end.row,L.end.column=$.end.column;}}g.mergeOverlappingRanges();for(var T=[],A=d.length;A--;){var L=d[A];T.unshift(M.getTextRange(L));}S<0?T.unshift(T.pop()):T.push(T.shift());for(var A=d.length;A--;){var L=d[A],w=L.clone();M.replace(L,T[A]),L.start.row=w.start.row,L.start.column=w.start.column;}g.fromOrientedRange(g.ranges[0]);},this.selectMore=function(S,M,g){var d=this.session,A=d.multiSelect,L=A.toOrientedRange();if(!(L.isEmpty()&&(L=d.getWordRange(L.start.row,L.start.column),L.cursor=S==-1?L.start:L.end,this.multiSelect.addRange(L),g))){var $=d.getTextRange(L),T=i(d,$,S);T&&(T.cursor=S==-1?T.start:T.end,this.session.unfold(T),this.multiSelect.addRange(T),this.renderer.scrollCursorIntoView(null,.5)),M&&this.multiSelect.substractPoint(L.cursor);}},this.alignCursors=function(){var S=this.session,M=S.multiSelect,g=M.ranges,d=-1,A=g.filter(function(I){if(I.cursor.row==d)return !0;d=I.cursor.row;});if(!g.length||A.length==g.length-1){var L=this.selection.getRange(),$=L.start.row,T=L.end.row,w=$==T;if(w){var b=this.session.getLength(),u;do u=this.session.getLine(T);while(/[=:]/.test(u)&&++T<b);do u=this.session.getLine($);while(/[=:]/.test(u)&&--$>0);$<0&&($=0),T>=b&&(T=b-1);}var v=this.session.removeFullLines($,T);v=this.$reAlignText(v,w),this.session.insert({row:$,column:0},v.join(`
955
+ `)+`
956
+ `),w||(L.start.column=0,L.end.column=v[v.length-1].length),this.selection.setRange(L);}else {A.forEach(function(I){M.substractPoint(I.cursor);});var x=0,k=1/0,R=g.map(function(I){var D=I.cursor,O=S.getLine(D.row),F=O.substr(D.column).search(/\S/g);return F==-1&&(F=0),D.column>x&&(x=D.column),F<k&&(k=F),F});g.forEach(function(I,D){var O=I.cursor,F=x-O.column,N=R[D]-k;F>N?S.insert(O,n.stringRepeat(" ",F-N)):S.remove(new m(O.row,O.column,O.row,O.column-F+N)),I.start.column=I.end.column=x,I.start.row=I.end.row=O.row,I.cursor=I.end;}),M.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers();}},this.$reAlignText=function(S,M){var g=!0,d=!0,A,L,$;return S.map(function(v){var x=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return x?A==null?(A=x[1].length,L=x[2].length,$=x[3].length,x):(A+L+$!=x[1].length+x[2].length+x[3].length&&(d=!1),A!=x[1].length&&(g=!1),A>x[1].length&&(A=x[1].length),L<x[2].length&&(L=x[2].length),$>x[3].length&&($=x[3].length),x):[v]}).map(M?w:g?d?b:w:u);function T(v){return n.stringRepeat(" ",v)}function w(v){return v[2]?T(A)+v[2]+T(L-v[2].length+$)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function b(v){return v[2]?T(A+L-v[2].length)+v[2]+T($)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function u(v){return v[2]?T(A)+v[2]+T($)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}};}).call(c.prototype);function p(S,M){return S.row==M.row&&S.column==M.column}h.onSessionChange=function(S){var M=S.session;M&&!M.multiSelect&&(M.$selectionMarkers=[],M.selection.$initRangeList(),M.multiSelect=M.selection),this.multiSelect=M&&M.multiSelect;var g=S.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),M&&(M.multiSelect.on("addRange",this.$onAddRange),M.multiSelect.on("removeRange",this.$onRemoveRange),M.multiSelect.on("multiSelect",this.$onMultiSelect),M.multiSelect.on("singleSelect",this.$onSingleSelect),M.multiSelect.lead.on("change",this.$checkMultiselectChange),M.multiSelect.anchor.on("change",this.$checkMultiselectChange)),M&&this.inMultiSelectMode!=M.selection.inMultiSelectMode&&(M.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect());};function C(S){S.$multiselectOnSessionChange||(S.$onAddRange=S.$onAddRange.bind(S),S.$onRemoveRange=S.$onRemoveRange.bind(S),S.$onMultiSelect=S.$onMultiSelect.bind(S),S.$onSingleSelect=S.$onSingleSelect.bind(S),S.$multiselectOnSessionChange=h.onSessionChange.bind(S),S.$checkMultiselectChange=S.$checkMultiselectChange.bind(S),S.$multiselectOnSessionChange(S),S.on("changeSession",S.$multiselectOnSessionChange),S.on("mousedown",a),S.commands.addCommands(e.defaultCommands),E(S));}function E(S){if(!S.textInput)return;var M=S.textInput.getElement(),g=!1;l.addListener(M,"keydown",function(A){var L=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);S.$blockSelectEnabled&&L?g||(S.renderer.setMouseCursor("crosshair"),g=!0):g&&d();},S),l.addListener(M,"keyup",d,S),l.addListener(M,"blur",d,S);function d(A){g&&(S.renderer.setMouseCursor(""),g=!1);}}h.MultiSelect=C,o("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(S){C(this),S?this.on("mousedown",a):this.off("mousedown",a);},value:!0},enableBlockSelect:{set:function(S){this.$blockSelectEnabled=S;},value:!0}});});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(o,h,_){var y=o("../../range").Range,m=h.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(f,a,l){var n=f.getLine(l);return this.foldingStartMarker.test(n)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(f,a,l){return null},this.indentationBlock=function(f,a,l){var n=/\S/,e=f.getLine(a),t=e.search(n);if(t!=-1){for(var r=l||e.length,i=f.getLength(),s=a,c=a;++a<i;){var p=f.getLine(a).search(n);if(p!=-1){if(p<=t){var C=f.getTokenAt(a,0);if(!C||C.type!=="string")break}c=a;}}if(c>s){var E=f.getLine(c).length;return new y(s,r,c,E)}}},this.openingBracketBlock=function(f,a,l,n,e){var t={row:l,column:n+1},r=f.$findClosingBracket(a,t,e);if(r){var i=f.foldWidgets[r.row];return i==null&&(i=f.getFoldWidget(r.row)),i=="start"&&r.row>t.row&&(r.row--,r.column=f.getLine(r.row).length),y.fromPoints(t,r)}},this.closingBracketBlock=function(f,a,l,n,e){var t={row:l,column:n},r=f.$findOpeningBracket(a,t);if(r)return r.column++,t.column--,y.fromPoints(r,t)};}).call(m.prototype);});ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(o,h,_){var y=o("../line_widgets").LineWidgets,m=o("../lib/dom"),f=o("../range").Range,a=o("../config").nls;function l(e,t,r){for(var i=0,s=e.length-1;i<=s;){var c=i+s>>1,p=r(t,e[c]);if(p>0)i=c+1;else if(p<0)s=c-1;else return c}return -(i+1)}function n(e,t,r){var i=e.getAnnotations().sort(f.comparePoints);if(i.length){var s=l(i,{row:t,column:-1},f.comparePoints);s<0&&(s=-s-1),s>=i.length?s=r>0?0:i.length-1:s===0&&r<0&&(s=i.length-1);var c=i[s];if(!(!c||!r)){if(c.row===t){do c=i[s+=r];while(c&&c.row===t);if(!c)return i.slice()}var p=[];t=c.row;do p[r<0?"unshift":"push"](c),c=i[s+=r];while(c&&c.row==t);return p.length&&p}}}h.showErrorMarker=function(e,t){var r=e.session;r.widgetManager||(r.widgetManager=new y(r),r.widgetManager.attach(e));var i=e.getCursorPosition(),s=i.row,c=r.widgetManager.getWidgetsAtRow(s).filter(function(L){return L.type=="errorMarker"})[0];c?c.destroy():s-=t;var p=n(r,s,t),C;if(p){var E=p[0];i.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,i.row=E.row,C=e.renderer.$gutterLayer.$annotations[i.row];}else {if(c)return;C={displayText:[a("error-marker.good-state","Looks good!")],className:"ace_ok"};}e.session.unfold(i.row),e.selection.moveToPosition(i);var S={row:i.row,fixedWidth:!0,coverGutter:!0,el:m.createElement("div"),type:"errorMarker"},M=S.el.appendChild(m.createElement("div")),g=S.el.appendChild(m.createElement("div"));g.className="error_widget_arrow "+C.className;var d=e.renderer.$cursorLayer.getPixelPosition(i).left;g.style.left=d+e.renderer.gutterWidth-5+"px",S.el.className="error_widget_wrapper",M.className="error_widget "+C.className,C.displayText.forEach(function(L,$){M.appendChild(m.createTextNode(L)),$<C.displayText.length-1&&M.appendChild(m.createElement("br"));}),M.appendChild(m.createElement("div"));var A=function(L,$,T){if($===0&&(T==="esc"||T==="return"))return S.destroy(),{command:"null"}};S.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(A),r.widgetManager.removeLineWidget(S),e.off("changeSelection",S.destroy),e.off("changeSession",S.destroy),e.off("mouseup",S.destroy),e.off("change",S.destroy));},e.keyBinding.addKeyboardHandler(A),e.on("changeSelection",S.destroy),e.on("changeSession",S.destroy),e.on("mouseup",S.destroy),e.on("change",S.destroy),e.session.widgetManager.addLineWidget(S),S.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:S.el.offsetHeight});},m.importCssString(`
957
+ .error_widget_wrapper {
958
+ background: inherit;
959
+ color: inherit;
960
+ border:none
961
+ }
962
+ .error_widget {
963
+ border-top: solid 2px;
964
+ border-bottom: solid 2px;
965
+ margin: 5px 0;
966
+ padding: 10px 40px;
967
+ white-space: pre-wrap;
968
+ }
969
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
970
+ border-color: #ff5a5a
971
+ }
972
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
973
+ border-color: #F1D817
974
+ }
975
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
976
+ border-color: #5a5a5a
977
+ }
978
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
979
+ border-color: #5aaa5a
980
+ }
981
+ .error_widget_arrow {
982
+ position: absolute;
983
+ border: solid 5px;
984
+ border-top-color: transparent!important;
985
+ border-right-color: transparent!important;
986
+ border-left-color: transparent!important;
987
+ top: -5px;
988
+ }
989
+ `,"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(o,h,_){o("./loader_build")(h);var y=o("./lib/dom"),m=o("./range").Range,f=o("./editor").Editor,a=o("./edit_session").EditSession,l=o("./undomanager").UndoManager,n=o("./virtual_renderer").VirtualRenderer;o("./worker/worker_client"),o("./keyboard/hash_handler"),o("./placeholder"),o("./multi_select"),o("./mode/folding/fold_mode"),o("./theme/textmate"),o("./ext/error_marker"),h.config=o("./config"),h.edit=function(e,t){if(typeof e=="string"){var r=e;if(e=document.getElementById(r),!e)throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof f)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;i=s.value,e=y.createElement("pre"),s.parentNode.replaceChild(e,s);}else e&&(i=e.textContent,e.innerHTML="");var c=h.createEditSession(i),p=new f(new n(e),c,t),C={document:c,editor:p,onResize:p.resize.bind(p,null)};return s&&(C.textarea=s),p.on("destroy",function(){C.editor.container.env=null;}),p.container.env=p.env=C,p},h.createEditSession=function(e,t){var r=new a(e,t);return r.setUndoManager(new l),r},h.Range=m,h.Editor=f,h.EditSession=a,h.UndoManager=l,h.VirtualRenderer=n,h.version=h.config.version;});(function(){ace.require(["ace/ace"],function(o){o&&(o.config.init(!0),o.define=ace.define);var h=function(){return this}();!h&&typeof window<"u"&&(h=window),!h&&typeof self<"u"&&(h=self),h.ace||(h.ace=o);for(var _ in o)o.hasOwnProperty(_)&&(h.ace[_]=o[_]);h.ace.default=h.ace,typeof Ct=="object"&&typeof oi=="object"&&Ct&&(Ct.exports=h.ace);});})();});var ai=b(ce=>{var be=typeof Symbol=="function"&&Symbol.for,cn=be?Symbol.for("react.element"):60103,hn=be?Symbol.for("react.portal"):60106,$t=be?Symbol.for("react.fragment"):60107,At=be?Symbol.for("react.strict_mode"):60108,Mt=be?Symbol.for("react.profiler"):60114,Tt=be?Symbol.for("react.provider"):60109,Lt=be?Symbol.for("react.context"):60110,un=be?Symbol.for("react.async_mode"):60111,_t=be?Symbol.for("react.concurrent_mode"):60111,Et=be?Symbol.for("react.forward_ref"):60112,xt=be?Symbol.for("react.suspense"):60113,go=be?Symbol.for("react.suspense_list"):60120,kt=be?Symbol.for("react.memo"):60115,Rt=be?Symbol.for("react.lazy"):60116,mo=be?Symbol.for("react.block"):60121,vo=be?Symbol.for("react.fundamental"):60117,yo=be?Symbol.for("react.responder"):60118,wo=be?Symbol.for("react.scope"):60119;function $e(o){if(typeof o=="object"&&o!==null){var h=o.$$typeof;switch(h){case cn:switch(o=o.type,o){case un:case _t:case $t:case Mt:case At:case xt:return o;default:switch(o=o&&o.$$typeof,o){case Lt:case Et:case Rt:case kt:case Tt:return o;default:return h}}case hn:return h}}}function si(o){return $e(o)===_t}ce.AsyncMode=un;ce.ConcurrentMode=_t;ce.ContextConsumer=Lt;ce.ContextProvider=Tt;ce.Element=cn;ce.ForwardRef=Et;ce.Fragment=$t;ce.Lazy=Rt;ce.Memo=kt;ce.Portal=hn;ce.Profiler=Mt;ce.StrictMode=At;ce.Suspense=xt;ce.isAsyncMode=function(o){return si(o)||$e(o)===un};ce.isConcurrentMode=si;ce.isContextConsumer=function(o){return $e(o)===Lt};ce.isContextProvider=function(o){return $e(o)===Tt};ce.isElement=function(o){return typeof o=="object"&&o!==null&&o.$$typeof===cn};ce.isForwardRef=function(o){return $e(o)===Et};ce.isFragment=function(o){return $e(o)===$t};ce.isLazy=function(o){return $e(o)===Rt};ce.isMemo=function(o){return $e(o)===kt};ce.isPortal=function(o){return $e(o)===hn};ce.isProfiler=function(o){return $e(o)===Mt};ce.isStrictMode=function(o){return $e(o)===At};ce.isSuspense=function(o){return $e(o)===xt};ce.isValidElementType=function(o){return typeof o=="string"||typeof o=="function"||o===$t||o===_t||o===Mt||o===At||o===xt||o===go||typeof o=="object"&&o!==null&&(o.$$typeof===Rt||o.$$typeof===kt||o.$$typeof===Tt||o.$$typeof===Lt||o.$$typeof===Et||o.$$typeof===vo||o.$$typeof===yo||o.$$typeof===wo||o.$$typeof===mo)};ce.typeOf=$e;});var li=b(he=>{process.env.NODE_ENV!=="production"&&function(){var o=typeof Symbol=="function"&&Symbol.for,h=o?Symbol.for("react.element"):60103,_=o?Symbol.for("react.portal"):60106,y=o?Symbol.for("react.fragment"):60107,m=o?Symbol.for("react.strict_mode"):60108,f=o?Symbol.for("react.profiler"):60114,a=o?Symbol.for("react.provider"):60109,l=o?Symbol.for("react.context"):60110,n=o?Symbol.for("react.async_mode"):60111,e=o?Symbol.for("react.concurrent_mode"):60111,t=o?Symbol.for("react.forward_ref"):60112,r=o?Symbol.for("react.suspense"):60113,i=o?Symbol.for("react.suspense_list"):60120,s=o?Symbol.for("react.memo"):60115,c=o?Symbol.for("react.lazy"):60116,p=o?Symbol.for("react.block"):60121,C=o?Symbol.for("react.fundamental"):60117,E=o?Symbol.for("react.responder"):60118,S=o?Symbol.for("react.scope"):60119;function M(G){return typeof G=="string"||typeof G=="function"||G===y||G===e||G===f||G===m||G===r||G===i||typeof G=="object"&&G!==null&&(G.$$typeof===c||G.$$typeof===s||G.$$typeof===a||G.$$typeof===l||G.$$typeof===t||G.$$typeof===C||G.$$typeof===E||G.$$typeof===S||G.$$typeof===p)}function g(G){if(typeof G=="object"&&G!==null){var ie=G.$$typeof;switch(ie){case h:var ee=G.type;switch(ee){case n:case e:case y:case f:case m:case r:return ee;default:var oe=ee&&ee.$$typeof;switch(oe){case l:case t:case c:case s:case a:return oe;default:return ie}}case _:return ie}}}var d=n,A=e,L=l,$=a,T=h,w=t,b=y,u=c,v=s,x=_,k=f,R=m,I=r,D=!1;function O(G){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(G)||g(G)===n}function F(G){return g(G)===e}function N(G){return g(G)===l}function P(G){return g(G)===a}function W(G){return typeof G=="object"&&G!==null&&G.$$typeof===h}function B(G){return g(G)===t}function H(G){return g(G)===y}function V(G){return g(G)===c}function U(G){return g(G)===s}function K(G){return g(G)===_}function Z(G){return g(G)===f}function Y(G){return g(G)===m}function ne(G){return g(G)===r}he.AsyncMode=d,he.ConcurrentMode=A,he.ContextConsumer=L,he.ContextProvider=$,he.Element=T,he.ForwardRef=w,he.Fragment=b,he.Lazy=u,he.Memo=v,he.Portal=x,he.Profiler=k,he.StrictMode=R,he.Suspense=I,he.isAsyncMode=O,he.isConcurrentMode=F,he.isContextConsumer=N,he.isContextProvider=P,he.isElement=W,he.isForwardRef=B,he.isFragment=H,he.isLazy=V,he.isMemo=U,he.isPortal=K,he.isProfiler=Z,he.isStrictMode=Y,he.isSuspense=ne,he.isValidElementType=M,he.typeOf=g;}();});var fn=b((Rc,dn)=>{process.env.NODE_ENV==="production"?dn.exports=ai():dn.exports=li();});var ui=b((Ic,hi)=>{var ci=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,So=Object.prototype.propertyIsEnumerable;function Co(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function $o(){try{if(!Object.assign)return !1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return !1;for(var h={},_=0;_<10;_++)h["_"+String.fromCharCode(_)]=_;var y=Object.getOwnPropertyNames(h).map(function(f){return h[f]});if(y.join("")!=="0123456789")return !1;var m={};return "abcdefghijklmnopqrst".split("").forEach(function(f){m[f]=f;}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return !1}}hi.exports=$o()?Object.assign:function(o,h){for(var _,y=Co(o),m,f=1;f<arguments.length;f++){_=Object(arguments[f]);for(var a in _)bo.call(_,a)&&(y[a]=_[a]);if(ci){m=ci(_);for(var l=0;l<m.length;l++)So.call(_,m[l])&&(y[m[l]]=_[m[l]]);}}return y};});var It=b((Oc,di)=>{var Ao="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";di.exports=Ao;});var pn=b((Dc,fi)=>{fi.exports=Function.call.bind(Object.prototype.hasOwnProperty);});var yi=b((Nc,vi)=>{var gn=function(){};process.env.NODE_ENV!=="production"&&(pi=It(),Ot={},gi=pn(),gn=function(o){var h="Warning: "+o;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});var pi,Ot,gi;function mi(o,h,_,y,m){if(process.env.NODE_ENV!=="production"){for(var f in o)if(gi(o,f)){var a;try{if(typeof o[f]!="function"){var l=Error((y||"React class")+": "+_+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=o[f](h,f,y,_,null,pi);}catch(e){a=e;}if(a&&!(a instanceof Error)&&gn((y||"React class")+": type specification of "+_+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Ot)){Ot[a.message]=!0;var n=m?m():"";gn("Failed "+_+" type: "+a.message+(n??""));}}}}mi.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Ot={});};vi.exports=mi;});var Si=b((Fc,bi)=>{var Mo=fn(),To=ui(),qe=It(),mn=pn(),wi=yi(),et=function(){};process.env.NODE_ENV!=="production"&&(et=function(o){var h="Warning: "+o;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function Dt(){return null}bi.exports=function(o,h){var _=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function m(v){var x=v&&(_&&v[_]||v[y]);if(typeof x=="function")return x}var f="<<anonymous>>",a={array:t("array"),bigint:t("bigint"),bool:t("boolean"),func:t("function"),number:t("number"),object:t("object"),string:t("string"),symbol:t("symbol"),any:r(),arrayOf:i,element:s(),elementType:c(),instanceOf:p,node:M(),objectOf:E,oneOf:C,oneOfType:S,shape:d,exact:A};function l(v,x){return v===x?v!==0||1/v===1/x:v!==v&&x!==x}function n(v,x){this.message=v,this.data=x&&typeof x=="object"?x:{},this.stack="";}n.prototype=Error.prototype;function e(v){if(process.env.NODE_ENV!=="production")var x={},k=0;function R(D,O,F,N,P,W,B){if(N=N||f,W=W||F,B!==qe){if(h){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var V=N+":"+F;!x[V]&&k<3&&(et("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+N+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[V]=!0,k++);}}return O[F]==null?D?O[F]===null?new n("The "+P+" `"+W+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new n("The "+P+" `"+W+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:v(O,F,N,P,W)}var I=R.bind(null,!1);return I.isRequired=R.bind(null,!0),I}function t(v){function x(k,R,I,D,O,F){var N=k[R],P=T(N);if(P!==v){var W=w(N);return new n("Invalid "+D+" `"+O+"` of type "+("`"+W+"` supplied to `"+I+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return e(x)}function r(){return e(Dt)}function i(v){function x(k,R,I,D,O){if(typeof v!="function")return new n("Property `"+O+"` of component `"+I+"` has invalid PropType notation inside arrayOf.");var F=k[R];if(!Array.isArray(F)){var N=T(F);return new n("Invalid "+D+" `"+O+"` of type "+("`"+N+"` supplied to `"+I+"`, expected an array."))}for(var P=0;P<F.length;P++){var W=v(F,P,I,D,O+"["+P+"]",qe);if(W instanceof Error)return W}return null}return e(x)}function s(){function v(x,k,R,I,D){var O=x[k];if(!o(O)){var F=T(O);return new n("Invalid "+I+" `"+D+"` of type "+("`"+F+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return e(v)}function c(){function v(x,k,R,I,D){var O=x[k];if(!Mo.isValidElementType(O)){var F=T(O);return new n("Invalid "+I+" `"+D+"` of type "+("`"+F+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return e(v)}function p(v){function x(k,R,I,D,O){if(!(k[R]instanceof v)){var F=v.name||f,N=u(k[R]);return new n("Invalid "+D+" `"+O+"` of type "+("`"+N+"` supplied to `"+I+"`, expected ")+("instance of `"+F+"`."))}return null}return e(x)}function C(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?et("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):et("Invalid argument supplied to oneOf, expected an array.")),Dt;function x(k,R,I,D,O){for(var F=k[R],N=0;N<v.length;N++)if(l(F,v[N]))return null;var P=JSON.stringify(v,function(B,H){var V=w(H);return V==="symbol"?String(H):H});return new n("Invalid "+D+" `"+O+"` of value `"+String(F)+"` "+("supplied to `"+I+"`, expected one of "+P+"."))}return e(x)}function E(v){function x(k,R,I,D,O){if(typeof v!="function")return new n("Property `"+O+"` of component `"+I+"` has invalid PropType notation inside objectOf.");var F=k[R],N=T(F);if(N!=="object")return new n("Invalid "+D+" `"+O+"` of type "+("`"+N+"` supplied to `"+I+"`, expected an object."));for(var P in F)if(mn(F,P)){var W=v(F,P,I,D,O+"."+P,qe);if(W instanceof Error)return W}return null}return e(x)}function S(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&et("Invalid argument supplied to oneOfType, expected an instance of array."),Dt;for(var x=0;x<v.length;x++){var k=v[x];if(typeof k!="function")return et("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(k)+" at index "+x+"."),Dt}function R(I,D,O,F,N){for(var P=[],W=0;W<v.length;W++){var B=v[W],H=B(I,D,O,F,N,qe);if(H==null)return null;H.data&&mn(H.data,"expectedType")&&P.push(H.data.expectedType);}var V=P.length>0?", expected one of type ["+P.join(", ")+"]":"";return new n("Invalid "+F+" `"+N+"` supplied to "+("`"+O+"`"+V+"."))}return e(R)}function M(){function v(x,k,R,I,D){return L(x[k])?null:new n("Invalid "+I+" `"+D+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return e(v)}function g(v,x,k,R,I){return new n((v||"React class")+": "+x+" type `"+k+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+I+"`.")}function d(v){function x(k,R,I,D,O){var F=k[R],N=T(F);if(N!=="object")return new n("Invalid "+D+" `"+O+"` of type `"+N+"` "+("supplied to `"+I+"`, expected `object`."));for(var P in v){var W=v[P];if(typeof W!="function")return g(I,D,O,P,w(W));var B=W(F,P,I,D,O+"."+P,qe);if(B)return B}return null}return e(x)}function A(v){function x(k,R,I,D,O){var F=k[R],N=T(F);if(N!=="object")return new n("Invalid "+D+" `"+O+"` of type `"+N+"` "+("supplied to `"+I+"`, expected `object`."));var P=To({},k[R],v);for(var W in P){var B=v[W];if(mn(v,W)&&typeof B!="function")return g(I,D,O,W,w(B));if(!B)return new n("Invalid "+D+" `"+O+"` key `"+W+"` supplied to `"+I+"`.\nBad object: "+JSON.stringify(k[R],null," ")+`
990
+ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var H=B(F,W,I,D,O+"."+W,qe);if(H)return H}return null}return e(x)}function L(v){switch(typeof v){case"number":case"string":case"undefined":return !0;case"boolean":return !v;case"object":if(Array.isArray(v))return v.every(L);if(v===null||o(v))return !0;var x=m(v);if(x){var k=x.call(v),R;if(x!==v.entries){for(;!(R=k.next()).done;)if(!L(R.value))return !1}else for(;!(R=k.next()).done;){var I=R.value;if(I&&!L(I[1]))return !1}}else return !1;return !0;default:return !1}}function $(v,x){return v==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function T(v){var x=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":$(x,v)?"symbol":x}function w(v){if(typeof v>"u"||v===null)return ""+v;var x=T(v);if(x==="object"){if(v instanceof Date)return "date";if(v instanceof RegExp)return "regexp"}return x}function b(v){var x=w(v);switch(x){case"array":case"object":return "an "+x;case"boolean":case"date":case"regexp":return "a "+x;default:return x}}function u(v){return !v.constructor||!v.constructor.name?f:v.constructor.name}return a.checkPropTypes=wi,a.resetWarningCache=wi.resetWarningCache,a.PropTypes=a,a};});var Mi=b((Pc,Ai)=>{var Lo=It();function Ci(){}function $i(){}$i.resetWarningCache=Ci;Ai.exports=function(){function o(y,m,f,a,l,n){if(n!==Lo){var e=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw e.name="Invariant Violation",e}}o.isRequired=o;function h(){return o}var _={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:h,element:o,elementType:o,instanceOf:h,node:o,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:$i,resetWarningCache:Ci};return _.PropTypes=_,_};});var Nt=b((Wc,vn)=>{process.env.NODE_ENV!=="production"?(Ti=fn(),Li=!0,vn.exports=Si()(Ti.isElement,Li)):vn.exports=Mi()();var Ti,Li;});var En=b((ut,nt)=>{var _o=200,_n="__lodash_hash_undefined__",jt=1,Wi=2,Bi=9007199254740991,Ft="[object Arguments]",Sn="[object Array]",Eo="[object AsyncFunction]",Hi="[object Boolean]",zi="[object Date]",Ui="[object Error]",ji="[object Function]",xo="[object GeneratorFunction]",Pt="[object Map]",Gi="[object Number]",ko="[object Null]",tt="[object Object]",_i="[object Promise]",Ro="[object Proxy]",Vi="[object RegExp]",Wt="[object Set]",Ki="[object String]",Io="[object Symbol]",Oo="[object Undefined]",Cn="[object WeakMap]",Yi="[object ArrayBuffer]",Bt="[object DataView]",Do="[object Float32Array]",No="[object Float64Array]",Fo="[object Int8Array]",Po="[object Int16Array]",Wo="[object Int32Array]",Bo="[object Uint8Array]",Ho="[object Uint8ClampedArray]",zo="[object Uint16Array]",Uo="[object Uint32Array]",jo=/[\\^$.*+?()[\]{}|]/g,Go=/^\[object .+?Constructor\]$/,Vo=/^(?:0|[1-9]\d*)$/,fe={};fe[Do]=fe[No]=fe[Fo]=fe[Po]=fe[Wo]=fe[Bo]=fe[Ho]=fe[zo]=fe[Uo]=!0;fe[Ft]=fe[Sn]=fe[Yi]=fe[Hi]=fe[Bt]=fe[zi]=fe[Ui]=fe[ji]=fe[Pt]=fe[Gi]=fe[tt]=fe[Vi]=fe[Wt]=fe[Ki]=fe[Cn]=!1;var Qi=typeof global=="object"&&global&&global.Object===Object&&global,Ko=typeof self=="object"&&self&&self.Object===Object&&self,xe=Qi||Ko||Function("return this")(),Zi=typeof ut=="object"&&ut&&!ut.nodeType&&ut,Ei=Zi&&typeof nt=="object"&&nt&&!nt.nodeType&&nt,Xi=Ei&&Ei.exports===Zi,yn=Xi&&Qi.process,xi=function(){try{return yn&&yn.binding&&yn.binding("util")}catch{}}(),ki=xi&&xi.isTypedArray;function Yo(o,h){for(var _=-1,y=o==null?0:o.length,m=0,f=[];++_<y;){var a=o[_];h(a,_,o)&&(f[m++]=a);}return f}function Qo(o,h){for(var _=-1,y=h.length,m=o.length;++_<y;)o[m+_]=h[_];return o}function Zo(o,h){for(var _=-1,y=o==null?0:o.length;++_<y;)if(h(o[_],_,o))return !0;return !1}function Xo(o,h){for(var _=-1,y=Array(o);++_<o;)y[_]=h(_);return y}function Jo(o){return function(h){return o(h)}}function qo(o,h){return o.has(h)}function es(o,h){return o?.[h]}function ts(o){var h=-1,_=Array(o.size);return o.forEach(function(y,m){_[++h]=[m,y];}),_}function ns(o,h){return function(_){return o(h(_))}}function is(o){var h=-1,_=Array(o.size);return o.forEach(function(y){_[++h]=y;}),_}var rs=Array.prototype,os=Function.prototype,Gt=Object.prototype,wn=xe["__core-js_shared__"],Ji=os.toString,_e=Gt.hasOwnProperty,Ri=function(){var o=/[^.]+$/.exec(wn&&wn.keys&&wn.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),qi=Gt.toString,ss=RegExp("^"+Ji.call(_e).replace(jo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ii=Xi?xe.Buffer:void 0,Ht=xe.Symbol,Oi=xe.Uint8Array,er=Gt.propertyIsEnumerable,as=rs.splice,Be=Ht?Ht.toStringTag:void 0,Di=Object.getOwnPropertySymbols,ls=Ii?Ii.isBuffer:void 0,cs=ns(Object.keys,Object),$n=it(xe,"DataView"),dt=it(xe,"Map"),An=it(xe,"Promise"),Mn=it(xe,"Set"),Tn=it(xe,"WeakMap"),ft=it(Object,"create"),hs=Ue($n),us=Ue(dt),ds=Ue(An),fs=Ue(Mn),ps=Ue(Tn),Ni=Ht?Ht.prototype:void 0,bn=Ni?Ni.valueOf:void 0;function He(o){var h=-1,_=o==null?0:o.length;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function gs(){this.__data__=ft?ft(null):{},this.size=0;}function ms(o){var h=this.has(o)&&delete this.__data__[o];return this.size-=h?1:0,h}function vs(o){var h=this.__data__;if(ft){var _=h[o];return _===_n?void 0:_}return _e.call(h,o)?h[o]:void 0}function ys(o){var h=this.__data__;return ft?h[o]!==void 0:_e.call(h,o)}function ws(o,h){var _=this.__data__;return this.size+=this.has(o)?0:1,_[o]=ft&&h===void 0?_n:h,this}He.prototype.clear=gs;He.prototype.delete=ms;He.prototype.get=vs;He.prototype.has=ys;He.prototype.set=ws;function ke(o){var h=-1,_=o==null?0:o.length;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function bs(){this.__data__=[],this.size=0;}function Ss(o){var h=this.__data__,_=Vt(h,o);if(_<0)return !1;var y=h.length-1;return _==y?h.pop():as.call(h,_,1),--this.size,!0}function Cs(o){var h=this.__data__,_=Vt(h,o);return _<0?void 0:h[_][1]}function $s(o){return Vt(this.__data__,o)>-1}function As(o,h){var _=this.__data__,y=Vt(_,o);return y<0?(++this.size,_.push([o,h])):_[y][1]=h,this}ke.prototype.clear=bs;ke.prototype.delete=Ss;ke.prototype.get=Cs;ke.prototype.has=$s;ke.prototype.set=As;function ze(o){var h=-1,_=o==null?0:o.length;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function Ms(){this.size=0,this.__data__={hash:new He,map:new(dt||ke),string:new He};}function Ts(o){var h=Kt(this,o).delete(o);return this.size-=h?1:0,h}function Ls(o){return Kt(this,o).get(o)}function _s(o){return Kt(this,o).has(o)}function Es(o,h){var _=Kt(this,o),y=_.size;return _.set(o,h),this.size+=_.size==y?0:1,this}ze.prototype.clear=Ms;ze.prototype.delete=Ts;ze.prototype.get=Ls;ze.prototype.has=_s;ze.prototype.set=Es;function zt(o){var h=-1,_=o==null?0:o.length;for(this.__data__=new ze;++h<_;)this.add(o[h]);}function xs(o){return this.__data__.set(o,_n),this}function ks(o){return this.__data__.has(o)}zt.prototype.add=zt.prototype.push=xs;zt.prototype.has=ks;function Ne(o){var h=this.__data__=new ke(o);this.size=h.size;}function Rs(){this.__data__=new ke,this.size=0;}function Is(o){var h=this.__data__,_=h.delete(o);return this.size=h.size,_}function Os(o){return this.__data__.get(o)}function Ds(o){return this.__data__.has(o)}function Ns(o,h){var _=this.__data__;if(_ instanceof ke){var y=_.__data__;if(!dt||y.length<_o-1)return y.push([o,h]),this.size=++_.size,this;_=this.__data__=new ze(y);}return _.set(o,h),this.size=_.size,this}Ne.prototype.clear=Rs;Ne.prototype.delete=Is;Ne.prototype.get=Os;Ne.prototype.has=Ds;Ne.prototype.set=Ns;function Fs(o,h){var _=Ut(o),y=!_&&Js(o),m=!_&&!y&&Ln(o),f=!_&&!y&&!m&&ar(o),a=_||y||m||f,l=a?Xo(o.length,String):[],n=l.length;for(var e in o)(h||_e.call(o,e))&&!(a&&(e=="length"||m&&(e=="offset"||e=="parent")||f&&(e=="buffer"||e=="byteLength"||e=="byteOffset")||Ks(e,n)))&&l.push(e);return l}function Vt(o,h){for(var _=o.length;_--;)if(ir(o[_][0],h))return _;return -1}function Ps(o,h,_){var y=h(o);return Ut(o)?y:Qo(y,_(o))}function gt(o){return o==null?o===void 0?Oo:ko:Be&&Be in Object(o)?Gs(o):Xs(o)}function Fi(o){return pt(o)&&gt(o)==Ft}function tr(o,h,_,y,m){return o===h?!0:o==null||h==null||!pt(o)&&!pt(h)?o!==o&&h!==h:Ws(o,h,_,y,tr,m)}function Ws(o,h,_,y,m,f){var a=Ut(o),l=Ut(h),n=a?Sn:De(o),e=l?Sn:De(h);n=n==Ft?tt:n,e=e==Ft?tt:e;var t=n==tt,r=e==tt,i=n==e;if(i&&Ln(o)){if(!Ln(h))return !1;a=!0,t=!1;}if(i&&!t)return f||(f=new Ne),a||ar(o)?nr(o,h,_,y,m,f):Us(o,h,n,_,y,m,f);if(!(_&jt)){var s=t&&_e.call(o,"__wrapped__"),c=r&&_e.call(h,"__wrapped__");if(s||c){var p=s?o.value():o,C=c?h.value():h;return f||(f=new Ne),m(p,C,_,y,f)}}return i?(f||(f=new Ne),js(o,h,_,y,m,f)):!1}function Bs(o){if(!sr(o)||Qs(o))return !1;var h=rr(o)?ss:Go;return h.test(Ue(o))}function Hs(o){return pt(o)&&or(o.length)&&!!fe[gt(o)]}function zs(o){if(!Zs(o))return cs(o);var h=[];for(var _ in Object(o))_e.call(o,_)&&_!="constructor"&&h.push(_);return h}function nr(o,h,_,y,m,f){var a=_&jt,l=o.length,n=h.length;if(l!=n&&!(a&&n>l))return !1;var e=f.get(o);if(e&&f.get(h))return e==h;var t=-1,r=!0,i=_&Wi?new zt:void 0;for(f.set(o,h),f.set(h,o);++t<l;){var s=o[t],c=h[t];if(y)var p=a?y(c,s,t,h,o,f):y(s,c,t,o,h,f);if(p!==void 0){if(p)continue;r=!1;break}if(i){if(!Zo(h,function(C,E){if(!qo(i,E)&&(s===C||m(s,C,_,y,f)))return i.push(E)})){r=!1;break}}else if(!(s===c||m(s,c,_,y,f))){r=!1;break}}return f.delete(o),f.delete(h),r}function Us(o,h,_,y,m,f,a){switch(_){case Bt:if(o.byteLength!=h.byteLength||o.byteOffset!=h.byteOffset)return !1;o=o.buffer,h=h.buffer;case Yi:return !(o.byteLength!=h.byteLength||!f(new Oi(o),new Oi(h)));case Hi:case zi:case Gi:return ir(+o,+h);case Ui:return o.name==h.name&&o.message==h.message;case Vi:case Ki:return o==h+"";case Pt:var l=ts;case Wt:var n=y&jt;if(l||(l=is),o.size!=h.size&&!n)return !1;var e=a.get(o);if(e)return e==h;y|=Wi,a.set(o,h);var t=nr(l(o),l(h),y,m,f,a);return a.delete(o),t;case Io:if(bn)return bn.call(o)==bn.call(h)}return !1}function js(o,h,_,y,m,f){var a=_&jt,l=Pi(o),n=l.length,e=Pi(h),t=e.length;if(n!=t&&!a)return !1;for(var r=n;r--;){var i=l[r];if(!(a?i in h:_e.call(h,i)))return !1}var s=f.get(o);if(s&&f.get(h))return s==h;var c=!0;f.set(o,h),f.set(h,o);for(var p=a;++r<n;){i=l[r];var C=o[i],E=h[i];if(y)var S=a?y(E,C,i,h,o,f):y(C,E,i,o,h,f);if(!(S===void 0?C===E||m(C,E,_,y,f):S)){c=!1;break}p||(p=i=="constructor");}if(c&&!p){var M=o.constructor,g=h.constructor;M!=g&&"constructor"in o&&"constructor"in h&&!(typeof M=="function"&&M instanceof M&&typeof g=="function"&&g instanceof g)&&(c=!1);}return f.delete(o),f.delete(h),c}function Pi(o){return Ps(o,ta,Vs)}function Kt(o,h){var _=o.__data__;return Ys(h)?_[typeof h=="string"?"string":"hash"]:_.map}function it(o,h){var _=es(o,h);return Bs(_)?_:void 0}function Gs(o){var h=_e.call(o,Be),_=o[Be];try{o[Be]=void 0;var y=!0;}catch{}var m=qi.call(o);return y&&(h?o[Be]=_:delete o[Be]),m}var Vs=Di?function(o){return o==null?[]:(o=Object(o),Yo(Di(o),function(h){return er.call(o,h)}))}:na,De=gt;($n&&De(new $n(new ArrayBuffer(1)))!=Bt||dt&&De(new dt)!=Pt||An&&De(An.resolve())!=_i||Mn&&De(new Mn)!=Wt||Tn&&De(new Tn)!=Cn)&&(De=function(o){var h=gt(o),_=h==tt?o.constructor:void 0,y=_?Ue(_):"";if(y)switch(y){case hs:return Bt;case us:return Pt;case ds:return _i;case fs:return Wt;case ps:return Cn}return h});function Ks(o,h){return h=h??Bi,!!h&&(typeof o=="number"||Vo.test(o))&&o>-1&&o%1==0&&o<h}function Ys(o){var h=typeof o;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?o!=="__proto__":o===null}function Qs(o){return !!Ri&&Ri in o}function Zs(o){var h=o&&o.constructor,_=typeof h=="function"&&h.prototype||Gt;return o===_}function Xs(o){return qi.call(o)}function Ue(o){if(o!=null){try{return Ji.call(o)}catch{}try{return o+""}catch{}}return ""}function ir(o,h){return o===h||o!==o&&h!==h}var Js=Fi(function(){return arguments}())?Fi:function(o){return pt(o)&&_e.call(o,"callee")&&!er.call(o,"callee")},Ut=Array.isArray;function qs(o){return o!=null&&or(o.length)&&!rr(o)}var Ln=ls||ia;function ea(o,h){return tr(o,h)}function rr(o){if(!sr(o))return !1;var h=gt(o);return h==ji||h==xo||h==Eo||h==Ro}function or(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Bi}function sr(o){var h=typeof o;return o!=null&&(h=="object"||h=="function")}function pt(o){return o!=null&&typeof o=="object"}var ar=ki?Jo(ki):Hs;function ta(o){return qs(o)?Fs(o):zs(o)}function na(){return []}function ia(){return !1}nt.exports=ea;});var xn=b(Ee=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getAceInstance=Ee.debounce=Ee.editorEvents=Ee.editorOptions=void 0;var ra=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Ee.editorOptions=ra;var oa=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Ee.editorEvents=oa;var sa=function(){var o;return typeof window>"u"?(global.window={},o=ht(),delete global.window):window.ace?(o=window.ace,o.acequire=window.ace.require||window.ace.acequire):o=ht(),o};Ee.getAceInstance=sa;var aa=function(o,h){var _=null;return function(){var y=this,m=arguments;clearTimeout(_),_=setTimeout(function(){o.apply(y,m);},h);}};Ee.debounce=aa;});var hr=b(je=>{var la=je&&je.__extends||function(){var o=function(h,_){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m;}||function(y,m){for(var f in m)Object.prototype.hasOwnProperty.call(m,f)&&(y[f]=m[f]);},o(h,_)};return function(h,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");o(h,_);function y(){this.constructor=h;}h.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y);}}(),kn=je&&je.__assign||function(){return kn=Object.assign||function(o){for(var h,_=1,y=arguments.length;_<y;_++){h=arguments[_];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(o[m]=h[m]);}return o},kn.apply(this,arguments)};Object.defineProperty(je,"__esModule",{value:!0});var ca=ht(),X=Nt(),lr=a("react"),Yt=En(),rt=xn(),cr=(0, rt.getAceInstance)(),ha=function(o){la(h,o);function h(_){var y=o.call(this,_)||this;return rt.editorEvents.forEach(function(m){y[m]=y[m].bind(y);}),y.debounce=rt.debounce,y}return h.prototype.isInShadow=function(_){for(var y=_&&_.parentNode;y;){if(y.toString()==="[object ShadowRoot]")return !0;y=y.parentNode;}return !1},h.prototype.componentDidMount=function(){var _=this,y=this.props,m=y.className,f=y.onBeforeLoad,a=y.onValidate,l=y.mode,n=y.focus,e=y.theme,t=y.fontSize,r=y.lineHeight,i=y.value,s=y.defaultValue,c=y.showGutter,p=y.wrapEnabled,C=y.showPrintMargin,E=y.scrollMargin,S=E===void 0?[0,0,0,0]:E,M=y.keyboardHandler,g=y.onLoad,d=y.commands,A=y.annotations,L=y.markers,$=y.placeholder;this.editor=cr.edit(this.refEditor),f&&f(cr);for(var T=Object.keys(this.props.editorProps),w=0;w<T.length;w++)this.editor[T[w]]=this.props.editorProps[T[w]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(S[0],S[1],S[2],S[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof l=="string"?"ace/mode/".concat(l):l),e&&e!==""&&this.editor.setTheme("ace/theme/".concat(e)),this.editor.setFontSize(typeof t=="number"?"".concat(t,"px"):t),r&&(this.editor.container.style.lineHeight=typeof r=="number"?"".concat(r,"px"):"".concat(r),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(s||i||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(c),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(C),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),$&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),a&&this.editor.getSession().on("changeAnnotation",function(){var u=_.editor.getSession().getAnnotations();_.props.onValidate(u);}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(A||[]),L&&L.length>0&&this.handleMarkers(L);var b=this.editor.$options;rt.editorOptions.forEach(function(u){b.hasOwnProperty(u)?_.editor.setOption(u,_.props[u]):_.props[u]&&console.warn("ReactAce: editor option ".concat(u," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"));}),this.handleOptions(this.props),Array.isArray(d)&&d.forEach(function(u){typeof u.exec=="string"?_.editor.commands.bindKey(u.bindKey,u.exec):_.editor.commands.addCommand(u);}),M&&this.editor.setKeyboardHandler("ace/keyboard/"+M),m&&(this.refEditor.className+=" "+m),g&&g(this.editor),this.editor.resize(),n&&this.editor.focus();},h.prototype.componentDidUpdate=function(_){for(var y=_,m=this.props,f=0;f<rt.editorOptions.length;f++){var a=rt.editorOptions[f];m[a]!==y[a]&&this.editor.setOption(a,m[a]);}if(m.className!==y.className){var l=this.refEditor.className,n=l.trim().split(" "),e=y.className.trim().split(" ");e.forEach(function(i){var s=n.indexOf(i);n.splice(s,1);}),this.refEditor.className=" "+m.className+" "+n.join(" ");}var t=this.editor&&m.value!=null&&this.editor.getValue()!==m.value;if(t){this.silent=!0;var r=this.editor.session.selection.toJSON();this.editor.setValue(m.value,m.cursorStart),this.editor.session.selection.fromJSON(r),this.silent=!1;}m.placeholder!==y.placeholder&&this.updatePlaceholder(),m.mode!==y.mode&&this.editor.getSession().setMode(typeof m.mode=="string"?"ace/mode/".concat(m.mode):m.mode),m.theme!==y.theme&&this.editor.setTheme("ace/theme/"+m.theme),m.keyboardHandler!==y.keyboardHandler&&(m.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+m.keyboardHandler):this.editor.setKeyboardHandler(null)),m.fontSize!==y.fontSize&&this.editor.setFontSize(typeof m.fontSize=="number"?"".concat(m.fontSize,"px"):m.fontSize),m.lineHeight!==y.lineHeight&&(this.editor.container.style.lineHeight=typeof m.lineHeight=="number"?"".concat(m.lineHeight,"px"):m.lineHeight,this.editor.renderer.updateFontSize()),m.wrapEnabled!==y.wrapEnabled&&this.editor.getSession().setUseWrapMode(m.wrapEnabled),m.showPrintMargin!==y.showPrintMargin&&this.editor.setShowPrintMargin(m.showPrintMargin),m.showGutter!==y.showGutter&&this.editor.renderer.setShowGutter(m.showGutter),Yt(m.setOptions,y.setOptions)||this.handleOptions(m),(t||!Yt(m.annotations,y.annotations))&&this.editor.getSession().setAnnotations(m.annotations||[]),!Yt(m.markers,y.markers)&&Array.isArray(m.markers)&&this.handleMarkers(m.markers),Yt(m.scrollMargin,y.scrollMargin)||this.handleScrollMargins(m.scrollMargin),(_.height!==this.props.height||_.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!_.focus&&this.editor.focus();},h.prototype.handleScrollMargins=function(_){_===void 0&&(_=[0,0,0,0]),this.editor.renderer.setScrollMargin(_[0],_[1],_[2],_[3]);},h.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null);},h.prototype.onChange=function(_){if(this.editor&&this.props.onChange&&!this.silent){var y=this.editor.getValue();this.props.onChange(y,_);}},h.prototype.onSelectionChange=function(_){if(this.props.onSelectionChange){var y=this.editor.getSelection();this.props.onSelectionChange(y,_);}},h.prototype.onCursorChange=function(_){if(this.props.onCursorChange){var y=this.editor.getSelection();this.props.onCursorChange(y,_);}},h.prototype.onInput=function(_){this.props.onInput&&this.props.onInput(_),this.props.placeholder&&this.updatePlaceholder();},h.prototype.onFocus=function(_){this.props.onFocus&&this.props.onFocus(_,this.editor);},h.prototype.onBlur=function(_){this.props.onBlur&&this.props.onBlur(_,this.editor);},h.prototype.onCopy=function(_){var y=_.text;this.props.onCopy&&this.props.onCopy(y);},h.prototype.onPaste=function(_){var y=_.text;this.props.onPaste&&this.props.onPaste(y);},h.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor);},h.prototype.handleOptions=function(_){for(var y=Object.keys(_.setOptions),m=0;m<y.length;m++)this.editor.setOption(y[m],_.setOptions[y[m]]);},h.prototype.handleMarkers=function(_){var y=this,m=this.editor.getSession().getMarkers(!0);for(var f in m)m.hasOwnProperty(f)&&this.editor.getSession().removeMarker(m[f].id);m=this.editor.getSession().getMarkers(!1);for(var f in m)m.hasOwnProperty(f)&&m[f].clazz!=="ace_active-line"&&m[f].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(m[f].id);_.forEach(function(a){var l=a.startRow,n=a.startCol,e=a.endRow,t=a.endCol,r=a.className,i=a.type,s=a.inFront,c=s===void 0?!1:s,p=new ca.Range(l,n,e,t);y.editor.getSession().addMarker(p,r,i,c);});},h.prototype.updatePlaceholder=function(){var _=this.editor,y=this.props.placeholder,m=!_.session.getValue().length,f=_.renderer.placeholderNode;!m&&f?(_.renderer.scroller.removeChild(_.renderer.placeholderNode),_.renderer.placeholderNode=null):m&&!f?(f=_.renderer.placeholderNode=document.createElement("div"),f.textContent=y||"",f.className="ace_comment ace_placeholder",f.style.padding="0 9px",f.style.position="absolute",f.style.zIndex="3",_.renderer.scroller.appendChild(f)):m&&f&&(f.textContent=y);},h.prototype.updateRef=function(_){this.refEditor=_;},h.prototype.render=function(){var _=this.props,y=_.name,m=_.width,f=_.height,a=_.style,l=kn({width:m,height:f},a);return lr.createElement("div",{ref:this.updateRef,id:y,style:l})},h.propTypes={mode:X.oneOfType([X.string,X.object]),focus:X.bool,theme:X.string,name:X.string,className:X.string,height:X.string,width:X.string,fontSize:X.oneOfType([X.number,X.string]),lineHeight:X.oneOfType([X.number,X.string]),showGutter:X.bool,onChange:X.func,onCopy:X.func,onPaste:X.func,onFocus:X.func,onInput:X.func,onBlur:X.func,onScroll:X.func,value:X.string,defaultValue:X.string,onLoad:X.func,onSelectionChange:X.func,onCursorChange:X.func,onBeforeLoad:X.func,onValidate:X.func,minLines:X.number,maxLines:X.number,readOnly:X.bool,highlightActiveLine:X.bool,tabSize:X.number,showPrintMargin:X.bool,cursorStart:X.number,debounceChangePeriod:X.number,editorProps:X.object,setOptions:X.object,style:X.object,scrollMargin:X.array,annotations:X.array,markers:X.array,keyboardHandler:X.string,wrapEnabled:X.bool,enableSnippets:X.bool,enableBasicAutocompletion:X.oneOfType([X.bool,X.array]),enableLiveAutocompletion:X.oneOfType([X.bool,X.array]),navigateToFileEnd:X.bool,commands:X.array,placeholder:X.string},h.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},h}(lr.Component);je.default=ha;});var dr=b((ur,Qt)=>{ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(o,h,_){var y=o("./lib/oop");o("./lib/lang");var f=o("./lib/event_emitter").EventEmitter,a=o("./editor").Editor,l=o("./virtual_renderer").VirtualRenderer,n=o("./edit_session").EditSession,e;e=function(t,r,i){this.BELOW=1,this.BESIDE=0,this.$container=t,this.$theme=r,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(i||1),this.$cEditor=this.$editors[0],this.on("focus",function(s){this.$cEditor=s;}.bind(this));},function(){y.implement(this,f),this.$createEditor=function(){var t=document.createElement("div");t.className=this.$editorCSS,t.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(t);var r=new a(new l(t,this.$theme));return r.on("focus",function(){this._emit("focus",r);}.bind(this)),this.$editors.push(r),r.setFontSize(this.$fontSize),r},this.setSplits=function(t){var r;if(t<1)throw "The number of splits have to be > 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<t;)r=this.$editors[this.$splits],this.$container.appendChild(r.container),r.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<t;)this.$createEditor(),this.$splits++;}else for(;this.$splits>t;)r=this.$editors[this.$splits-1],this.$container.removeChild(r.container),this.$splits--;this.resize();}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus();},this.blur=function(){this.$cEditor.blur();},this.setTheme=function(t){this.$editors.forEach(function(r){r.setTheme(t);});},this.setKeyboardHandler=function(t){this.$editors.forEach(function(r){r.setKeyboardHandler(t);});},this.forEach=function(t,r){this.$editors.forEach(t,r);},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(r){r.setFontSize(t);});},this.$cloneSession=function(t){var r=new n(t.getDocument(),t.getMode()),i=t.getUndoManager();return r.setUndoManager(i),r.setTabSize(t.getTabSize()),r.setUseSoftTabs(t.getUseSoftTabs()),r.setOverwrite(t.getOverwrite()),r.setBreakpoints(t.getBreakpoints()),r.setUseWrapMode(t.getUseWrapMode()),r.setUseWorker(t.getUseWorker()),r.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),r.$foldData=t.$cloneFoldData(),r},this.setSession=function(t,r){var i;r==null?i=this.$cEditor:i=this.$editors[r];var s=this.$editors.some(function(c){return c.session===t});return s&&(t=this.$cloneSession(t)),i.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize());},this.resize=function(){var t=this.$container.clientWidth,r=this.$container.clientHeight,i;if(this.$orientation==this.BESIDE)for(var s=t/this.$splits,c=0;c<this.$splits;c++)i=this.$editors[c],i.container.style.width=s+"px",i.container.style.top="0px",i.container.style.left=c*s+"px",i.container.style.height=r+"px",i.resize();else for(var p=r/this.$splits,c=0;c<this.$splits;c++)i=this.$editors[c],i.container.style.width=t+"px",i.container.style.top=c*p+"px",i.container.style.left="0px",i.container.style.height=p+"px",i.resize();};}.call(e.prototype),h.Split=e;});ace.define("ace/ext/split",["require","exports","module","ace/split"],function(o,h,_){_.exports=o("../split");});(function(){ace.require(["ace/ext/split"],function(o){typeof Qt=="object"&&typeof ur=="object"&&Qt&&(Qt.exports=o);});})();});var Tr=b((zc,Mr)=>{var ua="Expected a function",vr="__lodash_hash_undefined__",yr=1/0,da="[object Function]",fa="[object GeneratorFunction]",pa="[object Symbol]",ga=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ma=/^\w*$/,va=/^\./,ya=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wa=/[\\^$.*+?()[\]{}|]/g,ba=/\\(\\)?/g,Sa=/^\[object .+?Constructor\]$/,Ca=typeof global=="object"&&global&&global.Object===Object&&global,$a=typeof self=="object"&&self&&self.Object===Object&&self,In=Ca||$a||Function("return this")();function Aa(o,h){return o?.[h]}function Ma(o){var h=!1;if(o!=null&&typeof o.toString!="function")try{h=!!(o+"");}catch{}return h}var Ta=Array.prototype,La=Function.prototype,wr=Object.prototype,Rn=In["__core-js_shared__"],fr=function(){var o=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),br=La.toString,On=wr.hasOwnProperty,Sr=wr.toString,_a=RegExp("^"+br.call(On).replace(wa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pr=In.Symbol,Ea=Ta.splice,xa=Cr(In,"Map"),mt=Cr(Object,"create"),gr=pr?pr.prototype:void 0,mr=gr?gr.toString:void 0;function Ge(o){var h=-1,_=o?o.length:0;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function ka(){this.__data__=mt?mt(null):{};}function Ra(o){return this.has(o)&&delete this.__data__[o]}function Ia(o){var h=this.__data__;if(mt){var _=h[o];return _===vr?void 0:_}return On.call(h,o)?h[o]:void 0}function Oa(o){var h=this.__data__;return mt?h[o]!==void 0:On.call(h,o)}function Da(o,h){var _=this.__data__;return _[o]=mt&&h===void 0?vr:h,this}Ge.prototype.clear=ka;Ge.prototype.delete=Ra;Ge.prototype.get=Ia;Ge.prototype.has=Oa;Ge.prototype.set=Da;function ot(o){var h=-1,_=o?o.length:0;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function Na(){this.__data__=[];}function Fa(o){var h=this.__data__,_=Zt(h,o);if(_<0)return !1;var y=h.length-1;return _==y?h.pop():Ea.call(h,_,1),!0}function Pa(o){var h=this.__data__,_=Zt(h,o);return _<0?void 0:h[_][1]}function Wa(o){return Zt(this.__data__,o)>-1}function Ba(o,h){var _=this.__data__,y=Zt(_,o);return y<0?_.push([o,h]):_[y][1]=h,this}ot.prototype.clear=Na;ot.prototype.delete=Fa;ot.prototype.get=Pa;ot.prototype.has=Wa;ot.prototype.set=Ba;function Ve(o){var h=-1,_=o?o.length:0;for(this.clear();++h<_;){var y=o[h];this.set(y[0],y[1]);}}function Ha(){this.__data__={hash:new Ge,map:new(xa||ot),string:new Ge};}function za(o){return Xt(this,o).delete(o)}function Ua(o){return Xt(this,o).get(o)}function ja(o){return Xt(this,o).has(o)}function Ga(o,h){return Xt(this,o).set(o,h),this}Ve.prototype.clear=Ha;Ve.prototype.delete=za;Ve.prototype.get=Ua;Ve.prototype.has=ja;Ve.prototype.set=Ga;function Zt(o,h){for(var _=o.length;_--;)if(nl(o[_][0],h))return _;return -1}function Va(o,h){h=Za(h,o)?[h]:Qa(h);for(var _=0,y=h.length;o!=null&&_<y;)o=o[el(h[_++])];return _&&_==y?o:void 0}function Ka(o){if(!Ar(o)||Ja(o))return !1;var h=il(o)||Ma(o)?_a:Sa;return h.test(tl(o))}function Ya(o){if(typeof o=="string")return o;if(Nn(o))return mr?mr.call(o):"";var h=o+"";return h=="0"&&1/o==-yr?"-0":h}function Qa(o){return $r(o)?o:qa(o)}function Xt(o,h){var _=o.__data__;return Xa(h)?_[typeof h=="string"?"string":"hash"]:_.map}function Cr(o,h){var _=Aa(o,h);return Ka(_)?_:void 0}function Za(o,h){if($r(o))return !1;var _=typeof o;return _=="number"||_=="symbol"||_=="boolean"||o==null||Nn(o)?!0:ma.test(o)||!ga.test(o)||h!=null&&o in Object(h)}function Xa(o){var h=typeof o;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?o!=="__proto__":o===null}function Ja(o){return !!fr&&fr in o}var qa=Dn(function(o){o=ol(o);var h=[];return va.test(o)&&h.push(""),o.replace(ya,function(_,y,m,f){h.push(m?f.replace(ba,"$1"):y||_);}),h});function el(o){if(typeof o=="string"||Nn(o))return o;var h=o+"";return h=="0"&&1/o==-yr?"-0":h}function tl(o){if(o!=null){try{return br.call(o)}catch{}try{return o+""}catch{}}return ""}function Dn(o,h){if(typeof o!="function"||h&&typeof h!="function")throw new TypeError(ua);var _=function(){var y=arguments,m=h?h.apply(this,y):y[0],f=_.cache;if(f.has(m))return f.get(m);var a=o.apply(this,y);return _.cache=f.set(m,a),a};return _.cache=new(Dn.Cache||Ve),_}Dn.Cache=Ve;function nl(o,h){return o===h||o!==o&&h!==h}var $r=Array.isArray;function il(o){var h=Ar(o)?Sr.call(o):"";return h==da||h==fa}function Ar(o){var h=typeof o;return !!o&&(h=="object"||h=="function")}function rl(o){return !!o&&typeof o=="object"}function Nn(o){return typeof o=="symbol"||rl(o)&&Sr.call(o)==pa}function ol(o){return o==null?"":Ya(o)}function sl(o,h,_){var y=o==null?void 0:Va(o,h);return y===void 0?_:y}Mr.exports=sl;});var Bn=b(Ye=>{var al=Ye&&Ye.__extends||function(){var o=function(h,_){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m;}||function(y,m){for(var f in m)Object.prototype.hasOwnProperty.call(m,f)&&(y[f]=m[f]);},o(h,_)};return function(h,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");o(h,_);function y(){this.constructor=h;}h.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y);}}(),Wn=Ye&&Ye.__assign||function(){return Wn=Object.assign||function(o){for(var h,_=1,y=arguments.length;_<y;_++){h=arguments[_];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(o[m]=h[m]);}return o},Wn.apply(this,arguments)};Object.defineProperty(Ye,"__esModule",{value:!0});var Ke=xn(),Fn=(0, Ke.getAceInstance)(),ll=ht(),cl=dr(),q=Nt(),Lr=a("react"),Pn=En(),Re=Tr(),hl=function(o){al(h,o);function h(_){var y=o.call(this,_)||this;return Ke.editorEvents.forEach(function(m){y[m]=y[m].bind(y);}),y.debounce=Ke.debounce,y}return h.prototype.isInShadow=function(_){for(var y=_&&_.parentNode;y;){if(y.toString()==="[object ShadowRoot]")return !0;y=y.parentNode;}return !1},h.prototype.componentDidMount=function(){var _=this,y=this.props,m=y.className,f=y.onBeforeLoad,a=y.mode,l=y.focus,n=y.theme,e=y.fontSize,t=y.value,r=y.defaultValue,i=y.cursorStart,s=y.showGutter,c=y.wrapEnabled,p=y.showPrintMargin,C=y.scrollMargin,E=C===void 0?[0,0,0,0]:C,S=y.keyboardHandler,M=y.onLoad,g=y.commands,d=y.annotations,A=y.markers,L=y.splits;this.editor=Fn.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(n)),f&&f(Fn);var $=Object.keys(this.props.editorProps),T=new cl.Split(this.editor.container,"ace/theme/".concat(n),L);this.editor.env.split=T,this.splitEditor=T.getEditor(0),this.split=T,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var w=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),T.forEach(function(u,v){for(var x=0;x<$.length;x++)u[$[x]]=_.props.editorProps[$[x]];var k=Re(r,v),R=Re(t,v,"");u.session.setUndoManager(new Fn.UndoManager),u.setTheme("ace/theme/".concat(n)),u.renderer.setScrollMargin(E[0],E[1],E[2],E[3]),u.getSession().setMode("ace/mode/".concat(a)),u.setFontSize(e),u.renderer.setShowGutter(s),u.getSession().setUseWrapMode(c),u.setShowPrintMargin(p),u.on("focus",_.onFocus),u.on("blur",_.onBlur),u.on("input",_.onInput),u.on("copy",_.onCopy),u.on("paste",_.onPaste),u.on("change",_.onChange),u.getSession().selection.on("changeSelection",_.onSelectionChange),u.getSession().selection.on("changeCursor",_.onCursorChange),u.session.on("changeScrollTop",_.onScroll),u.setValue(k===void 0?R:k,i);var I=Re(d,v,[]),D=Re(A,v,[]);u.getSession().setAnnotations(I),D&&D.length>0&&_.handleMarkers(D,u);for(var x=0;x<Ke.editorOptions.length;x++){var O=Ke.editorOptions[x];w.hasOwnProperty(O)?u.setOption(O,_.props[O]):_.props[O]&&console.warn("ReaceAce: editor option ".concat(O," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"));}_.handleOptions(_.props,u),Array.isArray(g)&&g.forEach(function(F){typeof F.exec=="string"?u.commands.bindKey(F.bindKey,F.exec):u.commands.addCommand(F);}),S&&u.setKeyboardHandler("ace/keyboard/"+S);}),m&&(this.refEditor.className+=" "+m),l&&this.splitEditor.focus();var b=this.editor.env.split;b.setOrientation(this.props.orientation==="below"?b.BELOW:b.BESIDE),b.resize(!0),M&&M(b);},h.prototype.componentDidUpdate=function(_){var y=this,m=_,f=this.props,a=this.editor.env.split;if(f.splits!==m.splits&&a.setSplits(f.splits),f.orientation!==m.orientation&&a.setOrientation(f.orientation==="below"?a.BELOW:a.BESIDE),a.forEach(function(t,r){f.mode!==m.mode&&t.getSession().setMode("ace/mode/"+f.mode),f.keyboardHandler!==m.keyboardHandler&&(f.keyboardHandler?t.setKeyboardHandler("ace/keyboard/"+f.keyboardHandler):t.setKeyboardHandler(null)),f.fontSize!==m.fontSize&&t.setFontSize(f.fontSize),f.wrapEnabled!==m.wrapEnabled&&t.getSession().setUseWrapMode(f.wrapEnabled),f.showPrintMargin!==m.showPrintMargin&&t.setShowPrintMargin(f.showPrintMargin),f.showGutter!==m.showGutter&&t.renderer.setShowGutter(f.showGutter);for(var i=0;i<Ke.editorOptions.length;i++){var s=Ke.editorOptions[i];f[s]!==m[s]&&t.setOption(s,f[s]);}Pn(f.setOptions,m.setOptions)||y.handleOptions(f,t);var c=Re(f.value,r,"");if(t.getValue()!==c){y.silent=!0;var p=t.session.selection.toJSON();t.setValue(c,f.cursorStart),t.session.selection.fromJSON(p),y.silent=!1;}var C=Re(f.annotations,r,[]),E=Re(m.annotations,r,[]);Pn(C,E)||t.getSession().setAnnotations(C);var S=Re(f.markers,r,[]),M=Re(m.markers,r,[]);!Pn(S,M)&&Array.isArray(S)&&y.handleMarkers(S,t);}),f.className!==m.className){var l=this.refEditor.className,n=l.trim().split(" "),e=m.className.trim().split(" ");e.forEach(function(t){var r=n.indexOf(t);n.splice(r,1);}),this.refEditor.className=" "+f.className+" "+n.join(" ");}f.theme!==m.theme&&a.setTheme("ace/theme/"+f.theme),f.focus&&!m.focus&&this.splitEditor.focus(),(f.height!==this.props.height||f.width!==this.props.width)&&this.editor.resize();},h.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null;},h.prototype.onChange=function(_){if(this.props.onChange&&!this.silent){var y=[];this.editor.env.split.forEach(function(m){y.push(m.getValue());}),this.props.onChange(y,_);}},h.prototype.onSelectionChange=function(_){if(this.props.onSelectionChange){var y=[];this.editor.env.split.forEach(function(m){y.push(m.getSelection());}),this.props.onSelectionChange(y,_);}},h.prototype.onCursorChange=function(_){if(this.props.onCursorChange){var y=[];this.editor.env.split.forEach(function(m){y.push(m.getSelection());}),this.props.onCursorChange(y,_);}},h.prototype.onFocus=function(_){this.props.onFocus&&this.props.onFocus(_);},h.prototype.onInput=function(_){this.props.onInput&&this.props.onInput(_);},h.prototype.onBlur=function(_){this.props.onBlur&&this.props.onBlur(_);},h.prototype.onCopy=function(_){this.props.onCopy&&this.props.onCopy(_);},h.prototype.onPaste=function(_){this.props.onPaste&&this.props.onPaste(_);},h.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor);},h.prototype.handleOptions=function(_,y){for(var m=Object.keys(_.setOptions),f=0;f<m.length;f++)y.setOption(m[f],_.setOptions[m[f]]);},h.prototype.handleMarkers=function(_,y){var m=y.getSession().getMarkers(!0);for(var f in m)m.hasOwnProperty(f)&&y.getSession().removeMarker(m[f].id);m=y.getSession().getMarkers(!1);for(var f in m)m.hasOwnProperty(f)&&y.getSession().removeMarker(m[f].id);_.forEach(function(a){var l=a.startRow,n=a.startCol,e=a.endRow,t=a.endCol,r=a.className,i=a.type,s=a.inFront,c=s===void 0?!1:s,p=new ll.Range(l,n,e,t);y.getSession().addMarker(p,r,i,c);});},h.prototype.updateRef=function(_){this.refEditor=_;},h.prototype.render=function(){var _=this.props,y=_.name,m=_.width,f=_.height,a=_.style,l=Wn({width:m,height:f},a);return Lr.createElement("div",{ref:this.updateRef,id:y,style:l})},h.propTypes={className:q.string,debounceChangePeriod:q.number,defaultValue:q.arrayOf(q.string),focus:q.bool,fontSize:q.oneOfType([q.number,q.string]),height:q.string,mode:q.string,name:q.string,onBlur:q.func,onChange:q.func,onCopy:q.func,onFocus:q.func,onInput:q.func,onLoad:q.func,onPaste:q.func,onScroll:q.func,orientation:q.string,showGutter:q.bool,splits:q.number,theme:q.string,value:q.arrayOf(q.string),width:q.string,onSelectionChange:q.func,onCursorChange:q.func,onBeforeLoad:q.func,minLines:q.number,maxLines:q.number,readOnly:q.bool,highlightActiveLine:q.bool,tabSize:q.number,showPrintMargin:q.bool,cursorStart:q.number,editorProps:q.object,setOptions:q.object,style:q.object,scrollMargin:q.array,annotations:q.array,markers:q.array,keyboardHandler:q.string,wrapEnabled:q.bool,enableBasicAutocompletion:q.oneOfType([q.bool,q.array]),enableLiveAutocompletion:q.oneOfType([q.bool,q.array]),commands:q.array},h.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},h}(Lr.Component);Ye.default=hl;});var _r=b((jc,st)=>{var j=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32;},ue=-1,de=1,te=0;j.Diff=function(o,h){return [o,h]};j.prototype.diff_main=function(o,h,_,y){typeof y>"u"&&(this.Diff_Timeout<=0?y=Number.MAX_VALUE:y=new Date().getTime()+this.Diff_Timeout*1e3);var m=y;if(o==null||h==null)throw new Error("Null input. (diff_main)");if(o==h)return o?[new j.Diff(te,o)]:[];typeof _>"u"&&(_=!0);var f=_,a=this.diff_commonPrefix(o,h),l=o.substring(0,a);o=o.substring(a),h=h.substring(a),a=this.diff_commonSuffix(o,h);var n=o.substring(o.length-a);o=o.substring(0,o.length-a),h=h.substring(0,h.length-a);var e=this.diff_compute_(o,h,f,m);return l&&e.unshift(new j.Diff(te,l)),n&&e.push(new j.Diff(te,n)),this.diff_cleanupMerge(e),e};j.prototype.diff_compute_=function(o,h,_,y){var m;if(!o)return [new j.Diff(de,h)];if(!h)return [new j.Diff(ue,o)];var f=o.length>h.length?o:h,a=o.length>h.length?h:o,l=f.indexOf(a);if(l!=-1)return m=[new j.Diff(de,f.substring(0,l)),new j.Diff(te,a),new j.Diff(de,f.substring(l+a.length))],o.length>h.length&&(m[0][0]=m[2][0]=ue),m;if(a.length==1)return [new j.Diff(ue,o),new j.Diff(de,h)];var n=this.diff_halfMatch_(o,h);if(n){var e=n[0],t=n[1],r=n[2],i=n[3],s=n[4],c=this.diff_main(e,r,_,y),p=this.diff_main(t,i,_,y);return c.concat([new j.Diff(te,s)],p)}return _&&o.length>100&&h.length>100?this.diff_lineMode_(o,h,y):this.diff_bisect_(o,h,y)};j.prototype.diff_lineMode_=function(o,h,_){var y=this.diff_linesToChars_(o,h);o=y.chars1,h=y.chars2;var m=y.lineArray,f=this.diff_main(o,h,!1,_);this.diff_charsToLines_(f,m),this.diff_cleanupSemantic(f),f.push(new j.Diff(te,""));for(var a=0,l=0,n=0,e="",t="";a<f.length;){switch(f[a][0]){case de:n++,t+=f[a][1];break;case ue:l++,e+=f[a][1];break;case te:if(l>=1&&n>=1){f.splice(a-l-n,l+n),a=a-l-n;for(var r=this.diff_main(e,t,!1,_),i=r.length-1;i>=0;i--)f.splice(a,0,r[i]);a=a+r.length;}n=0,l=0,e="",t="";break}a++;}return f.pop(),f};j.prototype.diff_bisect_=function(o,h,_){for(var y=o.length,m=h.length,f=Math.ceil((y+m)/2),a=f,l=2*f,n=new Array(l),e=new Array(l),t=0;t<l;t++)n[t]=-1,e[t]=-1;n[a+1]=0,e[a+1]=0;for(var r=y-m,i=r%2!=0,s=0,c=0,p=0,C=0,E=0;E<f&&!(new Date().getTime()>_);E++){for(var S=-E+s;S<=E-c;S+=2){var M=a+S,g;S==-E||S!=E&&n[M-1]<n[M+1]?g=n[M+1]:g=n[M-1]+1;for(var d=g-S;g<y&&d<m&&o.charAt(g)==h.charAt(d);)g++,d++;if(n[M]=g,g>y)c+=2;else if(d>m)s+=2;else if(i){var A=a+r-S;if(A>=0&&A<l&&e[A]!=-1){var L=y-e[A];if(g>=L)return this.diff_bisectSplit_(o,h,g,d,_)}}}for(var $=-E+p;$<=E-C;$+=2){var A=a+$,L;$==-E||$!=E&&e[A-1]<e[A+1]?L=e[A+1]:L=e[A-1]+1;for(var T=L-$;L<y&&T<m&&o.charAt(y-L-1)==h.charAt(m-T-1);)L++,T++;if(e[A]=L,L>y)C+=2;else if(T>m)p+=2;else if(!i){var M=a+r-$;if(M>=0&&M<l&&n[M]!=-1){var g=n[M],d=a+g-M;if(L=y-L,g>=L)return this.diff_bisectSplit_(o,h,g,d,_)}}}}return [new j.Diff(ue,o),new j.Diff(de,h)]};j.prototype.diff_bisectSplit_=function(o,h,_,y,m){var f=o.substring(0,_),a=h.substring(0,y),l=o.substring(_),n=h.substring(y),e=this.diff_main(f,a,!1,m),t=this.diff_main(l,n,!1,m);return e.concat(t)};j.prototype.diff_linesToChars_=function(o,h){var _=[],y={};_[0]="";function m(n){for(var e="",t=0,r=-1,i=_.length;r<n.length-1;){r=n.indexOf(`
991
+ `,t),r==-1&&(r=n.length-1);var s=n.substring(t,r+1);(y.hasOwnProperty?y.hasOwnProperty(s):y[s]!==void 0)?e+=String.fromCharCode(y[s]):(i==f&&(s=n.substring(t),r=n.length),e+=String.fromCharCode(i),y[s]=i,_[i++]=s),t=r+1;}return e}var f=4e4,a=m(o);f=65535;var l=m(h);return {chars1:a,chars2:l,lineArray:_}};j.prototype.diff_charsToLines_=function(o,h){for(var _=0;_<o.length;_++){for(var y=o[_][1],m=[],f=0;f<y.length;f++)m[f]=h[y.charCodeAt(f)];o[_][1]=m.join("");}};j.prototype.diff_commonPrefix=function(o,h){if(!o||!h||o.charAt(0)!=h.charAt(0))return 0;for(var _=0,y=Math.min(o.length,h.length),m=y,f=0;_<m;)o.substring(f,m)==h.substring(f,m)?(_=m,f=_):y=m,m=Math.floor((y-_)/2+_);return m};j.prototype.diff_commonSuffix=function(o,h){if(!o||!h||o.charAt(o.length-1)!=h.charAt(h.length-1))return 0;for(var _=0,y=Math.min(o.length,h.length),m=y,f=0;_<m;)o.substring(o.length-m,o.length-f)==h.substring(h.length-m,h.length-f)?(_=m,f=_):y=m,m=Math.floor((y-_)/2+_);return m};j.prototype.diff_commonOverlap_=function(o,h){var _=o.length,y=h.length;if(_==0||y==0)return 0;_>y?o=o.substring(_-y):_<y&&(h=h.substring(0,_));var m=Math.min(_,y);if(o==h)return m;for(var f=0,a=1;;){var l=o.substring(m-a),n=h.indexOf(l);if(n==-1)return f;a+=n,(n==0||o.substring(m-a)==h.substring(0,a))&&(f=a,a++);}};j.prototype.diff_halfMatch_=function(o,h){if(this.Diff_Timeout<=0)return null;var _=o.length>h.length?o:h,y=o.length>h.length?h:o;if(_.length<4||y.length*2<_.length)return null;var m=this;function f(c,p,C){for(var E=c.substring(C,C+Math.floor(c.length/4)),S=-1,M="",g,d,A,L;(S=p.indexOf(E,S+1))!=-1;){var $=m.diff_commonPrefix(c.substring(C),p.substring(S)),T=m.diff_commonSuffix(c.substring(0,C),p.substring(0,S));M.length<T+$&&(M=p.substring(S-T,S)+p.substring(S,S+$),g=c.substring(0,C-T),d=c.substring(C+$),A=p.substring(0,S-T),L=p.substring(S+$));}return M.length*2>=c.length?[g,d,A,L,M]:null}var a=f(_,y,Math.ceil(_.length/4)),l=f(_,y,Math.ceil(_.length/2)),n;if(!a&&!l)return null;l?a?n=a[4].length>l[4].length?a:l:n=l:n=a;var e,t,r,i;o.length>h.length?(e=n[0],t=n[1],r=n[2],i=n[3]):(r=n[0],i=n[1],e=n[2],t=n[3]);var s=n[4];return [e,t,r,i,s]};j.prototype.diff_cleanupSemantic=function(o){for(var h=!1,_=[],y=0,m=null,f=0,a=0,l=0,n=0,e=0;f<o.length;)o[f][0]==te?(_[y++]=f,a=n,l=e,n=0,e=0,m=o[f][1]):(o[f][0]==de?n+=o[f][1].length:e+=o[f][1].length,m&&m.length<=Math.max(a,l)&&m.length<=Math.max(n,e)&&(o.splice(_[y-1],0,new j.Diff(ue,m)),o[_[y-1]+1][0]=de,y--,y--,f=y>0?_[y-1]:-1,a=0,l=0,n=0,e=0,m=null,h=!0)),f++;for(h&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),f=1;f<o.length;){if(o[f-1][0]==ue&&o[f][0]==de){var t=o[f-1][1],r=o[f][1],i=this.diff_commonOverlap_(t,r),s=this.diff_commonOverlap_(r,t);i>=s?(i>=t.length/2||i>=r.length/2)&&(o.splice(f,0,new j.Diff(te,r.substring(0,i))),o[f-1][1]=t.substring(0,t.length-i),o[f+1][1]=r.substring(i),f++):(s>=t.length/2||s>=r.length/2)&&(o.splice(f,0,new j.Diff(te,t.substring(0,s))),o[f-1][0]=de,o[f-1][1]=r.substring(0,r.length-s),o[f+1][0]=ue,o[f+1][1]=t.substring(s),f++),f++;}f++;}};j.prototype.diff_cleanupSemanticLossless=function(o){function h(s,c){if(!s||!c)return 6;var p=s.charAt(s.length-1),C=c.charAt(0),E=p.match(j.nonAlphaNumericRegex_),S=C.match(j.nonAlphaNumericRegex_),M=E&&p.match(j.whitespaceRegex_),g=S&&C.match(j.whitespaceRegex_),d=M&&p.match(j.linebreakRegex_),A=g&&C.match(j.linebreakRegex_),L=d&&s.match(j.blanklineEndRegex_),$=A&&c.match(j.blanklineStartRegex_);return L||$?5:d||A?4:E&&!M&&g?3:M||g?2:E||S?1:0}for(var _=1;_<o.length-1;){if(o[_-1][0]==te&&o[_+1][0]==te){var y=o[_-1][1],m=o[_][1],f=o[_+1][1],a=this.diff_commonSuffix(y,m);if(a){var l=m.substring(m.length-a);y=y.substring(0,y.length-a),m=l+m.substring(0,m.length-a),f=l+f;}for(var n=y,e=m,t=f,r=h(y,m)+h(m,f);m.charAt(0)===f.charAt(0);){y+=m.charAt(0),m=m.substring(1)+f.charAt(0),f=f.substring(1);var i=h(y,m)+h(m,f);i>=r&&(r=i,n=y,e=m,t=f);}o[_-1][1]!=n&&(n?o[_-1][1]=n:(o.splice(_-1,1),_--),o[_][1]=e,t?o[_+1][1]=t:(o.splice(_+1,1),_--));}_++;}};j.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;j.whitespaceRegex_=/\s/;j.linebreakRegex_=/[\r\n]/;j.blanklineEndRegex_=/\n\r?\n$/;j.blanklineStartRegex_=/^\r?\n\r?\n/;j.prototype.diff_cleanupEfficiency=function(o){for(var h=!1,_=[],y=0,m=null,f=0,a=!1,l=!1,n=!1,e=!1;f<o.length;)o[f][0]==te?(o[f][1].length<this.Diff_EditCost&&(n||e)?(_[y++]=f,a=n,l=e,m=o[f][1]):(y=0,m=null),n=e=!1):(o[f][0]==ue?e=!0:n=!0,m&&(a&&l&&n&&e||m.length<this.Diff_EditCost/2&&a+l+n+e==3)&&(o.splice(_[y-1],0,new j.Diff(ue,m)),o[_[y-1]+1][0]=de,y--,m=null,a&&l?(n=e=!0,y=0):(y--,f=y>0?_[y-1]:-1,n=e=!1),h=!0)),f++;h&&this.diff_cleanupMerge(o);};j.prototype.diff_cleanupMerge=function(o){o.push(new j.Diff(te,""));for(var h=0,_=0,y=0,m="",f="",a;h<o.length;)switch(o[h][0]){case de:y++,f+=o[h][1],h++;break;case ue:_++,m+=o[h][1],h++;break;case te:_+y>1?(_!==0&&y!==0&&(a=this.diff_commonPrefix(f,m),a!==0&&(h-_-y>0&&o[h-_-y-1][0]==te?o[h-_-y-1][1]+=f.substring(0,a):(o.splice(0,0,new j.Diff(te,f.substring(0,a))),h++),f=f.substring(a),m=m.substring(a)),a=this.diff_commonSuffix(f,m),a!==0&&(o[h][1]=f.substring(f.length-a)+o[h][1],f=f.substring(0,f.length-a),m=m.substring(0,m.length-a))),h-=_+y,o.splice(h,_+y),m.length&&(o.splice(h,0,new j.Diff(ue,m)),h++),f.length&&(o.splice(h,0,new j.Diff(de,f)),h++),h++):h!==0&&o[h-1][0]==te?(o[h-1][1]+=o[h][1],o.splice(h,1)):h++,y=0,_=0,m="",f="";break}o[o.length-1][1]===""&&o.pop();var l=!1;for(h=1;h<o.length-1;)o[h-1][0]==te&&o[h+1][0]==te&&(o[h][1].substring(o[h][1].length-o[h-1][1].length)==o[h-1][1]?(o[h][1]=o[h-1][1]+o[h][1].substring(0,o[h][1].length-o[h-1][1].length),o[h+1][1]=o[h-1][1]+o[h+1][1],o.splice(h-1,1),l=!0):o[h][1].substring(0,o[h+1][1].length)==o[h+1][1]&&(o[h-1][1]+=o[h+1][1],o[h][1]=o[h][1].substring(o[h+1][1].length)+o[h+1][1],o.splice(h+1,1),l=!0)),h++;l&&this.diff_cleanupMerge(o);};j.prototype.diff_xIndex=function(o,h){var _=0,y=0,m=0,f=0,a;for(a=0;a<o.length&&(o[a][0]!==de&&(_+=o[a][1].length),o[a][0]!==ue&&(y+=o[a][1].length),!(_>h));a++)m=_,f=y;return o.length!=a&&o[a][0]===ue?f:f+(h-m)};j.prototype.diff_prettyHtml=function(o){for(var h=[],_=/&/g,y=/</g,m=/>/g,f=/\n/g,a=0;a<o.length;a++){var l=o[a][0],n=o[a][1],e=n.replace(_,"&amp;").replace(y,"&lt;").replace(m,"&gt;").replace(f,"&para;<br>");switch(l){case de:h[a]='<ins style="background:#e6ffe6;">'+e+"</ins>";break;case ue:h[a]='<del style="background:#ffe6e6;">'+e+"</del>";break;case te:h[a]="<span>"+e+"</span>";break}}return h.join("")};j.prototype.diff_text1=function(o){for(var h=[],_=0;_<o.length;_++)o[_][0]!==de&&(h[_]=o[_][1]);return h.join("")};j.prototype.diff_text2=function(o){for(var h=[],_=0;_<o.length;_++)o[_][0]!==ue&&(h[_]=o[_][1]);return h.join("")};j.prototype.diff_levenshtein=function(o){for(var h=0,_=0,y=0,m=0;m<o.length;m++){var f=o[m][0],a=o[m][1];switch(f){case de:_+=a.length;break;case ue:y+=a.length;break;case te:h+=Math.max(_,y),_=0,y=0;break}}return h+=Math.max(_,y),h};j.prototype.diff_toDelta=function(o){for(var h=[],_=0;_<o.length;_++)switch(o[_][0]){case de:h[_]="+"+encodeURI(o[_][1]);break;case ue:h[_]="-"+o[_][1].length;break;case te:h[_]="="+o[_][1].length;break}return h.join(" ").replace(/%20/g," ")};j.prototype.diff_fromDelta=function(o,h){for(var _=[],y=0,m=0,f=h.split(/\t/g),a=0;a<f.length;a++){var l=f[a].substring(1);switch(f[a].charAt(0)){case"+":try{_[y++]=new j.Diff(de,decodeURI(l));}catch{throw new Error("Illegal escape in diff_fromDelta: "+l)}break;case"-":case"=":var n=parseInt(l,10);if(isNaN(n)||n<0)throw new Error("Invalid number in diff_fromDelta: "+l);var e=o.substring(m,m+=n);f[a].charAt(0)=="="?_[y++]=new j.Diff(te,e):_[y++]=new j.Diff(ue,e);break;default:if(f[a])throw new Error("Invalid diff operation in diff_fromDelta: "+f[a])}}if(m!=o.length)throw new Error("Delta length ("+m+") does not equal source text length ("+o.length+").");return _};j.prototype.match_main=function(o,h,_){if(o==null||h==null||_==null)throw new Error("Null input. (match_main)");return _=Math.max(0,Math.min(_,o.length)),o==h?0:o.length?o.substring(_,_+h.length)==h?_:this.match_bitap_(o,h,_):-1};j.prototype.match_bitap_=function(o,h,_){if(h.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var y=this.match_alphabet_(h),m=this;function f(g,d){var A=g/h.length,L=Math.abs(_-d);return m.Match_Distance?A+L/m.Match_Distance:L?1:A}var a=this.Match_Threshold,l=o.indexOf(h,_);l!=-1&&(a=Math.min(f(0,l),a),l=o.lastIndexOf(h,_+h.length),l!=-1&&(a=Math.min(f(0,l),a)));var n=1<<h.length-1;l=-1;for(var e,t,r=h.length+o.length,i,s=0;s<h.length;s++){for(e=0,t=r;e<t;)f(s,_+t)<=a?e=t:r=t,t=Math.floor((r-e)/2+e);r=t;var c=Math.max(1,_-t+1),p=Math.min(_+t,o.length)+h.length,C=Array(p+2);C[p+1]=(1<<s)-1;for(var E=p;E>=c;E--){var S=y[o.charAt(E-1)];if(s===0?C[E]=(C[E+1]<<1|1)&S:C[E]=(C[E+1]<<1|1)&S|((i[E+1]|i[E])<<1|1)|i[E+1],C[E]&n){var M=f(s,E-1);if(M<=a)if(a=M,l=E-1,l>_)c=Math.max(1,2*_-l);else break}}if(f(s+1,_)>a)break;i=C;}return l};j.prototype.match_alphabet_=function(o){for(var h={},_=0;_<o.length;_++)h[o.charAt(_)]=0;for(var _=0;_<o.length;_++)h[o.charAt(_)]|=1<<o.length-_-1;return h};j.prototype.patch_addContext_=function(o,h){if(h.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var _=h.substring(o.start2,o.start2+o.length1),y=0;h.indexOf(_)!=h.lastIndexOf(_)&&_.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)y+=this.Patch_Margin,_=h.substring(o.start2-y,o.start2+o.length1+y);y+=this.Patch_Margin;var m=h.substring(o.start2-y,o.start2);m&&o.diffs.unshift(new j.Diff(te,m));var f=h.substring(o.start2+o.length1,o.start2+o.length1+y);f&&o.diffs.push(new j.Diff(te,f)),o.start1-=m.length,o.start2-=m.length,o.length1+=m.length+f.length,o.length2+=m.length+f.length;}};j.prototype.patch_make=function(o,h,_){var y,m;if(typeof o=="string"&&typeof h=="string"&&typeof _>"u")y=o,m=this.diff_main(y,h,!0),m.length>2&&(this.diff_cleanupSemantic(m),this.diff_cleanupEfficiency(m));else if(o&&typeof o=="object"&&typeof h>"u"&&typeof _>"u")m=o,y=this.diff_text1(m);else if(typeof o=="string"&&h&&typeof h=="object"&&typeof _>"u")y=o,m=h;else if(typeof o=="string"&&typeof h=="string"&&_&&typeof _=="object")y=o,m=_;else throw new Error("Unknown call format to patch_make.");if(m.length===0)return [];for(var f=[],a=new j.patch_obj,l=0,n=0,e=0,t=y,r=y,i=0;i<m.length;i++){var s=m[i][0],c=m[i][1];switch(!l&&s!==te&&(a.start1=n,a.start2=e),s){case de:a.diffs[l++]=m[i],a.length2+=c.length,r=r.substring(0,e)+c+r.substring(e);break;case ue:a.length1+=c.length,a.diffs[l++]=m[i],r=r.substring(0,e)+r.substring(e+c.length);break;case te:c.length<=2*this.Patch_Margin&&l&&m.length!=i+1?(a.diffs[l++]=m[i],a.length1+=c.length,a.length2+=c.length):c.length>=2*this.Patch_Margin&&l&&(this.patch_addContext_(a,t),f.push(a),a=new j.patch_obj,l=0,t=r,n=e);break}s!==de&&(n+=c.length),s!==ue&&(e+=c.length);}return l&&(this.patch_addContext_(a,t),f.push(a)),f};j.prototype.patch_deepCopy=function(o){for(var h=[],_=0;_<o.length;_++){var y=o[_],m=new j.patch_obj;m.diffs=[];for(var f=0;f<y.diffs.length;f++)m.diffs[f]=new j.Diff(y.diffs[f][0],y.diffs[f][1]);m.start1=y.start1,m.start2=y.start2,m.length1=y.length1,m.length2=y.length2,h[_]=m;}return h};j.prototype.patch_apply=function(o,h){if(o.length==0)return [h,[]];o=this.patch_deepCopy(o);var _=this.patch_addPadding(o);h=_+h+_,this.patch_splitMax(o);for(var y=0,m=[],f=0;f<o.length;f++){var a=o[f].start2+y,l=this.diff_text1(o[f].diffs),n,e=-1;if(l.length>this.Match_MaxBits?(n=this.match_main(h,l.substring(0,this.Match_MaxBits),a),n!=-1&&(e=this.match_main(h,l.substring(l.length-this.Match_MaxBits),a+l.length-this.Match_MaxBits),(e==-1||n>=e)&&(n=-1))):n=this.match_main(h,l,a),n==-1)m[f]=!1,y-=o[f].length2-o[f].length1;else {m[f]=!0,y=n-a;var t;if(e==-1?t=h.substring(n,n+l.length):t=h.substring(n,e+this.Match_MaxBits),l==t)h=h.substring(0,n)+this.diff_text2(o[f].diffs)+h.substring(n+l.length);else {var r=this.diff_main(l,t,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(r)/l.length>this.Patch_DeleteThreshold)m[f]=!1;else {this.diff_cleanupSemanticLossless(r);for(var i=0,s,c=0;c<o[f].diffs.length;c++){var p=o[f].diffs[c];p[0]!==te&&(s=this.diff_xIndex(r,i)),p[0]===de?h=h.substring(0,n+s)+p[1]+h.substring(n+s):p[0]===ue&&(h=h.substring(0,n+s)+h.substring(n+this.diff_xIndex(r,i+p[1].length))),p[0]!==ue&&(i+=p[1].length);}}}}}return h=h.substring(_.length,h.length-_.length),[h,m]};j.prototype.patch_addPadding=function(o){for(var h=this.Patch_Margin,_="",y=1;y<=h;y++)_+=String.fromCharCode(y);for(var y=0;y<o.length;y++)o[y].start1+=h,o[y].start2+=h;var m=o[0],f=m.diffs;if(f.length==0||f[0][0]!=te)f.unshift(new j.Diff(te,_)),m.start1-=h,m.start2-=h,m.length1+=h,m.length2+=h;else if(h>f[0][1].length){var a=h-f[0][1].length;f[0][1]=_.substring(f[0][1].length)+f[0][1],m.start1-=a,m.start2-=a,m.length1+=a,m.length2+=a;}if(m=o[o.length-1],f=m.diffs,f.length==0||f[f.length-1][0]!=te)f.push(new j.Diff(te,_)),m.length1+=h,m.length2+=h;else if(h>f[f.length-1][1].length){var a=h-f[f.length-1][1].length;f[f.length-1][1]+=_.substring(0,a),m.length1+=a,m.length2+=a;}return _};j.prototype.patch_splitMax=function(o){for(var h=this.Match_MaxBits,_=0;_<o.length;_++)if(!(o[_].length1<=h)){var y=o[_];o.splice(_--,1);for(var m=y.start1,f=y.start2,a="";y.diffs.length!==0;){var l=new j.patch_obj,n=!0;for(l.start1=m-a.length,l.start2=f-a.length,a!==""&&(l.length1=l.length2=a.length,l.diffs.push(new j.Diff(te,a)));y.diffs.length!==0&&l.length1<h-this.Patch_Margin;){var e=y.diffs[0][0],t=y.diffs[0][1];e===de?(l.length2+=t.length,f+=t.length,l.diffs.push(y.diffs.shift()),n=!1):e===ue&&l.diffs.length==1&&l.diffs[0][0]==te&&t.length>2*h?(l.length1+=t.length,m+=t.length,n=!1,l.diffs.push(new j.Diff(e,t)),y.diffs.shift()):(t=t.substring(0,h-l.length1-this.Patch_Margin),l.length1+=t.length,m+=t.length,e===te?(l.length2+=t.length,f+=t.length):n=!1,l.diffs.push(new j.Diff(e,t)),t==y.diffs[0][1]?y.diffs.shift():y.diffs[0][1]=y.diffs[0][1].substring(t.length));}a=this.diff_text2(l.diffs),a=a.substring(a.length-this.Patch_Margin);var r=this.diff_text1(y.diffs).substring(0,this.Patch_Margin);r!==""&&(l.length1+=r.length,l.length2+=r.length,l.diffs.length!==0&&l.diffs[l.diffs.length-1][0]===te?l.diffs[l.diffs.length-1][1]+=r:l.diffs.push(new j.Diff(te,r))),n||o.splice(++_,0,l);}}};j.prototype.patch_toText=function(o){for(var h=[],_=0;_<o.length;_++)h[_]=o[_];return h.join("")};j.prototype.patch_fromText=function(o){var h=[];if(!o)return h;for(var _=o.split(`
992
+ `),y=0,m=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;y<_.length;){var f=_[y].match(m);if(!f)throw new Error("Invalid patch string: "+_[y]);var a=new j.patch_obj;for(h.push(a),a.start1=parseInt(f[1],10),f[2]===""?(a.start1--,a.length1=1):f[2]=="0"?a.length1=0:(a.start1--,a.length1=parseInt(f[2],10)),a.start2=parseInt(f[3],10),f[4]===""?(a.start2--,a.length2=1):f[4]=="0"?a.length2=0:(a.start2--,a.length2=parseInt(f[4],10)),y++;y<_.length;){var l=_[y].charAt(0);try{var n=decodeURI(_[y].substring(1));}catch{throw new Error("Illegal escape in patch_fromText: "+n)}if(l=="-")a.diffs.push(new j.Diff(ue,n));else if(l=="+")a.diffs.push(new j.Diff(de,n));else if(l==" ")a.diffs.push(new j.Diff(te,n));else {if(l=="@")break;if(l!=="")throw new Error('Invalid patch mode "'+l+'" in: '+n)}y++;}}return h};j.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0;};j.patch_obj.prototype.toString=function(){var o,h;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?h=this.start2+",0":this.length2==1?h=this.start2+1:h=this.start2+1+","+this.length2;for(var _=["@@ -"+o+" +"+h+` @@
993
+ `],y,m=0;m<this.diffs.length;m++){switch(this.diffs[m][0]){case de:y="+";break;case ue:y="-";break;case te:y=" ";break}_[m+1]=y+encodeURI(this.diffs[m][1])+`
994
+ `;}return _.join("").replace(/%20/g," ")};st.exports=j;st.exports.diff_match_patch=j;st.exports.DIFF_DELETE=ue;st.exports.DIFF_INSERT=de;st.exports.DIFF_EQUAL=te;});var xr=b(vt=>{var ul=vt&&vt.__extends||function(){var o=function(h,_){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m;}||function(y,m){for(var f in m)Object.prototype.hasOwnProperty.call(m,f)&&(y[f]=m[f]);},o(h,_)};return function(h,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");o(h,_);function y(){this.constructor=h;}h.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y);}}();Object.defineProperty(vt,"__esModule",{value:!0});var se=Nt(),Er=a("react"),dl=Bn(),fl=_r(),pl=function(o){ul(h,o);function h(_){var y=o.call(this,_)||this;return y.state={value:y.props.value},y.onChange=y.onChange.bind(y),y.diff=y.diff.bind(y),y}return h.prototype.componentDidUpdate=function(){var _=this.props.value;_!==this.state.value&&this.setState({value:_});},h.prototype.onChange=function(_){this.setState({value:_}),this.props.onChange&&this.props.onChange(_);},h.prototype.diff=function(){var _=new fl,y=this.state.value[0],m=this.state.value[1];if(y.length===0&&m.length===0)return [];var f=_.diff_main(y,m);_.diff_cleanupSemantic(f);var a=this.generateDiffedLines(f),l=this.setCodeMarkers(a);return l},h.prototype.generateDiffedLines=function(_){var y={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},m={left:[],right:[]},f={left:1,right:1};return _.forEach(function(a){var l=a[0],n=a[1],e=n.split(`
995
+ `).length-1;if(n.length!==0){var t=n[0],r=n[n.length-1],i=0;switch(l){case y.DIFF_EQUAL:f.left+=e,f.right+=e;break;case y.DIFF_DELETE:t===`
996
+ `&&(f.left++,e--),i=e,i===0&&m.right.push({startLine:f.right,endLine:f.right}),r===`
997
+ `&&(i-=1),m.left.push({startLine:f.left,endLine:f.left+i}),f.left+=e;break;case y.DIFF_INSERT:t===`
998
+ `&&(f.right++,e--),i=e,i===0&&m.left.push({startLine:f.left,endLine:f.left}),r===`
999
+ `&&(i-=1),m.right.push({startLine:f.right,endLine:f.right+i}),f.right+=e;break;default:throw new Error("Diff type was not defined.")}}}),m},h.prototype.setCodeMarkers=function(_){_===void 0&&(_={left:[],right:[]});for(var y=[],m={left:[],right:[]},f=0;f<_.left.length;f++){var a={startRow:_.left[f].startLine-1,endRow:_.left[f].endLine,type:"text",className:"codeMarker"};m.left.push(a);}for(var f=0;f<_.right.length;f++){var a={startRow:_.right[f].startLine-1,endRow:_.right[f].endLine,type:"text",className:"codeMarker"};m.right.push(a);}return y[0]=m.left,y[1]=m.right,y},h.prototype.render=function(){var _=this.diff();return Er.createElement(dl.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:_})},h.propTypes={cursorStart:se.number,editorProps:se.object,enableBasicAutocompletion:se.bool,enableLiveAutocompletion:se.bool,focus:se.bool,fontSize:se.number,height:se.string,highlightActiveLine:se.bool,maxLines:se.number,minLines:se.number,mode:se.string,name:se.string,className:se.string,onLoad:se.func,onPaste:se.func,onScroll:se.func,onChange:se.func,orientation:se.string,readOnly:se.bool,scrollMargin:se.array,setOptions:se.object,showGutter:se.bool,showPrintMargin:se.bool,splits:se.number,style:se.object,tabSize:se.number,theme:se.string,value:se.array,width:se.string,wrapEnabled:se.bool},h.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},h}(Er.Component);vt.default=pl;});var kr=b(Qe=>{Object.defineProperty(Qe,"__esModule",{value:!0});Qe.diff=Qe.split=void 0;var gl=hr(),ml=xr();Qe.diff=ml.default;var vl=Bn();Qe.split=vl.default;Qe.default=gl.default;});var Ir=b((Rr,Jt)=>{ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(o,h,_){var y=o("../lib/oop"),m=o("./text_highlight_rules").TextHighlightRules,f=function(){var a="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct|is|in|all|alter|any|array|at|authorization|between|both|cast|check|collate|column|commit|constraint|cube|current|current_date|current_time|current_timestamp|current_user|describe|escape|except|exists|external|extract|fetch|filter|for|full|function|global|grouping|intersect|interval|into|leading|like|local|no|of|only|out|overlaps|partition|position|range|revoke|rollback|rollup|row|rows|session_user|set|some|start|tablesample|time|to|trailing|truncate|unique|unknown|user|using|values|window|with",l="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",e="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer|string",t=this.createKeywordMapper({"support.function":n,keyword:a,"constant.language":l,"storage.type":e},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:t,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules();};y.inherits(f,m),h.SqlHighlightRules=f;});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(o,h,_){var y=o("../../lib/oop"),m=o("../../range").Range,f=o("./fold_mode").FoldMode,a=h.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)));};y.inherits(a,f),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,n,e){var t=l.getLine(e);if(this.singleLineBlockCommentRe.test(t)&&!this.startRegionRe.test(t)&&!this.tripleStarBlockCommentRe.test(t))return "";var r=this._getFoldWidgetBase(l,n,e);return !r&&this.startRegionRe.test(t)?"start":r},this.getFoldWidgetRange=function(l,n,e,t){var r=l.getLine(e);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(l,r,e);var c=r.match(this.foldingStartMarker);if(c){var i=c.index;if(c[1])return this.openingBracketBlock(l,c[1],e,i);var s=l.getCommentFoldRange(e,i+c[0].length,1);return s&&!s.isMultiLine()&&(t?s=this.getSectionRange(l,e):n!="all"&&(s=null)),s}if(n!=="markbegin"){var c=r.match(this.foldingStopMarker);if(c){var i=c.index+c[0].length;return c[1]?this.closingBracketBlock(l,c[1],e,i):l.getCommentFoldRange(e,i,-1)}}},this.getSectionRange=function(l,n){var e=l.getLine(n),t=e.search(/\S/),r=n,i=e.length;n=n+1;for(var s=n,c=l.getLength();++n<c;){e=l.getLine(n);var p=e.search(/\S/);if(p!==-1){if(t>p)break;var C=this.getFoldWidgetRange(l,"all",n);if(C){if(C.start.row<=r)break;if(C.isMultiLine())n=C.end.row;else if(t==p)break}s=n;}}return new m(r,i,s,l.getLine(s).length)},this.getCommentRegionBlock=function(l,n,e){for(var t=n.search(/\s*$/),r=l.getLength(),i=e,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++e<r;){n=l.getLine(e);var p=s.exec(n);if(p&&(p[1]?c--:c++,!c))break}var C=e;if(C>i)return new m(i,t,C,n.length)};}.call(a.prototype);});ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(o,h,_){var y=o("../../lib/oop"),m=o("./cstyle").FoldMode,f=h.FoldMode=function(){};y.inherits(f,m),function(){}.call(f.prototype);});ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],function(o,h,_){var y=o("../lib/oop"),m=o("./text").Mode,f=o("./sql_highlight_rules").SqlHighlightRules,a=o("./folding/sql").FoldMode,l=function(){this.HighlightRules=f,this.foldingRules=new a,this.$behaviour=this.$defaultBehaviour;};y.inherits(l,m),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql";}.call(l.prototype),h.Mode=l;});(function(){ace.require(["ace/mode/sql"],function(o){typeof Jt=="object"&&typeof Rr=="object"&&Jt&&(Jt.exports=o);});})();});var Dr=b((Or,qt)=>{ace.define("ace/theme/github-css",["require","exports","module"],function(o,h,_){_.exports=`/* CSS style content from github's default pygments highlighter template.
1000
+ Cursor and selection styles from textmate.css. */
1001
+ .ace-github .ace_gutter {
1002
+ background: #e8e8e8;
1003
+ color: #AAA;
1004
+ }
1005
+
1006
+ .ace-github {
1007
+ background: #fff;
1008
+ color: #000;
1009
+ }
1010
+
1011
+ .ace-github .ace_keyword {
1012
+ font-weight: bold;
1013
+ }
1014
+
1015
+ .ace-github .ace_string {
1016
+ color: #D14;
1017
+ }
1018
+
1019
+ .ace-github .ace_variable.ace_class {
1020
+ color: teal;
1021
+ }
1022
+
1023
+ .ace-github .ace_constant.ace_numeric {
1024
+ color: #099;
1025
+ }
1026
+
1027
+ .ace-github .ace_constant.ace_buildin {
1028
+ color: #0086B3;
1029
+ }
1030
+
1031
+ .ace-github .ace_support.ace_function {
1032
+ color: #0086B3;
1033
+ }
1034
+
1035
+ .ace-github .ace_comment {
1036
+ color: #998;
1037
+ font-style: italic;
1038
+ }
1039
+
1040
+ .ace-github .ace_variable.ace_language {
1041
+ color: #0086B3;
1042
+ }
1043
+
1044
+ .ace-github .ace_paren {
1045
+ font-weight: bold;
1046
+ }
1047
+
1048
+ .ace-github .ace_boolean {
1049
+ font-weight: bold;
1050
+ }
1051
+
1052
+ .ace-github .ace_string.ace_regexp {
1053
+ color: #009926;
1054
+ font-weight: normal;
1055
+ }
1056
+
1057
+ .ace-github .ace_variable.ace_instance {
1058
+ color: teal;
1059
+ }
1060
+
1061
+ .ace-github .ace_constant.ace_language {
1062
+ font-weight: bold;
1063
+ }
1064
+
1065
+ .ace-github .ace_cursor {
1066
+ color: black;
1067
+ }
1068
+
1069
+ .ace-github.ace_focus .ace_marker-layer .ace_active-line {
1070
+ background: rgb(255, 255, 204);
1071
+ }
1072
+ .ace-github .ace_marker-layer .ace_active-line {
1073
+ background: rgb(245, 245, 245);
1074
+ }
1075
+
1076
+ .ace-github .ace_marker-layer .ace_selection {
1077
+ background: rgb(181, 213, 255);
1078
+ }
1079
+
1080
+ .ace-github.ace_multiselect .ace_selection.ace_start {
1081
+ box-shadow: 0 0 3px 0px white;
1082
+ }
1083
+ /* bold keywords cause cursor issues for some fonts */
1084
+ /* this disables bold style for editor and keeps for static highlighter */
1085
+ .ace-github.ace_nobold .ace_line > span {
1086
+ font-weight: normal !important;
1087
+ }
1088
+
1089
+ .ace-github .ace_marker-layer .ace_step {
1090
+ background: rgb(252, 255, 0);
1091
+ }
1092
+
1093
+ .ace-github .ace_marker-layer .ace_stack {
1094
+ background: rgb(164, 229, 101);
1095
+ }
1096
+
1097
+ .ace-github .ace_marker-layer .ace_bracket {
1098
+ margin: -1px 0 0 -1px;
1099
+ border: 1px solid rgb(192, 192, 192);
1100
+ }
1101
+
1102
+ .ace-github .ace_gutter-active-line {
1103
+ background-color : rgba(0, 0, 0, 0.07);
1104
+ }
1105
+
1106
+ .ace-github .ace_marker-layer .ace_selected-word {
1107
+ background: rgb(250, 250, 255);
1108
+ border: 1px solid rgb(200, 200, 250);
1109
+ }
1110
+
1111
+ .ace-github .ace_invisible {
1112
+ color: #BFBFBF
1113
+ }
1114
+
1115
+ .ace-github .ace_print-margin {
1116
+ width: 1px;
1117
+ background: #e8e8e8;
1118
+ }
1119
+
1120
+ .ace-github .ace_indent-guide {
1121
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
1122
+ }
1123
+
1124
+ .ace-github .ace_indent-guide-active {
1125
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
1126
+ }
1127
+ `;});ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(o,h,_){h.isDark=!1,h.cssClass="ace-github",h.cssText=o("./github-css");var y=o("../lib/dom");y.importCssString(h.cssText,h.cssClass,!1);});(function(){ace.require(["ace/theme/github"],function(o){typeof qt=="object"&&typeof Or=="object"&&qt&&(qt.exports=o);});})();});var Fr=b((Nr,en)=>{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(o,h,_){var y=o("./lib/dom"),m=o("./lib/oop"),f=o("./lib/event_emitter").EventEmitter,a=o("./lib/lang"),l=o("./range").Range,n=o("./range_list").RangeList,e=o("./keyboard/hash_handler").HashHandler,t=o("./tokenizer").Tokenizer,r=o("./clipboard"),i={CURRENT_WORD:function(g){return g.session.getTextRange(g.session.getWordRange())},SELECTION:function(g,d,A){var L=g.session.getTextRange();return A?L.replace(/\n\r?([ \t]*\S)/g,`
1128
+ `+A+"$1"):L},CURRENT_LINE:function(g){return g.session.getLine(g.getCursorPosition().row)},PREV_LINE:function(g){return g.session.getLine(g.getCursorPosition().row-1)},LINE_INDEX:function(g){return g.getCursorPosition().row},LINE_NUMBER:function(g){return g.getCursorPosition().row+1},SOFT_TABS:function(g){return g.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(g){return g.session.getTabSize()},CLIPBOARD:function(g){return r.getText&&r.getText()},FILENAME:function(g){return /[^/\\]*$/.exec(this.FILEPATH(g))[0]},FILENAME_BASE:function(g){return /[^/\\]*$/.exec(this.FILEPATH(g))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(g){return this.FILEPATH(g).replace(/[^/\\]*$/,"")},FILEPATH:function(g){return "/not implemented.txt"},WORKSPACE_NAME:function(){return "Unknown"},FULLNAME:function(){return "Unknown"},BLOCK_COMMENT_START:function(g){var d=g.session.$mode||{};return d.blockComment&&d.blockComment.start||""},BLOCK_COMMENT_END:function(g){var d=g.session.$mode||{};return d.blockComment&&d.blockComment.end||""},LINE_COMMENT:function(g){var d=g.session.$mode||{};return d.lineCommentStart||""},CURRENT_YEAR:s.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:s.bind(null,{year:"2-digit"}),CURRENT_MONTH:s.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:s.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:s.bind(null,{month:"short"}),CURRENT_DATE:s.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:s.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:s.bind(null,{weekday:"short"}),CURRENT_HOUR:s.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:s.bind(null,{minute:"2-digit"}),CURRENT_SECOND:s.bind(null,{second:"2-digit"})};i.SELECTED_TEXT=i.SELECTION;function s(g){var d=new Date().toLocaleString("en-us",g);return d.length==1?"0"+d:d}var c=function(){function g(){this.snippetMap={},this.snippetNameMap={},this.variables=i;}return g.prototype.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},g.prototype.createTokenizer=function(){function d($){return $=$.substr(1),/^\d+$/.test($)?[{tabstopId:parseInt($,10)}]:[{text:$}]}function A($){return "(?:[^\\\\"+$+"]|\\\\.)"}var L={regex:"/("+A("/")+"+)/",onMatch:function($,T,w){var b=w[0];return b.fmtString=!0,b.guard=$.slice(1,-1),b.flag="",""},next:"formatString"};return g.$tokenizer=new t({start:[{regex:/\\./,onMatch:function($,T,w){var b=$[1];return (b=="}"&&w.length||"`$\\".indexOf(b)!=-1)&&($=b),[$]}},{regex:/}/,onMatch:function($,T,w){return [w.length?w.shift():$]}},{regex:/\$(?:\d+|\w+)/,onMatch:d},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function($,T,w){var b=d($.substr(1));return w.unshift(b[0]),b},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+A("\\|")+"*\\|",onMatch:function($,T,w){var b=$.slice(1,-1).replace(/\\[,|\\]|,/g,function(u){return u.length==2?u[1]:"\0"}).split("\0").map(function(u){return {value:u}});return w[0].choices=b,[b[0]]},next:"start"},L,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function($,T,w){return w.length&&w[0].expectElse?(w[0].expectElse=!1,w[0].ifEnd={elseEnd:w[0]},[w[0].ifEnd]):":"}},{regex:/\\./,onMatch:function($,T,w){var b=$[1];return b=="}"&&w.length||"`$\\".indexOf(b)!=-1?$=b:b=="n"?$=`
1129
+ `:b=="t"?$=" ":"ulULE".indexOf(b)!=-1&&($={changeCase:b,local:b>"a"}),[$]}},{regex:"/\\w*}",onMatch:function($,T,w){var b=w.shift();return b&&(b.flag=$.slice(1,-1)),this.next=b&&b.tabstopId?"start":"",[b||$]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function($,T,w){return [{text:$.slice(1)}]}},{regex:/\${\w+/,onMatch:function($,T,w){var b={text:$.slice(2)};return w.unshift(b),[b]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function($,T,w){var b=w.shift();return this.next=b&&b.tabstopId?"start":"",[b||$]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function($,T,w){var b=w[0];return b.formatFunction=$.slice(2,-1),[w.shift()]},next:"formatString"},L,{regex:/:[\?\-+]?/,onMatch:function($,T,w){$[1]=="+"&&(w[0].ifEnd=w[0]),$[1]=="?"&&(w[0].expectElse=!0);},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),g.$tokenizer},g.prototype.tokenizeTmSnippet=function(d,A){return this.getTokenizer().getLineTokens(d,A).tokens.map(function(L){return L.value||L})},g.prototype.getVariableValue=function(d,A,L){if(/^\d+$/.test(A))return (this.variables.__||{})[A]||"";if(/^[A-Z]\d+$/.test(A))return (this.variables[A[0]+"__"]||{})[A.substr(1)]||"";if(A=A.replace(/^TM_/,""),!this.variables.hasOwnProperty(A))return "";var $=this.variables[A];return typeof $=="function"&&($=this.variables[A](d,A,L)),$??""},g.prototype.tmStrFormat=function(d,A,L){if(!A.fmt)return d;var $=A.flag||"",T=A.guard;T=new RegExp(T,$.replace(/[^gim]/g,""));var w=typeof A.fmt=="string"?this.tokenizeTmSnippet(A.fmt,"formatString"):A.fmt,b=this,u=d.replace(T,function(){var v=b.variables.__;b.variables.__=[].slice.call(arguments);for(var x=b.resolveVariables(w,L),k="E",R=0;R<x.length;R++){var I=x[R];if(typeof I=="object")if(x[R]="",I.changeCase&&I.local){var D=x[R+1];D&&typeof D=="string"&&(I.changeCase=="u"?x[R]=D[0].toUpperCase():x[R]=D[0].toLowerCase(),x[R+1]=D.substr(1));}else I.changeCase&&(k=I.changeCase);else k=="U"?x[R]=I.toUpperCase():k=="L"&&(x[R]=I.toLowerCase());}return b.variables.__=v,x.join("")});return u},g.prototype.tmFormatFunction=function(d,A,L){return A.formatFunction=="upcase"?d.toUpperCase():A.formatFunction=="downcase"?d.toLowerCase():d},g.prototype.resolveVariables=function(d,A){for(var L=[],$="",T=!0,w=0;w<d.length;w++){var b=d[w];if(typeof b=="string"){L.push(b),b==`
1130
+ `?(T=!0,$=""):T&&($=/^\t*/.exec(b)[0],T=/\S/.test(b));continue}if(b){if(T=!1,b.fmtString){var u=d.indexOf(b,w+1);u==-1&&(u=d.length),b.fmt=d.slice(w+1,u),w=u;}if(b.text){var v=this.getVariableValue(A,b.text,$)+"";b.fmtString&&(v=this.tmStrFormat(v,b,A)),b.formatFunction&&(v=this.tmFormatFunction(v,b,A)),v&&!b.ifEnd?(L.push(v),x(b)):!v&&b.ifEnd&&x(b.ifEnd);}else b.elseEnd?x(b.elseEnd):(b.tabstopId!=null||b.changeCase!=null)&&L.push(b);}}function x(k){var R=d.indexOf(k,w+1);R!=-1&&(w=R);}return L},g.prototype.getDisplayTextForSnippet=function(d,A){var L=p.call(this,d,A);return L.text},g.prototype.insertSnippetForSelection=function(d,A,L){L===void 0&&(L={});var $=p.call(this,d,A,L),T=d.getSelectionRange(),w=d.session.replace(T,$.text),b=new C(d),u=d.inVirtualSelectionMode&&d.selection.index;b.addTabstops($.tabstops,T.start,w,u);},g.prototype.insertSnippet=function(d,A,L){L===void 0&&(L={});var $=this;if(d.inVirtualSelectionMode)return $.insertSnippetForSelection(d,A,L);d.forEachSelection(function(){$.insertSnippetForSelection(d,A,L);},null,{keepOrder:!0}),d.tabstopManager&&d.tabstopManager.tabNext();},g.prototype.$getScope=function(d){var A=d.session.$mode.$id||"";if(A=A.split("/").pop(),A==="html"||A==="php"){A==="php"&&!d.session.$mode.inlinePhp&&(A="html");var L=d.getCursorPosition(),$=d.session.getState(L.row);typeof $=="object"&&($=$[0]),$.substring&&($.substring(0,3)=="js-"?A="javascript":$.substring(0,4)=="css-"?A="css":$.substring(0,4)=="php-"&&(A="php"));}return A},g.prototype.getActiveScopes=function(d){var A=this.$getScope(d),L=[A],$=this.snippetMap;return $[A]&&$[A].includeScopes&&L.push.apply(L,$[A].includeScopes),L.push("_"),L},g.prototype.expandWithTab=function(d,A){var L=this,$=d.forEachSelection(function(){return L.expandSnippetForSelection(d,A)},null,{keepOrder:!0});return $&&d.tabstopManager&&d.tabstopManager.tabNext(),$},g.prototype.expandSnippetForSelection=function(d,A){var L=d.getCursorPosition(),$=d.session.getLine(L.row),T=$.substring(0,L.column),w=$.substr(L.column),b=this.snippetMap,u;return this.getActiveScopes(d).some(function(v){var x=b[v];return x&&(u=this.findMatchingSnippet(x,T,w)),!!u},this),u?(A&&A.dryRun||(d.session.doc.removeInLine(L.row,L.column-u.replaceBefore.length,L.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(d,u.content),this.variables.M__=this.variables.T__=null),!0):!1},g.prototype.findMatchingSnippet=function(d,A,L){for(var $=d.length;$--;){var T=d[$];if(!(T.startRe&&!T.startRe.test(A))&&!(T.endRe&&!T.endRe.test(L))&&!(!T.startRe&&!T.endRe))return T.matchBefore=T.startRe?T.startRe.exec(A):[""],T.matchAfter=T.endRe?T.endRe.exec(L):[""],T.replaceBefore=T.triggerRe?T.triggerRe.exec(A)[0]:"",T.replaceAfter=T.endTriggerRe?T.endTriggerRe.exec(L)[0]:"",T}},g.prototype.register=function(d,A){var L=this.snippetMap,$=this.snippetNameMap,T=this;d||(d=[]);function w(v){return v&&!/^\^?\(.*\)\$?$|^\\b$/.test(v)&&(v="(?:"+v+")"),v||""}function b(v,x,k){return v=w(v),x=w(x),k?(v=x+v,v&&v[v.length-1]!="$"&&(v=v+"$")):(v=v+x,v&&v[0]!="^"&&(v="^"+v)),new RegExp(v)}function u(v){v.scope||(v.scope=A||"_"),A=v.scope,L[A]||(L[A]=[],$[A]={});var x=$[A];if(v.name){var k=x[v.name];k&&T.unregister(k),x[v.name]=v;}L[A].push(v),v.prefix&&(v.tabTrigger=v.prefix),!v.content&&v.body&&(v.content=Array.isArray(v.body)?v.body.join(`
1131
+ `):v.body),v.tabTrigger&&!v.trigger&&(!v.guard&&/^\w/.test(v.tabTrigger)&&(v.guard="\\b"),v.trigger=a.escapeRegExp(v.tabTrigger)),!(!v.trigger&&!v.guard&&!v.endTrigger&&!v.endGuard)&&(v.startRe=b(v.trigger,v.guard,!0),v.triggerRe=new RegExp(v.trigger),v.endRe=b(v.endTrigger,v.endGuard,!0),v.endTriggerRe=new RegExp(v.endTrigger));}Array.isArray(d)?d.forEach(u):Object.keys(d).forEach(function(v){u(d[v]);}),this._signal("registerSnippets",{scope:A});},g.prototype.unregister=function(d,A){var L=this.snippetMap,$=this.snippetNameMap;function T(w){var b=$[w.scope||A];if(b&&b[w.name]){delete b[w.name];var u=L[w.scope||A],v=u&&u.indexOf(w);v>=0&&u.splice(v,1);}}d.content?T(d):Array.isArray(d)&&d.forEach(T);},g.prototype.parseSnippetFile=function(d){d=d.replace(/\r/g,"");for(var A=[],L={},$=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,T;T=$.exec(d);){if(T[1])try{L=JSON.parse(T[1]),A.push(L);}catch{}if(T[4])L.content=T[4].replace(/^\t/gm,""),A.push(L),L={};else {var w=T[2],b=T[3];if(w=="regex"){var u=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=u.exec(b)[1],L.trigger=u.exec(b)[1],L.endTrigger=u.exec(b)[1],L.endGuard=u.exec(b)[1];}else w=="snippet"?(L.tabTrigger=b.match(/^\S*/)[0],L.name||(L.name=b)):w&&(L[w]=b);}}return A},g.prototype.getSnippetByName=function(d,A){var L=this.snippetNameMap,$;return this.getActiveScopes(A).some(function(T){var w=L[T];return w&&($=w[d]),!!$},this),$},g}();m.implement(c.prototype,f);var p=function(g,d,A){A===void 0&&(A={});var L=g.getCursorPosition(),$=g.session.getLine(L.row),T=g.session.getTabString(),w=$.match(/^\s*/)[0];L.column<w.length&&(w=w.slice(0,L.column)),d=d.replace(/\r/g,"");var b=this.tokenizeTmSnippet(d);b=this.resolveVariables(b,g),b=b.map(function(B){return B==`
1132
+ `&&!A.excludeExtraIndent?B+w:typeof B=="string"?B.replace(/\t/g,T):B});var u=[];b.forEach(function(B,H){if(typeof B=="object"){var V=B.tabstopId,U=u[V];if(U||(U=u[V]=[],U.index=V,U.value="",U.parents={}),U.indexOf(B)===-1){B.choices&&!U.choices&&(U.choices=B.choices),U.push(B);var K=b.indexOf(B,H+1);if(K!==-1){var Z=b.slice(H+1,K),Y=Z.some(function(ne){return typeof ne=="object"});Y&&!U.value?U.value=Z:Z.length&&(!U.value||typeof U.value!="string")&&(U.value=Z.join(""));}}}}),u.forEach(function(B){B.length=0;});var v={};function x(B){for(var H=[],V=0;V<B.length;V++){var U=B[V];if(typeof U=="object"){if(v[U.tabstopId])continue;var K=B.lastIndexOf(U,V-1);U=H[K]||{tabstopId:U.tabstopId};}H[V]=U;}return H}for(var k=0;k<b.length;k++){var R=b[k];if(typeof R=="object"){var I=R.tabstopId,D=u[I],O=b.indexOf(R,k+1);if(v[I]){v[I]===R&&(delete v[I],Object.keys(v).forEach(function(B){D.parents[B]=!0;}));continue}v[I]=R;var F=D.value;typeof F!="string"?F=x(F):R.fmt&&(F=this.tmStrFormat(F,R,g)),b.splice.apply(b,[k+1,Math.max(0,O-k)].concat(F,R)),D.indexOf(R)===-1&&D.push(R);}}var N=0,P=0,W="";return b.forEach(function(B){if(typeof B=="string"){var H=B.split(`
1133
+ `);H.length>1?(P=H[H.length-1].length,N+=H.length-1):P+=B.length,W+=B;}else B&&(B.start?B.end={row:N,column:P}:B.start={row:N,column:P});}),{text:W,tabstops:u,tokens:b}},C=function(){function g(d){if(this.index=0,this.ranges=[],this.tabstops=[],d.tabstopManager)return d.tabstopManager;d.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(d);}return g.prototype.attach=function(d){this.$openTabstops=null,this.selectedTabstop=null,this.editor=d,this.session=d.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);},g.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null;},g.prototype.onChange=function(d){for(var A=d.action[0]=="r",L=this.selectedTabstop||{},$=L.parents||{},T=this.tabstops.slice(),w=0;w<T.length;w++){var b=T[w],u=b==L||$[b.index];if(b.rangeList.$bias=u?0:1,d.action=="remove"&&b!==L){var v=b.parents&&b.parents[L.index],x=b.rangeList.pointIndex(d.start,v);x=x<0?-x-1:x+1;var k=b.rangeList.pointIndex(d.end,v);k=k<0?-k-1:k-1;for(var R=b.rangeList.ranges.slice(x,k),I=0;I<R.length;I++)this.removeRange(R[I]);}b.rangeList.$onChange(d);}var D=this.session;!this.$inChange&&A&&D.getLength()==1&&!D.getValue()&&this.detach();},g.prototype.updateLinkedFields=function(){var d=this.selectedTabstop;if(!(!d||!d.hasLinkedRanges||!d.firstNonLinked)){this.$inChange=!0;for(var A=this.session,L=A.getTextRange(d.firstNonLinked),$=0;$<d.length;$++){var T=d[$];if(T.linked){var w=T.original,b=h.snippetManager.tmStrFormat(L,w,this.editor);A.replace(T,b);}}this.$inChange=!1;}},g.prototype.onAfterExec=function(d){d.command&&!d.command.readOnly&&this.updateLinkedFields();},g.prototype.onChangeSelection=function(){if(this.editor){for(var d=this.editor.selection.lead,A=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),$=0;$<this.ranges.length;$++)if(!this.ranges[$].linked){var T=this.ranges[$].contains(d.row,d.column),w=L||this.ranges[$].contains(A.row,A.column);if(T&&w)return}this.detach();}},g.prototype.onChangeSession=function(){this.detach();},g.prototype.tabNext=function(d){var A=this.tabstops.length,L=this.index+(d||1);L=Math.min(Math.max(L,1),A),L==A&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach();},g.prototype.selectTabstop=function(d){this.$openTabstops=null;var A=this.tabstops[this.index];if(A&&this.addTabstopMarkers(A),this.index=d,A=this.tabstops[this.index],!(!A||!A.length)){this.selectedTabstop=A;var L=A.firstNonLinked||A;if(A.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else {var $=this.editor.multiSelect;$.toSingleRange(L);for(var T=0;T<A.length;T++)A.hasLinkedRanges&&A[T].linked||$.addRange(A[T].clone(),!0);}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices});}},g.prototype.addTabstops=function(d,A,L){var $=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!d[0]){var T=l.fromPoints(L,L);S(T.start,A),S(T.end,A),d[0]=[T],d[0].index=0;}var w=this.index,b=[w+1,0],u=this.ranges,v=this.snippetId=(this.snippetId||0)+1;d.forEach(function(x,k){var R=this.$openTabstops[k]||x;R.snippetId=v;for(var I=0;I<x.length;I++){var D=x[I],O=l.fromPoints(D.start,D.end||D.start);E(O.start,A),E(O.end,A),O.original=D,O.tabstop=R,u.push(O),R!=x?R.unshift(O):R[I]=O,D.fmtString||R.firstNonLinked&&$?(O.linked=!0,R.hasLinkedRanges=!0):R.firstNonLinked||(R.firstNonLinked=O);}R.firstNonLinked||(R.hasLinkedRanges=!1),R===x&&(b.push(R),this.$openTabstops[k]=R),this.addTabstopMarkers(R),R.rangeList=R.rangeList||new n,R.rangeList.$bias=0,R.rangeList.addList(R);},this),b.length>2&&(this.tabstops.length&&b.push(b.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,b));},g.prototype.addTabstopMarkers=function(d){var A=this.session;d.forEach(function(L){L.markerId||(L.markerId=A.addMarker(L,"ace_snippet-marker","text"));});},g.prototype.removeTabstopMarkers=function(d){var A=this.session;d.forEach(function(L){A.removeMarker(L.markerId),L.markerId=null;});},g.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var d=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&d--,this.tabstops.forEach(function(A){A.snippetId===d?this.addTabstopMarkers(A):this.removeTabstopMarkers(A);},this);}},g.prototype.removeRange=function(d){var A=d.tabstop.indexOf(d);A!=-1&&d.tabstop.splice(A,1),A=this.ranges.indexOf(d),A!=-1&&this.ranges.splice(A,1),A=d.tabstop.rangeList.ranges.indexOf(d),A!=-1&&d.tabstop.splice(A,1),this.session.removeMarker(d.markerId),d.tabstop.length||(A=this.tabstops.indexOf(d.tabstop),A!=-1&&this.tabstops.splice(A,1),this.tabstops.length||this.detach());},g}();C.prototype.keyboardHandler=new e,C.prototype.keyboardHandler.bindKeys({Tab:function(g){h.snippetManager&&h.snippetManager.expandWithTab(g)||(g.tabstopManager.tabNext(1),g.renderer.scrollCursorIntoView());},"Shift-Tab":function(g){g.tabstopManager.tabNext(-1),g.renderer.scrollCursorIntoView();},Esc:function(g){g.tabstopManager.detach();}});var E=function(g,d){g.row==0&&(g.column+=d.column),g.row+=d.row;},S=function(g,d){g.row==d.row&&(g.column-=d.column),g.row-=d.row;};y.importCssString(`
1134
+ .ace_snippet-marker {
1135
+ -moz-box-sizing: border-box;
1136
+ box-sizing: border-box;
1137
+ background: rgba(194, 193, 208, 0.09);
1138
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1139
+ position: absolute;
1140
+ }`,"snippets.css",!1),h.snippetManager=new c;var M=o("./editor").Editor;(function(){this.insertSnippet=function(g,d){return h.snippetManager.insertSnippet(this,g,d)},this.expandSnippet=function(g){return h.snippetManager.expandWithTab(this,g)};}).call(M.prototype);});ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(o,h,_){var y=o("../virtual_renderer").VirtualRenderer,m=o("../editor").Editor,f=o("../range").Range,a=o("../lib/event"),l=o("../lib/lang"),n=o("../lib/dom"),e=o("../config").nls,t=o("./../lib/useragent"),r=function(E){return "suggest-aria-id:".concat(E)},i=t.isSafari?"menu":"listbox",s=t.isSafari?"menuitem":"option",c=t.isSafari?"aria-current":"aria-selected",p=function(E){var S=new y(E);S.$maxLines=4;var M=new m(S);return M.setHighlightActiveLine(!1),M.setShowPrintMargin(!1),M.renderer.setShowGutter(!1),M.renderer.setHighlightGutterLine(!1),M.$mouseHandler.$focusTimeout=0,M.$highlightTagPending=!0,M},C=function(){function E(S){var M=n.createElement("div"),g=p(M);S&&S.appendChild(M),M.style.display="none",g.renderer.content.style.cursor="default",g.renderer.setStyle("ace_autocomplete"),g.renderer.$textLayer.element.setAttribute("role",i),g.renderer.$textLayer.element.setAttribute("aria-roledescription",e("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),g.renderer.$textLayer.element.setAttribute("aria-label",e("autocomplete.popup.aria-label","Autocomplete suggestions")),g.renderer.textarea.setAttribute("aria-hidden","true"),g.setOption("displayIndentGuides",!1),g.setOption("dragDelay",150);var d=function(){};g.focus=d,g.$isFocused=!0,g.renderer.$cursorLayer.restartTimer=d,g.renderer.$cursorLayer.element.style.opacity="0",g.renderer.$maxLines=8,g.renderer.$keepTextAreaAtCursor=!1,g.setHighlightActiveLine(!1),g.session.highlight(""),g.session.$searchHighlight.clazz="ace_highlight-marker",g.on("mousedown",function(u){var v=u.getDocumentPosition();g.selection.moveToPosition(v),$.start.row=$.end.row=v.row,u.stop();});var A,L=new f(-1,0,-1,1/0),$=new f(-1,0,-1,1/0);$.id=g.session.addMarker($,"ace_active-line","fullLine"),g.setSelectOnHover=function(u){u?L.id&&(g.session.removeMarker(L.id),L.id=null):L.id=g.session.addMarker(L,"ace_line-hover","fullLine");},g.setSelectOnHover(!1),g.on("mousemove",function(u){if(!A){A=u;return}if(!(A.x==u.x&&A.y==u.y)){A=u,A.scrollTop=g.renderer.scrollTop,g.isMouseOver=!0;var v=A.getDocumentPosition().row;L.start.row!=v&&(L.id||g.setRow(v),w(v));}}),g.renderer.on("beforeRender",function(){if(A&&L.start.row!=-1){A.$pos=null;var u=A.getDocumentPosition().row;L.id||g.setRow(u),w(u,!0);}}),g.renderer.on("afterRender",function(){var u=g.getRow(),v=g.renderer.$textLayer,x=v.element.childNodes[u-v.config.firstRow],k=document.activeElement;if(x!==g.selectedNode&&g.selectedNode&&(n.removeCssClass(g.selectedNode,"ace_selected"),k.removeAttribute("aria-activedescendant"),g.selectedNode.removeAttribute(c),g.selectedNode.removeAttribute("id")),g.selectedNode=x,x){n.addCssClass(x,"ace_selected");var R=r(u);x.id=R,v.element.setAttribute("aria-activedescendant",R),k.setAttribute("aria-activedescendant",R),x.setAttribute("role",s),x.setAttribute("aria-roledescription",e("autocomplete.popup.item.aria-roledescription","item")),x.setAttribute("aria-label",g.getData(u).caption||g.getData(u).value),x.setAttribute("aria-setsize",g.data.length),x.setAttribute("aria-posinset",u+1),x.setAttribute("aria-describedby","doc-tooltip"),x.setAttribute(c,"true");}});var T=function(){w(-1);},w=function(u,v){u!==L.start.row&&(L.start.row=L.end.row=u,v||g.session._emit("changeBackMarker"),g._emit("changeHoverMarker"));};g.getHoveredRow=function(){return L.start.row},a.addListener(g.container,"mouseout",function(){g.isMouseOver=!1,T();}),g.on("hide",T),g.on("changeSelection",T),g.session.doc.getLength=function(){return g.data.length},g.session.doc.getLine=function(u){var v=g.data[u];return typeof v=="string"?v:v&&v.value||""};var b=g.session.bgTokenizer;return b.$tokenizeRow=function(u){var v=g.data[u],x=[];if(!v)return x;typeof v=="string"&&(v={value:v});var k=v.caption||v.value||v.name;function R(B,H){B&&x.push({type:(v.className||"")+(H||""),value:B});}for(var I=k.toLowerCase(),D=(g.filterText||"").toLowerCase(),O=0,F=0,N=0;N<=D.length;N++)if(N!=F&&(v.matchMask&1<<N||N==D.length)){var P=D.slice(F,N);F=N;var W=I.indexOf(P,O);if(W==-1)continue;R(k.slice(O,W),""),O=W+P.length,R(k.slice(W,O),"completion-highlight");}return R(k.slice(O,k.length),""),x.push({type:"completion-spacer",value:" "}),v.meta&&x.push({type:"completion-meta",value:v.meta}),v.message&&x.push({type:"completion-message",value:v.message}),x},b.$updateOnChange=d,b.start=d,g.session.$computeWidth=function(){return this.screenWidth=0},g.isOpen=!1,g.isTopdown=!1,g.autoSelect=!0,g.filterText="",g.isMouseOver=!1,g.data=[],g.setData=function(u,v){g.filterText=v||"",g.setValue(l.stringRepeat(`
1141
+ `,u.length),-1),g.data=u||[],g.setRow(0);},g.getData=function(u){return g.data[u]},g.getRow=function(){return $.start.row},g.setRow=function(u){u=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,u)),$.start.row!=u&&(g.selection.clearSelection(),$.start.row=$.end.row=u||0,g.session._emit("changeBackMarker"),g.moveCursorTo(u||0,0),g.isOpen&&g._signal("select"));},g.on("changeSelection",function(){g.isOpen&&g.setRow(g.selection.lead.row),g.renderer.scrollCursorIntoView();}),g.hide=function(){this.container.style.display="none",g.anchorPos=null,g.anchor=null,g.isOpen&&(g.isOpen=!1,this._signal("hide"));},g.tryShow=function(u,v,x,k){if(!k&&g.isOpen&&g.anchorPos&&g.anchor&&g.anchorPos.top===u.top&&g.anchorPos.left===u.left&&g.anchor===x)return !0;var R=this.container,I=window.innerHeight,D=window.innerWidth,O=this.renderer,F=O.$maxLines*v*1.4,N={top:0,bottom:0,left:0},P=I-u.top-3*this.$borderSize-v,W=u.top-3*this.$borderSize;x||(W<=P||P>=F?x="bottom":x="top"),x==="top"?(N.bottom=u.top-this.$borderSize,N.top=N.bottom-F):x==="bottom"&&(N.top=u.top+v+this.$borderSize,N.bottom=N.top+F);var B=N.top>=0&&N.bottom<=I;if(!k&&!B)return !1;B?O.$maxPixelHeight=null:x==="top"?O.$maxPixelHeight=W:O.$maxPixelHeight=P,x==="top"?(R.style.top="",R.style.bottom=I-N.bottom+"px",g.isTopdown=!1):(R.style.top=N.top+"px",R.style.bottom="",g.isTopdown=!0),R.style.display="";var H=u.left;return H+R.offsetWidth>D&&(H=D-R.offsetWidth),R.style.left=H+"px",R.style.right="",g.isOpen||(g.isOpen=!0,this._signal("show"),A=null),g.anchorPos=u,g.anchor=x,!0},g.show=function(u,v,x){this.tryShow(u,v,x?"bottom":void 0,!0);},g.goTo=function(u){var v=this.getRow(),x=this.session.getLength()-1;switch(u){case"up":v=v<=0?x:v-1;break;case"down":v=v>=x?-1:v+1;break;case"start":v=0;break;case"end":v=x;break}this.setRow(v);},g.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},g.$imageSize=0,g.$borderSize=1,g}return E}();n.importCssString(`
1142
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1143
+ background-color: #CAD6FA;
1144
+ z-index: 1;
1145
+ }
1146
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1147
+ background-color: #3a674e;
1148
+ }
1149
+ .ace_editor.ace_autocomplete .ace_line-hover {
1150
+ border: 1px solid #abbffe;
1151
+ margin-top: -1px;
1152
+ background: rgba(233,233,253,0.4);
1153
+ position: absolute;
1154
+ z-index: 2;
1155
+ }
1156
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1157
+ border: 1px solid rgba(109, 150, 13, 0.8);
1158
+ background: rgba(58, 103, 78, 0.62);
1159
+ }
1160
+ .ace_completion-meta {
1161
+ opacity: 0.5;
1162
+ margin-left: 0.9em;
1163
+ }
1164
+ .ace_completion-message {
1165
+ margin-left: 0.9em;
1166
+ color: blue;
1167
+ }
1168
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1169
+ color: #2d69c7;
1170
+ }
1171
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1172
+ color: #93ca12;
1173
+ }
1174
+ .ace_editor.ace_autocomplete {
1175
+ width: 300px;
1176
+ z-index: 200000;
1177
+ border: 1px lightgray solid;
1178
+ position: fixed;
1179
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1180
+ line-height: 1.4;
1181
+ background: #fefefe;
1182
+ color: #111;
1183
+ }
1184
+ .ace_dark.ace_editor.ace_autocomplete {
1185
+ border: 1px #484747 solid;
1186
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1187
+ line-height: 1.4;
1188
+ background: #25282c;
1189
+ color: #c1c1c1;
1190
+ }
1191
+ .ace_autocomplete .ace_text-layer {
1192
+ width: calc(100% - 8px);
1193
+ }
1194
+ .ace_autocomplete .ace_line {
1195
+ display: flex;
1196
+ align-items: center;
1197
+ }
1198
+ .ace_autocomplete .ace_line > * {
1199
+ min-width: 0;
1200
+ flex: 0 0 auto;
1201
+ }
1202
+ .ace_autocomplete .ace_line .ace_ {
1203
+ flex: 0 1 auto;
1204
+ overflow: hidden;
1205
+ text-overflow: ellipsis;
1206
+ }
1207
+ .ace_autocomplete .ace_completion-spacer {
1208
+ flex: 1;
1209
+ }
1210
+ .ace_autocomplete.ace_loading:after {
1211
+ content: "";
1212
+ position: absolute;
1213
+ top: 0px;
1214
+ height: 2px;
1215
+ width: 8%;
1216
+ background: blue;
1217
+ z-index: 100;
1218
+ animation: ace_progress 3s infinite linear;
1219
+ animation-delay: 300ms;
1220
+ transform: translateX(-100%) scaleX(1);
1221
+ }
1222
+ @keyframes ace_progress {
1223
+ 0% { transform: translateX(-100%) scaleX(1) }
1224
+ 50% { transform: translateX(625%) scaleX(2) }
1225
+ 100% { transform: translateX(1500%) scaleX(3) }
1226
+ }
1227
+ @media (prefers-reduced-motion) {
1228
+ .ace_autocomplete.ace_loading:after {
1229
+ transform: translateX(625%) scaleX(2);
1230
+ animation: none;
1231
+ }
1232
+ }
1233
+ `,"autocompletion.css",!1),h.AcePopup=C,h.$singleLineEditor=p,h.getAriaId=r;});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(o,h,_){var y=function(){function m(f){this.editor=f,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv);}return m.prototype.setScreenReaderContent=function(f){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var l=this.popup.getRow(),n=this.popup.renderer.$textLayer,e=n.element.childNodes[l-n.config.firstRow];if(e){for(var t="doc-tooltip ",r=0;r<this._lines.length;r++)t+="ace-inline-screenreader-line-".concat(r," ");e.setAttribute("aria-describedby",t);}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=f.split(/\r\n|\r|\n/);var a=this.createCodeBlock();this.screenReaderDiv.appendChild(a);},m.prototype.destroy=function(){this.screenReaderDiv.remove();},m.prototype.createCodeBlock=function(){var f=document.createElement("pre");f.setAttribute("id","ace-inline-screenreader");for(var a=0;a<this._lines.length;a++){var l=document.createElement("code");l.setAttribute("id","ace-inline-screenreader-line-".concat(a));var n=document.createTextNode(this._lines[a]);l.appendChild(n),f.appendChild(l);}return f},m}();h.AceInlineScreenReader=y;});ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(o,h,_){var y=o("../snippets").snippetManager,m=o("./inline_screenreader").AceInlineScreenReader,f=function(){function a(){this.editor=null;}return a.prototype.show=function(l,n,e){if(e=e||"",l&&this.editor&&this.editor!==l&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!l||!n)return !1;this.inlineScreenReader||(this.inlineScreenReader=new m(l));var t=n.snippet?y.getDisplayTextForSnippet(l,n.snippet):n.value;return n.hideInlinePreview||!t||!t.startsWith(e)?!1:(this.editor=l,this.inlineScreenReader.setScreenReaderContent(t),t=t.slice(e.length),t===""?l.removeGhostText():l.setGhostText(t),!0)},a.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},a.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},a.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null);},a}();h.AceInline=f;});ace.define("ace/autocomplete/util",["require","exports","module"],function(o,h,_){h.parForEach=function(m,f,a){var l=0,n=m.length;n===0&&a();for(var e=0;e<n;e++)f(m[e],function(t,r){l++,l===n&&a(t,r);});};var y=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;h.retrievePrecedingIdentifier=function(m,f,a){a=a||y;for(var l=[],n=f-1;n>=0&&a.test(m[n]);n--)l.push(m[n]);return l.reverse().join("")},h.retrieveFollowingIdentifier=function(m,f,a){a=a||y;for(var l=[],n=f;n<m.length&&a.test(m[n]);n++)l.push(m[n]);return l},h.getCompletionPrefix=function(m){var f=m.getCursorPosition(),a=m.session.getLine(f.row),l;return m.completers.forEach(function(n){n.identifierRegexps&&n.identifierRegexps.forEach(function(e){!l&&e&&(l=this.retrievePrecedingIdentifier(a,f.column,e));}.bind(this));}.bind(this)),l||this.retrievePrecedingIdentifier(a,f.column)},h.triggerAutocomplete=function(m,a){var a=a??m.session.getPrecedingCharacter();return m.completers.some(function(l){if(l.triggerCharacters&&Array.isArray(l.triggerCharacters))return l.triggerCharacters.includes(a)})};});ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(o,h,_){var y=o("./keyboard/hash_handler").HashHandler,m=o("./autocomplete/popup").AcePopup,f=o("./autocomplete/inline").AceInline,a=o("./autocomplete/popup").getAriaId,l=o("./autocomplete/util"),n=o("./lib/lang"),e=o("./lib/dom"),t=o("./snippets").snippetManager,r=o("./config"),i=o("./lib/event"),s=o("./lib/scroll").preventParentScroll,c=function(S,M){M.completer&&M.completer.destroy();},p=function(){function S(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new y,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=n.delayedCall(function(){this.updateCompletions(!0);}.bind(this)),this.tooltipTimer=n.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=n.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=n.delayedCall(function(){this.stickySelection=!0;}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=n.delayedCall(function(){var M=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!M||this.editor.completers.length===0||(this.completions=new E(S.completionsForLoading),this.openPopup(this.editor,M.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0));}.bind(this),this.stickySelectionDelay);}return Object.defineProperty(S,"completionsForLoading",{get:function(){return [{caption:r.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),S.prototype.$init=function(){return this.popup=new m(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(M){this.insertMatch(),M.stop();}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new f,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1;},S.prototype.$seen=function(M){!this.hasSeen.has(M)&&M&&M.completer&&M.completer.onSeen&&typeof M.completer.onSeen=="function"&&(M.completer.onSeen(this.editor,M),this.hasSeen.add(M));},S.prototype.$onPopupChange=function(M){if(this.inlineRenderer&&this.inlineEnabled){var g=M?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(g),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule();}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null);},S.prototype.$updateGhostText=function(M){var g=this.base.row,d=this.base.column,A=this.editor.getCursorPosition().column,L=this.editor.session.getLine(g).slice(d,A);this.inlineRenderer.show(this.editor,M,L)?this.$seen(M):this.inlineRenderer.hide();},S.prototype.$onPopupRender=function(){var M=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var g=this.popup.getFirstVisibleRow();g<=this.popup.getLastVisibleRow();g++){var d=this.popup.getData(g);d&&(!M||d.hideInlinePreview)&&this.$seen(d);}},S.prototype.$onPopupShow=function(M){this.$onPopupChange(M),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay);},S.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var M=this.editor.container.parentNode,g=[];M;)g.push(M),M.addEventListener("scroll",this.onLayoutChange,{passive:!0}),M=M.parentNode;this.$elements=g;}},S.prototype.unObserveLayoutChanges=function(){var M=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(g){g.removeEventListener("scroll",M.onLayoutChange,{passive:!0});}),this.$elements=null;},S.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip();},S.prototype.$updatePopupPosition=function(){var M=this.editor,g=M.renderer,d=g.layerConfig.lineHeight,A=g.$cursorLayer.getPixelPosition(this.base,!0);A.left-=this.popup.getTextLeftOffset();var L=M.container.getBoundingClientRect();A.top+=L.top-g.layerConfig.offset,A.left+=L.left-M.renderer.scrollLeft,A.left+=g.gutterWidth;var $={top:A.top,left:A.left};g.$ghostText&&g.$ghostTextWidget&&this.base.row===g.$ghostText.position.row&&($.top+=g.$ghostTextWidget.el.offsetHeight);var T=M.container.getBoundingClientRect().bottom-d,w=T<$.top?{top:T,left:$.left}:$;this.popup.tryShow(w,d,"bottom")||this.popup.tryShow(A,d,"top")||this.popup.show(A,d);},S.prototype.openPopup=function(M,g,d){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var A=this.popup.getRow(),L=this.popup.data[A];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),M.keyBinding.addKeyboardHandler(this.keyboardHandler);var $;this.stickySelection&&($=this.popup.data.indexOf(L)),(!$||$===-1)&&($=0),this.popup.setRow(this.autoSelect?$:-1),$===A&&L!==this.completions.filtered[$]&&this.$onPopupChange();var T=this.inlineRenderer&&this.inlineEnabled;if($===A&&T){var w=this.popup.getData(this.popup.getRow());this.$updateGhostText(w);}d||(this.popup.setTheme(M.getTheme()),this.popup.setFontSize(M.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges();},S.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges();},S.prototype.changeListener=function(M){var g=this.editor.selection.lead;(g.row!=this.base.row||g.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach();},S.prototype.blurListener=function(M){var g=document.activeElement,d=this.editor.textInput.getElement(),A=M.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(M.relatedTarget),L=this.popup&&this.popup.container;g!=d&&g.parentNode!=L&&!A&&g!=this.tooltipNode&&M.relatedTarget!=d&&this.detach();},S.prototype.mousedownListener=function(M){this.detach();},S.prototype.mousewheelListener=function(M){this.popup&&!this.popup.isMouseOver&&this.detach();},S.prototype.mouseOutListener=function(M){this.popup.isOpen&&this.$updatePopupPosition();},S.prototype.goTo=function(M){this.popup.goTo(M);},S.prototype.insertMatch=function(M,g){if(M||(M=this.popup.getData(this.popup.getRow())),!M)return !1;if(M.value==="")return this.detach();var d=this.completions,A=this.getCompletionProvider().insertMatch(this.editor,M,d.filterText,g);return this.completions==d&&this.detach(),A},S.prototype.showPopup=function(M,g){this.editor&&this.detach(),this.activated=!0,this.editor=M,M.completer!=this&&(M.completer&&M.completer.detach(),M.completer=this),M.on("changeSelection",this.changeListener),M.on("blur",this.blurListener),M.on("mousedown",this.mousedownListener),M.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,g);},S.prototype.getCompletionProvider=function(M){return this.completionProvider||(this.completionProvider=new C(M)),this.completionProvider},S.prototype.gatherCompletions=function(M,g){return this.getCompletionProvider().gatherCompletions(M,g)},S.prototype.updateCompletions=function(M,g){if(M&&this.base&&this.completions){var A=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:A});if(L==this.completions.filterText)return;if(this.completions.setFilter(L),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==L&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,L,M);return}if(g&&g.matches){var A=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(A.row,A.column),this.base.$insertRight=!0,this.completions=new E(g.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",M)}var d=this.editor.getSession(),A=this.editor.getCursorPosition(),L=l.getCompletionPrefix(this.editor);this.base=d.doc.createAnchor(A.row,A.column-L.length),this.base.$insertRight=!0;var $={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:A}).provideCompletions(this.editor,$,function(T,w,b){var u=w.filtered,v=l.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),b){if(!u.length){var x=!this.autoShown&&this.emptyMessage;if(typeof x=="function"&&(x=this.emptyMessage(v)),x){var k=[{caption:x,value:""}];this.completions=new E(k),this.openPopup(this.editor,v,M),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(u.length==1&&u[0].value==v&&!u[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&u.length==1)return this.insertMatch(u[0])}this.completions=!b&&this.showLoadingState?new E(S.completionsForLoading.concat(u),w.filterText):w,this.openPopup(this.editor,v,M),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!b);}.bind(this)),this.showLoadingState&&!this.autoShown&&!(this.popup&&this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2);},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu();},S.prototype.updateDocTooltip=function(){var M=this.popup,g=this.completions.filtered,d=g&&(g[M.getHoveredRow()]||g[M.getRow()]),A=null;if(!d||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,$=0;$<L;$++){var T=this.editor.completers[$];if(T.getDocTooltip&&d.completerId===T.id){A=T.getDocTooltip(d);break}}if(!A&&typeof d!="string"&&(A=d),typeof A=="string"&&(A={docText:A}),!A||!(A.docHTML||A.docText))return this.hideDocTooltip();this.showDocTooltip(A);},S.prototype.showDocTooltip=function(M){this.tooltipNode||(this.tooltipNode=e.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",s));var g=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(g.isDark?"ace_dark ":"")+(g.cssClass||"");var d=this.tooltipNode;M.docHTML?d.innerHTML=M.docHTML:M.docText&&(d.textContent=M.docText),d.parentNode||this.popup.container.appendChild(this.tooltipNode);var A=this.popup,L=A.container.getBoundingClientRect();d.style.top=A.container.style.top,d.style.bottom=A.container.style.bottom,d.style.display="block",window.innerWidth-L.right<320?L.left<320?A.isTopdown?(d.style.top=L.bottom+"px",d.style.left=L.left+"px",d.style.right="",d.style.bottom=""):(d.style.top=A.container.offsetTop-d.offsetHeight+"px",d.style.left=L.left+"px",d.style.right="",d.style.bottom=""):(d.style.right=window.innerWidth-L.left+"px",d.style.left=""):(d.style.left=L.right+1+"px",d.style.right="");},S.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var M=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==M&&this.editor.focus(),this.tooltipNode=null,M.parentNode&&M.parentNode.removeChild(M);}},S.prototype.onTooltipClick=function(M){for(var g=M.target;g&&g!=this.tooltipNode;){if(g.nodeName=="A"&&g.href){g.rel="noreferrer",g.target="_blank";break}g=g.parentNode;}},S.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var M=this.popup.container;M&&M.parentNode&&M.parentNode.removeChild(M);}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",c),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null;},S}();p.prototype.commands={Up:function(S){S.completer.goTo("up");},Down:function(S){S.completer.goTo("down");},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start");},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end");},Esc:function(S){S.completer.detach();},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0});},Tab:function(S){var M=S.completer.insertMatch();if(!M&&!S.tabstopManager)S.completer.goTo("down");else return M},Backspace:function(S){S.execCommand("backspace");var M=l.getCompletionPrefix(S);!M&&S.completer&&S.completer.detach();},PageUp:function(S){S.completer.popup.gotoPageUp();},PageDown:function(S){S.completer.popup.gotoPageDown();}},p.for=function(S){return S.completer instanceof p||(S.completer&&(S.completer.destroy(),S.completer=null),r.get("sharedPopups")?(p.$sharedInstance||(p.$sharedInstance=new p),S.completer=p.$sharedInstance):(S.completer=new p,S.once("destroy",c))),S.completer},p.startCommand={name:"startAutocomplete",exec:function(S,M){var g=p.for(S);g.autoInsert=!1,g.autoSelect=!0,g.autoShown=!1,g.showPopup(S,M),g.cancelContextMenu();},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var C=function(){function S(M){this.initialPosition=M,this.active=!0;}return S.prototype.insertByIndex=function(M,g,d){return !this.completions||!this.completions.filtered?!1:this.insertMatch(M,this.completions.filtered[g],d)},S.prototype.insertMatch=function(M,g,d){if(!g)return !1;if(M.startOperation({command:{name:"insertMatch"}}),g.completer&&g.completer.insertMatch)g.completer.insertMatch(M,g);else {if(!this.completions)return !1;var A=this.completions.filterText.length,L=0;if(g.range&&g.range.start.row===g.range.end.row&&(A-=this.initialPosition.prefix.length,A+=this.initialPosition.pos.column-g.range.start.column,L+=g.range.end.column-this.initialPosition.pos.column),A||L){var $;M.selection.getAllRanges?$=M.selection.getAllRanges():$=[M.getSelectionRange()];for(var T=0,w;w=$[T];T++)w.start.column-=A,w.end.column+=L,M.session.remove(w);}g.snippet?t.insertSnippet(M,g.snippet):this.$insertString(M,g),g.completer&&g.completer.onInsert&&typeof g.completer.onInsert=="function"&&g.completer.onInsert(M,g),g.command&&g.command==="startAutocomplete"&&M.execCommand(g.command);}return M.endOperation(),!0},S.prototype.$insertString=function(M,g){var d=g.value||g;M.execCommand("insertstring",d);},S.prototype.gatherCompletions=function(M,g){var d=M.getSession(),A=M.getCursorPosition(),L=l.getCompletionPrefix(M),$=[];this.completers=M.completers;var T=M.completers.length;return M.completers.forEach(function(w,b){w.getCompletions(M,d,A,L,function(u,v){w.hideInlinePreview&&(v=v.map(function(x){return Object.assign(x,{hideInlinePreview:w.hideInlinePreview})})),!u&&v&&($=$.concat(v)),g(null,{prefix:l.getCompletionPrefix(M),matches:$,finished:--T===0});});}),!0},S.prototype.provideCompletions=function(M,g,d){var A=function(w){var b=w.prefix,u=w.matches;this.completions=new E(u),g.exactMatch&&(this.completions.exactMatch=!0),g.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(b),(w.finished||this.completions.filtered.length)&&d(null,this.completions,w.finished);}.bind(this),L=!0,$=null;if(this.gatherCompletions(M,function(w,b){if(this.active){w&&(d(w,[],!0),this.detach());var u=b.prefix;if(u.indexOf(b.prefix)===0){if(L){$=b;return}A(b);}}}.bind(this)),L=!1,$){var T=$;$=null,A(T);}},S.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(M){typeof M.cancel=="function"&&M.cancel();});},S}(),E=function(){function S(M,g){this.all=M,this.filtered=M,this.filterText=g||"",this.exactMatch=!1,this.ignoreCaption=!1;}return S.prototype.setFilter=function(M){if(M.length>this.filterText&&M.lastIndexOf(this.filterText,0)===0)var g=this.filtered;else var g=this.all;this.filterText=M,g=this.filterCompletions(g,this.filterText),g=g.sort(function(A,L){return L.exactMatch-A.exactMatch||L.$score-A.$score||(A.caption||A.value).localeCompare(L.caption||L.value)});var d=null;g=g.filter(function(A){var L=A.snippet||A.caption||A.value;return L===d?!1:(d=L,!0)}),this.filtered=g;},S.prototype.filterCompletions=function(M,g){var d=[],A=g.toUpperCase(),L=g.toLowerCase();e:for(var $=0,T;T=M[$];$++){var w=!this.ignoreCaption&&T.caption||T.value||T.snippet;if(w){var b=-1,u=0,v=0,x,k;if(this.exactMatch){if(g!==w.substr(0,g.length))continue e}else {var R=w.toLowerCase().indexOf(L);if(R>-1)v=R;else for(var I=0;I<g.length;I++){var D=w.indexOf(L[I],b+1),O=w.indexOf(A[I],b+1);if(x=D>=0&&(O<0||D<O)?D:O,x<0)continue e;k=x-b-1,k>0&&(b===-1&&(v+=10),v+=k,u=u|1<<I),b=x;}}T.matchMask=u,T.exactMatch=v?0:1,T.$score=(T.score||0)-v,d.push(T);}}return d},S}();h.Autocomplete=p,h.CompletionProvider=C,h.FilteredList=E;});ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(o,h,_){var y=o("../range").Range,m=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function f(l,n){var e=l.getTextRange(y.fromPoints({row:0,column:0},n));return e.split(m).length-1}function a(l,n){var e=f(l,n),t=l.getValue().split(m),r=Object.create(null),i=t[e];return t.forEach(function(s,c){if(!(!s||s===i)){var p=Math.abs(e-c),C=t.length-p;r[s]?r[s]=Math.max(C,r[s]):r[s]=C;}}),r}h.getCompletions=function(l,n,e,t,r){var i=a(n,e),s=Object.keys(i);r(null,s.map(function(c){return {caption:c,value:c,score:i[c],meta:"local"}}));};});ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(o,h,_){var y=o("../snippets").snippetManager,m=o("../autocomplete").Autocomplete,f=o("../config"),a=o("../lib/lang"),l=o("../autocomplete/util"),n=o("../autocomplete/text_completer"),e={getCompletions:function(A,L,$,T,w){if(L.$mode.completer)return L.$mode.completer.getCompletions(A,L,$,T,w);var b=A.session.getState($.row),u=L.$mode.getCompletions(b,L,$,T);u=u.map(function(v){return v.completerId=e.id,v}),w(null,u);},id:"keywordCompleter"},t=function(A){var L={};return A.replace(/\${(\d+)(:(.*?))?}/g,function($,T,w,b){return L[T]=b||""}).replace(/\$(\d+?)/g,function($,T){return L[T]})},r={getCompletions:function(A,L,$,T,w){var b=[],u=L.getTokenAt($.row,$.column);u&&u.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?b.push("html-tag"):b=y.getActiveScopes(A);var v=y.snippetMap,x=[];b.forEach(function(k){for(var R=v[k]||[],I=R.length;I--;){var D=R[I],O=D.name||D.tabTrigger;O&&x.push({caption:O,snippet:D.content,meta:D.tabTrigger&&!D.name?D.tabTrigger+"\u21E5 ":"snippet",completerId:r.id});}},this),w(null,x);},getDocTooltip:function(A){A.snippet&&!A.docHTML&&(A.docHTML=["<b>",a.escapeHTML(A.caption),"</b>","<hr></hr>",a.escapeHTML(t(A.snippet))].join(""));},id:"snippetCompleter"},i=[r,n,e];h.setCompleters=function(A){i.length=0,A&&i.push.apply(i,A);},h.addCompleter=function(A){i.push(A);},h.textCompleter=n,h.keyWordCompleter=e,h.snippetCompleter=r;var s={name:"expandSnippet",exec:function(A){return y.expandWithTab(A)},bindKey:"Tab"},c=function(A,L){p(L.session.$mode);},p=function(A){typeof A=="string"&&(A=f.$modes[A]),A&&(y.files||(y.files={}),C(A.$id,A.snippetFileId),A.modes&&A.modes.forEach(p));},C=function(A,L){!L||!A||y.files[A]||(y.files[A]={},f.loadModule(L,function($){$&&(y.files[A]=$,!$.snippets&&$.snippetText&&($.snippets=y.parseSnippetFile($.snippetText)),y.register($.snippets||[],$.scope),$.includeScopes&&(y.snippetMap[$.scope].includeScopes=$.includeScopes,$.includeScopes.forEach(function(T){p("ace/mode/"+T);})));}));},E=function(A){var L=A.editor,$=L.completer&&L.completer.activated;if(A.command.name==="backspace")$&&!l.getCompletionPrefix(L)&&L.completer.detach();else if(A.command.name==="insertstring"&&!$){S=A;var T=A.editor.$liveAutocompletionDelay;T?M.delay(T):g(A);}},S,M=a.delayedCall(function(){g(S);},0),g=function(A){var L=A.editor,$=l.getCompletionPrefix(L),T=A.args,w=l.triggerAutocomplete(L,T);if($&&$.length>=L.$liveAutocompletionThreshold||w){var b=m.for(L);b.autoShown=!0,b.showPopup(L);}},d=o("../editor").Editor;o("../config").defineOptions(d.prototype,"editor",{enableBasicAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:i),this.commands.addCommand(m.startCommand)):this.commands.removeCommand(m.startCommand);},value:!1},enableLiveAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:i),this.commands.on("afterExec",E)):this.commands.off("afterExec",E);},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(A){A?(this.commands.addCommand(s),this.on("changeMode",c),c(null,this)):(this.commands.removeCommand(s),this.off("changeMode",c));},value:!1}});});(function(){ace.require(["ace/ext/language_tools"],function(o){typeof en=="object"&&typeof Nr=="object"&&en&&(en.exports=o);});})();});var St=styled(bt)(({theme:o})=>({borderBottom:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(o.palette.grey[500],.32)}`,padding:16})),qn=styled(bt)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:o.palette.grey[100]}})),ei=styled(bt)(({theme:o})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:"#fff",padding:"8px 16px",borderRadius:8,border:`1px solid ${alpha(o.palette.grey[500],.24)}`,cursor:"pointer",color:o.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${o.palette.primary.main}`,backgroundColor:alpha(o.palette.primary.main,.05)}})),ti=styled(bt)(({theme:o})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(o.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:o.palette.text.disabled,fontSize:12}}})),ln=styled(so)({padding:0});var po=({openPopover:o,handleClose:h,argumentsValues:_,filter:y,onExecute:m})=>{let[f,a]=useState([]),l=(e,t)=>{if(t&&t!=="")f.filter(i=>i.name===e).length>0?a(f.map(i=>i.name===e?{name:e,value:t}:i)):a([...f||[],{name:e,value:t}]);else {let r=f.filter(i=>i.name===e);a(r);}},n=()=>{let e=y||"";return f.forEach(t=>{e=e.replace(`$ARG[${t.name}]`,`'${t.value}'`);}),e};return jsxs(lo,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:h,title:"Pr\xE9-visualizar",children:[jsx(Hr,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(St,{children:_?.map((e,t)=>jsx(ho,{name:e,label:e,size:"small",onChange:r=>l(e,r.target.value),required:!0},t))}),jsxs(bt,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ni,{variant:"outlined",color:"inherit",size:"small",onClick:h,children:"Cancelar"}),jsx(ni,{variant:"contained",color:"primary",size:"small",startIcon:jsx(zn,{icon:"PLAY_SIMPLE"}),onClick:()=>m(n()),disabled:f.length<_.length,children:"Executar"})]})]})},ri=po;var zr=c(kr());c(Ir());c(Dr());c(Fr());var Al=({openPopover:o,handleClose:h,addItem:_})=>{let[y,m]=useState("");return jsxs(lo,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:h,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(Hr,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(St,{children:jsx(ho,{value:y,onChange:a=>m(a.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(bt,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ni,{variant:"outlined",color:"inherit",size:"small",onClick:h,children:"Cancelar"}),jsx(ni,{variant:"contained",color:"primary",size:"small",startIcon:jsx(zn,{icon:"SAVE_MARK"}),disabled:!y||y==="",onClick:()=>{_(y),h(),m("");},children:"Salvar"})]})]})},Br=Al;var El=({label:o,itens:h,argumentsValues:_,fields:y,addItem:m,removeItem:f,insertItemSQL:a})=>{let[l,n]=useState(!1),e=_l(),t=()=>{n(!l);},r=(s,c)=>{s.stopPropagation(),f&&f(c);},i=s=>{a(_?` $ARG[${s}]`:y?` this.${s}`:` ${s}`);};return jsxs(bt,{children:[jsxs(bt,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(ln,{edge:"end",onClick:t,children:jsx(zn,{icon:l?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(Hr,{variant:"overline",color:"text.primary",children:o}),m&&jsxs(Fragment,{children:[jsx(ln,{edge:"end",onClick:e.onOpen,children:jsx(zn,{icon:"SIMPLE_ADD"})}),jsx(Br,{addItem:m,handleClose:e.onClose,openPopover:e.open})]})]}),l&&jsx(bt,{spacing:.5,children:jsx(Ll,{sx:{maxHeight:150},children:h?.map((s,c)=>jsxs(ei,{direction:"row",justifyContent:"space-between",onClick:()=>i(s),children:[jsx(Hr,{variant:"caption",textAlign:"center",width:"100%",children:s}),f&&jsx(so,{edge:"end",onClick:p=>r(p,s),children:jsx(zn,{icon:"DELETE_MARK_BUTTON_02"})})]},c))})})]})},yt=El;var Ol=({fieldsSelect:o,argumentsValues:h,onChangeArguments:_,sql:y,setSql:m,setFilterRule:f})=>{let[a,l]=useState(),{setValue:n}=useFormContext(),[e,t]=useState(1),[r,i]=useState(),s=S=>{r.session.insert(e,` ${S} `);},c=S=>{_([...h||[],S]);},p=S=>{_(h?.filter(M=>M!==S));},C=S=>{m(S[0]),f(S[0]),n("groups",void 0);},E=a?o.filter(S=>S.id.toString().toLocaleLowerCase().includes(a)||S.description.toString().toLocaleLowerCase().includes(a)||S.name?.toString().toLocaleLowerCase().includes(a)):o;return console.log({"react-ace/lib/ace":y}),jsxs(bt,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(qn,{children:[jsx(Rl,{value:a,trigger:"change",onSearch:S=>l(S?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(yt,{label:"Campos",fields:!0,itens:E.map(S=>S.name),insertItemSQL:s}),jsx(yt,{label:"Argumentos",argumentsValues:!0,itens:h,addItem:c,removeItem:p,insertItemSQL:s}),jsx(yt,{label:"Operadores",insertItemSQL:s,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(yt,{label:"Filtros",fields:!0,insertItemSQL:s,itens:E.map(S=>S.name)})]}),jsx(ti,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(zr.default,{mode:"mysql",theme:"github",name:"splitEditor",onChange:S=>{console.log(S),C(S);},onCursorChange:S=>{console.log({selection:S}),t(S.getCursor);},value:y,onLoad:S=>i(S),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},Ur=Ol;var Fl=({data:o,fields:h,isLoading:_,isError:y})=>jsxs(bt,{children:[jsx(Hr,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),y&&jsx(bt,{children:"Falha ao gerar resultado"}),o&&jsx(Nl,{columns:h?.map(m=>({field:m,headerName:m,width:150,type:"string"})),loading:_,rows:o,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})]}),Gr=Fl;var Kr=styled(bt)(({theme:o})=>({border:`1px solid ${alpha(o.palette.primary.main,.32)}`,backgroundColor:alpha(o.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),Yr=styled(so)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),nn=styled(rn)(()=>({width:230}));var Vl=({index:o,indexGroup:h,removeConditional:_,fieldsSelect:y})=>{let{watch:m}=useFormContext(),f=`groups.[${h}].conditionals[${o}].field`,a=`groups.[${h}].conditionals[${o}].conditional`,l=`groups.[${h}].conditionals[${o}].type`,n=`groups.[${h}].conditionals[${o}].value`,e=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],t=m(l);return jsxs(bt,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(rn,{label:"Se",name:f,size:"small",fullWidth:!0,options:y?.map(r=>({value:r.name,label:r.description}))}),jsx(rn,{label:"Estado",name:a,size:"small",fullWidth:!0,options:e}),jsx(rn,{label:"Objetivo",name:`groups.[${h}].conditionals[${o}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),t==="value"?jsx(Gl,{label:"Valor",name:n,size:"small",fullWidth:!0}):jsx(rn,{label:"Se",name:n,size:"small",fullWidth:!0,options:y?.map(r=>({value:r.name,label:r.description}))}),jsx(Yr,{color:"error",onClick:()=>{_(o);},children:jsx(zn,{icon:"DELETE_MARK_BUTTON_02"})})]})},Qr=Vl;var ql=({index:o,removeGroup:h,fieldsSelect:_})=>{let{control:y}=useFormContext(),m=`groups.[${o}].operator`,{fields:f,append:a,remove:l}=useFieldArray({name:`groups.${o}.conditionals`,control:y});return jsx(Jl,{name:`GRUPO ${o+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(nn,{name:m,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>h(o),children:jsxs(bt,{spacing:1.5,alignItems:"flex-start",children:[f.map((n,e)=>jsx(Qr,{index:e,indexGroup:o,removeConditional:t=>l(t),fieldsSelect:_},n.id)),jsx(Xl,{actionType:"NEW",onClick:()=>a({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},Zr=ql;var oc=({fieldsSelect:o})=>{let{control:h}=useFormContext(),{fields:_,append:y,remove:m}=useFieldArray({name:"groups",control:h});return jsxs(bt,{gap:1.5,children:[jsxs(Kr,{direction:"row",spacing:1.5,children:[jsx(Hr,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(bt,{children:jsx(nn,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(Hr,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),_.map((f,a)=>jsx(Zr,{index:a,removeGroup:l=>m(l),fieldsSelect:o},f.id)),jsx(ni,{size:"large",color:"inherit",startIcon:jsx(zn,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{y({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},qr=oc;var eo=styled(bt)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),to=styled(bt)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),Qn=styled(ac)(()=>({lineHeight:"1em"})),no=styled(bt)(()=>({padding:12}));var gc=({argumentsValues:o,onChangeArguments:h,fieldsSelect:_,onChangeRule:y,onChangeSqlProcessed:m,defaultMode:f,defaultFilter:a,dataPreview:l,errorPreview:n,loadingPreview:e})=>{let[t,r]=useState(a||""),[i,s]=pc(),[c,p]=useState(f||"simple"),{watch:C,setValue:E}=useFormContext(),S=_l(),M=C("operator"),g=C("groups");useEffect(()=>()=>{E("config",{});},[]);let d=($,T)=>{if(T==="advanced"){let w=a$1(g,M);r(w),m(w),y(w);}p(T);},A=$=>{i||c==="simple"||o.length===0?s():S.onOpen($);},L=$=>{s(),m($);};return jsx(Fragment,{children:jsxs(eo,{children:[jsxs(to,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(uc,{color:"primary",value:c,size:"small",exclusive:!0,onChange:d,children:[jsx(Qn,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(Qn,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(ni,{variant:"outlined",color:"inherit",onClick:$=>A($),startIcon:!i&&jsx(zn,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:i?"Voltar":"Executar"}),!!S.open&&jsx(ri,{handleClose:S.onClose,openPopover:S.open,argumentsValues:o,filter:t,onExecute:$=>L($)})]}),jsx(no,{children:i?jsx(Gr,{fields:_.map($=>$.name),data:l,isError:n,isLoading:e}):jsx(Fragment,{children:c==="simple"?jsx(qr,{fieldsSelect:_,sql:t,setSql:r}):jsx(Ur,{fieldsSelect:_,argumentsValues:o,onChangeArguments:h,sql:t,setSql:r,setFilterRule:y})})})]})})},Mu=gc;/*! Bundled license information:
1234
+
1235
+ ace-builds/src-noconflict/ace.js:
1236
+ (*
1237
+ * based on code from:
1238
+ *
1239
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
1240
+ * Available via the MIT or new BSD license.
1241
+ * see: http://github.com/jrburke/requirejs for details
1242
+ *)
1243
+
1244
+ react-is/cjs/react-is.production.min.js:
1245
+ (** @license React v16.13.1
1246
+ * react-is.production.min.js
1247
+ *
1248
+ * Copyright (c) Facebook, Inc. and its affiliates.
1249
+ *
1250
+ * This source code is licensed under the MIT license found in the
1251
+ * LICENSE file in the root directory of this source tree.
1252
+ *)
1253
+
1254
+ react-is/cjs/react-is.development.js:
1255
+ (** @license React v16.13.1
1256
+ * react-is.development.js
1257
+ *
1258
+ * Copyright (c) Facebook, Inc. and its affiliates.
1259
+ *
1260
+ * This source code is licensed under the MIT license found in the
1261
+ * LICENSE file in the root directory of this source tree.
1262
+ *)
1263
+
1264
+ object-assign/index.js:
1265
+ (*
1266
+ object-assign
1267
+ (c) Sindre Sorhus
1268
+ @license MIT
1269
+ *)
1270
+ */
1271
+
1272
+ export { Mu as default };