openc3-cosmos-tool-cmdtlmserver 6.2.1 → 6.3.0
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.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/{ArrayWidget-BxEO5hEG-89ca0a2e546d77657dd9.js → ArrayWidget-BbsN1dzF-ee2cfc7dad123cfaccf5.js} +2 -2
- data/tools/cmdtlmserver/{ArrayplotWidget-B_VPoV4v-7b820a5e88bad1425d1c.js → ArrayplotWidget-CCKEyYIx-a00019e86008704efc46.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-C9dkpg2O-7723dc0faa77b237d7f9.js → BarColumn-C6p07yWK-a95a551de7a97b26a986.js} +1 -1
- data/tools/cmdtlmserver/BlockWidget-DlCHbqZX-c390667024b5d4780d6b.js +2 -0
- data/tools/cmdtlmserver/{ButtonWidget-B6HM0Doo-ce7e70aebc6509184e26.js → ButtonWidget-CtfJzCBR-9a325bb9d73eea161bde.js} +2 -2
- data/tools/cmdtlmserver/{CanvasWidget-DZQGG-yQ-6864bab874dccb2db67c.js → CanvasWidget-CqRlXc4r-fecb24efdf6f68a33ad2.js} +1 -1
- data/tools/cmdtlmserver/CanvasdotWidget--Xr_KsZs-840bf70c26d7888f4d66.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-mhcPpAuN-441a8a40b76b47f0e9dd.js → CanvasimageWidget-BPlj5QYK-148404626d26f39ae7a4.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-Cx-dH8Gc-c505d808df433d5fd979.js → CanvasimagevalueWidget-DVFGLt8f-228223ab8bc7ab0b61c6.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-CYNqmyP0-c9c9beb56e22552527cb.js +1 -0
- data/tools/cmdtlmserver/{CanvaslabelvalueWidget-CwmYDCjr-aca636f4d86f04fc6120.js → CanvaslabelvalueWidget-B7yIDmsn-725d0c4e2daf6bda08ec.js} +1 -1
- data/tools/cmdtlmserver/CanvaslineWidget-BICdxX0Q-7c180d081ca1a967d997.js +1 -0
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-C3sJnjLQ-c20af62fc101f2e6d9e7.js → CanvaslinevalueWidget-Cq-Ddh0P-bdf272b782303e2bc8bb.js} +1 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-B74AWeaW-de22da2f691ae5858bbf.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-543bcdcded38905596c1.js → CmdPacketsTab-8938018b2c20935a31ff.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-c5e0c27cd668cb4acdd2.js → CmdTlmServer-3100bab0f78a7952a5f1.js} +2 -2
- data/tools/cmdtlmserver/ComboboxWidget-CtyKbEWb-7925168021879bcae865.js +1 -0
- data/tools/cmdtlmserver/DateWidget-BEVSczU8-95d14f0b9ce5fc0b69a3.js +1 -0
- data/tools/cmdtlmserver/{DetailsDialog-BvbziA7Y-a6d191d4c24ae44227f5.js → DetailsDialog-DmEC5BTs-ae29c74b5a12a811ab58.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-gFSYxzvT-5b7c1448f53e03ca3e91.js → DynamicWidget-CfMtj7H8-dda9e71246a61119ef51.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-CGpnTqVH-5a4cac76beeee76398b5.js → FormatvalueWidget-DN12xymS-312eedcf339bb3a361e8.js} +1 -1
- data/tools/cmdtlmserver/Graph-Bgo0cjl3-34cca1d79d056287c70c.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-Dycey-mj-d4aa575ef98087670b47.js → GraphWidget-DurWDmpg-1d3f53de02fa1378a1c8.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-D31NRWy5-567abe97366db941d1d0.js → HorizontalWidget-Cd_wl1b3-b4a1220511cbad208895.js} +1 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-BcMTFBU--ebe35d30ef1038d848e8.js +1 -0
- data/tools/cmdtlmserver/HorizontallineWidget-CXFqHclf-fa0e898fc84d1495ab9f.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-Ctj8OIcG-8eb7274680df97862be9.js → IframeWidget-BPerHCCa-89189a6be7985eb8e47b.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-BrNrCBvi-c56dfbfda95fe546284c.js → ImageLoader-4N-7Gj61-e6e724f54c4470cc6855.js} +1 -1
- data/tools/cmdtlmserver/ImageviewerWidget-Cw_H_HmZ-79d50f4df25f701d60c0.js +1 -0
- data/tools/cmdtlmserver/InterfacesTab-2d486c0457a95cc3e028.js +1 -0
- data/tools/cmdtlmserver/{LabelWidget-t7I87dp7-c8e7d564e904105dba56.js → LabelWidget-xrmcVeq8-870ee165781b2cf65c51.js} +1 -1
- data/tools/cmdtlmserver/LabelledWidget-D48QoyMk-8ef3423e6396375a66e4.js +1 -0
- data/tools/cmdtlmserver/LabelprogressbarWidget-C_950t6g-2936a8a5b4b14474e12e.js +1 -0
- data/tools/cmdtlmserver/LabelsparklineWidget-0KXQyPoU-da36e09f571b80924e16.js +1 -0
- data/tools/cmdtlmserver/{LabelvalueWidget-Zx_yHCtl-761beda3ba9005900e83.js → LabelvalueWidget-CQ06wWDK-1796e7cae5e984c98aaf.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluedescWidget-BBSBh4vI-7930a82f5e07d7ac49ee.js → LabelvaluedescWidget-Bo8zT01X-80efb25b4bedad034d9d.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluelimitsbarWidget-CZueHYWG-24b90c24e80fd1a209b0.js → LabelvaluelimitsbarWidget-BucTw8Yk-3294f1f5165c95dd609e.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Dflb1hNd-a115105dee00eafa5323.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-BhYTBgDq-f7d7ee8128f9058ef8c3.js → LabelvaluerangebarWidget-D8cbfXFM-ed365f14f0ddd33fc1ee.js} +1 -1
- data/tools/cmdtlmserver/{Layout-Bh7VzCZd-dcb9c3641454e6c67c47.js → Layout-Tf--nruw-77595e15c57a061b0dba.js} +1 -1
- data/tools/cmdtlmserver/LedWidget-qH_FthkK-1cfbae497162dcc3aefa.js +1 -0
- data/tools/cmdtlmserver/{LimitsbarWidget-Djui0IpK-c1dec25b5074f46c266b.js → LimitsbarWidget-B9lAB2RD-ba9cf8359583cfe6eeb1.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-DdmvKzmx-6cf2a6f3dc4493ea0ef5.js → LimitscolorWidget-c6Qa6su7-87921f3fb3e7afc5de79.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-Cc19IEjq-bc58d443d9a79a05718e.js → LimitscolumnWidget-CcLs_443-604b2033bbe5db32cec6.js} +1 -1
- data/tools/cmdtlmserver/LinegraphWidget-BSVYLFo1-e8a98958fba9fb2e2fb9.js +1 -0
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-DXFpZTre-67f734ae3f31f19eb2a0.js +1 -0
- data/tools/cmdtlmserver/{ProgressbarWidget-DIfqhHRE-aebd8d5a762deda63d9c.js → ProgressbarWidget-iYGw8-Dc-ebd0bd2f7dd1a5a808fc.js} +1 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-ytmoVZ3u-3a28b6b2ee47bb71a55d.js +1 -0
- data/tools/cmdtlmserver/{RadiogroupWidget-Ci9sCX39-db829f94bee5140bb9cc.js → RadiogroupWidget-CusMBhKH-2ab564c7e2c5bd9ce708.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-CN0YuHqy-9b49a64ed4d1a23e9fa2.js → RangebarWidget-D_zGTtCa-8bfd7bef4ad63b9af243.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-2b725610c629b9879bac.js → RawDialog-9d64be002d16366306d0.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-y4jBtJB2-2fa7012d1e3c1cc9a765.js → RollupWidget-Dolsixyt-64fd8c2e5990b362afb3.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-97a4ce9897517bb6bde4.js → RoutersTab-12cdceede3476c777ebf.js} +1 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-DV2nZuNi-622615ed3b3c3be199a7.js +1 -0
- data/tools/cmdtlmserver/{SignalWidget-DQ5Uc2uV-864549b10d055bc6c168.js → SignalWidget-d9-6h85k-6fb4be9567110de7f7f2.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-BH0p2OLi-d2bd2a8e1f0b4014a44f.js +1 -0
- data/tools/cmdtlmserver/{SparklineWidget-CZtvu2ss-a652a442fd625a97a9b0.js → SparklineWidget-coxi9r2g-93d3a65c88c064975334.js} +1 -1
- data/tools/cmdtlmserver/{StatusTab-ebf6453fac33bf59a564.js → StatusTab-84eda227fff2c85ad6b1.js} +1 -1
- data/tools/cmdtlmserver/TabbookWidget-B1XKplGH-e22ec8d6a5c838c7c5fd.js +1 -0
- data/tools/cmdtlmserver/{TargetsTab-ae3381cde4d9b22a9272.js → TargetsTab-e4763d63ea20379aa310.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-C-_M2M4l-e87fb9cd37972bf5d25b.js +1 -0
- data/tools/cmdtlmserver/{TextfieldWidget-Df0ANSiU-a45885e9c031fa702946.js → TextfieldWidget-C08N4JE8-1068f0ee1d4002e54079.js} +1 -1
- data/tools/cmdtlmserver/TimeWidget-DtwdEcFg-5a3bc19e8ab2a1804ae7.js +1 -0
- data/tools/cmdtlmserver/TitleWidget-CT-aLcNb-f05601921aa733b9911e.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-60429ad30f45f45c7ac9.js → TlmPacketsTab-e5b98e3e4c15475a7a17.js} +1 -1
- data/tools/cmdtlmserver/{Updater-82fa1a354a9721098906.js → Updater-30365f17f9b4eb94ca1e.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-C4spAawK-e7dee3c34a6d790327ec.js → VWidget-DQqb7NVW-4602918435743a49de41.js} +1 -1
- data/tools/cmdtlmserver/ValueWidget-C6RanBj3-1821aa6088bd82d581f4.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-B3bvjfxc-4f2349bfcb30c31119c1.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-QvhI6EcE-b0440ffbb0b94727592e.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-Dt3K9BnC-5a6ec326052278b4ed3d.js +1 -0
- data/tools/cmdtlmserver/{VerticalWidget-D8jUFxjS-dc1f1f22baae1b1bf9ee.js → VerticalWidget-BIIViZgI-3d41ce14c58d12499a92.js} +1 -1
- data/tools/cmdtlmserver/VerticalboxWidget-DY72fLHW-f459428e4aed8df3e9d9.js +1 -0
- data/tools/cmdtlmserver/{Widget-fRCERxGf-6cf6e886d2d5ee76cfc6.js → Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js} +1 -1
- data/tools/cmdtlmserver/main-3edbee545cea57a5f76d.js +1499 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-61aec8b87d81fdbc4b64.js +7 -0
- metadata +79 -82
- data/tools/cmdtlmserver/BlockWidget-CuefOin6-edc80607b7a1d528f5e3.js +0 -2
- data/tools/cmdtlmserver/CanvasdotWidget-6wuCSnw_-e0f154be630a0c8394bc.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-CQZCeohU-85c23c2118739625a3a1.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-nTP3fJB4-78e605105cd357f98670.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-5-8YDsQL-e19c2b901eae43feeb7c.js +0 -1
- data/tools/cmdtlmserver/ComboboxWidget-DzBL8h9f-d1afd3d09dbb57142156.js +0 -1
- data/tools/cmdtlmserver/DateWidget-CW7Od7lB-14c75cebe909660c92a6.js +0 -1
- data/tools/cmdtlmserver/Graph-3rkhFP3G-b8db0cdb9ecf80ac5155.js +0 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-Br8dSVHD-7c9a14b981c6d7631921.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-CbxREBYI-cd6486b6aeb6fbdd102b.js +0 -1
- data/tools/cmdtlmserver/ImageviewerWidget-XrsqxmLo-e5e72a6a85a49cb007ad.js +0 -1
- data/tools/cmdtlmserver/InterfacesTab-5fe4b0f137ffde75f928.js +0 -1
- data/tools/cmdtlmserver/LabelledWidget-C7TDf92M-e5c2e34c391a4721e565.js +0 -1
- data/tools/cmdtlmserver/LabelprogressbarWidget-wwLURt1u-c12f252a4577e90e8ba4.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B3awLUyP-dafc251f2886e5de7219.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BTvzyQMq-8ef478f7a9ed47139a9b.js +0 -1
- data/tools/cmdtlmserver/LedWidget-CxJjJBBS-71046e57b3786c5a7889.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-BtieJxeL-be15f3c0e6a500ecc463.js +0 -1
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-DnExVRF8-4a69d3f7ece972d3f5e2.js +0 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-QzIkNP7m-300018a2418b2cbe7f09.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-CBzYk4Y3-48abadd8da946b6c65a5.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-6rsc_dSM-4c67a06ee2036a93075a.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-DNALU0jl-ae79a3b9beef34b7efde.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-5hqPj74D-292f2786815b2027f6e6.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-C6XQMUG2-fa62efc8fea7b7a08ccc.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-B9SPUlbW-55092f64413a6ce5551d.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-D4RrYVEK-c90078a7e58747e8aa55.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Bc9_Vj_f-b088c7ef6cd4bf20f55e.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-DHKIL7sf-72a766dafcef2f6c4767.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-CecQRIok-5cef01f82763ccf9350a.js +0 -1
- data/tools/cmdtlmserver/VerticalboxWidget-B4eGUSYH-24dd29d0e54de2ba61eb.js +0 -1
- data/tools/cmdtlmserver/main-4bad43bda3e8a8483ba9.js +0 -1423
- data/tools/cmdtlmserver/services-6c036365da68dd4327ff.js +0 -7
@@ -0,0 +1,1499 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(yr,et){"use strict";var Qt,io,or,sn,Et,Hi,hr,Xd,Qd,Ns,Ds,$o,Si,Ir,al,ll,Zd,Jd,ep,Hc,tp,np,rp,ip,Uc,op,sp,ap,lp,cp,up,hp,dp,pp;return{setters:[Lt=>{Qt=Lt.resolveComponent,io=Lt.createBlock,or=Lt.openBlock,sn=Lt.withCtx,Et=Lt.createVNode,Hi=Lt.createElementBlock,hr=Lt.createElementVNode,Xd=Lt.useCssVars,Qd=Lt.defineAsyncComponent,Ns=Lt.h,Ds=Lt.normalizeStyle,$o=Lt.createCommentVNode,Si=Lt.createTextVNode,Ir=Lt.toDisplayString,al=Lt.normalizeProps,ll=Lt.guardReactiveProps,Zd=Lt.defineComponent,Jd=Lt.warn,ep=Lt.inject,Hc=Lt.computed,tp=Lt.shallowRef,np=Lt.watchEffect,rp=Lt.getCurrentInstance,ip=Lt.provide,Uc=Lt.createApp,op=Lt.withDirectives,sp=Lt.withModifiers,ap=Lt.vShow,lp=Lt.mergeProps},Lt=>{cp=Lt.createRouter,up=Lt.createWebHistory},Lt=>{hp=Lt.getMountedApps},Lt=>{dp=Lt.createStore},Lt=>{pp=Lt.createVuetify}],execute:function(){yr({$:xp,c:R$,l:bn,m:br,y:qn,z:Qh});var Lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(n,f).enumerable})),e.push.apply(e,r)}return e}function Zo(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?gp(Object(e),!0).forEach(function(r){p0(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):gp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function p0(n,t,e){return(t=function(r){var f=function(m,y){if(Jo(m)!=="object"||m===null)return m;var x=m[Symbol.toPrimitive];if(x!==void 0){var h=x.call(m,y);if(Jo(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(m)}(r,"string");return Jo(f)==="symbol"?f:String(f)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Jo(n){return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,f=String(e),m=f.length,y=-1,x="",h=f.charCodeAt(0);++y<m;)(r=f.charCodeAt(y))!=0?x+=r>=1&&r<=31||r==127||y==0&&r>=48&&r<=57||y==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":y==0&&m==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(y):f.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(Lt);var g0={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function f0(n){if(Jo(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Zo(Zo({},g0),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(Jo(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:m0.bind(null,t,e),mount:v0.bind(null,t,e),unmount:w0.bind(null,t,e),update:y0.bind(null,t,e)}}function m0(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function v0(n,t,e){var r={};return Promise.resolve().then(function(){return function(f,m){return typeof f.appOptions=="function"?f.appOptions(m):Promise.resolve(Zo({},f.appOptions))}(n,e).then(function(f){var m;if(e.domElement&&!f.el&&(f.el=e.domElement),f.el)if(typeof f.el=="string"){if(!(m=document.querySelector(f.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(f.el))}else(m=f.el).id||(m.id="single-spa-application:".concat(e.name)),f.el="#".concat(CSS.escape(m.id));else{var y="single-spa-application:".concat(e.name);f.el="#".concat(CSS.escape(y)),(m=document.getElementById(y))||((m=document.createElement("div")).id=y,document.body.appendChild(m))}if(!n.replaceMode&&(f.el=f.el+" .single-spa-container",!m.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",m.appendChild(x)}r.domEl=m,f.render||f.template||!n.rootComponent||(f.render=function(g){return g(n.rootComponent)}),f.data||(f.data={});var h=f.data;if(f.data=function(){return Zo(Zo({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(f),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return r.root=r.vueInstance.mount(f.el),t[e.name]=r,r.vueInstance});r.root=r.vueInstance.mount(f.el)}else if(r.vueInstance=new n.Vue(f),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return t[e.name]=r,r.vueInstance});return t[e.name]=r,r.vueInstance})})}function y0(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],f=Zo(Zo({},n.appOptions.data||{}),e),m=r.root||r.vueInstance;for(var y in f)m[y]=f[y]})}function w0(n,t,e){return Promise.resolve().then(function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const b0=yr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,f]of t)e[r]=f;return e}),x0={};function C0(n,t){const e=Qt("router-view"),r=Qt("v-app");return or(),io(r,{id:"innerapp"},{default:sn(()=>[Et(e)]),_:1})}const k0=b0(x0,[["render",C0]]),I2="modulepreload",R2=function(n){return"/"+n},E2={},tt=function(t,e,r){let f=Promise.resolve();function m(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return f.then(y=>{for(const x of y||[])x.status==="rejected"&&m(x.reason);return t().catch(m)})},fp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/cmdtlmserver/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(fp)},es=yr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,f]of t)e[r]=f;return e}),_0="/icons/customIcons.svg",Vc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return _0+"#"+this.icon}}},mp=()=>{Xd(n=>({"259824e2":n.color}))},vp=Vc.setup;Vc.setup=vp?(n,t)=>(mp(),vp(n,t)):mp;const A0={class:"cosmos-custom-icon"},S0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},T0=["href"];function $0(n,t,e,r,f,m){return or(),Hi("span",A0,[(or(),Hi("svg",S0,[hr("use",{href:m.iconSrc},null,8,T0)]))])}const M0=es(Vc,[["render",$0],["__scopeId","data-v-4b6f1199"]]),cl=6e4,qc=36e5,I0=1e3,yp=Symbol.for("constructDateFrom");function qn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&yp in n?n[yp](t):n instanceof Date?new n.constructor(t):new Date(t)}function bn(n,t){return qn(t||n,n)}let R0={};function Fs(){return R0}function Mo(n,t){var e,r,f,m;const y=Fs(),x=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??y.weekStartsOn??((m=(f=y.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,h=bn(n,t==null?void 0:t.in),g=h.getDay(),s=(g<x?7:0)+g-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Ps(n,t){return Mo(n,{...t,weekStartsOn:1})}function wp(n,t){const e=bn(n,void 0),r=e.getFullYear(),f=qn(e,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const m=Ps(f),y=qn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Ps(y);return e.getTime()>=m.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function ul(n){const t=bn(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function E0(n,...t){const e=qn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function bp(n,t){const e=bn(n,void 0);return e.setHours(0,0,0,0),e}function L0(n,t,e){const[r,f]=E0(void 0,n,t),m=bp(r),y=bp(f),x=+m-ul(m),h=+y-ul(y);return Math.round((x-h)/864e5)}function O0(n,t){const e=wp(n),r=qn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Ps(r)}function N0(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function xp(n){return!(!N0(n)&&typeof n!="number"||isNaN(+bn(n)))}function D0(n,t){const e=bn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const F0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},P0=(n,t,e)=>{let r;const f=F0[n];return typeof f=="string"?r=f:t===1?r=f.one:r=f.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Kc(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const W0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},B0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},z0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},j0={date:Kc({formats:W0,defaultWidth:"full"}),time:Kc({formats:B0,defaultWidth:"full"}),dateTime:Kc({formats:z0,defaultWidth:"full"})},H0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},U0=(n,t,e,r)=>H0[n];function ya(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let f;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;f=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;f=n.values[x]||n.values[y]}const m=n.argumentCallback?n.argumentCallback(t):t;return f[m]}}const V0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},K0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},G0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Y0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Q0=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Z0={ordinalNumber:Q0,era:ya({values:V0,defaultWidth:"wide"}),quarter:ya({values:q0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ya({values:K0,defaultWidth:"wide"}),day:ya({values:G0,defaultWidth:"wide"}),dayPeriod:ya({values:Y0,defaultWidth:"wide",formattingValues:X0,defaultFormattingWidth:"wide"})};function wa(n){return(t,e={})=>{const r=e.width,f=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],m=t.match(f);if(!m)return null;const y=m[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?eb(x,c=>c.test(y)):J0(x,c=>c.test(y));let g;g=n.valueCallback?n.valueCallback(h):h,g=e.valueCallback?e.valueCallback(g):g;const s=t.slice(y.length);return{value:g,rest:s}}}function J0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function eb(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function tb(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const f=r[0],m=t.match(n.parsePattern);if(!m)return null;let y=n.valueCallback?n.valueCallback(m[0]):m[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(f.length);return{value:y,rest:x}}}const nb=/^(\d+)(th|st|nd|rd)?/i,rb=/\d+/i,ib={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ob={any:[/^b/i,/^(a|c)/i]},sb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ab={any:[/1/i,/2/i,/3/i,/4/i]},lb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ub={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},db={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},pb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gb={ordinalNumber:tb({matchPattern:nb,parsePattern:rb,valueCallback:n=>parseInt(n,10)}),era:wa({matchPatterns:ib,defaultMatchWidth:"wide",parsePatterns:ob,defaultParseWidth:"any"}),quarter:wa({matchPatterns:sb,defaultMatchWidth:"wide",parsePatterns:ab,defaultParseWidth:"any",valueCallback:n=>n+1}),month:wa({matchPatterns:lb,defaultMatchWidth:"wide",parsePatterns:cb,defaultParseWidth:"any"}),day:wa({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:hb,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:db,defaultMatchWidth:"any",parsePatterns:pb,defaultParseWidth:"any"})},Cp={code:"en-US",formatDistance:P0,formatLong:j0,formatRelative:U0,localize:Z0,match:gb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fb(n,t){const e=bn(n,void 0);return L0(e,D0(e))+1}function kp(n,t){const e=bn(n,void 0),r=+Ps(e)-+O0(e);return Math.round(r/6048e5)+1}function Gc(n,t){var e,r,f,m;const y=bn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Fs(),g=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((m=(f=h.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,s=qn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,g),s.setHours(0,0,0,0);const c=Mo(s,t),u=qn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,g),u.setHours(0,0,0,0);const a=Mo(u,t);return+y>=+c?x+1:+y>=+a?x:x-1}function mb(n,t){var e,r,f,m;const y=Fs(),x=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??y.firstWeekContainsDate??((m=(f=y.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,h=Gc(n,t),g=qn((t==null?void 0:t.in)||n,0);return g.setFullYear(h,0,x),g.setHours(0,0,0,0),Mo(g,t)}function _p(n,t){const e=bn(n,t==null?void 0:t.in),r=+Mo(e,t)-+mb(e,t);return Math.round(r/6048e5)+1}function an(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Io={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return an(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):an(e+1,2)},d(n,t){return an(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return an(n.getHours()%12||12,t.length)},H(n,t){return an(n.getHours(),t.length)},m(n,t){return an(n.getMinutes(),t.length)},s(n,t){return an(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),f=Math.trunc(r*Math.pow(10,e-3));return an(f,t.length)}},Ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ap={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),f=r>0?r:1-r;return e.ordinalNumber(f,{unit:"year"})}return Io.y(n,t)},Y:function(n,t,e,r){const f=Gc(n,r),m=f>0?f:1-f;if(t==="YY"){const y=m%100;return an(y,2)}return t==="Yo"?e.ordinalNumber(m,{unit:"year"}):an(m,t.length)},R:function(n,t){const e=wp(n);return an(e,t.length)},u:function(n,t){const e=n.getFullYear();return an(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return an(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return an(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Io.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return an(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const f=_p(n,r);return t==="wo"?e.ordinalNumber(f,{unit:"week"}):an(f,t.length)},I:function(n,t,e){const r=kp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):an(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Io.d(n,t)},D:function(n,t,e){const r=fb(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):an(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const f=n.getDay(),m=(f-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(m);case"ee":return an(m,2);case"eo":return e.ordinalNumber(m,{unit:"day"});case"eee":return e.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(f,{width:"short",context:"formatting"});case"eeee":default:return e.day(f,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const f=n.getDay(),m=(f-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(m);case"cc":return an(m,t.length);case"co":return e.ordinalNumber(m,{unit:"day"});case"ccc":return e.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(f,{width:"narrow",context:"standalone"});case"cccccc":return e.day(f,{width:"short",context:"standalone"});case"cccc":default:return e.day(f,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),f=r===0?7:r;switch(t){case"i":return String(f);case"ii":return an(f,t.length);case"io":return e.ordinalNumber(f,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let f;switch(r===12?f=Ws.noon:r===0?f=Ws.midnight:f=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let f;switch(r>=17?f=Ws.evening:r>=12?f=Ws.afternoon:r>=4?f=Ws.morning:f=Ws.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Io.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Io.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):an(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):an(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Io.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Io.s(n,t)},S:function(n,t){return Io.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Tp(r);case"XXXX":case"XX":return ts(r);case"XXXXX":case"XXX":default:return ts(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Tp(r);case"xxxx":case"xx":return ts(r);case"xxxxx":case"xxx":default:return ts(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sp(r,":");case"OOOO":default:return"GMT"+ts(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sp(r,":");case"zzzz":default:return"GMT"+ts(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return an(r,t.length)},T:function(n,t,e){return an(+n,t.length)}};function Sp(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=Math.trunc(r/60),m=r%60;return m===0?e+String(f):e+String(f)+t+an(m,2)}function Tp(n,t){return n%60===0?(n>0?"-":"+")+an(Math.abs(n)/60,2):ts(n,t)}function ts(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=an(Math.trunc(r/60),2),m=an(r%60,2);return e+f+t+m}const $p=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Mp=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},vb=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],f=e[2];if(!f)return $p(n,t);let m;switch(r){case"P":m=t.dateTime({width:"short"});break;case"PP":m=t.dateTime({width:"medium"});break;case"PPP":m=t.dateTime({width:"long"});break;case"PPPP":default:m=t.dateTime({width:"full"});break}return m.replace("{{date}}",$p(r,t)).replace("{{time}}",Mp(f,t))},Yc={p:Mp,P:vb},yb=/^D+$/,wb=/^Y+$/,bb=["D","DD","YY","YYYY"];function Ip(n){return yb.test(n)}function Rp(n){return wb.test(n)}function Xc(n,t,e){const r=xb(n,t,e);if(console.warn(r),bb.includes(n))throw new RangeError(r)}function xb(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Cb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_b=/^'([^]*?)'?$/,Ab=/''/g,Sb=/[a-zA-Z]/;function ns(n,t,e){var r,f,m,y,x,h,g,s;const c=Fs(),u=(e==null?void 0:e.locale)??c.locale??Cp,a=(e==null?void 0:e.firstWeekContainsDate)??((f=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??c.firstWeekContainsDate??((y=(m=c.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((h=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??c.weekStartsOn??((s=(g=c.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,l=bn(n,e==null?void 0:e.in);if(!xp(l))throw new RangeError("Invalid time value");let d=t.match(kb).map(b=>{const E=b[0];if(E==="p"||E==="P"){const $=Yc[E];return $(b,u.formatLong)}return b}).join("").match(Cb).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const E=b[0];if(E==="'")return{isToken:!1,value:Tb(b)};if(Ap[E])return{isToken:!0,value:b};if(E.match(Sb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(d=u.localize.preprocessor(l,d));const w={firstWeekContainsDate:a,weekStartsOn:o,locale:u};return d.map(b=>{if(!b.isToken)return b.value;const E=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Rp(E)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Ip(E))&&Xc(E,t,String(n));const $=Ap[E[0]];return $(l,E,u.localize,w)}).join("")}function Tb(n){const t=n.match(_b);return t?t[1].replace(Ab,"'"):n}var Ro=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ep={exports:{}},Lp;function $b(){return Lp||(Lp=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(s,c,u){if(typeof s!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=c),f.modules[s]||(f.payloads[s]=u,f.modules[s]=null)};f.modules={},f.payloads={};var m=function(s,c,u){if(typeof c=="string"){var a=h(s,c);if(a!=null)return u&&u(),a}else if(Object.prototype.toString.call(c)==="[object Array]"){for(var o=[],l=0,d=c.length;l<d;++l){var w=h(s,c[l]);if(w==null&&y.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},y=function(s,c){var u=m("",s,c);return u==null&&y.original?y.original.apply(this,arguments):u},x=function(s,c){if(c.indexOf("!")!==-1){var u=c.split("!");return x(s,u[0])+"!"+x(s,u[1])}if(c.charAt(0)=="."){var a=s.split("/").slice(0,-1).join("/");for(c=a+"/"+c;c.indexOf(".")!==-1&&o!=c;){var o=c;c=c.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return c},h=function(s,c){c=x(s,c);var u=f.modules[c];if(!u){if(u=f.payloads[c],typeof u=="function"){var a={},o={id:c,uri:"",exports:a,packaged:!0},l=function(w,b){return m(c,w,b)},d=u(l,a,o);a=d||o.exports,f.modules[c]=a,delete f.payloads[c]}u=f.modules[c]=a||u}return u};function g(s){var c=r;r[s]||(r[s]={}),c=r[s],(!c.define||!c.define.packaged)&&(f.original=c.define,c.define=f,c.define.packaged=!0),(!c.require||!c.require.packaged)&&(y.original=c.require,c.require=y,c.require.packaged=!0)}g(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,f){function m(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||m(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||m(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var g=h.indexOf(y,x);return g!==-1&&g===x}),String.prototype.repeat||m(String.prototype,"repeat",function(y){for(var x="",h=this;y>0;)y&1&&(x+=h),(y>>=1)&&(h+=h);return x}),String.prototype.includes||m(String.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Object.assign||(Object.assign=function(y){if(y==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(y),h=1;h<arguments.length;h++){var g=arguments[h];g!=null&&Object.keys(g).forEach(function(s){x[s]=g[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||m(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],g=0;g<x;g++){var s=this[g];if(y.call(h,s,g,this))return s}}),Array.prototype.findIndex||m(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],g=0;g<x;g++){var s=this[g];if(y.call(h,s,g,this))return g}}),Array.prototype.includes||m(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||m(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,g=arguments[1],s=g>>0,c=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],a=u===void 0?h:u>>0,o=a<0?Math.max(h+a,0):Math.min(a,h);c<o;)x[c]=y,c++;return x}),Array.of||m(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,f){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,f){r.deepCopy=function m(y){if(typeof y!="object"||!y)return y;var x;if(Array.isArray(y)){x=[];for(var h=0;h<y.length;h++)x[h]=m(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=m(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,f){r.last=function(x){return x[x.length-1]},r.stringReverse=function(x){return x.split("").reverse().join("")},r.stringRepeat=function(x,h){for(var g="";h>0;)h&1&&(g+=x),(h>>=1)&&(x+=x);return g};var m=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(m,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var g in x)h[g]=x[g];return h},r.copyArray=function(x){for(var h=[],g=0,s=x.length;g<s;g++)x[g]&&typeof x[g]=="object"?h[g]=this.copyObject(x[g]):h[g]=x[g];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},g=0;g<x.length;g++)h[x[g]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var g in x)h[g]=x[g];return h},r.arrayRemove=function(x,h){for(var g=0;g<=x.length;g++)h===x[g]&&x.splice(g,1)},r.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(x){return(""+x).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(x,h){var g=[];return x.replace(h,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(x){var h=null,g=function(){h=null,x()},s=function(c){return s.cancel(),h=setTimeout(g,c||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(x,h){var g=null,s=function(){g=null,x()},c=function(u){g==null&&(g=setTimeout(s,u||h))};return c.delay=function(u){g&&clearTimeout(g),g=setTimeout(s,u||h)},c.schedule=c,c.call=function(){this.cancel(),x()},c.cancel=function(){g&&clearTimeout(g),g=null},c.isPending=function(){return g},c},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,g){return g&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,f){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var m=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(m.platform)||["other"])[0].toLowerCase(),x=m.userAgent||"",h=m.appName||"";r.isWin=y=="win",r.isMac=y=="mac",r.isLinux=y=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=x.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(x.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,r.isAIR=x.indexOf("AdobeAIR")>=0,r.isAndroid=x.indexOf("Android")>=0,r.isChromeOS=x.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,f){var m=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function u(a,o,l){if(typeof a=="string"&&a){var d=document.createTextNode(a);return o&&o.appendChild(d),d}if(!Array.isArray(a))return a&&a.appendChild&&o&&o.appendChild(a),a;if(typeof a[0]!="string"||!a[0]){for(var w=[],b=0;b<a.length;b++){var E=u(a[b],o,l);E&&w.push(E)}return w}var $=document.createElement(a[0]),_=a[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var b=C;b<a.length;b++)u(a[b],$,l);return C==2&&Object.keys(_).forEach(function(R){var L=_[R];R==="class"?$.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?$[R]=L:R==="ref"?l&&(l[L]=$):R==="style"?typeof L=="string"&&($.style.cssText=L):L!=null&&$.setAttribute(R,L)}),o&&o.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,a){return document.createElementNS?document.createElementNS(a||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,a){var o=a?a.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var a=u?u.ownerDocument:document;return a.createDocumentFragment()},r.hasCssClass=function(u,a){var o=(u.className+"").split(/\s+/g);return o.indexOf(a)!==-1},r.addCssClass=function(u,a){r.hasCssClass(u,a)||(u.className+=" "+a)},r.removeCssClass=function(u,a){for(var o=u.className.split(/\s+/g);;){var l=o.indexOf(a);if(l==-1)break;o.splice(l,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,a){for(var o=u.className.split(/\s+/g),l=!0;;){var d=o.indexOf(a);if(d==-1)break;l=!1,o.splice(d,1)}return l&&o.push(a),u.className=o.join(" "),l},r.setCssClass=function(u,a,o){o?r.addCssClass(u,a):r.removeCssClass(u,a)},r.hasCssString=function(u,a){var o=0,l;if(a=a||document,l=a.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===u)return!0}},r.removeElementById=function(u,a){a=a||document,a.getElementById(u)&&a.getElementById(u).remove()};var x,h=[];r.useStrictCSP=function(u){x=u,u==!1?g():h||(h=[])};function g(){var u=h;h=null,u&&u.forEach(function(a){s(a[0],a[1])})}function s(u,a,o){if(!(typeof document>"u")){if(h){if(o)g();else if(o===!1)return h.push([u,a])}if(!x){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var d=l.ownerDocument||l;if(a&&r.hasCssString(a,l))return null;a&&(u+=`
|
2
|
+
/*# sourceURL=ace/css/`+a+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(u)),a&&(w.id=a),l==d&&(l=r.getDocumentHead(d)),l.insertBefore(w,l.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,a){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(a))},r.scrollbarWidth=function(u){var a=r.createElement("ace_inner");a.style.width="100%",a.style.minWidth="0px",a.style.height="200px",a.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(a);var d=u&&u.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(o);var w=a.offsetWidth;l.overflow="scroll";var b=a.offsetWidth;return w===b&&(b=o.clientWidth),d.removeChild(o),w-b},r.computedStyle=function(u,a){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,a,o){u[a]!==o&&(u[a]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=m.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,m.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var c=document.createElement("div");r.HI_DPI&&c.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!m.isEdge&&typeof c.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),c=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,a,o){u.style.transform="translate("+Math.round(a)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,a,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(a)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,f){/*
|
3
|
+
* based on code from:
|
4
|
+
*
|
5
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
+
* Available via the MIT or new BSD license.
|
7
|
+
* see: http://github.com/jrburke/requirejs for details
|
8
|
+
*/var m=e("./dom");r.get=function(y,x){var h=new XMLHttpRequest;h.open("GET",y,!0),h.onreadystatechange=function(){h.readyState===4&&x(h.responseText)},h.send(null)},r.loadScript=function(y,x){var h=m.getDocumentHead(),g=document.createElement("script");g.src=y,h.appendChild(g),g.onload=g.onreadystatechange=function(s,c){(c||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,c||x())}},r.qualifyURL=function(y){var x=document.createElement("a");return x.href=y,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,f){r.inherits=function(m,y){m.super_=y,m.prototype=Object.create(y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(m,y){for(var x in y)m[x]=y[x];return m},r.implement=function(m,y){r.mixin(m,y)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,f){var m={},y=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};m._emit=m._dispatchEvent=function(h,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],c=this._defaultHandlers[h];if(!(!s.length&&!c)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=h),g.stopPropagation||(g.stopPropagation=y),g.preventDefault||(g.preventDefault=x),s=s.slice();for(var u=0;u<s.length&&(s[u](g,this),!g.propagationStopped);u++);if(c&&!g.defaultPrevented)return c(g,this)}},m._signal=function(h,g){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var c=0;c<s.length;c++)s[c](g,this)}},m.once=function(h,g){var s=this;if(this.on(h,function c(){s.off(h,c),g.apply(null,arguments)}),!g)return new Promise(function(c){g=c})},m.setDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var c=s[h],u=s._disabled_[h];u||(s._disabled_[h]=u=[]),u.push(c);var a=u.indexOf(g);a!=-1&&u.splice(a,1)}s[h]=g},m.removeDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s){var c=s._disabled_[h];if(s[h]==g)c&&this.setDefaultHandler(h,c.pop());else if(c){var u=c.indexOf(g);u!=-1&&c.splice(u,1)}}},m.on=m.addEventListener=function(h,g,s){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[h];return c||(c=this._eventRegistry[h]=[]),c.indexOf(g)==-1&&c[s?"unshift":"push"](g),g},m.off=m.removeListener=m.removeEventListener=function(h,g){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var c=s.indexOf(g);c!==-1&&s.splice(c,1)}},m.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=m}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,f){r.reportError=function(m,y){var x=new Error(m);x.data=y,typeof console=="object"&&console.error&&console.error(x),setTimeout(function(){throw x})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,f){var m={"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 gutter","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","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=m}),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(e,r,f){"no use strict";var m=e("./oop"),y=e("./event_emitter").EventEmitter,x=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(l=o,o=Object.keys(l));else{var d=this.$options;o=Object.keys(d).filter(function(w){return!d[w].hidden})}return o.forEach(function(w){l[w]=this.getOption(w)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var d=this.$options[o];if(!d)return s('misspelled option "'+o+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(o,l);d.handlesSet||(this["$"+o]=l),d&&d.set&&d.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var c,u,a=function(){function o(){this.$defaultOptions={},c=h,u="dollarSigns"}return o.prototype.defineOptions=function(l,d,w){return l.$options||(this.$defaultOptions[d]=l.$options={}),Object.keys(w).forEach(function(b){var E=w[b];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=b),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),m.implement(l,g),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(d){var w=l.$options[d];"value"in w&&l.setOption(d,w.value)})},o.prototype.setDefaultValue=function(l,d,w){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][d])break;if(!this.$defaultOptions[l][d])return!1}var b=this.$defaultOptions[l]||(this.$defaultOptions[l]={});b[d]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,d,w):b[d].value=w)},o.prototype.setDefaultValues=function(l,d){Object.keys(d).forEach(function(w){this.setDefaultValue(l,w,d[w])},this)},o.prototype.setMessages=function(l,d){c=l,d&&d.placeholders&&(u=d.placeholders)},o.prototype.nls=function(l,d,w){c[l]||(s("No message found for the key '"+l+"' in messages with id "+c.$id+", trying to find a translation for the default string '"+d+"'."),c[d]||s("No message found for the default string '"+d+"' in the provided messages. Falling back to the default English message."));var b=c[l]||c[d]||d;return w&&(u==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":w[$]})),u==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(E,$){return w[$]}))),b},o}();a.prototype.warn=s,a.prototype.reportError=x,m.implement(a.prototype,y),r.AppConfig=a}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,f){f.exports=`.ace-tm .ace_gutter {
|
9
|
+
background: #f0f0f0;
|
10
|
+
color: #333;
|
11
|
+
}
|
12
|
+
|
13
|
+
.ace-tm .ace_print-margin {
|
14
|
+
width: 1px;
|
15
|
+
background: #e8e8e8;
|
16
|
+
}
|
17
|
+
|
18
|
+
.ace-tm .ace_fold {
|
19
|
+
background-color: #6B72E6;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ace-tm {
|
23
|
+
background-color: #FFFFFF;
|
24
|
+
color: black;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ace-tm .ace_cursor {
|
28
|
+
color: black;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ace-tm .ace_invisible {
|
32
|
+
color: rgb(191, 191, 191);
|
33
|
+
}
|
34
|
+
|
35
|
+
.ace-tm .ace_storage,
|
36
|
+
.ace-tm .ace_keyword {
|
37
|
+
color: blue;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ace-tm .ace_constant {
|
41
|
+
color: rgb(197, 6, 11);
|
42
|
+
}
|
43
|
+
|
44
|
+
.ace-tm .ace_constant.ace_buildin {
|
45
|
+
color: rgb(88, 72, 246);
|
46
|
+
}
|
47
|
+
|
48
|
+
.ace-tm .ace_constant.ace_language {
|
49
|
+
color: rgb(88, 92, 246);
|
50
|
+
}
|
51
|
+
|
52
|
+
.ace-tm .ace_constant.ace_library {
|
53
|
+
color: rgb(6, 150, 14);
|
54
|
+
}
|
55
|
+
|
56
|
+
.ace-tm .ace_invalid {
|
57
|
+
background-color: rgba(255, 0, 0, 0.1);
|
58
|
+
color: red;
|
59
|
+
}
|
60
|
+
|
61
|
+
.ace-tm .ace_support.ace_function {
|
62
|
+
color: rgb(60, 76, 114);
|
63
|
+
}
|
64
|
+
|
65
|
+
.ace-tm .ace_support.ace_constant {
|
66
|
+
color: rgb(6, 150, 14);
|
67
|
+
}
|
68
|
+
|
69
|
+
.ace-tm .ace_support.ace_type,
|
70
|
+
.ace-tm .ace_support.ace_class {
|
71
|
+
color: rgb(109, 121, 222);
|
72
|
+
}
|
73
|
+
|
74
|
+
.ace-tm .ace_keyword.ace_operator {
|
75
|
+
color: rgb(104, 118, 135);
|
76
|
+
}
|
77
|
+
|
78
|
+
.ace-tm .ace_string {
|
79
|
+
color: rgb(3, 106, 7);
|
80
|
+
}
|
81
|
+
|
82
|
+
.ace-tm .ace_comment {
|
83
|
+
color: rgb(76, 136, 107);
|
84
|
+
}
|
85
|
+
|
86
|
+
.ace-tm .ace_comment.ace_doc {
|
87
|
+
color: rgb(0, 102, 255);
|
88
|
+
}
|
89
|
+
|
90
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
91
|
+
color: rgb(128, 159, 191);
|
92
|
+
}
|
93
|
+
|
94
|
+
.ace-tm .ace_constant.ace_numeric {
|
95
|
+
color: rgb(0, 0, 205);
|
96
|
+
}
|
97
|
+
|
98
|
+
.ace-tm .ace_variable {
|
99
|
+
color: rgb(49, 132, 149);
|
100
|
+
}
|
101
|
+
|
102
|
+
.ace-tm .ace_xml-pe {
|
103
|
+
color: rgb(104, 104, 91);
|
104
|
+
}
|
105
|
+
|
106
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
107
|
+
color: #0000A2;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
.ace-tm .ace_heading {
|
112
|
+
color: rgb(12, 7, 255);
|
113
|
+
}
|
114
|
+
|
115
|
+
.ace-tm .ace_list {
|
116
|
+
color:rgb(185, 6, 144);
|
117
|
+
}
|
118
|
+
|
119
|
+
.ace-tm .ace_meta.ace_tag {
|
120
|
+
color:rgb(0, 22, 142);
|
121
|
+
}
|
122
|
+
|
123
|
+
.ace-tm .ace_string.ace_regex {
|
124
|
+
color: rgb(255, 0, 0)
|
125
|
+
}
|
126
|
+
|
127
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
128
|
+
background: rgb(181, 213, 255);
|
129
|
+
}
|
130
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
131
|
+
box-shadow: 0 0 3px 0px white;
|
132
|
+
}
|
133
|
+
.ace-tm .ace_marker-layer .ace_step {
|
134
|
+
background: rgb(252, 255, 0);
|
135
|
+
}
|
136
|
+
|
137
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
138
|
+
background: rgb(164, 229, 101);
|
139
|
+
}
|
140
|
+
|
141
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
142
|
+
margin: -1px 0 0 -1px;
|
143
|
+
border: 1px solid rgb(192, 192, 192);
|
144
|
+
}
|
145
|
+
|
146
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
147
|
+
background: rgba(0, 0, 0, 0.07);
|
148
|
+
}
|
149
|
+
|
150
|
+
.ace-tm .ace_gutter-active-line {
|
151
|
+
background-color : #dcdcdc;
|
152
|
+
}
|
153
|
+
|
154
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
155
|
+
background: rgb(250, 250, 255);
|
156
|
+
border: 1px solid rgb(200, 200, 250);
|
157
|
+
}
|
158
|
+
|
159
|
+
.ace-tm .ace_indent-guide {
|
160
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
161
|
+
}
|
162
|
+
|
163
|
+
.ace-tm .ace_indent-guide-active {
|
164
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
165
|
+
}
|
166
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var m=e("../lib/dom");m.importCssString(r.cssText,r.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(e,r,f){"no use strict";var m=e("./lib/lang"),y=e("./lib/net"),x=e("./lib/dom"),h=e("./lib/app_config").AppConfig;f.exports=r=new h;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(a){if(!g.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return g[a]},r.set=function(a,o){if(g.hasOwnProperty(a))g[a]=o;else if(this.setDefaultValue("",a,o)==!1)throw new Error("Unknown config key: "+a);a=="useStrictCSP"&&x.useStrictCSP(o)},r.all=function(){return m.copyObject(g)},r.$modes={},r.moduleUrl=function(a,o){if(g.$moduleUrls[a])return g.$moduleUrls[a];var l=a.split("/");o=o||l[l.length-2]||"";var d=o=="snippets"?"/":"-",w=l[l.length-1];if(o=="worker"&&d=="-"){var b=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(b,"")}(!w||w==o)&&l.length>1&&(w=l[l.length-2]);var E=g[o+"Path"];return E==null?E=g.basePath:d=="/"&&(o=d=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+d+w+this.get("suffix")},r.setModuleUrl=function(a,o){return g.$moduleUrls[a]=o};var s=function(a,o){if(a==="ace/theme/textmate"||a==="./theme/textmate")return o(null,e("./theme/textmate"));if(c)return c(a,o);console.error("loader is not configured")},c;r.setLoader=function(a){c=a},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(a,o){var l;if(Array.isArray(a))var d=a[0],w=a[1];else if(typeof a=="string")var w=a;var b=function(E){if(E&&!r.$loading[w])return o&&o(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var $=function(){s(w,function(_,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(L){L&&L(C)})})};if(!r.get("packaged"))return $();y.loadScript(r.moduleUrl(w,d),$),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?b(E.default):b(E)});else{try{l=this.$require(w)}catch{}b(l||r.$loaded[w])}},r.$require=function(a){if(typeof f.require=="function"){var o="require";return f[o](a)}},r.setModuleLoader=function(a,o){r.dynamicModules[a]=o};var u=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$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"),u=function(){})};r.version="1.39.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,f){e("./lib/fixoldbrowsers");var m=e("./config");m.setLoader(function(g,s){e([g],function(c){s(null,c)})});var y=function(){return this||typeof window<"u"&&window}();f.exports=function(g){m.init=x,m.$require=e,g.require=e},x(!0);function x(g){if(!(!y||!y.document)){m.set("packaged",g||e.packaged||f.packaged||y.define&&(void 0).packaged);var s={},c="",u=document.currentScript||document._currentScript,a=u&&u.ownerDocument||document;u&&u.src&&(c=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=a.getElementsByTagName("script"),l=0;l<o.length;l++){var d=o[l],w=d.src||d.getAttribute("src");if(w){for(var b=d.attributes,E=0,$=b.length;E<$;E++){var _=b[E];_.name.indexOf("data-ace-")===0&&(s[h(_.name.replace(/^data-ace-/,""))]=_.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(c=C[1])}}c&&(s.base=s.base||c,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&m.set(R,s[R])}}function h(g){return g.replace(/-(.)/g,function(s,c){return c.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,f){var m=function(){function y(x,h,g,s){this.start={row:x,column:h},this.end={row:g,column:s}}return y.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},y.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},y.prototype.contains=function(x,h){return this.compare(x,h)==0},y.prototype.compareRange=function(x){var h,g=x.end,s=x.start;return h=this.compare(g.row,g.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},y.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},y.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},y.prototype.intersects=function(x){var h=this.compareRange(x);return h==-1||h==0||h==1},y.prototype.isEnd=function(x,h){return this.end.row==x&&this.end.column==h},y.prototype.isStart=function(x,h){return this.start.row==x&&this.start.column==h},y.prototype.setStart=function(x,h){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=h)},y.prototype.setEnd=function(x,h){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=h)},y.prototype.inside=function(x,h){return this.compare(x,h)==0?!(this.isEnd(x,h)||this.isStart(x,h)):!1},y.prototype.insideStart=function(x,h){return this.compare(x,h)==0?!this.isEnd(x,h):!1},y.prototype.insideEnd=function(x,h){return this.compare(x,h)==0?!this.isStart(x,h):!1},y.prototype.compare=function(x,h){return!this.isMultiLine()&&x===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?h>=this.start.column?0:-1:this.end.row===x?h<=this.end.column?0:1:0},y.prototype.compareStart=function(x,h){return this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.compareEnd=function(x,h){return this.end.row==x&&this.end.column==h?1:this.compare(x,h)},y.prototype.compareInside=function(x,h){return this.end.row==x&&this.end.column==h?1:this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.clipRows=function(x,h){if(this.end.row>h)var g={row:h+1,column:0};else if(this.end.row<x)var g={row:x,column:0};if(this.start.row>h)var s={row:h+1,column:0};else if(this.start.row<x)var s={row:x,column:0};return y.fromPoints(s||this.start,g||this.end)},y.prototype.extend=function(x,h){var g=this.compare(x,h);if(g==0)return this;if(g==-1)var s={row:x,column:h};else var c={row:x,column:h};return y.fromPoints(s||this.start,c||this.end)},y.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},y.prototype.isMultiLine=function(){return this.start.row!==this.end.row},y.prototype.clone=function(){return y.fromPoints(this.start,this.end)},y.prototype.collapseRows=function(){return this.end.column==0?new y(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new y(this.start.row,0,this.end.row,0)},y.prototype.toScreenRange=function(x){var h=x.documentToScreenPosition(this.start),g=x.documentToScreenPosition(this.end);return new y(h.row,h.column,g.row,g.column)},y.prototype.moveBy=function(x,h){this.start.row+=x,this.start.column+=h,this.end.row+=x,this.end.column+=h},y}();m.fromPoints=function(y,x){return new m(y.row,y.column,x.row,x.column)},m.comparePoints=function(y,x){return y.row-x.row||y.column-x.column},r.Range=m}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,f){for(var m=e("./oop"),y={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:"*"}},x={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},h=0;h<10;h++)x["Digit"+h]=48+h,x["Numpad"+h]=96+h,y.PRINTABLE_KEYS[48+h]=""+h,y.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var g=String.fromCharCode(h+32);x["Key"+g.toUpperCase()]=h,y.PRINTABLE_KEYS[h]=g}for(var h=1;h<13;h++)x["F"+h]=111+h,y.FUNCTION_KEYS[111+h]="F"+h;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var c in s)x[c]=x[c+"Left"]=x[c+"Right"]=s[c];r.$codeToKeyCode=x,y.PRINTABLE_KEYS[173]="-";for(var u in y.FUNCTION_KEYS){var a=y.FUNCTION_KEYS[u].toLowerCase();y[a]=parseInt(u,10)}for(var u in y.PRINTABLE_KEYS){var a=y.PRINTABLE_KEYS[u].toLowerCase();y[a]=parseInt(u,10)}m.mixin(y,y.MODIFIER_KEYS),m.mixin(y,y.PRINTABLE_KEYS),m.mixin(y,y.FUNCTION_KEYS),y.enter=y.return,y.escape=y.esc,y.del=y.delete,function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)y.KEY_MODS[l]=o.filter(function(d){return l&y.KEY_MODS[d]}).join("-")+"-"}(),y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",m.mixin(r,y),r.default=r,r.keyCodeToString=function(o){var l=y[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,f){var m=e("./keys"),y=e("./useragent"),x=null,h=0,g;function s(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function c(){return g==null&&s(),g}function u(E,$,_){this.elem=E,this.type=$,this.callback=_}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var a=r.addListener=function(E,$,_,C){E.addEventListener($,_,c()),C&&C.$toDestroy.push(new u(E,$,_))},o=r.removeListener=function(E,$,_){E.removeEventListener($,_,c())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||y.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,$,_){var C=E&&E.ownerDocument||document;function R(L){$&&$(L),_&&_(L),o(C,"mousemove",$),o(C,"mouseup",R),o(C,"dragstart",R)}return a(C,"mousemove",$),a(C,"mouseup",R),a(C,"dragstart",R),R},r.addMouseWheelListener=function(E,$,_){a(E,"wheel",function(C){var R=.15,L=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=L*R,C.wheelY=F*R;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=L*I,C.wheelY=F*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=L*H,C.wheelY=F*H;break}$(C)},_)},r.addMultiMouseDownListener=function(E,$,_,C,R){var L=0,F,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(r.getButton(S)!==0?L=0:S.detail>1?(L++,L>4&&(L=1)):L=1,y.isIE){var A=Math.abs(S.clientX-F)>5||Math.abs(S.clientY-I)>5;(!H||A)&&(L=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},$[L-1]||600),L==1&&(F=S.clientX,I=S.clientY)}if(S._clicks=L,_[C]("mousedown",S),L>4)L=0;else if(L>1)return _[C](P[L],S)}Array.isArray(E)||(E=[E]),E.forEach(function(S){a(S,"mousedown",O,R)})};function l(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return m.KEY_MODS[l(E)]};function d(E,$,_){var C=l($);if(!_&&$.code&&(_=m.$codeToKeyCode[$.code]||_),!y.isMac&&x){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),x.altGr)if((3&C)!=3)x.altGr=0;else return;if(_===18||_===17){var R=$.location;if(_===17&&R===1)x[_]==1&&(h=$.timeStamp);else if(_===18&&C===3&&R===2){var L=$.timeStamp-h;L<50&&(x.altGr=!0)}}}if(_ in m.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&$.location===3&&(E($,C,-_),$.defaultPrevented))){if(y.isChromeOS&&C&8){if(E($,C,_),$.defaultPrevented)return;C&=-9}return!C&&!(_ in m.FUNCTION_KEYS)&&!(_ in m.PRINTABLE_KEYS)?!1:E($,C,_)}}r.addCommandKeyListener=function(E,$,_){var C=null;a(E,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var L=d($,R,R.keyCode);return C=R.defaultPrevented,L},_),a(E,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},_),a(E,"keyup",function(R){x[R.keyCode]=null},_),x||(w(),a(window,"focus",w))};function w(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!y.isOldIE){var b=1;r.nextTick=function(E,$){$=$||window;var _="zero-timeout-message-"+b++,C=function(R){R.data==_&&(r.stopPropagation(R),o($,"message",C),E())};a($,"message",C),$.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,$){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):E()},$)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,f){var m;f.exports={lineMode:!1,pasteCancelled:function(){return m&&m>Date.now()-50?!0:m=!1},cancel:function(){m=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,f){var m=e("../lib/event"),y=e("../config").nls,x=e("../lib/useragent"),h=e("../lib/dom"),g=e("../lib/lang"),s=e("../clipboard"),c=x.isChrome<18,u=x.isIE,a=x.isChrome>63,o=400,l=e("../lib/keys"),d=l.KEY_MODS,w=x.isIOS,b=w?/\s/:/\n/,E=x.isMobile,$;$=function(_,C){var R=h.createElement("textarea");R.className="ace_text-input",R.setAttribute("wrap","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),R.style.opacity="0",_.insertBefore(R,_.firstChild);var L=!1,F=!1,I=!1,H=!1,P="";E||(R.style.fontSize="1px");var O=!1,S=!1,A="",N=0,B=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===R}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var ze=C.session.selection.cursor.row;ke+=y("text-input.aria-label","Cursor at row $0",[ze+1])}R.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(R.setAttribute("aria-haspopup","true"),R.setAttribute("aria-autocomplete",ke.inline?"both":"list"),R.setAttribute("aria-activedescendant",ke.activeDescendant)):(R.setAttribute("aria-haspopup","false"),R.setAttribute("aria-autocomplete","both"),R.removeAttribute("aria-activedescendant")),ke.role&&R.setAttribute("role",ke.role),ke.setLabel&&(R.setAttribute("aria-roledescription",y("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),m.addListener(R,"blur",function(ke){S||(C.onBlur(ke),he=!1)},C),m.addListener(R,"focus",function(ke){if(!S){if(he=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),x.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||a||this.$focusScroll=="browser")return R.focus({preventScroll:!0});var ke=R.style.top;R.style.position="fixed",R.style.top="0px";try{var ze=R.getBoundingClientRect().top!=0}catch{return}var Ye=[];if(ze)for(var dt=R.parentElement;dt&&dt.nodeType==1;)Ye.push(dt),dt.setAttribute("ace_nocontext","true"),!dt.parentElement&&dt.getRootNode?dt=dt.getRootNode().host:dt=dt.parentElement;R.focus({preventScroll:!0}),ze&&Ye.forEach(function(Ct){Ct.removeAttribute("ace_nocontext")}),setTimeout(function(){R.style.position="",R.style.top=="0px"&&(R.style.top=ke)},0)},this.blur=function(){R.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,ze=ke&&ke.command&&ke.command.name;if(ze!="insertstring"){var Ye=ze&&(ke.docChanged||ke.selectionChanged);I&&Ye&&(A=R.value="",Kt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,ze){for(var Ye=ze,dt=1;dt<=ke-K&&dt<2*te+1;dt++)Ye+=C.session.getLine(ke-dt).length+1;return Ye},ae=w?function(ke){if(!(!he||L&&!ke||H)){ke||(ke="");var ze=`
|
167
|
+
ab`+ke+`cde fg
|
168
|
+
`;ze!=R.value&&(R.value=A=ze);var Ye=4,dt=4+(ke.length||(C.selection.isEmpty()?0:1));(N!=Ye||B!=dt)&&R.setSelectionRange(Ye,dt),N=Ye,B=dt}}:function(){if(!(I||H)&&!(!he&&!Ae)){I=!0;var ke=0,ze=0,Ye="";if(C.session){var dt=C.selection,Ct=dt.getRange(),xt=dt.cursor.row;xt===Z+1?(K=Z+1,Z=K+2*te):xt===K-1?(Z=K-1,K=Z-2*te):(xt<K-1||xt>Z+1)&&(K=xt>te?xt-te:0,Z=xt>te?xt+te:2*te);for(var Ot=[],It=K;It<=Z;It++)Ot.push(C.session.getLine(It));if(Ye=Ot.join(`
|
169
|
+
`),ke=ne(Ct.start.row,Ct.start.column),ze=ne(Ct.end.row,Ct.end.column),Ct.start.row<K){var ct=C.session.getLine(K-1);ke=Ct.start.row<K-1?0:ke,ze+=ct.length+1,Ye=ct+`
|
170
|
+
`+Ye}else if(Ct.end.row>Z){var yt=C.session.getLine(Z+1);ze=Ct.end.row>Z+1?yt.length:Ct.end.column,ze+=Ye.length+1,Ye=Ye+`
|
171
|
+
`+yt}else E&&xt>0&&(Ye=`
|
172
|
+
`+Ye,ze+=1,ke+=1);Ye.length>o&&(ke<o&&ze<o?Ye=Ye.slice(0,o):(Ye=`
|
173
|
+
`,ke==ze?ke=ze=0:(ke=0,ze=1)));var xn=Ye+`
|
174
|
+
|
175
|
+
`;xn!=A&&(R.value=A=xn,N=B=xn.length)}if(Ae&&(N=R.selectionStart,B=R.selectionEnd),B!=ze||N!=ke||R.selectionEnd!=B)try{R.setSelectionRange(ke,ze),N=ke,B=ze}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ce=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=A.length&&ke.value===A&&A&&ke.selectionEnd!==B},ue=function(ke){I||(L?L=!1:ce(R)?(C.selectAll(),ae()):E&&R.selectionStart!=N&&ae())},ye=null;this.setInputHandler=function(ke){ye=ke},this.getInputHandler=function(){return ye};var Ae=!1,$e=function(ke,ze){if(Ae&&(Ae=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ye=R.selectionStart,dt=R.selectionEnd,Ct=N,xt=A.length-B,Ot=ke,It=ke.length-Ye,ct=ke.length-dt,yt=0;Ct>0&&A[yt]==ke[yt];)yt++,Ct--;for(Ot=Ot.slice(yt),yt=1;xt>0&&A.length-yt>N-1&&A[A.length-yt]==ke[ke.length-yt];)yt++,xt--;It-=yt-1,ct-=yt-1;var xn=Ot.length-yt+1;if(xn<0&&(Ct=-xn,xn=0),Ot=Ot.slice(0,xn),!ze&&!Ot&&!It&&!Ct&&!xt&&!ct)return"";H=!0;var Cr=!1;return x.isAndroid&&Ot==". "&&(Ot=" ",Cr=!0),Ot&&!Ct&&!xt&&!It&&!ct||O?C.onTextInput(Ot):C.onTextInput(Ot,{extendLeft:Ct,extendRight:xt,restoreStart:It,restoreEnd:ct}),H=!1,A=ke,N=Ye,B=dt,U=ct,Cr?`
|
176
|
+
`:Ot},Ie=function(ke){if(I)return pn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var ze=R.value,Ye=$e(ze,!0);(ze.length>o+100||b.test(Ye)||E&&N<1&&N==B)&&ae()},Ge=function(ke,ze,Ye){var dt=ke.clipboardData||window.clipboardData;if(!(!dt||c)){var Ct=u||Ye?"Text":"text/plain";try{return ze?dt.setData(Ct,ze)!==!1:dt.getData(Ct)}catch(xt){if(!Ye)return Ge(xt,ze,!0)}}},qe=function(ke,ze){var Ye=C.getCopyText();if(!Ye)return m.preventDefault(ke);Ge(ke,Ye)?(w&&(ae(Ye),L=Ye,setTimeout(function(){L=!1},10)),ze?C.onCut():C.onCopy(),m.preventDefault(ke)):(L=!0,R.value=Ye,R.select(),setTimeout(function(){L=!1,ae(),ze?C.onCut():C.onCopy()}))},ut=function(ke){qe(ke,!0)},rt=function(ke){qe(ke,!1)},ht=function(ke){var ze=Ge(ke);s.pasteCancelled()||(typeof ze=="string"?(ze&&C.onPaste(ze,ke),x.isIE&&setTimeout(ae),m.preventDefault(ke)):(R.value="",F=!0))};m.addCommandKeyListener(R,function(ke,ze,Ye){if(!I)return C.onCommandKey(ke,ze,Ye)},C),m.addListener(R,"select",ue,C),m.addListener(R,"input",Ie,C),m.addListener(R,"cut",ut,C),m.addListener(R,"copy",rt,C),m.addListener(R,"paste",ht,C),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&m.addListener(_,"keydown",function(ke){if(!(x.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:rt(ke);break;case 86:ht(ke);break;case 88:ut(ke);break}},C);var en=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(pn,0),C._signal("compositionStart"),C.on("mousedown",pr);var ze=C.getSelectionRange();ze.end.row=ze.start.row,ze.end.column=ze.start.column,I.markerRange=ze,I.selectionStart=N,C.onCompositionStart(I),I.useTextareaForIME?(A=R.value="",N=0,B=0):(R.msGetInputContext&&(I.context=R.msGetInputContext()),R.getInputContext&&(I.context=R.getInputContext()))}},pn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return pr();if(I.useTextareaForIME)C.onCompositionUpdate(R.value);else{var ke=R.value;$e(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+B-I.selectionStart+U)}}},Kt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",pr),ke&&Ie())};function pr(){S=!0,R.blur(),R.focus(),S=!1}var gn=g.delayedCall(pn,50).schedule.bind(null,null);function In(ke){ke.keyCode==27&&R.value.length<R.selectionStart&&(I||(A=R.value),N=B=-1,ae()),gn()}m.addListener(R,"compositionstart",en,C),m.addListener(R,"compositionupdate",pn,C),m.addListener(R,"keyup",In,C),m.addListener(R,"keydown",gn,C),m.addListener(R,"compositionend",Kt,C),this.getElement=function(){return R},this.setCommandMode=function(ke){O=ke,R.readOnly=!1},this.setReadOnly=function(ke){O||(R.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){Ae=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,ze){P||(P=R.style.cssText),R.style.cssText=(ze?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ye=C.container.getBoundingClientRect(),dt=h.computedStyle(C.container),Ct=Ye.top+(parseInt(dt.borderTopWidth)||0),xt=Ye.left+(parseInt(dt.borderLeftWidth)||0),Ot=Ye.bottom-Ct-R.clientHeight-2,It=function(ct){h.translate(R,ct.clientX-xt-2,Math.min(ct.clientY-Ct-2,Ot))};It(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Rn),x.isWin&&m.capture(C.container,It,Yn))},this.onContextMenuClose=Yn;var Rn;function Yn(){clearTimeout(Rn),Rn=setTimeout(function(){P&&(R.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var vt=function(ke){C.textInput.onContextMenu(ke),Yn()};m.addListener(R,"mouseup",vt,C),m.addListener(R,"mousedown",function(ke){ke.preventDefault(),Yn()},C),m.addListener(C.renderer.scroller,"contextmenu",vt,C),m.addListener(R,"contextmenu",vt,C),w&&He(_,C,R);function He(ke,ze,Ye){var dt=null,Ct=!1;Ye.addEventListener("keydown",function(Ot){dt&&clearTimeout(dt),Ct=!0},!0),Ye.addEventListener("keyup",function(Ot){dt=setTimeout(function(){Ct=!1},100)},!0);var xt=function(Ot){if(document.activeElement===Ye&&!(Ct||I||ze.$mouseHandler.isMousePressed)&&!L){var It=Ye.selectionStart,ct=Ye.selectionEnd,yt=null,xn=0;if(It==0?yt=l.up:It==1?yt=l.home:ct>B&&A[ct]==`
|
177
|
+
`?yt=l.end:It<N&&A[It-1]==" "?(yt=l.left,xn=d.option):It<N||It==N&&B!=N&&It==ct?yt=l.left:ct>B&&A.slice(0,ct).split(`
|
178
|
+
`).length>2?yt=l.down:ct>B&&A[ct-1]==" "?(yt=l.right,xn=d.option):(ct>B||ct==B&&B!=N&&It==ct)&&(yt=l.right),It!==ct&&(xn|=d.shift),yt){var Cr=ze.onCommandKey({},xn,yt);if(!Cr&&ze.commands){yt=l.keyCodeToString(yt);var zr=ze.commands.findKeyCommand(xn,yt);zr&&ze.execCommand(zr)}N=It,B=ct,ae("")}}};document.addEventListener("selectionchange",xt),ze.on("destroy",function(){document.removeEventListener("selectionchange",xt)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=$,r.$setUserAgentForTests=function(_,C){E=_,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,f){var m=e("../lib/useragent"),y=0,x=550,h=function(){function c(u){u.$clickSelection=null;var a=u.editor;a.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),a.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),a.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),a.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),a.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){u[l]=this[l]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return c.prototype.onMouseDown=function(u){var a=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var l=this.editor,d=u.getButton();if(d!==0){var w=l.getSelectionRange(),b=w.isEmpty();(b||d==1)&&l.selection.moveToPosition(o),d==2&&(l.textInput.onContextMenu(u.domEvent),m.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),a&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},c.prototype.startSelect=function(u,a){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):a||o.selection.moveToPosition(u),a||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},c.prototype.select=function(){var u,a=this.editor,o=a.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)u=this.$clickSelection.end;else if(l==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,u=d.anchor}a.selection.setSelectionAnchor(u.row,u.column)}a.selection.selectToPosition(o),a.renderer.scrollCursorIntoView()},c.prototype.extendSelectionBy=function(u){var a,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[u](l.row,l.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)a=this.$clickSelection.end,(d.end.row!=l.row||d.end.column!=l.column)&&(l=d.start);else if(b==1&&w>=0)a=this.$clickSelection.start,(d.start.row!=l.row||d.start.column!=l.column)&&(l=d.end);else if(w==-1&&b==1)l=d.end,a=d.start;else{var E=s(this.$clickSelection,l);l=E.cursor,a=E.anchor}o.selection.setSelectionAnchor(a.row,a.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},c.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},c.prototype.focusWait=function(){var u=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),a=Date.now();(u>y||a-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},c.prototype.onDoubleClick=function(u){var a=u.getDocumentPosition(),o=this.editor,l=o.session,d=l.getBracketRange(a);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(a.row,a.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},c.prototype.onTripleClick=function(u){var a=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(a.row,a.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(a.row),this.select()},c.prototype.onQuadClick=function(u){var a=this.editor;a.selectAll(),this.$clickSelection=a.getSelectionRange(),this.setState("selectAll")},c.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var a=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=u.domEvent.timeStamp,d=l-o.t,w=d?u.wheelX/d:o.vx,b=d?u.wheelY/d:o.vy;d<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var E=Math.abs(w/b),$=!1;if(E>=1&&a.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),E<=1&&a.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)o.allowed=l;else if(l-o.allowed<x){var _=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);_?($=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=w,o.vy=b,$)return a.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},c}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function g(c,u,a,o){return Math.sqrt(Math.pow(a-c,2)+Math.pow(o-u,2))}function s(c,u){if(c.start.row==c.end.row)var a=2*u.column-c.start.column-c.end.column;else if(c.start.row==c.end.row-1&&!c.start.column&&!c.end.column)var a=u.column-4;else var a=2*u.row-c.start.row-c.end.row;return a<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,f){r.preventParentScroll=function(m){m.stopPropagation();var y=m.currentTarget,x=y.scrollHeight>y.clientHeight;x||m.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,f){var m=this&&this.__extends||function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(b[$]=E[$])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],b=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&b>=l.length&&(l=void 0),{value:l&&l[b++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,g=e("./lib/scroll").preventParentScroll,s="ace_tooltip",c=function(){function l(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return l.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(d){this.getElement().textContent=d},l.prototype.setHtml=function(d){this.getElement().innerHTML=d},l.prototype.setPosition=function(d,w){this.getElement().style.left=d+"px",this.getElement().style.top=w+"px"},l.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},l.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},l.prototype.show=function(d,w,b){d!=null&&this.setText(d),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l}(),u=function(){function l(){this.popups=[]}return l.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},l.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},l.prototype.updatePopups=function(){var d,w,b,E;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var _=y(this.popups),C=_.next();!C.done;C=_.next()){var R=C.value,L=!0;try{for(var F=(b=void 0,y($)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,R)){L=!1;break}}}catch(P){b={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(b)throw b.error}}L?$.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=_.return)&&w.call(_)}finally{if(d)throw d.error}}},l.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return b.left<E.right&&b.right>E.left&&b.top<E.bottom&&b.bottom>E.top},l}(),a=new u;r.popupManager=a,r.Tooltip=c;var o=function(l){m(d,l);function d(w){w===void 0&&(w=document.body);var b=l.call(this,w)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var E=b.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",b.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(b)),E.addEventListener("wheel",g),b}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var E=b.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},d.prototype.isOutsideOfText=function(w){var b=w.editor,E=w.getDocumentPosition(),$=b.session.getLine(E.row);if(E.column==$.length){var _=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(E.row,E.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,E,$){var _=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(a.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),L=C.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-I<0&&R.pageY<P&&(O=!1),F.style.maxHeight=(O?R.pageY:P)-_+"px",F.style.top=O?"":R.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.pageX,window.innerWidth-H-_)+"px"}},d.prototype.addMarker=function(w,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(w,"ace_highlight-marker","text")},d.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,a.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},d}(c);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,f){var m=this&&this.__extends||function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(b[$]=E[$])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],b=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&b>=l.length&&(l=void 0),{value:l&&l[b++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),g=e("../tooltip").Tooltip,s=e("../config").nls,c=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=c,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function a(l){var d=l.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);l.editor.setDefaultHandler("guttermousedown",function(L){if(!(!d.isFocused()||L.getButton()!=0)){var F=w.getRegion(L);if(F!="foldWidgets"){var I=L.getDocumentPosition().row,H=d.session.selection;if(L.getShiftKey())H.selectTo(I,0);else{if(L.domEvent.detail==2)return d.selectAll(),L.preventDefault();l.$clickSelection=d.selection.getLineRange(I)}return l.setState("selectByLines"),l.captureMouse(L),L.preventDefault()}}});var E,$;function _(){var L=$.getDocumentPosition().row,F=d.session.getLength();if(L==F){var I=d.renderer.pixelToScreenCoordinates(0,$.y).row,H=$.$pos;if(I>d.session.documentToScreenRow(H.row,H.column))return C()}if(b.showTooltip(L),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),l.$tooltipFollowsMouse)R($);else{var P=$.getGutterRow(),O=w.$lines.get(P);if(O){var S=O.element.querySelector(".ace_gutter_annotation"),A=S.getBoundingClientRect(),N=b.getElement().style;N.left=A.right-c+"px",N.top=A.bottom-u+"px"}else R($)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||b.getElement().contains(L.relatedTarget))||(E&&(E=clearTimeout(E)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(L){b.setPosition(L.x,L.y)}l.editor.setDefaultHandler("guttermousemove",function(L){var F=L.domEvent.target||L.domEvent.srcElement;if(x.hasCssClass(F,"ace_fold-widget"))return C();b.isOpen&&l.$tooltipFollowsMouse&&R(L),$=L,!E&&(E=setTimeout(function(){E=null,$&&!l.isMousePressed&&_()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(L){$=null,b.isOpen&&(E=setTimeout(function(){E=null,C(L)},50))},d)}r.GutterHandler=a;var o=function(l){m(d,l);function d(w,b){b===void 0&&(b=!1);var E=l.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var $=E.getElement();return $.setAttribute("role","tooltip"),$.style.pointerEvents="auto",b&&(E.onMouseOut=E.onMouseOut.bind(E),$.addEventListener("mouseout",E.onMouseOut)),E}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,b){var E=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,_=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+_>E&&(w-=w+_-E),b+C>$&&(b-=20+C),g.prototype.setPosition.call(this,w,b)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(w){var b,E=this.editor.renderer.$gutterLayer,$=E.$annotations[w],_;$?_={displayText:Array.from($.displayText),type:Array.from($.type)}:_={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];R[P].push(E.$annotations[I].text[H]),(!F||L[P]<L[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");_.displayText.push(O),_.type.push(F+"_fold")}}if(_.displayText.length===0)return this.hideTooltip();for(var S={error:[],security:[],warning:[],info:[],hint:[]},A=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<_.displayText.length;I++){var N=x.createElement("span"),B=x.createElement("span");(b=B.classList).add.apply(b,["ace_".concat(_.type[I]),A]),B.setAttribute("aria-label","".concat(d.annotationLabels[_.type[I].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(x.createTextNode(" ")),N.appendChild(B),N.appendChild(x.createTextNode(_.displayText[I])),N.appendChild(x.createElement("br")),S[_.type[I].replace("_fold","")].push(N)}var U=this.getElement();x.removeChildren(U),S.error.forEach(function(K){return U.appendChild(K)}),S.security.forEach(function(K){return U.appendChild(K)}),S.warning.forEach(function(K){return U.appendChild(K)}),S.info.forEach(function(K){return U.appendChild(K)}),S.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},d.annotationsToSummaryString=function(w){var b,E,$=[],_=["error","security","warning","info","hint"];try{for(var C=y(_),R=C.next();!R.done;R=C.next()){var L=R.value;if(w[L].length){var F=w[L].length===1?d.annotationLabels[L].singular:d.annotationLabels[L].plural;$.push("".concat(w[L].length," ").concat(F))}}}catch(I){b={error:I}}finally{try{R&&!R.done&&(E=C.return)&&E.call(C)}finally{if(b)throw b.error}}return $.join(", ")},d}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,f){var m=e("../lib/event"),y=e("../lib/useragent"),x=function(){function h(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){m.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){m.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),c=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-c},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,s=g.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=s.contains(c.row,c.column)}return this.$inSelection},h.prototype.getButton=function(){return m.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return y.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,f){var m=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,g=200,s=5;function c(a){var o=a.editor,l=m.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){a[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(a));var w=o.container,b,E,$,_,C,R,L=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ce=ne.dataTransfer;ce.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),ce.setDragImage&&ce.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),ce.clearData(),ce.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,b||B(),L++,ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,b||(B(),L++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&b)return U(),F=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=o.moveText(C,R);break;case"copy":C=o.moveText(C,R,!0);break}else{var ce=ae.getData("Text");C={start:R,end:o.session.insert(R,ce)},o.focus(),F=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(a),o),y.addListener(w,"dragend",this.onDragEnd.bind(a),o),y.addListener(w,"dragenter",this.onDragEnter.bind(a),o),y.addListener(w,"dragover",this.onDragOver.bind(a),o),y.addListener(w,"dragleave",this.onDragLeave.bind(a),o),y.addListener(w,"drop",this.onDrop.bind(a),o);function S(ne,ae){var ce=Date.now(),ue=!ae||ne.row!=ae.row,ye=!ae||ne.column!=ae.column;if(!P||ue||ye)o.moveCursorToPosition(ne),P=ce,O={x:E,y:$};else{var Ae=u(O.x,O.y,E,$);Ae>s?P=null:ce-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ce=Date.now(),ue=o.renderer.layerConfig.lineHeight,ye=o.renderer.layerConfig.characterWidth,Ae=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-Ae.left,right:Ae.right-E},y:{top:$-Ae.top,bottom:Ae.bottom-$}},Ie=Math.min($e.x.left,$e.x.right),Ge=Math.min($e.y.top,$e.y.bottom),qe={row:ne.row,column:ne.column};Ie/ye<=2&&(qe.column+=$e.x.left<$e.x.right?-3:2),Ge/ue<=1&&(qe.row+=$e.y.top<$e.y.bottom?-1:1);var ut=ne.row!=qe.row,rt=ne.column!=qe.column,ht=!ae||ne.row!=ae.row;ut||rt&&!ht?H?ce-H>=h&&o.renderer.scrollCursorIntoView(qe):H=ce:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(E,$),S(R,ne),A(R,ne)}function B(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),N(),_=setInterval(N,20),L=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(_),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,R=null,L=0,H=null,P=null,y.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&b&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ce){return ce=="text/plain"||ce=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],ue=x.isMac?ne.altKey:ne.ctrlKey,ye="uninitialized";try{ye=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ae="none";return ue&&ae.indexOf(ye)>=0?Ae="copy":ce.indexOf(ye)>=0?Ae="move":ae.indexOf(ye)>=0&&(Ae="copy"),Ae}}(function(){this.dragWait=function(){var a=Date.now()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(a){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor,o=a.container;o.draggable=!0,a.renderer.$cursorLayer.setBlinking(!1),a.setStyle("ace_dragging");var l=x.isWin?"default":"move";a.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(a){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var o=this.editor,l=a.inSelection(),d=a.getButton(),w=a.domEvent.detail||1;if(w===1&&d===0&&l){if(a.editor.inMultiSelectMode&&(a.getAccelKey()||a.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(c.prototype);function u(a,o,l,d){return Math.sqrt(Math.pow(l-a,2)+Math.pow(d-o,2))}r.DragdropHandler=c}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,f){var m=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,g){var s="scroll",c,u,a,o,l,d,w=0,b,E=0,$=0,_=0,C,R;function L(){var S=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(A?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},B=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?S.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(S?S.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),R.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&g.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){R&&I();return}R||L();var S=g.selection.cursor,A=g.renderer.textToScreenCoordinates(S.row,S.column),N=g.renderer.textToScreenCoordinates(0,0).pageX,B=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",g.on("input",I)}function I(S){R&&(R.style.display="none"),g.off("input",I)}function H(){l=null,clearTimeout(l);var S=g.selection.getRange(),A=S.contains(b.row,b.column);(S.isEmpty()||!A)&&(g.selection.moveToPosition(b),g.selection.selectWord()),s="wait",F()}function P(){l=null,clearTimeout(l),g.selection.moveToPosition(b);var S=E>=2?g.selection.getLineRange(b.row):g.session.getBracketRange(b);S&&!S.isEmpty()?g.selection.setRange(S):g.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(S){if(C){var A=g.textInput.getElement();A.focus()}},g),y.addListener(h,"touchstart",function(S){var A=S.touches;if(l||A.length>1){clearTimeout(l),l=null,a=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var N=g.renderer.layerConfig.lineHeight,B=g.renderer.layerConfig.lineHeight,U=S.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(c-Z)+Math.abs(u-te)>N&&(a=-1),c=S.clientX=Z,u=S.clientY=te,$=_=0;var he=new m(S,g);if(b=he.getDocumentPosition(),U-a<500&&A.length==1&&!w)E++,S.preventDefault(),S.button=0,P();else{E=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ce=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ue=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ye=g.renderer.scroller.getBoundingClientRect(),Ae=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ie=function(ut,rt){return ut=ut/B,rt=rt/N-.75,ut*ut+rt*rt};if(S.clientX<ye.left){s="zoom";return}var Ge=Ie(S.clientX-ye.left-ce.left+$e,S.clientY-ye.top-ce.top+Ae),qe=Ie(S.clientX-ye.left-ue.left+$e,S.clientY-ye.top-ue.top+Ae);Ge<3.5&&qe<3.5&&(s=Ge>qe?"cursor":"anchor"),qe<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",l=setTimeout(H,450)}a=U},g),y.addListener(h,"touchend",function(S){C=g.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):l?(g.selection.moveToPosition(b),w=0,F()):s=="scroll"?(O(),I()):F(),clearTimeout(l),l=null},g),y.addListener(h,"touchmove",function(S){l&&(clearTimeout(l),l=null);var A=S.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=c-N.clientX,U=u-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return S.preventDefault();c=N.clientX,u=N.clientY,S.clientX=N.clientX,S.clientY=N.clientY;var K=S.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new m(S,g);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&($=B/Z,_=U/Z),g._emit("mousewheel",te),te.propagationStopped||($=_=0)}else{var he=new m(S,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),S.preventDefault()}}},g);function O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs($)<.01&&($=0),Math.abs(_)<.01&&(_=0),w<20&&($=.9*$),w<20&&(_=.9*_);var S=g.session.getScrollTop();g.renderer.scrollBy(10*$,10*_),S==g.session.getScrollTop()&&(w=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(e,r,f){var m=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,g=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),a=function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=l,new x(this),new h(this),new s(this);var w=function($){var _=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());_&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},b=l.renderer.getMouseEventTarget();m.addListener(b,"click",this.onMouseEvent.bind(this,"click"),l),m.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),m.addMultiMouseDownListener([b,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),m.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),c(l.container,l);var E=l.renderer.$gutter;m.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),m.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),m.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),m.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),m.addListener(b,"mousedown",w,l),m.addListener(E,"mousedown",w,l),y.isIE&&l.renderer.scrollBarV&&(m.addListener(l.renderer.scrollBarV.element,"mousedown",w,l),m.addListener(l.renderer.scrollBarH.element,"mousedown",w,l)),l.on("mousemove",function($){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var _=l.renderer.screenToTextCoordinates($.x,$.y),C=l.session.selection.getRange(),R=l.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,d){this.editor.session&&this.editor._emit(l,new g(d,this.editor))},o.prototype.onMouseMove=function(l,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(l,new g(d,this.editor))},o.prototype.onMouseWheel=function(l,d){var w=new g(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(l,w)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,d){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var E=this,$=function(F){if(F){if(y.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,d&&d(F),E.mouseEvent=new g(F,E.editor),E.$mouseMoved=!0}},_=function(F){w.off("beforeEndOperation",R),clearInterval(L),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(y.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){_(l)});var R=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=$,E.releaseMouse=m.capture(this.editor.container,$,_);var L=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var l=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),d&&d.domEvent&&m.stopEvent(d.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();a.prototype.releaseMouse=null,u.defineOptions(a.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=a}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,f){var m=e("../lib/dom"),y=function(){function x(h){h.on("click",function(g){var s=g.getDocumentPosition(),c=h.session,u=c.getFoldAt(s.row,s.column,1);u&&(g.getAccelKey()?c.removeFold(u):c.expandFold(u),g.stop());var a=g.domEvent&&g.domEvent.target;a&&m.hasCssClass(a,"ace_inline_button")&&m.hasCssClass(a,"ace_toggle_wrap")&&(c.setOption("wrap",!c.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var c=g.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[c]&&h.session.onFoldWidgetClick(c,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var c=g.getDocumentPosition().row,u=h.session,a=u.getParentFoldRangeData(c,!0),o=a.range||a.firstRange;if(o){c=o.start.row;var l=u.getFoldAt(c,u.getLine(c).length,1);l?u.removeFold(l):(u.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return x}();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,f){var m=e("../lib/keys"),y=e("../lib/event"),x=function(){function h(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return h.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},h.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},h.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var c=this.$handlers.indexOf(g);c!=-1&&this.$handlers.splice(c,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),c==-1&&g.attach&&g.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(s,g)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(g,s,c,u){for(var a,o=!1,l=this.$editor.commands,d=this.$handlers.length;d--&&(a=this.$handlers[d].handleKeyboard(this.$data,g,s,c,u),!(!(!a||!a.command)&&(a.command=="null"?o=!0:o=l.exec(a.command,this.$editor,a.args,u),o&&u&&g!=-1&&a.passEvent!=!0&&a.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&g==-1&&(a={command:"insertstring"},o=l.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",a),o},h.prototype.onCommandKey=function(g,s,c){var u=m.keyCodeToString(c);return this.$callKeyboardHandlers(s,u,c,g)},h.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},h}();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,f){var m=0,y=0,x=!1,h=!1,g=!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]],u=0,a=1,o=0,l=1,d=2,w=3,b=4,E=5,$=6,_=7,C=8,R=9,L=10,F=11,I=12,H=13,P=14,O=15,S=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,E,$,C,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,E,E,$,C,b,b,F,F,F,b,b,b,b,b,L,R,L,R,R,d,d,d,d,d,d,d,d,d,d,R,b,b,b,b,b,b,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,b,b,b,b,b,b,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,b,b,b,b,N,N,N,N,N,N,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,b,F,F,F,F,b,b,b,b,o,b,b,N,b,b,F,F,d,d,b,o,b,b,b,d,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,l,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,E,H,P,O,S,A,R,F,F,F,F,F,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,R,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];function K(ne,ae,ce,ue){var ye=m?c:s,Ae=null,$e=null,Ie=null,Ge=0,qe=null,ut=null,rt=-1,ht=null,en=null,pn=[];if(!ue)for(ht=0,ue=[];ht<ce;ht++)ue[ht]=he(ne[ht]);for(y=m,x=!1,h=!1,g=!1,en=0;en<ce;en++){if(Ae=Ge,pn[en]=$e=te(ne,ue,pn,en),Ge=ye[Ae][$e],qe=Ge&240,Ge&=15,ae[en]=Ie=ye[Ge][5],qe>0)if(qe==16){for(ht=rt;ht<en;ht++)ae[ht]=1;rt=-1}else rt=-1;if(ut=ye[Ge][6],ut)rt==-1&&(rt=en);else if(rt>-1){for(ht=rt;ht<en;ht++)ae[ht]=Ie;rt=-1}ue[en]==E&&(ae[en]=0),y|=Ie}if(g){for(ht=0;ht<ce;ht++)if(ue[ht]==$){ae[ht]=m;for(var Kt=ht-1;Kt>=0&&ue[Kt]==C;Kt--)ae[Kt]=m}}}function Z(ne,ae,ce){if(!(y<ne)){if(ne==1&&m==a&&!h){ce.reverse();return}for(var ue=ce.length,ye=0,Ae,$e,Ie,Ge;ye<ue;){if(ae[ye]>=ne){for(Ae=ye+1;Ae<ue&&ae[Ae]>=ne;)Ae++;for($e=ye,Ie=Ae-1;$e<Ie;$e++,Ie--)Ge=ce[$e],ce[$e]=ce[Ie],ce[Ie]=Ge;ye=Ae}ye++}}}function te(ne,ae,ce,ue){var ye=ae[ue],Ae,$e,Ie,Ge;switch(ye){case o:case l:x=!1;case b:case w:return ye;case d:return x?w:d;case _:return x=!0,l;case C:return b;case R:return ue<1||ue+1>=ae.length||(Ae=ce[ue-1])!=d&&Ae!=w||($e=ae[ue+1])!=d&&$e!=w?b:(x&&($e=w),$e==Ae?$e:b);case L:return Ae=ue>0?ce[ue-1]:E,Ae==d&&ue+1<ae.length&&ae[ue+1]==d?d:b;case F:if(ue>0&&ce[ue-1]==d)return d;if(x)return b;for(Ge=ue+1,Ie=ae.length;Ge<Ie&&ae[Ge]==F;)Ge++;return Ge<Ie&&ae[Ge]==d?d:b;case I:for(Ie=ae.length,Ge=ue+1;Ge<Ie&&ae[Ge]==I;)Ge++;if(Ge<Ie){var qe=ne[ue],ut=qe>=1425&&qe<=2303||qe==64286;if(Ae=ae[Ge],ut&&(Ae==l||Ae==_))return l}return ue<1||(Ae=ae[ue-1])==E?b:ce[ue-1];case E:return x=!1,h=!0,m;case $:return g=!0,b;case H:case P:case S:case A:case O:x=!1;case N:return b}}function he(ne){var ae=ne.charCodeAt(0),ce=ae>>8;return ce==0?ae>191?o:B[ae]:ce==5?/[\u0591-\u05f4]/.test(ne)?l:o:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?d:_:ce==32&&ae<=8287?U[ae&255]:ce==254&&ae>=65136?_:b}r.L=o,r.R=l,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ce){if(ne.length<2)return{};var ue=ne.split(""),ye=new Array(ue.length),Ae=new Array(ue.length),$e=[];m=ce?a:u,K(ue,$e,ue.length,ae);for(var Ie=0;Ie<ye.length;ye[Ie]=Ie,Ie++);Z(2,$e,ye),Z(1,$e,ye);for(var Ie=0;Ie<ye.length-1;Ie++)ae[Ie]===w?$e[Ie]=r.AN:$e[Ie]===l&&(ae[Ie]>_&&ae[Ie]<H||ae[Ie]===b||ae[Ie]===N)?$e[Ie]=r.ON_R:Ie>0&&ue[Ie-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Ie])&&($e[Ie-1]=$e[Ie]=r.R_H,Ie++);ue[ue.length-1]===r.DOT&&($e[ue.length-1]=r.B),ue[0]===""&&($e[0]=r.RLE);for(var Ie=0;Ie<ye.length;Ie++)Ae[Ie]=$e[ye[Ie]];return{logicalFromVisual:ye,bidiLevels:Ae}},r.hasBidiCharacters=function(ne,ae){for(var ce=!1,ue=0;ue<ne.length;ue++)ae[ue]=he(ne.charAt(ue)),!ce&&(ae[ue]==l||ae[ue]==_||ae[ue]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ne,ae){for(var ce=0;ce<ae.logicalFromVisual.length;ce++)if(ae.logicalFromVisual[ce]==ne)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,f){var m=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=m,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(s.getValue())}return g.prototype.isBidiRow=function(s,c,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(c,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var s=0,c=this.session.$screenRowCache;if(c.length){var u=this.session.$getRowCacheIndex(c,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},g.prototype.getSplitIndex=function(){var s=0,c=this.session.$screenRowCache;if(c.length)for(var u,a=this.session.$getRowCacheIndex(c,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(c,this.currentRow-s-1),u===a);)a=u,s++;else s=this.currentRow;return s},g.prototype.updateRowLine=function(s,c){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,a=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(c===void 0&&(c=this.getSplitIndex()),c>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[m.L],this.line=c<o.length?this.line.substring(o[c-1],o[c]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[c]),c==o.length&&(this.line+=this.showInvisibles?a:m.DOT))}else this.line+=this.showInvisibles?a:m.DOT;var l=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,E){return b===" "||l.isFullWidth(b.charCodeAt(0))?(w=b===" "?l.getScreenTabSize(E+d):2,d+=w-1,y.stringRepeat(m.DOT,w)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==m.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var s=[];m.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=m.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var c=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[m.L]=this.charWidths[m.EN]=this.charWidths[m.ON_R]=c,this.charWidths[m.R]=this.charWidths[m.AN]=u,this.charWidths[m.R_H]=u*.45,this.charWidths[m.B]=this.charWidths[m.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},g.prototype.setEolChar=function(s){this.EOL=s},g.prototype.setContentWidth=function(s){this.contentWidth=s},g.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(s,c){for(var u=s.getCursorPosition(),a=s.selection.getSelectionAnchor().row;a<=u.row;a++)!c&&s.session.getLine(a).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(a,0,1):c&&s.session.getLine(a).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:a},s.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(s){s-=this.wrapIndent;var c=this.line.charAt(0)===this.RLE?1:0,u=s>c?this.session.getOverwrite()?s:s-1:c,a=m.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&s<=c&&o[a]%2!==0&&a++;for(var d=0;d<a;d++)l+=this.charWidths[o[d]];return!this.session.getOverwrite()&&s>c&&o[a]%2===0&&(l+=this.charWidths[o[a]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},g.prototype.getSelections=function(s,c){var u=this.bidiMap,a=u.bidiLevels,o,l=[],d=0,w=Math.min(s,c)-this.wrapIndent,b=Math.max(s,c)-this.wrapIndent,E=!1,$=!1,_=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<a.length;R++)C=u.logicalFromVisual[R],o=a[R],E=C>=w&&C<b,E&&!$?_=d:!E&&$&&l.push({left:_,width:d-_}),d+=this.charWidths[o],$=E;if(E&&R===a.length&&l.push({left:_,width:d-_}),this.isRtlDir)for(var L=0;L<l.length;L++)l[L].left+=this.rtlLineOffset;return l},g.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var c=0,u=Math.max(u,0),a=0,o=0,l=this.bidiMap.bidiLevels,d=this.charWidths[l[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>a+d/2;){if(a+=d,o===l.length-1){d=0;break}d=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(u<a&&o--,c=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?c=1+(u>a?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&d===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?c=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&d!==0&&o--,c=this.bidiMap.logicalFromVisual[o]),c===0&&this.isRtlDir&&c++,c+this.wrapIndent},g}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,f){var m=e("./lib/oop"),y=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,g=function(){function s(c){this.session=c,this.doc=c.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(a){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&a.old.column!=a.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(c,u){this.$isEmpty=!1,this.anchor.setPosition(c,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var c=this.anchor,u=this.lead;return c.row>u.row||c.row==u.row&&c.column>u.column},s.prototype.getRange=function(){var c=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,c):h.fromPoints(c,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(c,u){var a=u?c.end:c.start,o=u?c.start:c.end;this.$setSelection(a.row,a.column,o.row,o.column)},s.prototype.$setSelection=function(c,u,a,o){if(!this.$silent){var l=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(c,u),this.cursor.setPosition(a,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||d)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(c){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),c.call(this)},s.prototype.selectTo=function(c,u){this.$moveSelection(function(){this.moveCursorTo(c,u)})},s.prototype.selectToPosition=function(c){this.$moveSelection(function(){this.moveCursorToPosition(c)})},s.prototype.moveTo=function(c,u){this.clearSelection(),this.moveCursorTo(c,u)},s.prototype.moveToPosition=function(c){this.clearSelection(),this.moveCursorToPosition(c)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(c,u){if(typeof u>"u"){var a=c||this.lead;c=a.row,u=a.column}return this.session.getWordRange(c,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var c=this.getCursor(),u=this.session.getAWordRange(c.row,c.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(c,u){var a=typeof c=="number"?c:this.lead.row,o,l=this.session.getFoldLine(a);return l?(a=l.start.row,o=l.end.row):o=a,u===!0?new h(a,0,o,this.session.getLine(o).length):new h(a,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(c,u,a){var o=c.column,l=c.column+u;return a<0&&(o=c.column-u,l=c.column),this.session.isTabStop(c)&&this.doc.getLine(c.row).slice(o,l).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var c=this.lead.getPosition(),u;if(u=this.session.getFoldAt(c.row,c.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(c.column===0)c.row>0&&this.moveCursorTo(c.row-1,this.doc.getLine(c.row-1).length);else{var a=this.session.getTabSize();this.wouldMoveIntoSoftTab(c,a,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-a):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var c=this.lead.getPosition(),u;if(u=this.session.getFoldAt(c.row,c.column,1))this.moveCursorTo(u.end.row,u.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 a=this.session.getTabSize(),c=this.lead;this.wouldMoveIntoSoftTab(c,a,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,a):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var c=this.lead.row,u=this.lead.column,a=this.session.documentToScreenRow(c,u),o=this.session.screenToDocumentPosition(a,0),l=this.session.getDisplayLine(c,null,o.row,o.column),d=l.match(/^\s*/);d[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=d[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var c=this.lead,u=this.session.getDocumentLastRowColumnPosition(c.row,c.column);if(this.lead.column==u.column){var a=this.session.getLine(u.row);if(u.column==a.length){var o=a.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var c=this.doc.getLength()-1,u=this.doc.getLine(c).length;this.moveCursorTo(c,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var c=this.lead.row,u=this.lead.column,a=this.doc.getLine(c),o=a.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(c,u,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=a.substring(u)),u>=a.length){this.moveCursorTo(c,a.length),this.moveCursorRight(),c<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,u)},s.prototype.moveCursorLongWordLeft=function(){var c=this.lead.row,u=this.lead.column,a;if(a=this.session.getFoldAt(c,u,-1)){this.moveCursorTo(a.start.row,a.start.column);return}var o=this.session.getFoldStringAt(c,u,-1);o==null&&(o=this.doc.getLine(c).substring(0,u));var l=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(u-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(c,0),this.moveCursorLeft(),c>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,u)},s.prototype.$shortWordEndIndex=function(c){var u=0,a,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(c))u=this.session.tokenRe.lastIndex;else{for(;(a=c[u])&&o.test(a);)u++;if(u<1){for(l.lastIndex=0;(a=c[u])&&!l.test(a);)if(l.lastIndex=0,u++,o.test(a))if(u>2){u--;break}else{for(;(a=c[u])&&o.test(a);)u++;if(u>2)break}}}return l.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var c=this.lead.row,u=this.lead.column,a=this.doc.getLine(c),o=a.substring(u),l=this.session.getFoldAt(c,u,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(u==a.length){var d=this.doc.getLength();do c++,o=this.doc.getLine(c);while(c<d&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(c,u+w)},s.prototype.moveCursorShortWordLeft=function(){var c=this.lead.row,u=this.lead.column,a;if(a=this.session.getFoldAt(c,u,-1))return this.moveCursorTo(a.start.row,a.start.column);var o=this.session.getLine(c).substring(0,u);if(u===0){do c--,o=this.doc.getLine(c);while(c>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var l=y.stringReverse(o),d=this.$shortWordEndIndex(l);return this.moveCursorTo(c,u-d)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(c,u){var a=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(c!==0&&(this.session.$bidiHandler.isBidiRow(a.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(a.column),a.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=a.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?a.column=this.$desiredColumn:this.$desiredColumn=a.column),c!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];c<0?c-=l.rowsAbove||0:c>0&&(c+=l.rowCount-(l.rowsAbove||0))}var d=this.session.screenToDocumentPosition(a.row+c,a.column,o);c!==0&&u===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+u,u===0)},s.prototype.moveCursorToPosition=function(c){this.moveCursorTo(c.row,c.column)},s.prototype.moveCursorTo=function(c,u,a){var o=this.session.getFoldAt(c,u,1);o&&(c=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(c);/[\uDC00-\uDFFF]/.test(l.charAt(u))&&l.charAt(u-1)&&(this.lead.row==c&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(c,u),this.$keepDesiredColumnOnChange=!1,a||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(c,u,a){var o=this.session.screenToDocumentPosition(c,u);this.moveCursorTo(o.row,o.column,a)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(c){this.setSelectionRange(c,c.cursor==c.start),this.$desiredColumn=c.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(c){var u=this.getRange();return c?(c.start.column=u.start.column,c.start.row=u.start.row,c.end.column=u.end.column,c.end.row=u.end.row):c=u,c.cursor=this.isBackwards()?c.start:c.end,c.desiredColumn=this.$desiredColumn,c},s.prototype.getRangeOfMovements=function(c){var u=this.getCursor();try{c(this);var a=this.getCursor();return h.fromPoints(u,a)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var c=this.ranges.map(function(u){var a=u.clone();return a.isBackwards=u.cursor==u.start,a});else{var c=this.getRange();c.isBackwards=this.isBackwards()}return c},s.prototype.fromJSON=function(c){if(c.start==null)if(this.rangeList&&c.length>1){this.toSingleRange(c[0]);for(var u=c.length;u--;){var a=h.fromPoints(c[u].start,c[u].end);c[u].isBackwards&&(a.cursor=a.start),this.addRange(a,!0)}return}else c=c[0];this.rangeList&&this.toSingleRange(c),this.setSelectionRange(c,c.isBackwards)},s.prototype.isEqual=function(c){if((c.length||this.rangeCount)&&c.length!=this.rangeCount)return!1;if(!c.length||!this.ranges)return this.getRange().isEqual(c);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(c[u]))return!1;return!0},s}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,m.implement(g.prototype,x),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,f){var m=e("./lib/report_error").reportError,y=2e3,x=function(){function h(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var s in this.states){for(var c=this.states[s],u=[],a=0,o=this.matchMappings[s]={defaultToken:"text"},l="g",d=[],w=0;w<c.length;w++){var b=c[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),b.unicode&&l.indexOf("u")===-1&&(l+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var E=b.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||$==1?b.token=b.token[0]:$-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:$-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&($>1?b.onMatch=this.$applyToken:b.onMatch=b.token),$>1&&(/\\\d/.test(b.regex)?E=b.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+a+1)}):($=1,E=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&d.push(b)),o[a]=w,a+=$,u.push(E),b.onMatch||(b.onMatch=null)}}u.length||(o[0]=0,u.push("$")),d.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,l)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",l)}}return h.prototype.$setMaxTokenCount=function(g){y=g|0},h.prototype.$applyToken=function(g){var s=this.splitRegex.exec(g).slice(1),c=this.token.apply(this,s);if(typeof c=="string")return[{type:c,value:g}];for(var u=[],a=0,o=c.length;a<o;a++)s[a]&&(u[u.length]={type:c[a],value:s[a]});return u},h.prototype.$arrayTokens=function(g){if(!g)return[];var s=this.splitRegex.exec(g);if(!s)return"text";for(var c=[],u=this.tokenArray,a=0,o=u.length;a<o;a++)s[a+1]&&(c[c.length]={type:u[a],value:s[a+1]});return c},h.prototype.removeCapturingGroups=function(g){var s=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(c,u){return u?"(?:":c});return s},h.prototype.createSplitterRegexp=function(g,s){if(g.indexOf("(?=")!=-1){var c=0,u=!1,a={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,d,w,b,E){return u?u=b!="]":b?u=!0:w?(c==a.stack&&(a.end=E+1,a.stack=-1),c--):d&&(c++,d.length!=1&&(a.stack=c,a.start=E)),o}),a.end!=null&&/^\)*$/.test(g.substr(a.end))&&(g=g.substring(0,a.start)+g.substr(a.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(s||"").replace("g",""))},h.prototype.getLineTokens=function(g,s){if(s&&typeof s!="string"){var c=s.slice(0);s=c[0],s==="#tmp"&&(c.shift(),s=c.shift())}else var c=[];var u=s||"start",a=this.states[u];a||(u="start",a=this.states[u]);var o=this.matchMappings[u],l=this.regExps[u];l.lastIndex=0;for(var d,w=[],b=0,E=0,$={type:null,value:""};d=l.exec(g);){var _=o.defaultToken,C=null,R=d[0],L=l.lastIndex;if(L-R.length>b){var F=g.substring(b,L-R.length);$.type==_?$.value+=F:($.type&&w.push($),$={type:_,value:F})}for(var I=0;I<d.length-2;I++)if(d[I+1]!==void 0){C=a[o[I]],C.onMatch?_=C.onMatch(R,u,c,g):_=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,c),a=this.states[u],a||(this.reportError("state doesn't exist",u),u="start",a=this.states[u]),o=this.matchMappings[u],b=L,l=this.regExps[u],l.lastIndex=L),C.consumeLineEnd&&(b=L);break}if(R){if(typeof _=="string")(!C||C.merge!==!1)&&$.type===_?$.value+=R:($.type&&w.push($),$={type:_,value:R});else if(_){$.type&&w.push($),$={type:null,value:""};for(var I=0;I<_.length;I++)w.push(_[I])}}if(b==g.length)break;if(b=L,E++>y){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:g});b<g.length;)$.type&&w.push($),$={value:g.substring(b,b+=500),type:"overflow"};u="start",c=[];break}}return $.type&&w.push($),c.length>1&&c[0]!==u&&c.unshift("#tmp",u),{tokens:w,state:c.length?c:u}},h}();x.prototype.reportError=m,r.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,f){var m=e("../lib/deep_copy").deepCopy,y;y=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,s){if(!s){for(var c in g)this.$rules[c]=g[c];return}for(var c in g){for(var u=g[c],a=0;a<u.length;a++){var o=u[a];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+c]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(g,s,c,u,a){var o=typeof g=="function"?new g().getRules():g;if(u)for(var l=0;l<u.length;l++)u[l]=s+u[l];else{u=[];for(var d in o)u.push(s+d)}if(this.addRules(o,s),c)for(var w=Array.prototype[a?"push":"unshift"],l=0;l<u.length;l++)w.apply(this.$rules[u[l]],m(c));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(g,s){return(g!="start"||s.length)&&s.unshift(this.nextState,g),this.nextState},h=function(g,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var g=0,s=this.$rules;function c(u){var a=s[u];a.processed=!0;for(var o=0;o<a.length;o++){var l=a[o],d=null;Array.isArray(l)&&(d=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var w=l.next||l.push;if(w&&Array.isArray(w)){var b=l.stateName;b||(b=l.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=g++)),s[b]=w,l.next=b,c(b)}else w=="pop"&&(l.next=h);if(l.push&&(l.nextState=l.next||l.push,l.next=x,delete l.push),l.rules)for(var E in l.rules)s[E]?s[E].push&&s[E].push.apply(s[E],l.rules[E]):s[E]=l.rules[E];var $=typeof l=="string"?l:l.include;if($&&($==="$self"&&($="start"),Array.isArray($)?d=$.map(function(C){return s[C]}):d=s[$]),d){var _=[o,1].concat(d);l.noEscape&&(_=_.filter(function(C){return!C.next})),a.splice.apply(a,_),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(s).forEach(c,this)},this.createKeywordMapper=function(g,s,c,u){var a=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var l=g[o],d=l.split(u||"|"),w=d.length;w--;){var b=d[w];this.$keywordList.push(b),c&&(b=b.toLowerCase()),a[b]=o}},this),g=null,c?function(o){return a[o.toLowerCase()]||s}:function(o){return a[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(y.prototype),r.TextHighlightRules=y}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,f){var m;m=function(){this.$behaviours={}},(function(){this.add=function(y,x,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[y]:this.$behaviours[y]={}}this.$behaviours[y][x]=h},this.addBehaviours=function(y){for(var x in y)for(var h in y[x])this.add(x,h,y[x][h])},this.remove=function(y){this.$behaviours&&this.$behaviours[y]&&delete this.$behaviours[y]},this.inherit=function(y,x){if(typeof y=="function")var h=new y().getBehaviours(x);else var h=y.getBehaviours(x);this.addBehaviours(h)},this.getBehaviours=function(y){if(y){for(var x={},h=0;h<y.length;h++)this.$behaviours[y[h]]&&(x[y[h]]=this.$behaviours[y[h]]);return x}else return this.$behaviours}}).call(m.prototype),r.Behaviour=m}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,f){var m=e("./range").Range,y=function(){function x(h,g,s){this.$session=h,this.$row=g,this.$rowTokens=h.getTokens(g);var c=h.getTokenAt(g,s);this.$tokenIndex=c?c.index:-1}return x.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]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,g=this.$tokenIndex,s=h[g].start;if(s!==void 0)return s;for(s=0;g>0;)g-=1,s+=h[g].value.length;return s},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new m(this.$row,g,this.$row,g+h.value.length)},x}();r.TokenIterator=y}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,f){var m=e("../../lib/oop"),y=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],c,u={},a={'"':'"',"'":"'"},o=function(w){var b=-1;if(w.multiSelect&&(b=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[b])return c=u[b];c=u[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(w,b,E,$){var _=w.end.row-w.start.row;return{text:E+b+$,selection:[0,w.start.column+1,_,w.end.column+(_?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(b,E,$,_,C){var R=$.getCursorPosition(),L=_.doc.getLine(R.row);if(C=="{"){o($);var F=$.getSelectionRange(),I=_.doc.getTextRange(F),H=_.getTokenAt(R.row,R.column);if(I!==""&&I!=="{"&&$.getWrapBehavioursEnabled())return l(F,I,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[R.column-H.start-1]!=="$"?void 0:(d.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion($,_))return/[\]\}\)]/.test(L[R.column])||$.inMultiSelectMode||w.braces?(d.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert($,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var O=L.substring(R.column,R.column+1);if(O=="}"){var S=_.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(S!==null&&d.isAutoInsertedClosing(R,L,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o($);var A="";d.isMaybeInsertedClosing(R,L)&&(A=h.stringRepeat("}",c.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var O=L.substring(R.column,R.column+1);if(O==="}"){var N=_.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var B=this.$getIndent(_.getLine(N.row))}else if(A)var B=this.$getIndent(L);else{d.clearMaybeInsertedClosing();return}var U=B+_.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;c.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,E,$,_,C){if(C=="("){o($);var R=$.getSelectionRange(),L=_.doc.getTextRange(R);if(L!==""&&$.getWrapBehavioursEnabled())return l(R,L,"(",")");if(d.isSaneInsertion($,_))return d.recordAutoInsert($,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var F=$.getCursorPosition(),I=_.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H==")"){var P=_.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(b,E,$,_,C){if(C=="["){o($);var R=$.getSelectionRange(),L=_.doc.getTextRange(R);if(L!==""&&$.getWrapBehavioursEnabled())return l(R,L,"[","]");if(d.isSaneInsertion($,_))return d.recordAutoInsert($,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var F=$.getCursorPosition(),I=_.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H=="]"){var P=_.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(b,E,$,_,C){var R=_.$mode.$quotes||a;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var L=C,F=$.getSelectionRange(),I=_.doc.getTextRange(F);if(I!==""&&(I.length!=1||!R[I])&&$.getWrapBehavioursEnabled())return l(F,I,L,L);if(!I){var H=$.getCursorPosition(),P=_.doc.getLine(H.row),O=P.substring(H.column-1,H.column),S=P.substring(H.column,H.column+1),A=_.getTokenAt(H.row,H.column),N=_.getTokenAt(H.row,H.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!N||/string|escape/.test(N.type),K;if(S==L)K=B!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=_.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(S),ne=_.$mode.$pairQuotesAfter,ae=ne&&ne[L]&&ne[L].test(O);if(!ae&&te||he||S&&!/[\s;,.})\]\\]/.test(S))return null;var ce=P[H.column-2];if(O==L&&(ce==L||Z.test(ce)))return null;K=!0}return{text:K?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,E,$,_,C){var R=_.$mode.$quotes||a,L=_.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(L)){o($);var F=_.doc.getLine(C.start.row),I=F.substring(C.start.column+1,C.start.column+2);if(I==L)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,E,$,_,C){if(b==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&$.selection.isEmpty()){var R=$.getCursorPosition();if(R.column===0)return;for(var L=_.doc.getLine(R.row),F=_.doc.getLine(R.row+1),I=_.getTokens(R.row),H=0,P=0;P<I.length;P++){H+=I[P].value.length;var O=I[P];if(H>=R.column){if(H===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var S=I[P+1];if(!S||!/\.doc/.test(S.type))return}}var A=R.column-(H-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&A>B&&A<B+3||N!==-1&&B!==-1&&A>=N&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(L);if(/\s*\*/.test(F))return/^\s*\*/.test(L)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(L.substring(0,R.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},d.isSaneInsertion=function(w,b){var E=w.getCursorPosition(),$=new x(b,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var _=new x(b,E.row,E.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",g))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",s)},d.$matchTokenType=function(w,b){return b.indexOf(w.type||w)>-1},d.recordAutoInsert=function(w,b,E){var $=w.getCursorPosition(),_=b.doc.getLine($.row);this.isAutoInsertedClosing($,_,c.autoInsertedLineEnd[0])||(c.autoInsertedBrackets=0),c.autoInsertedRow=$.row,c.autoInsertedLineEnd=E+_.substr($.column),c.autoInsertedBrackets++},d.recordMaybeInsert=function(w,b,E){var $=w.getCursorPosition(),_=b.doc.getLine($.row);this.isMaybeInsertedClosing($,_)||(c.maybeInsertedBrackets=0),c.maybeInsertedRow=$.row,c.maybeInsertedLineStart=_.substr(0,$.column)+E,c.maybeInsertedLineEnd=_.substr($.column),c.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(w,b,E){return c.autoInsertedBrackets>0&&w.row===c.autoInsertedRow&&E===c.autoInsertedLineEnd[0]&&b.substr(w.column)===c.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(w,b){return c.maybeInsertedBrackets>0&&w.row===c.maybeInsertedRow&&b.substr(w.column)===c.maybeInsertedLineEnd&&b.substr(0,w.column)==c.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){c.autoInsertedLineEnd=c.autoInsertedLineEnd.substr(1),c.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){c&&(c.maybeInsertedBrackets=0,c.maybeInsertedRow=-1)},m.inherits(d,y),r.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,r,f){for(var m=[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],y=0,x=[],h=0;h<m.length;h+=2)x.push(y+=m[h]),m[h+1]&&x.push(45,y+=m[h+1]);r.wordChars=String.fromCharCode.apply(null,x)}),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(e,r,f){var m=e("../config"),y=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,g=e("../unicode"),s=e("../lib/lang"),c=e("../token_iterator").TokenIterator,u=e("../range").Range,a;a=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new y(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,d,w){var b=l.doc,E=!0,$=!0,_=1/0,C=l.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(s.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var L=s.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),R=l.getUseSoftTabs();var I=function(K,Z){var te=K.match(L);if(te){var he=te[1].length,ne=te[0].length;!S(K,he,ne)&&te[0][ne-1]==" "&&ne--,b.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!E||/\S/.test(K))&&(S(K,_,_)?b.insertInLine({row:Z,column:_},H):b.insertInLine({row:Z,column:_},F))},O=function(K,Z){return L.test(K)},S=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,A=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+s.escapeRegExp(F)+")"),N=new RegExp("(?:"+s.escapeRegExp(A)+")\\s*$"),P=function(ae,ce){O(ae,ce)||(!E||/\S/.test(ae))&&(b.insertInLine({row:ce,column:ae.length},A),b.insertInLine({row:ce,column:_},F))},I=function(ae,ce){var ue;(ue=ae.match(N))&&b.removeInLine(ce,ae.length-ue[0].length,ae.length),(ue=ae.match(L))&&b.removeInLine(ce,ue[1].length,ue[0].length)},O=function(ae,ce){if(L.test(ae))return!0;for(var ue=l.getTokens(ce),ye=0;ye<ue.length;ye++)if(ue[ye].type==="comment")return!0}}function B(K){for(var Z=d;Z<=w;Z++)K(b.getLine(Z),Z)}var U=1/0;B(function(K,Z){var te=K.search(/\S/);te!==-1?(te<_&&(_=te),$&&!O(K,Z)&&($=!1)):U>K.length&&(U=K.length)}),_==1/0&&(_=U,E=!1,$=!1),R&&_%C!=0&&(_=Math.floor(_/C)*C),B($?I:P)},this.toggleBlockComment=function(o,l,d,w){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var E=new c(l,w.row,w.column),$=E.getCurrentToken();l.selection;var _=l.selection.toOrientedRange(),C,R;if($&&/comment/.test($.type)){for(var L,F;$&&/comment/.test($.type);){var I=$.value.indexOf(b.start);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;L=new u(H,P,H,P+b.start.length);break}$=E.stepBackward()}for(var E=new c(l,w.row,w.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var I=$.value.indexOf(b.end);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;F=new u(H,P,H,P+b.end.length);break}$=E.stepForward()}F&&l.remove(F),L&&(l.remove(L),C=L.start.row,R=-b.start.length)}else R=b.start.length,C=d.start.row,l.insert(d.end,b.end),l.insert(d.start,b.start);_.start.row==C&&(_.start.column+=R),_.end.row==C&&(_.end.column+=R),l.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,l,d){return this.$getIndent(l)},this.checkOutdent=function(o,l,d){return!1},this.autoOutdent=function(o,l,d){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var d=o[l],w=d.prototype.$id,b=m.$modes[w];b||(m.$modes[w]=b=new d),m.$modes[l]||(m.$modes[l]=b),this.$embeds.push(l),this.$modes[l]=b}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(R){(function(L){var F=E[R],I=L[F];L[E[R]]=function(){return this.$delegator(F,arguments,I)}})(_)},_=this,l=0;l<E.length;l++)$(l)},this.$delegator=function(o,l,d){var w=l[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var b=w[2][w[2].length-1],E=this.$modes[b];if(E)return E[o].apply(E,[w[1]].concat([].slice.call(l,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var _=w.split(this.$embeds[$]);if(!_[0]&&_[1]){l[0]=_[1];var E=this.$modes[this.$embeds[$]];return E[o].apply(E,l)}}var C=d.apply(this,l);return d?C:void 0},this.transformAction=function(o,l,d,w,b){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][l]){var _=E[$][l].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,d=[];for(var w in l)for(var b=l[w],E=0,$=b.length;E<$;E++)if(typeof b[E].token=="string")/keyword|support|storage/.test(b[E].token)&&d.push(b[E].regex);else if(typeof b[E].token=="object"){for(var _=0,C=b[E].token.length;_<C;_++)if(/keyword|support|storage/.test(b[E].token[_])){var w=b[E].regex.match(/\(.+?\)/g)[_];d.push(w.substr(1,w.length-2))}}this.completionKeywords=d}return o?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,d,w){var b=this.$keywordList||this.$createKeywordList();return b.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(a.prototype),r.Mode=a}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,f){var m=e("./lib/dom"),y=function(){function x(h){this.session=h,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 x.prototype.getRowLength=function(h){var g;return this.lineWidgets?g=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[h]?1+g:this.$wrapData[h].length+1+g},x.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(h+=g.rowCount)}),h},x.prototype.$onChangeEditor=function(h){this.attach(h.editor)},x.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(h){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(c){c&&c.el&&c.el.parentNode&&(c._inDocument=!1,c.el.parentNode.removeChild(c.el))})}},x.prototype.updateOnFold=function(h,g){var s=g.lineWidgets;if(!(!s||!h.action)){for(var c=h.data,u=c.start.row,a=c.end.row,o=h.action=="add",l=u+1;l<a;l++)s[l]&&(s[l].hidden=o);s[a]&&(o?s[u]?s[a].hidden=o:s[u]=s[a]:(s[u]==s[a]&&(s[u]=void 0),s[a].hidden=o))}},x.prototype.updateOnChange=function(h){var g=this.session.lineWidgets;if(g){var s=h.start.row,c=h.end.row-s;if(c!==0)if(h.action=="remove"){var u=g.splice(s+1,c);!g[s]&&u[u.length-1]&&(g[s]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var a=new Array(c);g[s]&&g[s].column!=null&&h.start.column>g[s].column&&s++,a.unshift(s,0),g.splice.apply(g,a),this.$updateRows()}}},x.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var g=!0;h.forEach(function(s,c){if(s)for(g=!1,s.row=c;s.$oldWidget;)s.$oldWidget.row=c,s=s.$oldWidget}),g&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[h.row];return g&&(h.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},x.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var g=this.editor.renderer;h.html&&!h.el&&(h.el=m.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=m.createElement("div"),h.el.textContent=h.text),h.el&&(m.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&m.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",g.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/g.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var c=this.session.lineWidgets;h.row==s.end.row&&!c[s.start.row]?c[s.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(h),h},x.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[h.row];if(g==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;g;){if(g.$oldWidget==h){g.$oldWidget=h.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(h){for(var g=this.session.lineWidgets,s=g&&g[h],c=[];s;)c.push(s),s=s.$oldWidget;return c},x.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(h,g){var s=this.session._changedWidgets,c=g.layerConfig;if(!(!s||!s.length)){for(var u=1/0,a=0;a<s.length;a++){var o=s[a];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/c.characterWidth));var l=o.h/c.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(h,g){var s=g.layerConfig,c=this.session.lineWidgets;if(c){for(var u=Math.min(this.firstRow,s.firstRow),a=Math.max(this.lastRow,s.lastRow,c.length);u>0&&!c[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,g.$cursorLayer.config=s;for(var o=u;o<=a;o++){var l=c[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,g.container.appendChild(l.el));var d=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(d+=s.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=d-s.offset+"px";var w=l.coverGutter?0:g.gutterWidth;l.fixedWidth||(w-=g.scrollLeft),l.el.style.left=w+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=s.width+2*s.padding+"px"),l.fixedWidth?l.el.style.right=g.scrollBar.getWidth()+"px":l.el.style.right=""}}}},x}();r.LineWidgets=y}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,f){r.applyDelta=function(m,y,x){var h=y.start.row,g=y.start.column,s=m[h]||"";switch(y.action){case"insert":var c=y.lines;if(c.length===1)m[h]=s.substring(0,g)+y.lines[0]+s.substring(g);else{var u=[h,1].concat(y.lines);m.splice.apply(m,u),m[h]=s.substring(0,g)+m[h],m[h+y.lines.length-1]+=s.substring(g)}break;case"remove":var a=y.end.column,o=y.end.row;h===o?m[h]=s.substring(0,g)+s.substring(a):m.splice(h,o-h+1,s.substring(0,g)+m[o].substring(a));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var m=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=function(){function s(c,u,a){this.$onChange=this.onChange.bind(this),this.attach(c),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,a)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(c){if(!(c.start.row==c.end.row&&c.start.row!=this.row)&&!(c.start.row>this.row)){var u=g(c,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(c,u,a){var o;if(a?o={row:c,column:u}:o=this.$clipPositionToDocument(c,u),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(c){this.document=c||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(c,u){var a={};return c>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):c<0?(a.row=0,a.column=0):(a.row=c,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,u))),u<0&&(a.column=0),a},s}();x.prototype.$insertRight=!1,m.implement(x.prototype,y);function h(s,c,u){var a=u?s.column<=c.column:s.column<c.column;return s.row<c.row||s.row==c.row&&a}function g(s,c,u){var a=s.action=="insert",o=(a?1:-1)*(s.end.row-s.start.row),l=(a?1:-1)*(s.end.column-s.start.column),d=s.start,w=a?d:s.end;return h(c,d,u)?{row:c.row,column:c.column}:h(w,c,!u)?{row:c.row+o,column:c.column+(c.row==w.row?l:0)}:{row:d.row,column:d.column}}r.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,f){var m=e("./lib/oop"),y=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,g=e("./anchor").Anchor,s=function(){function c(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return c.prototype.setValue=function(u){var a=this.getLength()-1;this.remove(new h(0,0,a,this.getLine(a).length)),this.insert({row:0,column:0},u||"")},c.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},c.prototype.createAnchor=function(u,a){return new g(this,u,a)},c.prototype.$detectNewLine=function(u){var a=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=a?a[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},c.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},c.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},c.prototype.getNewLineMode=function(){return this.$newLineMode},c.prototype.isNewLine=function(u){return u==`\r
|
190
|
+
`||u=="\r"||u==`
|
191
|
+
`},c.prototype.getLine=function(u){return this.$lines[u]||""},c.prototype.getLines=function(u,a){return this.$lines.slice(u,a+1)},c.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},c.prototype.getLength=function(){return this.$lines.length},c.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},c.prototype.getLinesForRange=function(u){var a;if(u.start.row===u.end.row)a=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{a=this.getLines(u.start.row,u.end.row),a[0]=(a[0]||"").substring(u.start.column);var o=a.length-1;u.end.row-u.start.row==o&&(a[o]=a[o].substring(0,u.end.column))}return a},c.prototype.insertLines=function(u,a){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,a)},c.prototype.removeLines=function(u,a){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,a)},c.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},c.prototype.insert=function(u,a){return this.getLength()<=1&&this.$detectNewLine(a),this.insertMergedLines(u,this.$split(a))},c.prototype.insertInLine=function(u,a){var o=this.clippedPos(u.row,u.column),l=this.pos(u.row,u.column+a.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[a]},!0),this.clonePos(l)},c.prototype.clippedPos=function(u,a){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,a=void 0);var l=this.getLine(u);return a==null&&(a=l.length),a=Math.min(Math.max(a,0),l.length),{row:u,column:a}},c.prototype.clonePos=function(u){return{row:u.row,column:u.column}},c.prototype.pos=function(u,a){return{row:u,column:a}},c.prototype.$clipPosition=function(u){var a=this.getLength();return u.row>=a?(u.row=Math.max(0,a-1),u.column=this.getLine(a-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},c.prototype.insertFullLines=function(u,a){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(a=a.concat([""]),o=0):(a=[""].concat(a),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},a)},c.prototype.insertMergedLines=function(u,a){var o=this.clippedPos(u.row,u.column),l={row:o.row+a.length-1,column:(a.length==1?o.column:0)+a[a.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:a}),this.clonePos(l)},c.prototype.remove=function(u){var a=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:a,end:o,action:"remove",lines:this.getLinesForRange({start:a,end:o})}),this.clonePos(a)},c.prototype.removeInLine=function(u,a,o){var l=this.clippedPos(u,a),d=this.clippedPos(u,o);return this.applyDelta({start:l,end:d,action:"remove",lines:this.getLinesForRange({start:l,end:d})},!0),this.clonePos(l)},c.prototype.removeFullLines=function(u,a){u=Math.min(Math.max(0,u),this.getLength()-1),a=Math.min(Math.max(0,a),this.getLength()-1);var o=a==this.getLength()-1&&u>0,l=a<this.getLength()-1,d=o?u-1:u,w=o?this.getLine(d).length:0,b=l?a+1:a,E=l?0:this.getLine(b).length,$=new h(d,w,b,E),_=this.$lines.slice(u,a+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),_},c.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},c.prototype.replace=function(u,a){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),a.length===0&&u.isEmpty())return u.start;if(a==this.getTextRange(u))return u.end;this.remove(u);var o;return a?o=this.insert(u.start,a):o=u.start,o},c.prototype.applyDeltas=function(u){for(var a=0;a<u.length;a++)this.applyDelta(u[a])},c.prototype.revertDeltas=function(u){for(var a=u.length-1;a>=0;a--)this.revertDelta(u[a])},c.prototype.applyDelta=function(u,a){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(y(this.$lines,u,a),this._signal("change",u)))},c.prototype.$safeApplyDelta=function(u){var a=this.$lines.length;(u.action=="remove"&&u.start.row<a&&u.end.row<a||u.action=="insert"&&u.start.row<=a)&&this.applyDelta(u)},c.prototype.$splitAndapplyLargeDelta=function(u,a){for(var o=u.lines,l=o.length-a+1,d=u.start.row,w=u.start.column,b=0,E=0;b<l;b=E){E+=a-1;var $=o.slice(b,E);$.push(""),this.applyDelta({start:this.pos(d+b,w),end:this.pos(d+E,w=0),action:u.action,lines:$},!0)}u.lines=o.slice(b),u.start.row=d+b,u.start.column=w,this.applyDelta(u,!0)},c.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},c.prototype.indexToPosition=function(u,a){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=a||0,w=o.length;d<w;d++)if(u-=o[d].length+l,u<0)return{row:d,column:u+o[d].length+l};return{row:w-1,column:u+o[w-1].length+l}},c.prototype.positionToIndex=function(u,a){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=0,w=Math.min(u.row,o.length),b=a||0;b<w;++b)d+=o[b].length+l;return d+u.column},c.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},c}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",m.implement(s.prototype,x),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var m=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=function(){function h(g,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var c=this;this.$worker=function(){if(c.running){for(var u=new Date,a=c.currentLine,o=-1,l=c.doc,d=a;c.lines[a];)a++;var w=l.getLength(),b=0;for(c.running=!1;a<w;){c.$tokenizeRow(a),o=a;do a++;while(c.lines[a]);if(b++,b%5===0&&new Date-u>20){c.running=setTimeout(c.$worker,20);break}}c.currentLine=a,o==-1&&(o=a),d<=o&&c.fireUpdateEvent(d,o)}}}return h.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(g,s){var c={first:g,last:s};this._signal("update",{data:c})},h.prototype.start=function(g){this.currentLine=Math.min(g||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)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(g){var s=g.start.row,c=g.end.row-s;if(c===0)this.lines[s]=null;else if(g.action=="remove")this.lines.splice(s,c+1,null),this.states.splice(s,c+1,null);else{var u=Array(c+1);u.unshift(s,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},h.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},h.prototype.$tokenizeRow=function(g){var s=this.doc.getLine(g),c=this.states[g-1],u=this.tokenizer.getLineTokens(s,c,g);return this.states[g]+""!=u.state+""?(this.states[g]=u.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=u.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();m.implement(x.prototype,y),r.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,f){var m=e("./lib/lang"),y=e("./range").Range,x=function(){function h(g,s,c){c===void 0&&(c="text"),this.setRegexp(g),this.clazz=s,this.type=c,this.docLen=0}return h.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},h.prototype.update=function(g,s,c,u){if(this.regExp){for(var a=u.firstRow,o=u.lastRow,l={},d=c.$editor.$search,w=d.$isMultilineSearch(c.$editor.getLastSearchOptions()),b=a;b<=o;b++){var E=this.cache[b];if(E==null||c.getValue().length!=this.docLen){if(w){E=[];var $=d.$multiLineForward(c,this.regExp,b,o);if($){var _=$.endRow<=o?$.endRow-1:o;_>b&&(b=_),E.push(new y($.startRow,$.startCol,$.endRow,$.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=m.getMatchOffsets(c.getLine(b),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(F){return new y(b,F.offset,b,F.offset+F.length)});this.cache[b]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var R=E[C].toScreenRange(c),L=R.toString();l[L]||(l[L]=!0,s.drawSingleLineMarker(g,R,this.clazz,u))}}this.docLen=c.getValue().length}},h}();x.prototype.MAX_RANGES=500,r.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,f){var m=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,R,L){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=L.length;F--;){var I=L[F][0];if(I.id<=C)break;I.id<R&&(I.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,R){for(var L=this.selections,F=L.length;F--;){var I=L[F];if(I.rev<C)return R&&(I=L[F+1]),I}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=null,I=0,H=L.length;H--;){var P=L[H][0];if(P.id<R&&!F&&(F=H+1),P.id<=C){I=H+1;break}}return L.slice(I,F)},_.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},_.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},_.prototype.undo=function(C,R){this.lastDeltas=null;var L=this.$undoStack;if(y(L,L.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=L.pop(),I=null;return F&&(I=C.undoChanges(F,R),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I}},_.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),I=null;return F&&(I=C.redoChanges(F,R),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I},_.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],L=R&&R[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},_.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=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?c(C):c(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+c(this.$redoStack)},_}();m.prototype.hasUndo=m.prototype.canUndo,m.prototype.hasRedo=m.prototype.canRedo,m.prototype.isClean=m.prototype.isAtBookmark,m.prototype.markClean=m.prototype.bookmark;function y(_,C){for(var R=C;R--;){var L=_[R];if(L&&!L[0].ignore){for(;R<C-1;){var F=o(_[R],_[R+1]);_[R]=F[0],_[R+1]=F[1],R++}return!0}}}var x=e("./range").Range,h=x.comparePoints;x.comparePoints;function g(_){return{row:_.row,column:_.column}}function s(_){return{start:g(_.start),end:g(_.end),action:_.action,lines:_.lines.slice()}}function c(_){if(_=_||this,Array.isArray(_))return _.map(c).join(`
|
194
|
+
`);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(u).join(`
|
195
|
+
`):C=u(_.value)),_.start&&(C+=u(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function u(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function a(_,C){var R=_.action=="insert",L=C.action=="insert";if(R&&L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.start,_.start)<=0)d(_,C,1);else return null;else if(R&&!L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.end,_.start)<=0)d(_,C,-1);else return null;else if(!R&&L)if(h(C.start,_.start)>=0)d(C,_,1);else if(h(C.start,_.start)<=0)d(_,C,1);else return null;else if(!R&&!L)if(h(C.start,_.start)>=0)d(C,_,1);else if(h(C.end,_.start)<=0)d(_,C,-1);else return null;return[C,_]}function o(_,C){for(var R=_.length;R--;)for(var L=0;L<C.length;L++)if(!a(_[R],C[L])){for(;R<_.length;){for(;L--;)a(C[L],_[R]);L=C.length,R++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function l(_,C){var R=_.action=="insert",L=C.action=="insert";if(R&&L)h(_.start,C.start)<0?d(C,_,1):d(_,C,1);else if(R&&!L)h(_.start,C.end)>=0?d(_,C,-1):(h(_.start,C.start)<=0||d(_,x.fromPoints(C.start,_.start),-1),d(C,_,1));else if(!R&&L)h(C.start,_.end)>=0?d(C,_,-1):(h(C.start,_.start)<=0||d(C,x.fromPoints(_.start,C.start),-1),d(_,C,1));else if(!R&&!L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.end,_.start)<=0)d(_,C,-1);else{var F,I;return h(_.start,C.start)<0&&(F=_,_=b(_,C.start)),h(_.end,C.end)>0&&(I=b(_,C.end)),w(C.end,_.start,_.end,-1),I&&!F&&(_.lines=I.lines,_.start=I.start,_.end=I.end,I=_),[C,F,I].filter(Boolean)}return[C,_]}function d(_,C,R){w(_.start,C.start,C.end,R),w(_.end,C.start,C.end,R)}function w(_,C,R,L){_.row==(L==1?C:R).row&&(_.column+=L*(R.column-C.column)),_.row+=L*(R.row-C.row)}function b(_,C){var R=_.lines,L=_.end;_.end=g(C);var F=_.end.row-_.start.row,I=R.splice(F,R.length),H=F?C.column:C.column-_.start.column;R.push(I[0].substring(0,H)),I[0]=I[0].substr(H);var P={start:g(C),end:L,lines:I,action:_.action};return P}function E(_,C){C=s(C);for(var R=_.length;R--;){for(var L=_[R],F=0;F<L.length;F++){var I=L[F],H=l(I,C);C=H[0],H.length!=2&&(H[2]?(L.splice(F+1,1,H[1],H[2]),F++):H[1]||(L.splice(F,1),F--))}L.length||_.splice(R,1)}return _}function $(_,C){for(var R=0;R<C.length;R++)for(var L=C[R],F=0;F<L.length;F++)E(_,L[F])}r.UndoManager=m}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,f){var m=e("../range").Range,y=function(){function x(h,g){this.foldData=h,Array.isArray(g)?this.folds=g:g=this.folds=[g];var s=g[g.length-1];this.range=new m(g[0].start.row,g[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(c){c.setFoldLine(this)},this)}return x.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(g){g.start.row+=h,g.end.row+=h})},x.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(g,s){return-g.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},x.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},x.prototype.walk=function(h,g,s){var c=0,u=this.folds,a,o,l,d=!0;g==null&&(g=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(a=u[w],o=a.range.compareStart(g,s),o==-1){h(null,g,s,c,d);return}if(l=h(null,a.start.row,a.start.column,c,d),l=!l&&h(a.placeholder,a.start.row,a.start.column,c),l||o===0)return;d=!a.sameRow,c=a.end.column}h(null,g,s,c,d)},x.prototype.getNextFoldTo=function(h,g){for(var s,c,u=0;u<this.folds.length;u++){if(s=this.folds[u],c=s.range.compareEnd(h,g),c==-1)return{fold:s,kind:"after"};if(c===0)return{fold:s,kind:"inside"}}return null},x.prototype.addRemoveChars=function(h,g,s){var c=this.getNextFoldTo(h,g),u,a;if(c){if(u=c.fold,c.kind=="inside"&&u.start.column!=g&&u.start.row!=h)window.console&&window.console.log(h,g,u);else if(u.start.row==h){a=this.folds;var o=a.indexOf(u);for(o===0&&(this.start.column+=s),o;o<a.length;o++){if(u=a[o],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},x.prototype.split=function(h,g){var s=this.getNextFoldTo(h,g);if(!s||s.kind=="inside")return null;var c=s.fold,u=this.folds,a=this.foldData,o=u.indexOf(c),l=u[o-1];this.end.row=l.end.row,this.end.column=l.end.column,u=u.splice(o,u.length-o);var d=new x(a,u);return a.splice(a.indexOf(this)+1,0,d),d},x.prototype.merge=function(h){for(var g=h.folds,s=0;s<g.length;s++)this.addFold(g[s]);var c=this.foldData;c.splice(c.indexOf(h),1)},x.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(g){h.push(" "+g.toString())}),h.push("]"),h.join(`
|
196
|
+
`)},x.prototype.idxToPosition=function(h){for(var g=0,s=0;s<this.folds.length;s++){var c=this.folds[s];if(h-=c.start.column-g,h<0)return{row:c.start.row,column:c.start.column+h};if(h-=c.placeholder.length,h<0)return c.start;g=c.end.column}return{row:this.end.row,column:this.end.column+h}},x}();r.FoldLine=y}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,f){var m=e("./range").Range,y=m.comparePoints,x=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(g,s,c){for(var u=this.ranges,a=c||0;a<u.length;a++){var o=u[a],l=y(g,o.end);if(!(l>0)){var d=y(g,o.start);return l===0?s&&d!==0?-a-2:a:d>0||d===0&&!s?a:-a-1}}return-a-1},h.prototype.add=function(g){var s=!g.isEmpty(),c=this.pointIndex(g.start,s);c<0&&(c=-c-1);var u=this.pointIndex(g.end,s,c);return u<0?u=-u-1:u++,this.ranges.splice(c,u-c,g)},h.prototype.addList=function(g){for(var s=[],c=g.length;c--;)s.push.apply(s,this.add(g[c]));return s},h.prototype.substractPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var g=[],s=this.ranges;s=s.sort(function(l,d){return y(l.start,d.start)});for(var c=s[0],u,a=1;a<s.length;a++){u=c,c=s[a];var o=y(u.end,c.start);o<0||o==0&&!u.isEmpty()&&!c.isEmpty()||(y(u.end,c.end)<0&&(u.end.row=c.end.row,u.end.column=c.end.column),s.splice(a,1),g.push(c),c=u,a--)}return this.ranges=s,g},h.prototype.contains=function(g,s){return this.pointIndex({row:g,column:s})>=0},h.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},h.prototype.rangeAtPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(g,s){var c=this.ranges;if(c[0].start.row>s||c[c.length-1].start.row<g)return[];var u=this.pointIndex({row:g,column:0});u<0&&(u=-u-1);var a=this.pointIndex({row:s,column:0},u);a<0&&(a=-a-1);for(var o=[],l=u;l<a;l++)o.push(c[l]);return o},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(g){for(var s=g.start,c=g.end,u=s.row,a=c.row,o=this.ranges,l=0,d=o.length;l<d;l++){var w=o[l];if(w.end.row>=u)break}if(g.action=="insert")for(var b=a-u,E=-s.column+c.column;l<d;l++){var w=o[l];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=b)),w.end.row==u&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&E>0&&l<d-1&&w.end.column>w.start.column&&w.end.column==o[l+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=b}}else for(var b=u-a,E=s.column-c.column;l<d;l++){var w=o[l];if(w.start.row>a)break;w.end.row<a&&(u<w.end.row||u==w.end.row&&s.column<w.end.column)?(w.end.row=u,w.end.column=s.column):w.end.row==a?w.end.column<=c.column?(b||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=E,w.end.row+=b):w.end.row>a&&(w.end.row+=b),w.start.row<a&&(u<w.start.row||u==w.start.row&&s.column<w.start.column)?(w.start.row=u,w.start.column=s.column):w.start.row==a?w.start.column<=c.column?(b||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=E,w.start.row+=b):w.start.row>a&&(w.start.row+=b)}if(b!=0&&l<d)for(;l<d;l++){var w=o[l];w.start.row+=b,w.end.row+=b}},h}();x.prototype.comparePoints=y,r.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,f){var m=this&&this.__extends||function(){var u=function(a,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(a,o);function l(){this.constructor=a}a.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),y=e("../range_list").RangeList,x=function(u){m(a,u);function a(o,l){var d=u.call(this)||this;return d.foldLine=null,d.placeholder=l,d.range=o,d.start=o.start,d.end=o.end,d.sameRow=o.start.row==o.end.row,d.subFolds=d.ranges=[],d}return a.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},a.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},a.prototype.clone=function(){var o=this.range.clone(),l=new a(o,this.placeholder);return this.subFolds.forEach(function(d){l.subFolds.push(d.clone())}),l.collapseChildren=this.collapseChildren,l},a.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var l=o.start.row,d=o.start.column,w=0,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(l,d),b==1);w++);var E=this.subFolds[w],$=0;if(b==0){if(E.range.containsRange(o))return E.addSubFold(o);$=1}for(var l=o.range.end.row,d=o.range.end.column,_=w,b=-1;_<this.subFolds.length&&(b=this.subFolds[_].range.compare(l,d),b==1);_++);b==0&&_++;for(var C=this.subFolds.splice(w,_-w,o),R=b==0?C.length-1:C.length,L=$;L<R;L++)o.addSubFold(C[L]);return o.setFoldLine(this.foldLine),o}},a.prototype.restoreRange=function(o){return c(o,this.start)},a}(y);function h(u,a){u.row-=a.row,u.row==0&&(u.column-=a.column)}function g(u,a){h(u.start,a),h(u.end,a)}function s(u,a){u.row==0&&(u.column+=a.column),u.row+=a.row}function c(u,a){s(u.start,a),s(u.end,a)}r.Fold=x}),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(e,r,f){var m=e("../range").Range,y=e("./fold_line").FoldLine,x=e("./fold").Fold,h=e("../token_iterator").TokenIterator,g=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(c,u,a){var o=this.getFoldLine(c);if(!o)return null;for(var l=o.folds,d=0;d<l.length;d++){var w=l[d].range;if(w.contains(c,u)){if(a==1&&w.isEnd(c,u)&&!w.isEmpty()||a==-1&&w.isStart(c,u)&&!w.isEmpty())continue;return l[d]}}},this.getFoldsInRange=function(c){var u=c.start,a=c.end,o=this.$foldData,l=[];u.column+=1,a.column-=1;for(var d=0;d<o.length;d++){var w=o[d].range.compareRange(c);if(w!=2){if(w==-2)break;for(var b=o[d].folds,E=0;E<b.length;E++){var $=b[E];if(w=$.range.compareRange(c),w==-2)break;if(w!=2){if(w==42)break;l.push($)}}}}return u.column-=1,a.column+=1,l},this.getFoldsInRangeList=function(c){if(Array.isArray(c)){var u=[];c.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(c);return u},this.getAllFolds=function(){for(var c=[],u=this.$foldData,a=0;a<u.length;a++)for(var o=0;o<u[a].folds.length;o++)c.push(u[a].folds[o]);return c},this.getFoldStringAt=function(c,u,a,o){if(o=o||this.getFoldLine(c),!o)return null;for(var l={end:{column:0}},d,w,b=0;b<o.folds.length;b++){w=o.folds[b];var E=w.range.compareEnd(c,u);if(E==-1){d=this.getLine(w.start.row).substring(l.end.column,w.start.column);break}else if(E===0)return null;l=w}return d||(d=this.getLine(w.start.row).substring(l.end.column)),a==-1?d.substring(0,u-l.end.column):a==1?d.substring(u-l.end.column):d},this.getFoldLine=function(c,u){var a=this.$foldData,o=0;for(u&&(o=a.indexOf(u)),o==-1&&(o=0),o;o<a.length;o++){var l=a[o];if(l.start.row<=c&&l.end.row>=c)return l;if(l.end.row>c)return null}return null},this.getNextFoldLine=function(c,u){var a=this.$foldData,o=0;for(u&&(o=a.indexOf(u)),o==-1&&(o=0),o;o<a.length;o++){var l=a[o];if(l.end.row>=c)return l}return null},this.getFoldedRowCount=function(c,u){for(var a=this.$foldData,o=u-c+1,l=0;l<a.length;l++){var d=a[l],w=d.end.row,b=d.start.row;if(w>=u){b<u&&(b>=c?o-=u-b:o=0);break}else w>=c&&(b>=c?o-=w-b:o-=w-c+1)}return o},this.$addFoldLine=function(c){return this.$foldData.push(c),this.$foldData.sort(function(u,a){return u.start.row-a.start.row}),c},this.addFold=function(c,u){var a=this.$foldData,o=!1,l;c instanceof x?l=c:(l=new x(u,c),l.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(l.range);var d=l.start.row,w=l.start.column,b=l.end.row,E=l.end.column,$=this.getFoldAt(d,w,1),_=this.getFoldAt(b,E,-1);if($&&_==$)return $.addSubFold(l);$&&!$.range.isStart(d,w)&&this.removeFold($),_&&!_.range.isEnd(b,E)&&this.removeFold(_);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(I){l.addSubFold(I)}));for(var R=0;R<a.length;R++){var L=a[R];if(b==L.start.row){L.addFold(l),o=!0;break}else if(d==L.end.row){if(L.addFold(l),o=!0,!l.sameRow){var F=a[R+1];if(F&&F.start.row==b){L.merge(F);break}}break}else if(b<=L.start.row)break}return o||(L=this.$addFoldLine(new y(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(c){c.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(c){var u=c.foldLine,a=u.start.row,o=u.end.row,l=this.$foldData,d=u.folds;if(d.length==1)l.splice(l.indexOf(u),1);else if(u.range.isEnd(c.end.row,c.end.column))d.pop(),u.end.row=d[d.length-1].end.row,u.end.column=d[d.length-1].end.column;else if(u.range.isStart(c.start.row,c.start.column))d.shift(),u.start.row=d[0].start.row,u.start.column=d[0].start.column;else if(c.sameRow)d.splice(d.indexOf(c),1);else{var w=u.split(c.start.row,c.start.column);d=w.folds,d.shift(),w.start.row=d[0].start.row,w.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(a,o):this.$updateRowLengthCache(a,o)),this.$modified=!0,this._signal("changeFold",{data:c,action:"remove"})},this.removeFolds=function(c){for(var u=[],a=0;a<c.length;a++)u.push(c[a]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(c){this.removeFold(c),c.subFolds.forEach(function(u){c.restoreRange(u),this.addFold(u)},this),c.collapseChildren>0&&this.foldAll(c.start.row+1,c.end.row,c.collapseChildren-1),c.subFolds=[]},this.expandFolds=function(c){c.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(c,u){var a,o;if(c==null)a=new m(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof c=="number")a=new m(c,0,c,this.getLine(c).length);else if("row"in c)a=m.fromPoints(c,c);else{if(Array.isArray(c))return o=[],c.forEach(function(d){o=o.concat(this.unfold(d))},this),o;a=c}o=this.getFoldsInRangeList(a);for(var l=o;o.length==1&&m.comparePoints(o[0].start,a.start)<0&&m.comparePoints(o[0].end,a.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(a);if(u!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(c,u){return!!this.getFoldLine(c,u)},this.getRowFoldEnd=function(c,u){var a=this.getFoldLine(c,u);return a?a.end.row:c},this.getRowFoldStart=function(c,u){var a=this.getFoldLine(c,u);return a?a.start.row:c},this.getFoldDisplayLine=function(c,u,a,o,l){o==null&&(o=c.start.row),l==null&&(l=0),u==null&&(u=c.end.row),a==null&&(a=this.getLine(u).length);var d=this.doc,w="";return c.walk(function(b,E,$,_){if(!(E<o)){if(E==o){if($<l)return;_=Math.max(l,_)}b!=null?w+=b:w+=d.getLine(E).substring(_,$)}},u,a),w},this.getDisplayLine=function(c,u,a,o){var l=this.getFoldLine(c);if(l)return this.getFoldDisplayLine(l,c,u,a,o);var d;return d=this.doc.getLine(c),d.substring(o||0,u||d.length)},this.$cloneFoldData=function(){var c=[];return c=this.$foldData.map(function(u){var a=u.folds.map(function(o){return o.clone()});return new y(c,a)}),c},this.toggleFold=function(c){var u=this.selection,a=u.getRange(),o,l;if(a.isEmpty()){var d=a.start;if(o=this.getFoldAt(d.row,d.column),o){this.expandFold(o);return}else(l=this.findMatchingBracket(d))?a.comparePoint(l)==1?a.end=l:(a.start=l,a.start.column++,a.end.column--):(l=this.findMatchingBracket({row:d.row,column:d.column+1}))?(a.comparePoint(l)==1?a.end=l:a.start=l,a.start.column++):a=this.getCommentFoldRange(d.row,d.column)||a}else{var w=this.getFoldsInRange(a);if(c&&w.length){this.expandFolds(w);return}else w.length==1&&(o=w[0])}if(o||(o=this.getFoldAt(a.start.row,a.start.column)),o&&o.range.toString()==a.toString()){this.expandFold(o);return}var b="...";if(!a.isMultiLine()){if(b=this.getTextRange(a),b.length<4)return;b=b.trim().substring(0,2)+".."}this.addFold(b,a)},this.getCommentFoldRange=function(c,u,a){var o=new h(this,c,u),l=o.getCurrentToken(),d=l&&l.type;if(l&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start|\\.doc");var w=new RegExp(d),b=new m;if(a!=1){do l=o.stepBackward();while(l&&w.test(l.type));l=o.stepForward()}b.start.row=o.getCurrentTokenRow(),b.start.column=o.getCurrentTokenColumn()+l.value.length,o=new h(this,c,u);var E=this.getState(o.$row);if(a!=-1){var $=-1;do if(l=o.stepForward(),$==-1){var _=this.getState(o.$row);E.toString()!==_.toString()&&($=o.$row)}else if(o.$row>$)break;while(l&&w.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return b.end.row=o.getCurrentTokenRow(),b.end.column=o.getCurrentTokenColumn(),b}},this.foldAll=function(c,u,a,o){a==null&&(a=1e5);var l=this.foldWidgets;if(l){u=u||this.getLength(),c=c||0;for(var d=c;d<u;d++)if(l[d]==null&&(l[d]=this.getFoldWidget(d)),l[d]=="start"&&!(o&&!o(d))){var w=this.getFoldWidgetRange(d);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=c&&(d=w.end.row,w.collapseChildren=a,this.addFold("...",w))}}},this.foldToLevel=function(c){for(this.foldAll();c-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var c=this;this.foldAll(null,null,null,function(u){for(var a=c.getTokens(u),o=0;o<a.length;o++){var l=a[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(c){if(!this.$foldStyles[c])throw new Error("invalid fold style: "+c+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=c){this.$foldStyle=c,c=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(c){if(this.$foldMode!=c){if(this.$foldMode=c,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!c||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=c.getFoldWidget.bind(c,this,this.$foldStyle),this.getFoldWidgetRange=c.getFoldWidgetRange.bind(c,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(c,u){var a=this.foldWidgets;if(!a||u&&a[c])return{};for(var o=c-1,l;o>=0;){var d=a[o];if(d==null&&(d=a[o]=this.getFoldWidget(o)),d=="start"){var w=this.getFoldWidgetRange(o);if(l||(l=w),w&&w.end.row>=c)break}o--}return{range:o!==-1&&w,firstRange:l}},this.onFoldWidgetClick=function(c,u){u instanceof g&&(u=u.domEvent);var a={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(c,a);if(!o){var l=u.target||u.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(c,u){if(this.getFoldWidget){var a=this.getFoldWidget(c),o=this.getLine(c),l=a==="end"?-1:1,d=this.getFoldAt(c,l===-1?0:o.length,l);if(d)return u.children||u.all?this.removeFold(d):this.expandFold(d),d;var w=this.getFoldWidgetRange(c,!0);if(w&&!w.isMultiLine()&&(d=this.getFoldAt(w.start.row,w.start.column,1),d&&w.isEqual(d.range)))return this.removeFold(d),d;if(u.siblings){var b=this.getParentFoldRangeData(c);if(b.range)var E=b.range.start.row+1,$=b.range.end.row;this.foldAll(E,$,u.all?1e4:0)}else u.children?($=w?w.end.row:this.getLength(),this.foldAll(c+1,$,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(c){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var a=this.$toggleFoldWidget(u,{});if(!a){var o=this.getParentFoldRangeData(u,!0);if(a=o.range||o.firstRange,a){u=a.start.row;var l=this.getFoldAt(u,this.getLine(u).length,1);l?this.removeFold(l):this.addFold("...",a)}}},this.updateFoldWidgets=function(c){var u=c.start.row,a=c.end.row-u;if(a===0)this.foldWidgets[u]=null;else if(c.action=="remove")this.foldWidgets.splice(u,a+1,null);else{var o=Array(a+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(c){var u=c.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,f){var m=e("../token_iterator").TokenIterator,y=e("../range").Range;function x(){this.findMatchingBracket=function(h,g){if(h.column==0)return null;var s=g||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var c=s.match(/([\(\[\{])|([\)\]\}])/);return c?c[1]?this.$findClosingBracket(c[1],h):this.$findOpeningBracket(c[2],h):null},this.getBracketRange=function(h){var g=this.getLine(h.row),s=!0,c,u=g.charAt(h.column-1),a=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(a||(u=g.charAt(h.column),h={row:h.row,column:h.column+1},a=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!a)return null;if(a[1]){var o=this.$findClosingBracket(a[1],h);if(!o)return null;c=y.fromPoints(h,o),s||(c.end.column++,c.start.column--),c.cursor=c.end}else{var o=this.$findOpeningBracket(a[2],h);if(!o)return null;c=y.fromPoints(o,h),s||(c.start.column++,c.end.column--),c.cursor=c.start}return c},this.getMatchingBracketRanges=function(h,g){var s=this.getLine(h.row),c=/([\(\[\{])|([\)\]\}])/,u=!g&&s.charAt(h.column-1),a=u&&u.match(c);if(a||(u=(g===void 0||g)&&s.charAt(h.column),h={row:h.row,column:h.column+1},a=u&&u.match(c)),!a)return null;var o=new y(h.row,h.column-1,h.row,h.column),l=a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h);if(!l)return[o];var d=new y(l.row,l.column,l.row,l.column+1);return[o,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,g,s){var c=this.$brackets[h],u=1,a=new m(this,g.row,g.column),o=a.getCurrentToken();if(o||(o=a.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=g.column-a.getCurrentTokenColumn()-2,d=o.value;;){for(;l>=0;){var w=d.charAt(l);if(w==c){if(u-=1,u==0)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else w==h&&(u+=1);l-=1}do o=a.stepBackward();while(o&&!s.test(o.type));if(o==null)break;d=o.value,l=d.length-1}return null}},this.$findClosingBracket=function(h,g,s){var c=this.$brackets[h],u=1,a=new m(this,g.row,g.column),o=a.getCurrentToken();if(o||(o=a.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=g.column-a.getCurrentTokenColumn();;){for(var d=o.value,w=d.length;l<w;){var b=d.charAt(l);if(b==c){if(u-=1,u==0)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else b==h&&(u+=1);l+=1}do o=a.stepForward();while(o&&!s.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(h){var g=new m(this,h.row,h.column),s=this.$findTagName(g);if(s){var c=g.stepBackward();return c.value==="<"?this.$findClosingTag(g,s):this.$findOpeningTag(g,s)}},this.$findTagName=function(h){var g=h.getCurrentToken(),s=!1,c=!1;if(g&&g.type.indexOf("tag-name")===-1)do c?g=h.stepBackward():g=h.stepForward(),g&&(g.value==="/>"?c=!0:g.type.indexOf("tag-name")!==-1&&(s=!0));while(g&&!s);return g},this.$findClosingTag=function(h,g){var s,c=g.value,u=g.value,a=0,o=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);g=h.stepForward();var l=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length),d=!1;do{if(s=g,s.type.indexOf("tag-close")!==-1&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(g=h.stepForward(),g){if(g.value===">"&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(g.type.indexOf("tag-name")!==-1){if(c=g.value,u===c){if(s.value==="<")a++;else if(s.value==="</"&&(a--,a<0)){h.stepBackward();var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);g=h.stepForward();var E=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),g&&g.value===">")var $=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===c&&g.value==="/>"&&(a--,a<0))var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=b,$=E,w=new y(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(g&&a>=0);if(o&&w&&b&&$&&l&&E)return{openTag:new y(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new y(b.start.row,b.start.column,$.end.row,$.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(h,g){var s=h.getCurrentToken(),c=g.value,u=0,a=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),l=o+2,d=new y(a,o,a,l);h.stepForward();var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),!(!g||g.value!==">")){var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(g=s,a=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),l=o+g.value.length,s=h.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(c===g.value)if(s.value==="<"){if(u++,u>0){var E=new y(a,o,a,l),$=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do g=h.stepForward();while(g&&g.value!==">");var _=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&u--}else if(g.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===c){u--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var L=0;L<C;L++)h.stepForward()}}while(s&&u<=0);if($&&_&&d&&b&&E&&w)return{openTag:new y($.start.row,$.start.column,_.end.row,_.end.column),closeTag:new y(d.start.row,d.start.column,b.end.row,b.end.column),openTagName:E,closeTagName:w}}}}r.BracketMatch=x}),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/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,r,f){var m=e("./lib/oop"),y=e("./lib/lang"),x=e("./bidihandler").BidiHandler,h=e("./config"),g=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,a=e("./line_widgets").LineWidgets,o=e("./document").Document,l=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,b=function(){function P(O,S){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
197
|
+
`)},this.bgTokenizer=new l(new c().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(N){A._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new o(O)),this.setDocument(O),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),h.resetOptions(this),this.setMode(S),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=y.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var S=this.selection.toJSON();this.curOp.selectionAfter=S,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(S),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new a(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;S>A&&(this.$docRowCache.splice(A,S),this.$screenRowCache.splice(A,S))},P.prototype.$getRowCacheIndex=function(O,S){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(S>U)A=B+1;else if(S<U)N=B-1;else return B}return A-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var S=O.data;this.$resetRowCache(S.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var S=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(S&&S.length&&(this.$undoManager.add({action:"removeFolds",folds:S},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var S=new w;S.$undoStack=O.history.undo,S.$redoStack=O.history.redo,S.mark=O.history.mark,S.$rev=O.history.rev;var A=new P(O.value);return O.folds.forEach(function(N){A.addFold("...",u.fromPoints(N.start,N.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager(S),A.selection.fromJSON(O.selection),A},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,S){var A=this.bgTokenizer.getTokens(O),N,B=0;if(S==null){var U=A.length-1;B=this.getLine(O).length}else for(var U=0;U<A.length&&(B+=A[U].value.length,!(B>=S));U++);return N=A[U],N?(N.index=U,N.start=B-N.value.length,N):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var S=this;O.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=y.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?y.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,S){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+S,this._signal("changeBreakpoint",{})},P.prototype.removeGutterDecoration=function(O,S){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var S=0;S<O.length;S++)this.$breakpoints[O[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[O]=S:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,S,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:S,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},P.prototype.addDynamicMarker=function(O,S){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!S,S?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var S=this.$frontMarkers[O]||this.$backMarkers[O];if(S){var A=S.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var S=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,S,A,N){typeof S!="number"&&(A=S,S=O),A||(A="ace_step");var B=new u(O,0,S,1/0);return B.id=this.addMarker(B,A,"fullLine",N),B},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var S=O.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(O,S){var A=this.getLine(O),N=!1;if(S>0&&(N=!!A.charAt(S-1).match(this.tokenRe)),N||(N=!!A.charAt(S).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(S-1,S+1)))var B=/\s/;else var B=this.nonTokenRe;var U=S;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=S;K<A.length&&A.charAt(K).match(B);)K++;return new u(O,U,O,K)},P.prototype.getAWordRange=function(O,S){for(var A=this.getWordRange(O,S),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var S=O.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,S){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,N=A.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),S&&S();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return S&&S();this.$modes[N]&&!A?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,S){if(S||(this.$modeId=O.$id),this.$mode!==O){var A=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,S||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){h.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(S){S&&S.screenWidth>O&&(O=S.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=S.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[te]==null&&(A[te]=this.$getStringScreenWidth(S[te])[0]),A[te]>N&&(N=A[te])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,S){return this.doc.getLines(O,S)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,S){return this.doc.insert(O,S)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,S){return this.doc.removeFullLines(O,S)},P.prototype.undoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var N=O[A];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!S&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var N=O[A];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!S&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,S){function A(Z){return S?Z.action!=="insert":Z.action==="insert"}for(var N,B,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!N){A(K)?N=u.fromPoints(K.start,K.end):N=u.fromPoints(K.start,K.start);continue}A(K)?(B=K.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=K.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=K.start,N.compare(B.row,B.column)==-1&&(N=u.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(O,S){return this.doc.replace(O,S)},P.prototype.moveText=function(O,S,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=u.fromPoints(S,S);if(!A){this.remove(O);var K=O.start.row-O.end.row,Z=K?-O.end.column:O.start.column-O.end.column;Z&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=Z),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=Z)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,N),B.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(B.map(function(ce){return ce=ce.clone(),ce.start.row==te.row&&(ce.start.column+=Z),ce.end.row==te.row&&(ce.end.column+=Z),ce.start.row+=K,ce.end.row+=K,ce}))}return U},P.prototype.indentRows=function(O,S,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=S;N++)this.doc.insertInLine({row:N,column:0},A)},P.prototype.outdentRows=function(O){for(var S=O.collapseRows(),A=new u(0,0,0,0),N=this.getTabSize(),B=S.start.row;B<=S.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(A.start.column=K,A.end.column=K+1):(A.start.column=0,A.end.column=K),this.remove(A)}},P.prototype.$moveLines=function(O,S,A){if(O=this.getRowFoldStart(O),S=this.getRowFoldEnd(S),A<0){var N=this.getRowFoldStart(O+A);if(N<0)return 0;var B=N-O}else if(A>0){var N=this.getRowFoldEnd(S+A);if(N>this.doc.getLength()-1)return 0;var B=N-S}else{O=this.$clipRowToDocument(O),S=this.$clipRowToDocument(S);var B=S-O+1}var U=new u(O,0,S,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=B,te.end.row+=B,te}),Z=A==0?this.doc.getLines(O,S):this.doc.removeFullLines(O,S);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,S){return this.$moveLines(O,S,-1)},P.prototype.moveLinesDown=function(O,S){return this.$moveLines(O,S,1)},P.prototype.duplicateLines=function(O,S){return this.$moveLines(O,S,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,S){return S<0?0:Math.min(this.doc.getLine(O).length,S)},P.prototype.$clipPositionToDocument=function(O,S){if(S=Math.max(0,S),O<0)O=0,S=0;else{var A=this.doc.getLength();O>=A?(O=A-1,S=this.doc.getLine(A-1).length):S=Math.min(this.doc.getLine(O).length,S)}return{row:O,column:S}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var S=this.doc.getLength()-1;return O.end.row>S?(O.end.row=S,O.end.column=this.doc.getLine(S).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,S){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:O,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,S){var A=this.$wrapLimitRange;A.max<0&&(A={min:S,max:S});var N=this.$constrainWrapLimit(O,A.min,A.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,S,A){return S&&(O=Math.max(S,O)),A&&(O=Math.min(A,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var S=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(B.row),ae=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var ce=this.getFoldLine(U);ce&&ce!==ne&&(ce.merge(ne),ne=ce),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var ue=Array(Z);ue.unshift(U,0);var ye=S?this.$wrapData:this.$rowLengthCache;ye.splice.apply(ye,ue);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var Ae=ne.range.compareInside(N.row,N.column);Ae==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-N.column))):Ae==-1&&(ne.addRemoveChars(U,0,B.column-N.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(O,S){this.$rowLengthCache[O]=null,this.$rowLengthCache[S]=null},P.prototype.$updateWrapData=function(O,S){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(S=Math.min(S,A.length-1);te<=S;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ce){var ue;if(he!=null){ue=this.$getDisplayTokens(he,K.length),ue[0]=_;for(var ye=1;ye<ue.length;ye++)ue[ye]=C}else ue=this.$getDisplayTokens(A[ne].substring(ce,ae),K.length);K=K.concat(ue)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),te=Z.end.row+1):(K=this.$getDisplayTokens(A[te]),B[te]=this.$computeWrapSplits(K,U,N),te++)},P.prototype.$computeWrapSplits=function(O,S,A){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=S<=Math.max(2*A,8)||te===!1?0:Math.floor(S/2);function ne(){var Ae=0;if(he===0)return Ae;if(te)for(var $e=0;$e<O.length;$e++){var Ie=O[$e];if(Ie==L)Ae+=1;else if(Ie==F)Ae+=A;else{if(Ie==I)continue;break}}return Z&&te!==!1&&(Ae+=A),Math.min(Ae,he)}function ae(Ae){for(var $e=Ae-U,Ie=U;Ie<Ae;Ie++){var Ge=O[Ie];(Ge===12||Ge===2)&&($e-=1)}N.length||(ce=ne(),N.indent=ce),K+=$e,N.push(K),U=Ae}for(var ce=0;B-U>S-ce;){var ue=U+S-ce;if(O[ue-1]>=L&&O[ue]>=L){ae(ue);continue}if(O[ue]==_||O[ue]==C){for(ue;ue!=U-1&&O[ue]!=_;ue--);if(ue>U){ae(ue);continue}for(ue=U+S,ue;ue<O.length&&O[ue]==C;ue++);if(ue==O.length)break;ae(ue);continue}for(var ye=Math.max(ue-(S-(S>>2)),U-1);ue>ye&&O[ue]<_;)ue--;if(Z){for(;ue>ye&&O[ue]<_;)ue--;for(;ue>ye&&O[ue]==R;)ue--}else for(;ue>ye&&O[ue]<L;)ue--;if(ue>ye){ae(++ue);continue}ue=U+S,O[ue]==$&&ue--,ae(ue-ce)}return N},P.prototype.$getDisplayTokens=function(O,S){var A=[],N;S=S||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+S),A.push(F);for(var K=1;K<N;K++)A.push(I)}else U==32?A.push(L):U>39&&U<48||U>57&&U<64?A.push(R):U>=4352&&H(U)?A.push(E,$):A.push(E)}return A},P.prototype.$getStringScreenWidth=function(O,S,A){if(S==0)return[0,0];S==null&&(S=1/0),A=A||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?A+=this.getScreenTabSize(A):N>=4352&&H(N)?A+=2:A+=1,!(A>S));B++);return[A,B]},P.prototype.getRowLength=function(O){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?S:this.$wrapData[O].length+S},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[S.row];return A.length&&A[0]<S.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},P.prototype.getDocumentLastRowColumn=function(O,S){var A=this.documentToScreenRow(O,S);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,S){var A=this.documentToScreenRow(O,S);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,S){return this.screenToDocumentPosition(O,S).row},P.prototype.screenToDocumentColumn=function(O,S){return this.screenToDocumentPosition(O,S).column},P.prototype.screenToDocumentPosition=function(O,S,A){if(O<0)return{row:0,column:0};var N,ae=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ce=O>Z[he-1];else var ce=!he;for(var ue=this.getLength()-1,ye=this.getNextFoldLine(ae),Ae=ye?ye.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ue));)ne+=K,ae++,ae>Ae&&(ae=ye.end.row+1,ye=this.getNextFoldLine(ae,ye),Ae=ye?ye.start.row:1/0),ce&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(ye&&ye.start.row<=ae)N=this.getFoldDisplayLine(ye),ae=ye.start.row;else{if(ne+K<=O||ae>ue)return{row:ue,column:this.getLine(ue).length};N=this.getLine(ae),ye=null}var $e=0,Ie=Math.floor(O-ne);if(this.$useWrapMode){var Ge=this.$wrapData[ae];Ge&&(U=Ge[Ie],Ie>0&&Ge.length&&($e=Ge.indent,B=Ge[Ie-1]||Ge[Ge.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Ie,ae,Ie)&&(S=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,S-$e)[1],this.$useWrapMode&&B>=U&&(B=U-1),ye?ye.idxToPosition(B):{row:ae,column:B}},P.prototype.documentToScreenPosition=function(O,S){if(typeof S>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,S);O=A.row,S=A.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,S,1),B&&(O=B.start.row,S=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ce=this.getNextFoldLine(he),ue=ce?ce.start.row:1/0;he<O;){if(he>=ue){if(U=ce.end.row+1,U>O)break;ce=this.getNextFoldLine(U,ce),ue=ce?ce.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ye="";ce&&he>=ue?(ye=this.getFoldDisplayLine(ce,O,S),N=ce.start.row):(ye=this.getLine(O).substring(0,S),N=O);var Ae=0;if(this.$useWrapMode){var $e=this.$wrapData[N];if($e){for(var Ie=0;ye.length>=$e[Ie];)ne++,Ie++;ye=ye.substring($e[Ie-1]||0,ye.length),Ae=Ie>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ae+this.$getStringScreenWidth(ye)[0]}},P.prototype.documentToScreenColumn=function(O,S){return this.documentToScreenPosition(O,S).column},P.prototype.documentToScreenRow=function(O,S){return this.documentToScreenPosition(O,S).row},P.prototype.getScreenLength=function(){var O=0,S=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,S=this.$foldData[B++],U=S?S.start.row:1/0;N<A;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=S.end.row+1,S=this.$foldData[B++],U=S?S.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)S=Z[B],O-=S.end.row-S.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<S.length&&(B=S.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));U++);return[N,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(O.row);return S[O.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P}();b.$uid=0,b.prototype.$modes=h.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=H,m.implement(b.prototype,g);var E=1,$=2,_=3,C=4,R=9,L=10,F=11,I=12;function H(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}e("./edit_session/folding").Folding.call(b.prototype),e("./edit_session/bracket_match").BracketMatch.call(b.prototype),h.defineOptions(b.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,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(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,f){var m=e("./lib/lang"),y=e("./lib/oop"),x=e("./range").Range,h=function(){function u(){this.$options={}}return u.prototype.set=function(a){return y.mixin(this.$options,a),this},u.prototype.getOptions=function(){return m.copyObject(this.$options)},u.prototype.setOptions=function(a){this.$options=a},u.prototype.find=function(a){var o=this.$options,l=this.$matchIterator(a,o);if(!l)return!1;var d=null;return l.forEach(function(w,b,E,$){return d=new x(w,b,E,$),b==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&d.isEqual(o.start)?(d=null,!1):!0}),d},u.prototype.findAll=function(a){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,d=l?a.getLines(l.start.row,l.end.row):a.doc.getAllLines(),w=[],b=o.re;if(o.$isMultiLine){var E=b.length,$=d.length-E,_;e:for(var C=b.offset||0;C<=$;C++){for(var R=0;R<E;R++)if(d[C+R].search(b[R])==-1)continue e;var L=d[C],F=d[C+E-1],I=L.length-L.match(b[0])[0].length,H=F.match(b[E-1])[0].length;_&&_.end.row===C&&_.end.column>I||(w.push(_=new x(C,I,C+E-1,H)),E>2&&(C=C+E-2))}}else for(var P,O=0;O<d.length;O++)if(this.$isMultilineSearch(o)){var S=d.length-1;if(P=this.$multiLineForward(a,b,O,S),P){var A=P.endRow<=S?P.endRow-1:S;A>O&&(O=A),w.push(new x(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=m.getMatchOffsets(d[O],b);for(var R=0;R<P.length;R++){var N=P[R];w.push(new x(O,N.offset,O,N.offset+N.length))}}if(l){for(var B=l.start.column,U=l.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=l.end.row-l.start.row;O<R&&w[R].end.column>U&&w[R].end.row==K;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=l.start.row,w[O].end.row+=l.start.row}return w},u.prototype.parseReplaceString=function(a){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",d=0,w=a.length;d<w;d++){var b=a.charCodeAt(d);if(b===o.Backslash){if(d++,d>=w){l+="\\";break}var E=a.charCodeAt(d);switch(E){case o.Backslash:l+="\\";break;case o.n:l+=`
|
199
|
+
`;break;case o.t:l+=" ";break}continue}if(b===o.DollarSign){if(d++,d>=w){l+="$";break}var $=a.charCodeAt(d);if($===o.DollarSign){l+="$$";continue}if($===o.Digit0||$===o.Ampersand){l+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){l+="$"+a[d];continue}}l+=a[d]}return l||a},u.prototype.replace=function(a,o){var l=this.$options,d=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(d){var w=this.$isMultilineSearch(l);w&&(a=a.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var b=d.exec(a);if(!b||!w&&b[0].length!=a.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=a.replace(d,o),l.preserveCase){o=o.split("");for(var E=Math.min(a.length,a.length);E--;){var $=a[E];$&&$.toLowerCase()!=$?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(a,o){if(a.needle instanceof RegExp)return a.re=a.needle;var l=a.needle;if(!a.needle)return a.re=!1;a.regExp||(l=m.escapeRegExp(l));var d=a.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),a.$supportsUnicodeFlag=!0,d+="u"}catch{a.$supportsUnicodeFlag=!1}if(a.wholeWord&&(l=g(l,a)),a.$isMultiLine=!o&&/[\n\r]/.test(l),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(l,d);try{var w=new RegExp(l,d)}catch{w=!1}return a.re=w},u.prototype.$assembleMultilineRegExp=function(a,o){for(var l=a.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),d=[],w=0;w<l.length;w++)try{d.push(new RegExp(l[w],o))}catch{return!1}return d},u.prototype.$isMultilineSearch=function(a){return a.re&&/\\r\\n|\\r|\\n/.test(a.re.source)&&a.regExp&&!a.$isMultiLine},u.prototype.$multiLineForward=function(a,o,l,d){for(var w,b=c(a,l),E=l;E<=d;){for(var $=0;$<b&&!(E>d);$++){var _=a.getLine(E++);w=w==null?_:w+`
|
203
|
+
`+_}var C=o.exec(w);if(o.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
204
|
+
`),L=C[0].split(`
|
205
|
+
`),F=l+R.length-1,I=R[R.length-1].length,H=F+L.length-1,P=L.length==1?I+L[0].length:L[L.length-1].length;return{startRow:F,startCol:I,endRow:H,endCol:P}}}return null},u.prototype.$multiLineBackward=function(a,o,l,d,w){for(var b,E=c(a,d),$=a.getLine(d).length-l,_=d;_>=w;){for(var C=0;C<E&&_>=w;C++){var R=a.getLine(_--);b=b==null?R:R+`
|
206
|
+
`+b}var L=s(b,o,$);if(L){var F=b.slice(0,L.index).split(`
|
207
|
+
`),I=L[0].split(`
|
208
|
+
`),H=_+F.length,P=F[F.length-1].length,O=H+I.length-1,S=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:S}}}return null},u.prototype.$matchIterator=function(a,o){var l=this.$assembleRegExp(o);if(!l)return!1;var d=this.$isMultilineSearch(o),w=this.$multiLineForward,b=this.$multiLineBackward,E=o.backwards==!0,$=o.skipCurrent!=!1,_=l.unicode,C=o.range,R=o.start;R||(R=C?C[E?"end":"start"]:a.selection.getRange()),R.start&&(R=R[$!=E?"end":"start"]);var L=C?C.start.row:0,F=C?C.end.row:a.getLength()-1;if(E)var I=function(O){var S=R.row;if(!P(S,R.column,O)){for(S--;S>=L;S--)if(P(S,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(S=F,L=R.row;S>=L;S--)if(P(S,Number.MAX_VALUE,O))return}}};else var I=function(O){var S=R.row;if(!P(S,R.column,O)){for(S=S+1;S<=F;S++)if(P(S,0,O))return;if(o.wrap!=!1){for(S=L,F=R.row;S<=F;S++)if(P(S,0,O))return}}};if(o.$isMultiLine)var H=l.length,P=function(O,S,A){var N=E?O-H+1:O;if(!(N<0||N+H>a.getLength())){var B=a.getLine(N),U=B.search(l[0]);if(!(!E&&U<S||U===-1)){for(var K=1;K<H;K++)if(B=a.getLine(N+K),B.search(l[K])==-1)return;var Z=B.match(l[H-1])[0].length;if(!(E&&Z>S)&&A(N,U,N+H-1,Z))return!0}}};else if(E)var P=function(O,S,A){if(d){var N=b(a,l,S,O,L);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=a.getLine(O),U=[],K,Z=0;for(l.lastIndex=0;K=l.exec(B);){var te=K[0].length;if(Z=K.index,!te){if(Z>=B.length)break;l.lastIndex=Z+=m.skipEmptyMatch(B,Z,_)}if(K.index+te>S)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(A(O,ne,O,ne+te))return!0}}};else var P=function(O,S,A){if(l.lastIndex=S,d){var N=w(a,l,O,F);if(N){var B=N.endRow<=F?N.endRow-1:F;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=a.getLine(O),K,Z;Z=l.exec(U);){var te=Z[0].length;if(K=Z.index,A(O,K,O,K+te))return!0;if(!te&&(l.lastIndex=K+=m.skipEmptyMatch(U,K,_),K>=U.length))return!1}};return{forEach:I}},u}();function g(u,a){var o=m.supportsLookbehind();function l(E,$){$===void 0&&($=!0);var _=o&&a.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(E)||a.regExp?o&&a.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var d=Array.from(u),w=d[0],b=d[d.length-1];return l(w)+u+l(b,!1)}function s(u,a,o){for(var l=null,d=0;d<=u.length;){a.lastIndex=d;var w=a.exec(u);if(!w)break;var b=w.index+w[0].length;if(b>u.length-o)break;(!l||b>l.index+l[0].length)&&(l=w),d=w.index+1}return l}function c(u,a){var o=5e3,l={row:a,column:0},d=u.doc.positionToIndex(l),w=d+o,b=u.doc.indexToPosition(w),E=b.row;return E+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,f){var m=this&&this.__extends||function(){var u=function(a,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(a,o);function l(){this.constructor=a}a.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),y=e("../lib/keys"),x=e("../lib/useragent"),h=y.KEY_MODS,g=function(){function u(a,o){this.$init(a,o,!1)}return u.prototype.$init=function(a,o,l){this.platform=o||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(a),this.$singleCommand=l},u.prototype.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},u.prototype.removeCommand=function(a,o){var l=a&&(typeof a=="string"?a:a.name);a=this.commands[l],o||delete this.commands[l];var d=this.commandKeyBinding;for(var w in d){var b=d[w];if(b==a)delete d[w];else if(Array.isArray(b)){var E=b.indexOf(a);E!=-1&&(b.splice(E,1),b.length==1&&(d[w]=b[0]))}}},u.prototype.bindKey=function(a,o,l){if(typeof a=="object"&&a&&(l==null&&(l=a.position),a=a[this.platform]),!!a){if(typeof o=="function")return this.addCommand({exec:o,bindKey:a,name:o.name||a});a.split("|").forEach(function(d){var w="";if(d.indexOf(" ")!=-1){var b=d.split(/\s+/);d=b.pop(),b.forEach(function(_){var C=this.parseKeys(_),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(d),$=h[E.hashId]+E.key;this._addCommandToBinding(w+$,o,l)},this)}},u.prototype._addCommandToBinding=function(a,o,l){var d=this.commandKeyBinding,w;if(!o)delete d[a];else if(!d[a]||this.$singleCommand)d[a]=o;else{Array.isArray(d[a])?(w=d[a].indexOf(o))!=-1&&d[a].splice(w,1):d[a]=[d[a]],typeof l!="number"&&(l=s(o));var b=d[a];for(w=0;w<b.length;w++){var E=b[w],$=s(E);if($>l)break}b.splice(w,0,o)}},u.prototype.addCommands=function(a){a&&Object.keys(a).forEach(function(o){var l=a[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},u.prototype.removeCommands=function(a){Object.keys(a).forEach(function(o){this.removeCommand(a[o])},this)},u.prototype.bindKeys=function(a){Object.keys(a).forEach(function(o){this.bindKey(o,a[o])},this)},u.prototype._buildKeyHash=function(a){this.bindKey(a.bindKey,a)},u.prototype.parseKeys=function(a){var o=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),l=o.pop(),d=y[l];if(y.FUNCTION_KEYS[d])l=y.FUNCTION_KEYS[d].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var w=0,b=o.length;b--;){var E=y.KEY_MODS[o[b]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[b]+" in "+a),!1;w|=E}return{key:l,hashId:w}},u.prototype.findKeyCommand=function(a,o){var l=h[a]+o;return this.commandKeyBinding[l]},u.prototype.handleKeyboard=function(a,o,l,d){if(!(d<0)){var w=h[o]+l,b=this.commandKeyBinding[w];return a.$keyChain&&(a.$keyChain+=" "+w,b=this.commandKeyBinding[a.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(a.$keyChain=a.$keyChain||w,{command:"null"}):(a.$keyChain&&((!o||o==4)&&l.length==1?a.$keyChain=a.$keyChain.slice(0,-w.length-1):(o==-1||d>0)&&(a.$keyChain="")),{command:b})}},u.prototype.getStatusText=function(a,o){return o.$keyChain||""},u}();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var c=function(u){m(a,u);function a(o,l){var d=u.call(this,o,l)||this;return d.$singleCommand=!0,d}return a}(g);c.call=function(u,a,o){g.prototype.$init.call(u,a,o,!0)},g.call=function(u,a,o){g.prototype.$init.call(u,a,o,!1)},r.HashHandler=c,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,f){var m=this&&this.__extends||function(){var s=function(c,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l])},s(c,u)};return function(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(c,u);function a(){this.constructor=c}c.prototype=u===null?Object.create(u):(a.prototype=u.prototype,new a)}}(),y=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,g=function(s){m(c,s);function c(u,a){var o=s.call(this,a,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return c.prototype.exec=function(u,a,o){if(Array.isArray(u)){for(var l=u.length;l--;)if(this.exec(u[l],a,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var d={editor:a,command:u,args:o};return this.canExecute(u,a)?(d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1):(this._signal("commandUnavailable",d),!1)},c.prototype.canExecute=function(u,a){return typeof u=="string"&&(u=this.commands[u]),!(!u||a&&a.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(a))},c.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._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(a){this.macro.push([a.command,a.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},c.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(a){typeof a=="string"?this.exec(a,u):this.exec(a[0],u,a[1])},this)}finally{this.$inReplay=!1}}},c.prototype.trimMacro=function(u){return u.map(function(a){return typeof a[0]!="string"&&(a[0]=a[0].name),a[1]||(a=a[0]),a})},c}(x);y.implement(g.prototype,h),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,f){var m=e("../lib/lang"),y=e("../config"),x=e("../range").Range;function h(s,c){return{win:s,mac:c}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){y.loadModule("ace/ext/settings_menu",function(c){c.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(c){c.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(c){c.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(s,c){typeof c=="number"&&!isNaN(c)&&s.gotoLine(c),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(c){c.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(s,c){s.navigateUp(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(s,c){s.navigateDown(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(s,c){s.navigateLeft(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(s,c){s.navigateRight(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var c=s.$copyWithEmptySelection&&s.selection.isEmpty(),u=c?s.selection.getLineRange():s.selection.getRange();s._emit("cut",u),u.isEmpty()||s.session.remove(u),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,c){s.$handlePaste(c)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(c){c.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(s){var c=s.selection.getRange();c.start.column=0,s.session.remove(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(s){var c=s.selection.getRange();c.end.column=Number.MAX_VALUE,s.session.remove(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,c){s.insert(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,c){s.insert(m.stringRepeat(c.text||"",c.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var c=s.selection.getRange();c.start.column=c.end.column=0,c.end.row++,s.selection.setRange(c,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var c=s.selection.isBackwards(),u=c?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),a=c?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(u.row).length,l=s.session.doc.getTextRange(s.selection.getRange()),d=l.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),b=u.row+1;b<=a.row+1;b++){var E=m.stringTrimLeft(m.stringTrimRight(s.session.doc.getLine(b)));E.length!==0&&(E=" "+E),w+=E}a.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(u.row,0,a.row+2,0),w),d>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+d)):(o=s.session.doc.getLine(u.row).length>o?o+1:o,s.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var c=s.session.doc.getLength()-1,u=s.session.doc.getLine(c).length,a=s.selection.rangeList.ranges,o=[];a.length<1&&(a=[s.selection.getRange()]);for(var l=0;l<a.length;l++)l==a.length-1&&(a[l].end.row===c&&a[l].end.column===u||o.push(new x(a[l].end.row,a[l].end.column,c,u))),l===0?a[l].start.row===0&&a[l].start.column===0||o.push(new x(0,0,a[l].start.row,a[l].start.column)):o.push(new x(a[l-1].end.row,a[l-1].end.column,a[l].start.row,a[l].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var l=0;l<o.length;l++)s.selection.addRange(o[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var c=s.getCursorPosition();s.selection.moveTo(c.row-1,Number.MAX_VALUE),s.insert(`
|
210
|
+
`),c.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,r,f){var m=e("../lib/keys"),y=e("../mouse/default_gutter_handler").GutterTooltip,x=function(){function g(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new y(this.editor)}return g.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))},g.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))},g.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===m.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=m.enter)return;s.preventDefault();var c=this.editor.getCursorPosition().row;this.editor.isRowVisible(c)||this.editor.scrollToLine(c,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),a=this.$findNearestFoldWidget(u),o=this.$findNearestAnnotation(u);if(!(a===null&&o===null)){if(a===null&&o!==null){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(a!==null&&o===null){this.activeRowIndex=a,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(o-u)<Math.abs(a-u)){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=a,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new h(s,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===m.tab){s.preventDefault();return}if(s.keyCode===m.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===m.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===m.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===m.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===m.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===m.enter||s.keyCode===m.space){switch(s.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var c=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==c&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(c),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var u=this.lines.cells[this.activeRowIndex].element.childNodes[2],a=u.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=a.right+"px",o.top=a.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.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()},g.prototype.$isFoldWidgetVisible=function(s){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getFoldWidget(s).style.display!=="none";return c&&u},g.prototype.$isAnnotationVisible=function(s){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getAnnotation(s).style.display!=="none";return c&&u},g.prototype.$getFoldWidget=function(s){var c=this.lines.get(s),u=c.element;return u.childNodes[1]},g.prototype.$getAnnotation=function(s){var c=this.lines.get(s),u=c.element;return u.childNodes[2]},g.prototype.$findNearestFoldWidget=function(s){if(this.$isFoldWidgetVisible(s))return s;for(var c=0;s-c>0||s+c<this.lines.getLength()-1;){if(c++,s-c>=0&&this.$isFoldWidgetVisible(s-c))return s-c;if(s+c<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+c))return s+c}return null},g.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var c=0;s-c>0||s+c<this.lines.getLength()-1;){if(c++,s-c>=0&&this.$isAnnotationVisible(s-c))return s-c;if(s+c<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+c))return s+c}return null},g.prototype.$focusFoldWidget=function(s){if(s!=null){var c=this.$getFoldWidget(s);c.classList.add(this.editor.renderer.keyboardFocusClassName),c.focus()}},g.prototype.$focusAnnotation=function(s){if(s!=null){var c=this.$getAnnotation(s);c.classList.add(this.editor.renderer.keyboardFocusClassName),c.focus()}},g.prototype.$blurFoldWidget=function(s){var c=this.$getFoldWidget(s);c.classList.remove(this.editor.renderer.keyboardFocusClassName),c.blur()},g.prototype.$blurAnnotation=function(s){var c=this.$getAnnotation(s);c.classList.remove(this.editor.renderer.keyboardFocusClassName),c.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$switchLane=function(s){switch(s){case"annotation":if(this.activeLane==="annotation")break;var c=this.$findNearestAnnotation(this.activeRowIndex);if(c==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldWidget(this.activeRowIndex);if(u==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(s){var c=this.lines.get(s);return c?c.row:null},g.prototype.$rowToRowIndex=function(s){for(var c=0;c<this.lines.getLength();c++){var u=this.lines.get(c);if(u.row==s)return c}return null},g}();r.GutterKeyboardHandler=x;var h=function(){function g(s,c){this.gutterKeyboardHandler=c,this.domEvent=s}return g.prototype.getKey=function(){return m.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();r.GutterKeyboardEvent=h}),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/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,f){var m=this&&this.__values||function(S){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&S[A],B=0;if(N)return N.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&B>=S.length&&(S=void 0),{value:S&&S[B++],done:!S}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/lang"),g=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,a=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,l=e("./search").Search,d=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,E=e("./commands/default_commands").commands,$=e("./config"),_=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,L=e("./clipboard"),F=e("./lib/keys"),I=e("./lib/event"),H=e("./tooltip").HoverTooltip,P=function(){function S(A,N,B){this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.id="editor"+ ++S.$uid,this.commands=new b(g.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new a(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(A){this.session.startOperation(A)},S.prototype.endOperation=function(A){this.session.endOperation(A)},S.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},S.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&A.command.name==N.command.name;if(A.command.name=="insertstring"){var K=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;$.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),N&&N()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){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),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.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=A.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),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(A)),this._signal("changeSession",{session:A,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(A){this.renderer.onResize(A)},S.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(A){this.renderer.setStyle(A)},S.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(A){this.setOption("fontSize",A)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var N=A.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ce){N.removeMarker(ce)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Z=N.getMatchingBracketRanges(B,K);if(!Z){var te=new _(N,B.row,B.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(A.session)),!Z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(d.comparePoints(Z[0].end,Z[1].start)==0?Z=[d.fromPoints(Z[0].start,Z[1].end)]:d.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[d.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ce){return N.addMarker(ce,ae,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},S.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(A){var N=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,N),this._signal("change",A),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),A.$highlightLineMarker&&!N)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&N){var B=new d(N.row,N.column,N.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else N&&(A.$highlightLineMarker.start.row=N.row,A.$highlightLineMarker.end.row=N.row,A.$highlightLineMarker.start.column=N.column,A._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(A){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,K=A.getLine(N.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(te.test(he))return te}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var A=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!A&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(A+=this.session.getLine(Z.start.row)+N)}}var te={text:A};return this._signal("copy",te),L.lineMode=B?te.text:!1,te.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},S.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===L.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,N);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},S.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},S.prototype.insert=function(A,N){var B=this.session,U=B.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=U.transformAction(B.getState(K.row),"insertion",this,B,A);Z&&(A!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Z.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
211
|
+
`)==-1){var te=d.fromPoints(K,K);te.end.column+=A.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(A==`
|
212
|
+
`||A==`\r
|
213
|
+
`){var ce=B.getLine(K.row);if(K.column>ce.search(/\S|$/)){var he=ce.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=B.getState(K.row),ce=B.getLine(K.row),ue=U.checkOutdent(ae,ce,A);if(B.insert(K,A),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new d(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new d(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var ye=U.getNextLineIndent(ae,ce.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},ye)}ue&&U.autoOutdent(ae,B,K.row)}},S.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new d(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,ae=B[he].end.row,ce=ne;ce<=ae;ce++){ce>0&&(U=A.getState(ce-1),K=A.getLine(ce-1),Z=N.getNextLineIndent(U,K,te));var ue=A.getLine(ce),ye=N.$getIndent(ue);if(Z!==ye){if(ye.length>0){var Ae=new d(ce,0,ce,ye.length);A.remove(Ae)}Z.length>0&&A.insert({row:ce,column:0},Z)}N.autoOutdent(U,A,ce)}},S.prototype.onTextInput=function(A,N){if(!N)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},S.prototype.applyComposition=function(A,N){if(N.extendLeft||N.extendRight){var B=this.selection.getRange();B.start.column-=N.extendLeft,B.end.column+=N.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!A&&!B.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},S.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},S.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(N.start.row),K=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var Z=B.getTextRange(N);if(Z[Z.length-1]==`
|
214
|
+
`){var te=B.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(A)},S.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),N=A.column;if(N!==0){var B=this.session.getLine(A.row),U,K;N<B.length?(U=B.charAt(N)+B.charAt(N-1),K=new d(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new d(A.row,N-2,A.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},S.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(A)},S.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(A)},S.prototype.indent=function(){var A=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=A.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var K=A.getLine(N.start.row),Z=N.start,te=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=h.stringRepeat(" ",ne);else{for(var ne=he%te;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),ae=" "}return this.insert(ae)},S.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},S.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},S.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),N=this.session,B=[],U=A.first;U<=A.last;U++)B.push(N.getLine(U));B.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new d(0,0,0,0),U=A.first;U<=A.last;U++){var Z=N.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,N.replace(K,B[U-A.first])}},S.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,N.first,N.last)},S.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),N=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,A)},S.prototype.getNumberAt=function(A,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);B.lastIndex<N;){var K=B.exec(U);if(K.index<=N&&K.index+K[0].length>=N){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},S.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new d(N,B-1,N,B),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(N,B);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&B<te?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ce=new d(N,Z.start,N,Z.end);this.session.replace(ce,ae),this.moveCursorTo(N,Math.max(Z.start+1,B+ae.length-Z.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var A=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(qe,ut){he=te+qe.length,Z>=te&&Z<=he&&(B=qe,ne.selection.clearSelection(),ne.moveCursorTo(A,te+U),ne.selection.selectTo(A,he+U)),te=he});for(var ae=this.$toggleWordPairs,ce,ue=0;ue<ae.length;ue++)for(var ye=ae[ue],Ae=0;Ae<=1;Ae++){var $e=+!Ae,Ie=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(ye[Ae])+")\\s?$","i"));if(Ie){var Ge=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Ie[1])+")($|\\s)","g"));Ge&&(ce=B.replace(new RegExp(h.escapeRegExp(ye[Ae]),"i"),function(qe){var ut=ye[$e];return qe.toUpperCase()==qe?ut=ut.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(ut=ut.substr(0,0)+ye[$e].charAt(0).toUpperCase()+ut.substr(1)),ut}),this.insert(ce),ce="")}}},S.prototype.findLinkAt=function(A,N){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ce=m(Z),ue=ce.next();!ue.done;ue=ce.next()){var ye=ue.value;if(ne=he+ye.length,te>=he&&te<=ne&&ye.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=ye.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ae){B={error:Ae}}finally{try{ue&&!ue.done&&(U=ce.return)&&U.call(ce)}finally{if(B)throw B.error}}return ae},S.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},S.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var K=B.start.row;N.duplicateLines(K,K)}else{var Z=U?B.start:B.end,te=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=te,A.setSelectionRange(B,U)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(A,N){var B,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();B=this.$getSelectedRows(Z),U=this.session.$moveLines(B.first,B.last,N?0:A),N&&A==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ce=0;ce<ae;ce++){var ue=ce;te[ce].moveBy(he,0),B=this.$getSelectedRows(te[ce]);for(var ye=B.first,Ae=B.last;++ce<ae;){ne&&te[ce].moveBy(ne,0);var $e=this.$getSelectedRows(te[ce]);if(N&&$e.first!=Ae||!N&&$e.first>Ae+1)break;Ae=$e.last}for(ce--,he=this.session.$moveLines(ye,Ae,N?0:A),N&&A==-1&&(ue=ce+1);ue<=ce;)te[ue].moveBy(he,0),ue++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},S.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},S.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,K=A*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):N===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,K*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(Z)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},S.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},S.prototype.centerSelection=function(){var A=this.getSelectionRange(),N={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(N,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},S.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},S.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new _(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ce=B.column-te.start,ue,ye={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ce<te.value.length&&!ne;ce++)if(ye[te.value[ce]])switch(ue=ye[te.value[ce]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ue])&&(ae[ue]=0),te.value[ce]){case"(":case"[":case"{":ae[ue]++;break;case")":case"]":case"}":ae[ue]--,ae[ue]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ce=0)}while(te&&!ne);if(he){var Ae,$e;if(he==="bracket")Ae=this.session.getBracketRange(B),Ae||(Ae=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1),$e=Ae.start,(N||$e.row===B.row&&Math.abs($e.column-B.column)<2)&&(Ae=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ae=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ae.compare(B.row,B.column)===0){var Ie=this.session.getMatchingTags(B);Ie&&(Ie.openTag.contains(B.row,B.column)?(Ae=Ie.closeTag,$e=Ae.start):(Ae=Ie.openTag,Ie.closeTag.start.row===B.row&&Ie.closeTag.start.column===B.column?$e=Ae.end:$e=Ae.start))}$e=$e||Ae.start}$e=Ae&&Ae.cursor||$e,$e&&(A?Ae&&N?this.selection.setRange(Ae):Ae&&Ae.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},S.prototype.gotoLine=function(A,N,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,N||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},S.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},S.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},S.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},S.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(A,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,A)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},S.prototype.replaceAll=function(A,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=B.length-1;Z>=0;--Z)this.$tryReplace(B[Z],A)&&U++;return this.selection.setSelectionRange(K),U},S.prototype.$tryReplace=function(A,N){var B=this.session.getTextRange(A);return N=this.$search.replace(B,N),N!==null?(A.end=this.session.replace(A,N),A):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&y.mixin(N,A);var U=this.selection.getRange();N.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),this.$search.set(N),N.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(N.preventScroll)return K;if(K)return this.revealRange(K,B),K;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},S.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},S.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},S.prototype.revealRange=function(A,N){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),N!==!1&&this.renderer.animateScrolling(B)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(A){if(A){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,ae=ne.$cursorLayer.$pixelPos,ce=ne.layerConfig,ue=ae.top-ce.offset;ae.top>=0&&ue+N.top<0?U=!0:ae.top<ce.height&&ae.top+N.top+ce.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ue+"px",K.style.left=ae.left+"px",K.style.height=ce.lineHeight+"px",K.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},S.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},S.prototype.prompt=function(A,N,B){var U=this;$.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,N,B)})},S}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.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"],["&&","||"],["==","!="]],y.implement(P.prototype,w),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var A=this;this.textInput.setReadOnly(S),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(U=B&&B.key&&B.key.length==1&&!B.ctrlKey&&!B.metaKey,!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new H);var K=x.createElement("div");K.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),K)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();S?(I.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?O.attach(this):O.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(A),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",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("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),B||(B=new C(this)),B.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",N.bind(this)),this.commands.removeCommand(A),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),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},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 O={getText:function(S,A){return(Math.abs(S.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(S,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(S,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,f){var m=e("../lib/dom"),y=function(){function x(h,g){this.element=h,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(h){m.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(h,g){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(h,g,s){var c=g.firstRowScreen*g.lineHeight,u=Math.floor(c/this.canvasHeight),a=s.documentToScreenRow(h,0)*g.lineHeight;return a-u*this.canvasHeight},x.prototype.computeLineHeight=function(h,g,s){return g.lineHeight*s.getRowLineCount(h)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(h){return this.cells[h]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var g=m.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.appendChild(g)}else this.cells.push(h),this.element.appendChild(h.element)},x.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var g=m.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},x.prototype.createCell=function(h,g,s,c){var u=this.cellCache.pop();if(!u){var a=m.createElement("div");c&&c(a),this.element.appendChild(a),u={element:a,text:"",row:h}}return u.row=h,u},x}();r.Lines=y}),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(e,r,f){var m=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,g=e("./lines").Lines,s=e("../config").nls,c=function(){function a(o){this.element=m.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return a.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},a.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},a.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},a.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var d=o[l],w=d.row,b=this.$annotations[w];b||(b=this.$annotations[w]={text:[],type:[],displayText:[]});var E=d.text,$=d.text,_=d.type;E=E?x.escapeHTML(E):d.html||"",$=$||d.html||"",b.text.indexOf(E)===-1&&(b.text.push(E),b.type.push(_),b.displayText.push($));var C=d.className;C?b.className=C:_==="error"?b.className=" ace_error":_==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":_==="info"&&!b.className?b.className=" ace_info":_==="hint"&&!b.className&&(b.className=" ace_hint")}},a.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,d=o.end.row-l;if(d!==0)if(o.action=="remove")this.$annotations.splice(l,d+1,null);else{var w=new Array(d+1);w.unshift(l,1),this.$annotations.splice.apply(this.$annotations,w)}}},a.prototype.update=function(o){this.config=o;var l=this.session,d=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var b=l.getNextFoldLine(d),E=b?b.start.row:1/0,$=null,_=-1,C=d;;){if(C>E&&(C=b.end.row+1,b=l.getNextFoldLine(C,b),E=b?b.start.row:1/0),C>w){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}$=this.$lines.get(++_),$?$.row=C:($=this.$lines.createCell(C,o,this.session,u),this.$lines.push($)),this.$renderCell($,o,b,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},a.prototype.$updateGutterWidth=function(o){var l=this.session,d=l.gutterRenderer||this.$renderer,w=l.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(b=l.getLength()+w-1);var E=d?d.getWidth(l,b,o):b.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.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))},a.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},a.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<l.length;d++){var w=l[d];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(d>0&&b&&b.start.row==l[d-1].row)w=l[d-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},a.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var d=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=d,!l||w<o.firstRow)return this.update(o);if(d<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(w>d)for(var b=this.session.getFoldedRowCount(d+1,w);b>0;b--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),d>w&&this.$lines.push(this.$renderLines(o,w+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},a.prototype.$renderLines=function(o,l,d){for(var w=[],b=l,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>d);){var _=this.$lines.createCell(b,o,this.session,u);this.$renderCell(_,o,E,b),w.push(_),b++}return w},a.prototype.$renderCell=function(o,l,d,w){var b=o.element,E=this.session,$=b.childNodes[0],_=b.childNodes[1],C=b.childNodes[2],R=C.firstChild,L=E.$firstLineNumber,F=E.$breakpoints,I=E.$decorations,H=E.gutterRenderer||this.$renderer,P=this.$showFoldWidgets&&E.foldWidgets,O=d?d.start.row:Number.MAX_VALUE,S=l.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",N=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",B=(H?H.getText(E,w):w+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||d&&w<this.$cursorRow&&w>=O&&this.$cursorRow<=d.end.row)&&(A+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),F[w]&&(A+=F[w]),I[w]&&(A+=I[w]),this.$annotations[w]&&w!==O&&(A+=this.$annotations[w].className),P){var U=P[w];U==null&&(U=P[w]=E.getFoldWidget(w))}if(U){var K="ace_fold-widget ace_"+U,Z=U=="start"&&w==O&&w<d.end.row;if(Z){K+=" ace_closed";for(var te="",he=!1,ne=w+1;ne<=d.end.row;ne++)if(this.$annotations[ne]){if(this.$annotations[ne].className===" ace_error"){he=!0,te=" ace_error_fold";break}this.$annotations[ne].className===" ace_security"?(he=!0,te=" ace_security_fold"):this.$annotations[ne].className===" ace_warning"&&te!==" ace_security_fold"&&(he=!0,te=" ace_warning_fold")}A+=te}else K+=" ace_open";_.className!=K&&(_.className=K),m.setStyle(_.style,"height",S),m.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ae=E.getFoldWidgetRange(w);ae?_.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ae.start.row+1,ae.end.row+1])):d?_.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[d.start.row+1,d.end.row+1])):_.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),Z?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else _&&(m.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));if(he&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",R.className=N,R.className+=te,m.setStyle(R.style,"height",S),m.setStyle(C.style,"display","block"),m.setStyle(C.style,"height",S);var ce;switch(te){case" ace_error_fold":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security_fold":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning_fold":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",R.className=N,this.$useSvgGutterIcons?R.className+=this.$annotations[w].className:b.classList.add(this.$annotations[w].className.replace(" ","")),m.setStyle(R.style,"height",S),m.setStyle(C.style,"display","block"),m.setStyle(C.style,"height",S);var ce;switch(this.$annotations[w].className){case" ace_error":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break;case" ace_info":ce=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[B]);break;case" ace_hint":ce=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else m.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return B!==$.data&&($.data=B),b.className!=A&&(b.className=A),m.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,l,E)+"px"),m.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,l,E)+"px"),o.text=B,C.style.display==="none"&&_.style.display==="none"?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},a.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},a.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},a.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},a.prototype.setShowFoldWidgets=function(o){o?m.addCssClass(this.element,"ace_folding-enabled"):m.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},a.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},a.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=m.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},a.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(o.x<l.left+d.left)return"markers";if(this.$showFoldWidgets&&o.x>d.right-l.right)return"foldWidgets"},a}();c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,y.implement(c.prototype,h);function u(a){var o=document.createTextNode("");a.appendChild(o);var l=m.createElement("span");a.appendChild(l);var d=m.createElement("span");a.appendChild(d);var w=m.createElement("span");return d.appendChild(w),a}r.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,f){var m=e("../range").Range,y=e("../lib/dom"),x=function(){function g(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setMarkers=function(s){this.markers=s},g.prototype.elt=function(s,c){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=c,u.className=s},g.prototype.update=function(s){if(s){this.config=s,this.i=0;var c;for(var u in this.markers){var a=this.markers[u];if(!a.range){a.update(c,this,this.session,s);continue}var o=a.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),a.renderer){var l=this.$getTop(o.start.row,s),d=this.$padding+o.start.column*s.characterWidth;a.renderer(c,o,d,l,s)}else a.type=="fullLine"?this.drawFullLineMarker(c,o,a.clazz,s):a.type=="screenLine"?this.drawScreenLineMarker(c,o,a.clazz,s):o.isMultiLine()?a.type=="text"?this.drawTextMarker(c,o,a.clazz,s):this.drawMultiLineMarker(c,o,a.clazz,s):this.drawSingleLineMarker(c,o,a.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(s,c){return(s-c.firstRowScreen)*c.lineHeight},g.prototype.drawTextMarker=function(s,c,u,a,o){for(var l=this.session,d=c.start.row,w=c.end.row,b=d,E=0,$=0,_=l.getScreenLastRowColumn(b),C=new m(b,c.start.column,b,$);b<=w;b++)C.start.row=C.end.row=b,C.start.column=b==d?c.start.column:l.getRowWrapIndent(b),C.end.column=_,E=$,$=_,_=b+1<w?l.getScreenLastRowColumn(b+1):b==w?0:c.end.column,this.drawSingleLineMarker(s,C,u+(b==d?" ace_start":"")+" ace_br"+h(b==d||b==d+1&&c.start.column,E<$,$>_,b==w),a,b==w?0:1,o)},g.prototype.drawMultiLineMarker=function(s,c,u,a,o){var l=this.$padding,d=a.lineHeight,w=this.$getTop(c.start.row,a),b=l+c.start.column*a.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(c.start.row)){var E=c.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(s,E,u+" ace_br1 ace_start",a,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+b+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(c.end.row)){var E=c.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(s,E,u+" ace_br12",a,null,o)}else{w=this.$getTop(c.end.row,a);var $=c.end.column*a.characterWidth;this.elt(u+" ace_br12","height:"+d+"px;width:"+$+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}if(d=(c.end.row-c.start.row-1)*a.lineHeight,!(d<=0)){w=this.$getTop(c.start.row+1,a);var _=(c.start.column?1:0)|(c.end.column?0:8);this.elt(u+(_?" ace_br"+_:""),"height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(s,c,u,a,o,l){if(this.session.$bidiHandler.isBidiRow(c.start.row))return this.drawBidiSingleLineMarker(s,c,u,a,o,l);var d=a.lineHeight,w=(c.end.column+(o||0)-c.start.column)*a.characterWidth,b=this.$getTop(c.start.row,a),E=this.$padding+c.start.column*a.characterWidth;this.elt(u,"height:"+d+"px;width:"+w+"px;top:"+b+"px;left:"+E+"px;"+(l||""))},g.prototype.drawBidiSingleLineMarker=function(s,c,u,a,o,l){var d=a.lineHeight,w=this.$getTop(c.start.row,a),b=this.$padding,E=this.session.$bidiHandler.getSelections(c.start.column,c.end.column);E.forEach(function($){this.elt(u,"height:"+d+"px;width:"+($.width+(o||0))+"px;top:"+w+"px;left:"+(b+$.left)+"px;"+(l||""))},this)},g.prototype.drawFullLineMarker=function(s,c,u,a,o){var l=this.$getTop(c.start.row,a),d=a.lineHeight;c.start.row!=c.end.row&&(d+=this.$getTop(c.end.row,a)-l),this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(s,c,u,a,o){var l=this.$getTop(c.start.row,a),d=a.lineHeight;this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g}();x.prototype.$padding=0;function h(g,s,c,u){return(g?1:0)|(s?2:0)|(c?4:0)|(u?8:0)}r.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,f){var m=new Set(["text","rparen","lparen"]);r.isTextToken=function(y){return m.has(y)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("./lines").Lines,g=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,c=e("./text_util").isTextToken,u=function(){function a(o){this.dom=y,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return a.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",d=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},a.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},a.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},a.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},a.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},a.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},a.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},a.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},a.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},a.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},a.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},a.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],d=1;d<o+1;d++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=x.stringRepeat(this.TAB_CHAR,d),l.push(w)}else l.push(this.dom.createTextNode(x.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=b+E,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=b+_,w.textContent=C,this.$tabStrings[" "]=w}},a.prototype.updateLines=function(o,l,d){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(l,o.firstRow),b=Math.min(d,o.lastRow),E=this.element.childNodes,$=0,_=o.firstRow;_<w;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(w)){w=C.start.row;break}else _=C.end.row;$++}for(var R=!1,_=w,C=this.session.getNextFoldLine(_),L=C?C.start.row:1/0;_>L&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),L=C?C.start.row:1/0),!(_>b);){var F=E[$++];if(F){this.dom.removeChildren(F),this.$renderLine(F,_,_==L?C:!1),R&&(F.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(_)+"px";F.style.height!=I&&(R=!0,F.style.height=I)}_++}if(R)for(;$<this.$lines.cells.length;){var H=this.$lines.cells[$++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},a.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var d=o.lastRow,w=l?l.lastRow:-1;if(!l||w<o.firstRow)return this.update(o);if(d<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var b=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);b>0;b--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},a.prototype.$renderLinesFragment=function(o,l,d){for(var w=[],b=l,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>d);){var _=this.$lines.createCell(b,o,this.session),C=_.element;this.dom.removeChildren(C),y.setStyle(C.style,"height",this.$lines.computeLineHeight(b,o,this.session)+"px"),y.setStyle(C.style,"top",this.$lines.computeLineTop(b,o,this.session)+"px"),this.$renderLine(C,b,b==$?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(_),b++}return w},a.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,d=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,l,d))},a.prototype.$renderToken=function(o,l,d,w){for(var b=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\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\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,$=this.dom.createFragment(this.element),_,C=0;_=E.exec(w);){var R=_[1],L=_[2],F=_[3],I=_[4],H=_[5];if(!(!b.showSpaces&&L)){var P=C!=_.index?w.slice(C,_.index):"";if(C=_.index+_[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),R){var O=b.session.getScreenTabSize(l+_.index);$.appendChild(b.$tabStrings[O].cloneNode(!0)),l+=O-1}else if(L)if(b.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(b.SPACE_CHAR,L.length),$.appendChild(S)}else $.appendChild(this.dom.createTextNode(L,this.element));else if(F){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(b.SPACE_CHAR,F.length),$.appendChild(S)}else if(I){l+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=b.showSpaces?b.SPACE_CHAR:I,$.appendChild(S)}else if(H){l+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=H,$.appendChild(S)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),c(d.type))o.appendChild($);else{var A="ace_"+d.type.replace(/\./g," ace_"),S=this.dom.createElement("span");d.type=="fold"&&(S.style.width=d.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=A,S.appendChild($),o.appendChild(S)}return l+w.length},a.prototype.renderIndentGuide=function(o,l,d){var w=l.search(this.$indentGuideRe);if(w<=0||w>=d)return l;if(l[0]==" "){w-=w%this.tabSize;for(var b=w/this.tabSize,E=0;E<b;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}else if(l[0]==" "){for(var E=0;E<w;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}return this.$highlightIndentGuide(),l},a.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,w=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:l.row};var b=this.session.$bracketHighlight;if(b){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(l.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row+1,l.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=l.row+1;$<o.length;$++){var _=o[$],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=$,C<=d))break}}this.$renderHighlightIndentGuide()}}},a.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},a.prototype.$setIndentGuideActive=function(o,l){var d=this.session.doc.getLine(o.row);if(d!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var b=w.childNodes;if(b){var E=b[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},a.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var d=0;d<o.length;d++){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}else for(var d=o.length-1;d>=0;d--){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}}},a.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},a.prototype.$renderWrappedLine=function(o,l,d){var w=0,b=0,E=d[0],$=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<l.length;C++){var R=l[C],L=R.value;if(C==0&&this.displayIndentGuides){if(w=L.length,L=this.renderIndentGuide(_,L,E),!L)continue;w-=L.length}if(w+L.length<E)$=this.$renderToken(_,$,R,L),w+=L.length;else{for(;w+L.length>=E;)$=this.$renderToken(_,$,R,L.substring(0,E-w)),L=L.substring(E-w),w=E,_=this.$createLineElement(),o.appendChild(_),_.appendChild(this.dom.createTextNode(x.stringRepeat(" ",d.indent),this.element)),b++,$=0,E=d[b]||Number.MAX_VALUE;L.length!=0&&(w+=L.length,$=this.$renderToken(_,$,R,L))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,$,null,"",!0)},a.prototype.$renderSimpleLine=function(o,l){for(var d=0,w=0;w<l.length;w++){var b=l[w],E=b.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(d+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,d,b,E);d=this.$renderToken(o,d,b,E)}}},a.prototype.$renderOverflowMessage=function(o,l,d,w,b){d&&this.$renderToken(o,l,d,w.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=b?"<hide>":"<click to see more...>",o.appendChild(E)},a.prototype.$renderLine=function(o,l,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(l)),d)var w=this.$getFoldLineTokens(l,d);else var w=this.session.getTokens(l);var b=o;if(w.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(o,w,E);var b=o.lastChild}else{var b=o;this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b)),this.$renderSimpleLine(b,w)}}else this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b));if(this.showEOL&&b){d&&(l=d.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild($)}},a.prototype.$getFoldLineTokens=function(o,l){var d=this.session,w=[];function b($,_,C){for(var R=0,L=0;L+$[R].value.length<_;)if(L+=$[R].value.length,R++,R==$.length)return;if(L!=_){var F=$[R].value.substring(_-L);F.length>C-_&&(F=F.substring(0,C-_)),w.push({type:$[R].type,value:F}),L=_+F.length,R+=1}for(;L<C&&R<$.length;){var F=$[R].value;F.length+L>C?w.push({type:$[R].type,value:F.substring(0,C-L)}):w.push($[R]),L+=F.length,R+=1}}var E=d.getTokens(o);return l.walk(function($,_,C,R,L){$!=null?w.push({type:"fold",value:$}):(L&&(E=d.getTokens(_)),E.length&&b(E,R,C))},l.end.row,this.session.getLine(l.end.row).length),w},a.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},a}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,m.implement(u.prototype,g),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,f){var m=e("../lib/dom"),y=function(){function x(h){this.element=m.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),m.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(h){for(var g=this.cursors,s=g.length;s--;)m.setStyle(g[s].style,"opacity",h?"":"0")},x.prototype.$startCssAnimation=function(){for(var h=this.cursors,g=h.length;g--;)h[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&m.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,m.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(h){this.$padding=h},x.prototype.setSession=function(h){this.session=h},x.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},x.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},x.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,m.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var h=m.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},x.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},x.prototype.hideCursor=function(){this.isVisible=!1,m.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,m.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,m.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&m.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),m.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),g()},this.blinkInterval),g()}},x.prototype.getPixelPosition=function(h,g){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),c=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:c,top:u}},x.prototype.isCursorInView=function(h,g){return h.top>=0&&h.top<g.maxHeight},x.prototype.update=function(h){this.config=h;var g=this.session.$selectionMarkers,s=0,c=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var s=0,u=g.length;s<u;s++){var a=this.getPixelPosition(g[s].cursor,!0);if(!((a.top>h.height+h.offset||a.top<0)&&s>1)){var o=this.cursors[c++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,a,h,g[s],this.session):this.isCursorInView(a,h)?(m.setStyle(l,"display","block"),m.translate(o,a.left,a.top),m.setStyle(l,"width",Math.round(h.characterWidth)+"px"),m.setStyle(l,"height",h.lineHeight+"px")):m.setStyle(l,"display","none")}}for(;this.cursors.length>c;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=a,this.restartTimer()},x.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?m.addCssClass(this.element,"ace_overwrite-cursors"):m.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x}();y.prototype.$padding=0,y.prototype.drawCursor=null,r.Cursor=y}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,f){var m=this&&this.__extends||function(){var o=function(l,d){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(w[E]=b[E])},o(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");o(l,d);function w(){this.constructor=l}l.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter,s=32768,c=function(){function o(l,d){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o}();y.implement(c.prototype,g);var u=function(o){m(l,o);function l(d,w){var b=o.call(this,d,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,w.$scrollbarWidth=b.width=x.scrollbarWidth(d.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var d=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-d)/(this.coeff-d)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(d){this.element.style.height=d+"px"},l.prototype.setScrollHeight=function(d){this.scrollHeight=d,d>s?(this.coeff=s/d,d=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=d+"px"},l.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},l}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var a=function(o){m(l,o);function l(d,w){var b=o.call(this,d,"-h")||this;return b.scrollLeft=0,b.height=w.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(d){this.element.style.width=d+"px"},l.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},l}(c);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=a,r.VScrollBar=u,r.HScrollBar=a}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,f){var m=this&&this.__extends||function(){var a=function(o,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,w){d.__proto__=w}||function(d,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(d[b]=w[b])},a(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(o,l);function d(){this.constructor=o}o.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
217
|
+
position: absolute;
|
218
|
+
background: rgba(128, 128, 128, 0.6);
|
219
|
+
-moz-box-sizing: border-box;
|
220
|
+
box-sizing: border-box;
|
221
|
+
border: 1px solid #bbb;
|
222
|
+
border-radius: 2px;
|
223
|
+
z-index: 8;
|
224
|
+
}
|
225
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
226
|
+
position: absolute;
|
227
|
+
z-index: 6;
|
228
|
+
background: none;
|
229
|
+
overflow: hidden!important;
|
230
|
+
}
|
231
|
+
.ace_editor>.ace_sb-v {
|
232
|
+
z-index: 6;
|
233
|
+
right: 0;
|
234
|
+
top: 0;
|
235
|
+
width: 12px;
|
236
|
+
}
|
237
|
+
.ace_editor>.ace_sb-v div {
|
238
|
+
z-index: 8;
|
239
|
+
right: 0;
|
240
|
+
width: 100%;
|
241
|
+
}
|
242
|
+
.ace_editor>.ace_sb-h {
|
243
|
+
bottom: 0;
|
244
|
+
left: 0;
|
245
|
+
height: 12px;
|
246
|
+
}
|
247
|
+
.ace_editor>.ace_sb-h div {
|
248
|
+
bottom: 0;
|
249
|
+
height: 100%;
|
250
|
+
}
|
251
|
+
.ace_editor>.ace_sb_grabbed {
|
252
|
+
z-index: 8;
|
253
|
+
background: #000;
|
254
|
+
}`,"ace_scrollbar.css",!1);var s=function(){function a(o,l){this.element=x.createElement("div"),this.element.className="ace_sb"+l,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return a.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},a}();y.implement(s.prototype,g);var c=function(a){m(o,a);function o(l,d){var w=a.call(this,l,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=l,w.width=w.VScrollWidth,w.renderer=d,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientY,E=function(I){b=I.clientY},$=function(){clearInterval(L)},_=d.clientY,C=this.thumbTop,R=function(){if(b!==void 0){var I=w.scrollTopFromThumbTop(C+b-_);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var d=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return d=d>>0,d<0?d=0:d>this.pageHeight-this.viewHeight&&(d=this.pageHeight-this.viewHeight),d},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,d){this.pageHeight===l&&!d||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(s);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var u=function(a){m(o,a);function o(l,d){var w=a.call(this,l,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=d,w}return o.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientX,E=function(I){b=I.clientX},$=function(){clearInterval(L)},_=d.clientX,C=this.thumbLeft,R=function(){if(b!==void 0){var I=w.scrollLeftFromThumbLeft(C+b-_);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var d=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return d=d>>0,d<0?d=0:d>this.pageWidth-this.viewWidth&&(d=this.pageWidth-this.viewWidth),d},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,d){this.pageWidth===l&&!d||(this.pageWidth=l,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})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(s);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=u,r.VScrollBar=c,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,f){var m=e("./lib/event"),y=function(){function x(h,g){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var s=this;this._flush=function(c){s.pending=!1;var u=s.changes;if(u&&(m.blockIdle(100),s.changes=0,s.onRender(u)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return x.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(m.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(h){var g=this.changes;return this.changes=0,g},x}();r.RenderLoop=y}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("../lib/event"),g=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,c=512,u=typeof ResizeObserver=="function",a=200,o=function(){function l(d){this.el=y.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=y.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=y.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),d.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(d,w){d.width=d.height="auto",d.left=d.top="0px",d.visibility="hidden",d.position="absolute",d.whiteSpace="pre",g.isIE<8?d["font-family"]="inherit":d.font="inherit",d.overflow=w?"hidden":"visible"},l.prototype.checkForSizeChanges=function(d){if(d===void 0&&(d=this.$measureSizes()),d&&(this.$characterSize.width!==d.width||this.$characterSize.height!==d.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=d,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===d.width&&w.height===d.height,this._emit("changeCharacterSize",{data:d})}},l.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(w){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var d=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){d.checkForSizeChanges(),h.onIdle(w,500)},500)},l.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(d){var w={height:(d||this.$measureNode).clientHeight,width:(d||this.$measureNode).clientWidth/c};return w.width===0||w.height===0?null:w},l.prototype.$measureCharWidth=function(d){this.$main.textContent=x.stringRepeat(d,c);var w=this.$main.getBoundingClientRect();return w.width/c},l.prototype.getCharacterWidth=function(d){var w=this.charSizes[d];return w===void 0&&(w=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),w},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var d=function(w,b){return["div",{style:"position: absolute;top:"+w+"px;left:"+b+"px;"}]};this.els=y.buildDom([d(0,0),d(a,0),d(0,a),d(a,a)],this.el)},l.prototype.transformCoordinates=function(d,w){if(d){var b=this.$getZoom(this.el);d=C(1/b,d)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function $(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function _(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var L=R(this.els[0]),F=R(this.els[1]),I=R(this.els[2]),H=R(this.els[3]),P=E($(H,F),$(H,I),$(_(F,I),_(H,L))),O=C(1+P[0],$(F,L)),S=C(1+P[1],$(I,L));if(w){var A=w,N=P[0]*A[0]/a+P[1]*A[1]/a+1,B=_(C(A[0],O),C(A[1],S));return _(C(1/N/a,B),L)}var U=$(d,L),K=E($(O,C(P[0],U)),$(S,C(P[1],U)),U);return C(a,K)},l}();o.prototype.$characterSize={width:0,height:0},m.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,f){f.exports=`
|
255
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
256
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
257
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
258
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
259
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
260
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
261
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
263
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
264
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
265
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
266
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
|
271
|
+
|
272
|
+
.ace_editor {
|
273
|
+
position: relative;
|
274
|
+
overflow: hidden;
|
275
|
+
padding: 0;
|
276
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
277
|
+
direction: ltr;
|
278
|
+
text-align: left;
|
279
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
280
|
+
forced-color-adjust: none;
|
281
|
+
}
|
282
|
+
|
283
|
+
.ace_scroller {
|
284
|
+
position: absolute;
|
285
|
+
overflow: hidden;
|
286
|
+
top: 0;
|
287
|
+
bottom: 0;
|
288
|
+
background-color: inherit;
|
289
|
+
-ms-user-select: none;
|
290
|
+
-moz-user-select: none;
|
291
|
+
-webkit-user-select: none;
|
292
|
+
user-select: none;
|
293
|
+
cursor: text;
|
294
|
+
}
|
295
|
+
|
296
|
+
.ace_content {
|
297
|
+
position: absolute;
|
298
|
+
box-sizing: border-box;
|
299
|
+
min-width: 100%;
|
300
|
+
contain: style size layout;
|
301
|
+
font-variant-ligatures: no-common-ligatures;
|
302
|
+
}
|
303
|
+
.ace_invisible {
|
304
|
+
font-variant-ligatures: none;
|
305
|
+
}
|
306
|
+
|
307
|
+
.ace_keyboard-focus:focus {
|
308
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
309
|
+
outline: none;
|
310
|
+
}
|
311
|
+
|
312
|
+
.ace_dragging .ace_scroller:before{
|
313
|
+
position: absolute;
|
314
|
+
top: 0;
|
315
|
+
left: 0;
|
316
|
+
right: 0;
|
317
|
+
bottom: 0;
|
318
|
+
content: '';
|
319
|
+
background: rgba(250, 250, 250, 0.01);
|
320
|
+
z-index: 1000;
|
321
|
+
}
|
322
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
323
|
+
background: rgba(0, 0, 0, 0.01);
|
324
|
+
}
|
325
|
+
|
326
|
+
.ace_gutter {
|
327
|
+
position: absolute;
|
328
|
+
overflow : hidden;
|
329
|
+
width: auto;
|
330
|
+
top: 0;
|
331
|
+
bottom: 0;
|
332
|
+
left: 0;
|
333
|
+
cursor: default;
|
334
|
+
z-index: 4;
|
335
|
+
-ms-user-select: none;
|
336
|
+
-moz-user-select: none;
|
337
|
+
-webkit-user-select: none;
|
338
|
+
user-select: none;
|
339
|
+
contain: style size layout;
|
340
|
+
}
|
341
|
+
|
342
|
+
.ace_gutter-active-line {
|
343
|
+
position: absolute;
|
344
|
+
left: 0;
|
345
|
+
right: 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
.ace_scroller.ace_scroll-left:after {
|
349
|
+
content: "";
|
350
|
+
position: absolute;
|
351
|
+
top: 0;
|
352
|
+
right: 0;
|
353
|
+
bottom: 0;
|
354
|
+
left: 0;
|
355
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
356
|
+
pointer-events: none;
|
357
|
+
}
|
358
|
+
|
359
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
360
|
+
position: absolute;
|
361
|
+
top: 0;
|
362
|
+
left: 0;
|
363
|
+
right: 0;
|
364
|
+
padding-left: 19px;
|
365
|
+
padding-right: 6px;
|
366
|
+
background-repeat: no-repeat;
|
367
|
+
}
|
368
|
+
|
369
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
370
|
+
margin-left: -14px;
|
371
|
+
float: left;
|
372
|
+
}
|
373
|
+
|
374
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
375
|
+
margin-left: -19px;
|
376
|
+
float: left;
|
377
|
+
}
|
378
|
+
|
379
|
+
.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 {
|
380
|
+
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==");
|
381
|
+
background-repeat: no-repeat;
|
382
|
+
background-position: 2px center;
|
383
|
+
}
|
384
|
+
|
385
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
386
|
+
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==");
|
387
|
+
background-repeat: no-repeat;
|
388
|
+
background-position: 2px center;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
392
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
393
|
+
background-repeat: no-repeat;
|
394
|
+
background-position: 2px center;
|
395
|
+
}
|
396
|
+
|
397
|
+
.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 {
|
398
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
399
|
+
}
|
400
|
+
|
401
|
+
.ace_icon_svg.ace_error {
|
402
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
403
|
+
background-color: crimson;
|
404
|
+
}
|
405
|
+
.ace_icon_svg.ace_security {
|
406
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
407
|
+
background-color: crimson;
|
408
|
+
}
|
409
|
+
.ace_icon_svg.ace_warning {
|
410
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
411
|
+
background-color: darkorange;
|
412
|
+
}
|
413
|
+
.ace_icon_svg.ace_info {
|
414
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
415
|
+
background-color: royalblue;
|
416
|
+
}
|
417
|
+
.ace_icon_svg.ace_hint {
|
418
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
419
|
+
background-color: silver;
|
420
|
+
}
|
421
|
+
|
422
|
+
.ace_icon_svg.ace_error_fold {
|
423
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
424
|
+
background-color: crimson;
|
425
|
+
}
|
426
|
+
.ace_icon_svg.ace_security_fold {
|
427
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
428
|
+
background-color: crimson;
|
429
|
+
}
|
430
|
+
.ace_icon_svg.ace_warning_fold {
|
431
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
432
|
+
background-color: darkorange;
|
433
|
+
}
|
434
|
+
|
435
|
+
.ace_scrollbar {
|
436
|
+
contain: strict;
|
437
|
+
position: absolute;
|
438
|
+
right: 0;
|
439
|
+
bottom: 0;
|
440
|
+
z-index: 6;
|
441
|
+
}
|
442
|
+
|
443
|
+
.ace_scrollbar-inner {
|
444
|
+
position: absolute;
|
445
|
+
cursor: text;
|
446
|
+
left: 0;
|
447
|
+
top: 0;
|
448
|
+
}
|
449
|
+
|
450
|
+
.ace_scrollbar-v{
|
451
|
+
overflow-x: hidden;
|
452
|
+
overflow-y: scroll;
|
453
|
+
top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.ace_scrollbar-h {
|
457
|
+
overflow-x: scroll;
|
458
|
+
overflow-y: hidden;
|
459
|
+
left: 0;
|
460
|
+
}
|
461
|
+
|
462
|
+
.ace_print-margin {
|
463
|
+
position: absolute;
|
464
|
+
height: 100%;
|
465
|
+
}
|
466
|
+
|
467
|
+
.ace_text-input {
|
468
|
+
position: absolute;
|
469
|
+
z-index: 0;
|
470
|
+
width: 0.5em;
|
471
|
+
height: 1em;
|
472
|
+
opacity: 0;
|
473
|
+
background: transparent;
|
474
|
+
-moz-appearance: none;
|
475
|
+
appearance: none;
|
476
|
+
border: none;
|
477
|
+
resize: none;
|
478
|
+
outline: none;
|
479
|
+
overflow: hidden;
|
480
|
+
font: inherit;
|
481
|
+
padding: 0 1px;
|
482
|
+
margin: 0 -1px;
|
483
|
+
contain: strict;
|
484
|
+
-ms-user-select: text;
|
485
|
+
-moz-user-select: text;
|
486
|
+
-webkit-user-select: text;
|
487
|
+
user-select: text;
|
488
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
489
|
+
white-space: pre!important;
|
490
|
+
}
|
491
|
+
.ace_text-input.ace_composition {
|
492
|
+
background: transparent;
|
493
|
+
color: inherit;
|
494
|
+
z-index: 1000;
|
495
|
+
opacity: 1;
|
496
|
+
}
|
497
|
+
.ace_composition_placeholder { color: transparent }
|
498
|
+
.ace_composition_marker {
|
499
|
+
border-bottom: 1px solid;
|
500
|
+
position: absolute;
|
501
|
+
border-radius: 0;
|
502
|
+
margin-top: 1px;
|
503
|
+
}
|
504
|
+
|
505
|
+
[ace_nocontext=true] {
|
506
|
+
transform: none!important;
|
507
|
+
filter: none!important;
|
508
|
+
clip-path: none!important;
|
509
|
+
mask : none!important;
|
510
|
+
contain: none!important;
|
511
|
+
perspective: none!important;
|
512
|
+
mix-blend-mode: initial!important;
|
513
|
+
z-index: auto;
|
514
|
+
}
|
515
|
+
|
516
|
+
.ace_layer {
|
517
|
+
z-index: 1;
|
518
|
+
position: absolute;
|
519
|
+
overflow: hidden;
|
520
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
521
|
+
word-wrap: normal;
|
522
|
+
white-space: pre;
|
523
|
+
height: 100%;
|
524
|
+
width: 100%;
|
525
|
+
box-sizing: border-box;
|
526
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
527
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
528
|
+
pointer-events: none;
|
529
|
+
}
|
530
|
+
|
531
|
+
.ace_gutter-layer {
|
532
|
+
position: relative;
|
533
|
+
width: auto;
|
534
|
+
text-align: right;
|
535
|
+
pointer-events: auto;
|
536
|
+
height: 1000000px;
|
537
|
+
contain: style size layout;
|
538
|
+
}
|
539
|
+
|
540
|
+
.ace_text-layer {
|
541
|
+
font: inherit !important;
|
542
|
+
position: absolute;
|
543
|
+
height: 1000000px;
|
544
|
+
width: 1000000px;
|
545
|
+
contain: style size layout;
|
546
|
+
}
|
547
|
+
|
548
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
549
|
+
contain: style size layout;
|
550
|
+
position: absolute;
|
551
|
+
top: 0;
|
552
|
+
left: 0;
|
553
|
+
right: 0;
|
554
|
+
}
|
555
|
+
|
556
|
+
.ace_hidpi .ace_text-layer,
|
557
|
+
.ace_hidpi .ace_gutter-layer,
|
558
|
+
.ace_hidpi .ace_content,
|
559
|
+
.ace_hidpi .ace_gutter {
|
560
|
+
contain: strict;
|
561
|
+
}
|
562
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
563
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
564
|
+
contain: strict;
|
565
|
+
}
|
566
|
+
|
567
|
+
.ace_cjk {
|
568
|
+
display: inline-block;
|
569
|
+
text-align: center;
|
570
|
+
}
|
571
|
+
|
572
|
+
.ace_cursor-layer {
|
573
|
+
z-index: 4;
|
574
|
+
}
|
575
|
+
|
576
|
+
.ace_cursor {
|
577
|
+
z-index: 4;
|
578
|
+
position: absolute;
|
579
|
+
box-sizing: border-box;
|
580
|
+
border-left: 2px solid;
|
581
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
582
|
+
transform: translatez(0);
|
583
|
+
}
|
584
|
+
|
585
|
+
.ace_multiselect .ace_cursor {
|
586
|
+
border-left-width: 1px;
|
587
|
+
}
|
588
|
+
|
589
|
+
.ace_slim-cursors .ace_cursor {
|
590
|
+
border-left-width: 1px;
|
591
|
+
}
|
592
|
+
|
593
|
+
.ace_overwrite-cursors .ace_cursor {
|
594
|
+
border-left-width: 0;
|
595
|
+
border-bottom: 1px solid;
|
596
|
+
}
|
597
|
+
|
598
|
+
.ace_hidden-cursors .ace_cursor {
|
599
|
+
opacity: 0.2;
|
600
|
+
}
|
601
|
+
|
602
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
603
|
+
opacity: 0;
|
604
|
+
}
|
605
|
+
|
606
|
+
.ace_smooth-blinking .ace_cursor {
|
607
|
+
transition: opacity 0.18s;
|
608
|
+
}
|
609
|
+
|
610
|
+
.ace_animate-blinking .ace_cursor {
|
611
|
+
animation-duration: 1000ms;
|
612
|
+
animation-timing-function: step-end;
|
613
|
+
animation-name: blink-ace-animate;
|
614
|
+
animation-iteration-count: infinite;
|
615
|
+
}
|
616
|
+
|
617
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
618
|
+
animation-duration: 1000ms;
|
619
|
+
animation-timing-function: ease-in-out;
|
620
|
+
animation-name: blink-ace-animate-smooth;
|
621
|
+
}
|
622
|
+
|
623
|
+
@keyframes blink-ace-animate {
|
624
|
+
from, to { opacity: 1; }
|
625
|
+
60% { opacity: 0; }
|
626
|
+
}
|
627
|
+
|
628
|
+
@keyframes blink-ace-animate-smooth {
|
629
|
+
from, to { opacity: 1; }
|
630
|
+
45% { opacity: 1; }
|
631
|
+
60% { opacity: 0; }
|
632
|
+
85% { opacity: 0; }
|
633
|
+
}
|
634
|
+
|
635
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
636
|
+
position: absolute;
|
637
|
+
z-index: 3;
|
638
|
+
}
|
639
|
+
|
640
|
+
.ace_marker-layer .ace_selection {
|
641
|
+
position: absolute;
|
642
|
+
z-index: 5;
|
643
|
+
}
|
644
|
+
|
645
|
+
.ace_marker-layer .ace_bracket {
|
646
|
+
position: absolute;
|
647
|
+
z-index: 6;
|
648
|
+
}
|
649
|
+
|
650
|
+
.ace_marker-layer .ace_error_bracket {
|
651
|
+
position: absolute;
|
652
|
+
border-bottom: 1px solid #DE5555;
|
653
|
+
border-radius: 0;
|
654
|
+
}
|
655
|
+
|
656
|
+
.ace_marker-layer .ace_active-line {
|
657
|
+
position: absolute;
|
658
|
+
z-index: 2;
|
659
|
+
}
|
660
|
+
|
661
|
+
.ace_marker-layer .ace_selected-word {
|
662
|
+
position: absolute;
|
663
|
+
z-index: 4;
|
664
|
+
box-sizing: border-box;
|
665
|
+
}
|
666
|
+
|
667
|
+
.ace_line .ace_fold {
|
668
|
+
box-sizing: border-box;
|
669
|
+
|
670
|
+
display: inline-block;
|
671
|
+
height: 11px;
|
672
|
+
margin-top: -2px;
|
673
|
+
vertical-align: middle;
|
674
|
+
|
675
|
+
background-image:
|
676
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
677
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
678
|
+
background-repeat: no-repeat, repeat-x;
|
679
|
+
background-position: center center, top left;
|
680
|
+
color: transparent;
|
681
|
+
|
682
|
+
border: 1px solid black;
|
683
|
+
border-radius: 2px;
|
684
|
+
|
685
|
+
cursor: pointer;
|
686
|
+
pointer-events: auto;
|
687
|
+
}
|
688
|
+
|
689
|
+
.ace_dark .ace_fold {
|
690
|
+
}
|
691
|
+
|
692
|
+
.ace_fold:hover{
|
693
|
+
background-image:
|
694
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
695
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
696
|
+
}
|
697
|
+
|
698
|
+
.ace_tooltip {
|
699
|
+
background-color: #f5f5f5;
|
700
|
+
border: 1px solid gray;
|
701
|
+
border-radius: 1px;
|
702
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
703
|
+
color: black;
|
704
|
+
padding: 3px 4px;
|
705
|
+
position: fixed;
|
706
|
+
z-index: 999999;
|
707
|
+
box-sizing: border-box;
|
708
|
+
cursor: default;
|
709
|
+
white-space: pre-wrap;
|
710
|
+
word-wrap: break-word;
|
711
|
+
line-height: normal;
|
712
|
+
font-style: normal;
|
713
|
+
font-weight: normal;
|
714
|
+
letter-spacing: normal;
|
715
|
+
pointer-events: none;
|
716
|
+
overflow: auto;
|
717
|
+
max-width: min(33em, 66vw);
|
718
|
+
overscroll-behavior: contain;
|
719
|
+
}
|
720
|
+
.ace_tooltip pre {
|
721
|
+
white-space: pre-wrap;
|
722
|
+
}
|
723
|
+
|
724
|
+
.ace_tooltip.ace_dark {
|
725
|
+
background-color: #636363;
|
726
|
+
color: #fff;
|
727
|
+
}
|
728
|
+
|
729
|
+
.ace_tooltip:focus {
|
730
|
+
outline: 1px solid #5E9ED6;
|
731
|
+
}
|
732
|
+
|
733
|
+
.ace_icon {
|
734
|
+
display: inline-block;
|
735
|
+
width: 18px;
|
736
|
+
vertical-align: top;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon_svg {
|
740
|
+
display: inline-block;
|
741
|
+
width: 12px;
|
742
|
+
vertical-align: top;
|
743
|
+
-webkit-mask-repeat: no-repeat;
|
744
|
+
-webkit-mask-size: 12px;
|
745
|
+
-webkit-mask-position: center;
|
746
|
+
}
|
747
|
+
|
748
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
749
|
+
padding-right: 13px;
|
750
|
+
}
|
751
|
+
|
752
|
+
.ace_fold-widget {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
}
|
769
|
+
|
770
|
+
.ace_folding-enabled .ace_fold-widget {
|
771
|
+
display: inline-block;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_fold-widget.ace_end {
|
775
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_fold-widget.ace_closed {
|
779
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget:hover {
|
783
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
784
|
+
background-color: rgba(255, 255, 255, 0.2);
|
785
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
786
|
+
}
|
787
|
+
|
788
|
+
.ace_fold-widget:active {
|
789
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
790
|
+
background-color: rgba(0, 0, 0, 0.05);
|
791
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
792
|
+
}
|
793
|
+
/**
|
794
|
+
* Dark version for fold widgets
|
795
|
+
*/
|
796
|
+
.ace_dark .ace_fold-widget {
|
797
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
798
|
+
}
|
799
|
+
.ace_dark .ace_fold-widget.ace_end {
|
800
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
801
|
+
}
|
802
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
803
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
804
|
+
}
|
805
|
+
.ace_dark .ace_fold-widget:hover {
|
806
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
807
|
+
background-color: rgba(255, 255, 255, 0.1);
|
808
|
+
}
|
809
|
+
.ace_dark .ace_fold-widget:active {
|
810
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
811
|
+
}
|
812
|
+
|
813
|
+
.ace_inline_button {
|
814
|
+
border: 1px solid lightgray;
|
815
|
+
display: inline-block;
|
816
|
+
margin: -1px 8px;
|
817
|
+
padding: 0 5px;
|
818
|
+
pointer-events: auto;
|
819
|
+
cursor: pointer;
|
820
|
+
}
|
821
|
+
.ace_inline_button:hover {
|
822
|
+
border-color: gray;
|
823
|
+
background: rgba(200,200,200,0.2);
|
824
|
+
display: inline-block;
|
825
|
+
pointer-events: auto;
|
826
|
+
}
|
827
|
+
|
828
|
+
.ace_fold-widget.ace_invalid {
|
829
|
+
background-color: #FFB4B4;
|
830
|
+
border-color: #DE5555;
|
831
|
+
}
|
832
|
+
|
833
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
834
|
+
transition: opacity 0.4s ease 0.05s;
|
835
|
+
opacity: 0;
|
836
|
+
}
|
837
|
+
|
838
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
839
|
+
transition: opacity 0.05s ease 0.05s;
|
840
|
+
opacity:1;
|
841
|
+
}
|
842
|
+
|
843
|
+
.ace_underline {
|
844
|
+
text-decoration: underline;
|
845
|
+
}
|
846
|
+
|
847
|
+
.ace_bold {
|
848
|
+
font-weight: bold;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_nobold .ace_bold {
|
852
|
+
font-weight: normal;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_italic {
|
856
|
+
font-style: italic;
|
857
|
+
}
|
858
|
+
|
859
|
+
|
860
|
+
.ace_error-marker {
|
861
|
+
background-color: rgba(255, 0, 0,0.2);
|
862
|
+
position: absolute;
|
863
|
+
z-index: 9;
|
864
|
+
}
|
865
|
+
|
866
|
+
.ace_highlight-marker {
|
867
|
+
background-color: rgba(255, 255, 0,0.2);
|
868
|
+
position: absolute;
|
869
|
+
z-index: 8;
|
870
|
+
}
|
871
|
+
|
872
|
+
.ace_mobile-menu {
|
873
|
+
position: absolute;
|
874
|
+
line-height: 1.5;
|
875
|
+
border-radius: 4px;
|
876
|
+
-ms-user-select: none;
|
877
|
+
-moz-user-select: none;
|
878
|
+
-webkit-user-select: none;
|
879
|
+
user-select: none;
|
880
|
+
background: white;
|
881
|
+
box-shadow: 1px 3px 2px grey;
|
882
|
+
border: 1px solid #dcdcdc;
|
883
|
+
color: black;
|
884
|
+
}
|
885
|
+
.ace_dark > .ace_mobile-menu {
|
886
|
+
background: #333;
|
887
|
+
color: #ccc;
|
888
|
+
box-shadow: 1px 3px 2px grey;
|
889
|
+
border: 1px solid #444;
|
890
|
+
|
891
|
+
}
|
892
|
+
.ace_mobile-button {
|
893
|
+
padding: 2px;
|
894
|
+
cursor: pointer;
|
895
|
+
overflow: hidden;
|
896
|
+
}
|
897
|
+
.ace_mobile-button:hover {
|
898
|
+
background-color: #eee;
|
899
|
+
opacity:1;
|
900
|
+
}
|
901
|
+
.ace_mobile-button:active {
|
902
|
+
background-color: #ddd;
|
903
|
+
}
|
904
|
+
|
905
|
+
.ace_placeholder {
|
906
|
+
position: relative;
|
907
|
+
font-family: arial;
|
908
|
+
transform: scale(0.9);
|
909
|
+
transform-origin: left;
|
910
|
+
white-space: pre;
|
911
|
+
opacity: 0.7;
|
912
|
+
margin: 0 10px;
|
913
|
+
z-index: 1;
|
914
|
+
}
|
915
|
+
|
916
|
+
.ace_ghost_text {
|
917
|
+
opacity: 0.5;
|
918
|
+
font-style: italic;
|
919
|
+
}
|
920
|
+
|
921
|
+
.ace_ghost_text_container > div {
|
922
|
+
white-space: pre;
|
923
|
+
}
|
924
|
+
|
925
|
+
.ghost_text_line_wrapped::after {
|
926
|
+
content: "↩";
|
927
|
+
position: absolute;
|
928
|
+
}
|
929
|
+
|
930
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
931
|
+
margin: 0px 4px
|
932
|
+
}
|
933
|
+
|
934
|
+
.ace_screenreader-only {
|
935
|
+
position:absolute;
|
936
|
+
left:-10000px;
|
937
|
+
top:auto;
|
938
|
+
width:1px;
|
939
|
+
height:1px;
|
940
|
+
overflow:hidden;
|
941
|
+
}
|
942
|
+
|
943
|
+
.ace_hidden_token {
|
944
|
+
display: none;
|
945
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var m=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,h=function(){function g(s,c){this.canvas=m.createElement("canvas"),this.renderer=c,this.pixelRatio=1,this.maxHeight=c.layerConfig.maxHeight,this.lineHeight=c.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.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)"},s.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(s){var c=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var u=(s.lastRow+1)*this.lineHeight;u<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var a=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var l=this.renderer.session.$annotations;if(a.clearRect(0,0,this.canvas.width,this.canvas.height),l){var d={info:1,warning:2,error:3};l.forEach(function(H){H.priority=d[H.type]||null}),l=l.sort(o);for(var w=this.renderer.session.$foldData,b=0;b<l.length;b++){var E=l[b].row,$=this.compensateFoldRows(E,w),_=Math.round((E-$)*this.lineHeight*this.heightRatio),C=Math.round((E-$)*this.lineHeight*this.heightRatio),R=Math.round(((E-$)*this.lineHeight+this.lineHeight)*this.heightRatio),L=R-C;if(L<this.minDecorationHeight){var F=(C+R)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),R=Math.round(F+this.halfMinDecorationHeight)}a.fillStyle=c[l[b].type]||null,a.fillRect(0,_,this.canvasWidth,R-C)}}var I=this.renderer.session.selection.getCursor();if(I){var $=this.compensateFoldRows(I.row,w),_=Math.round((I.row-$)*this.lineHeight*this.heightRatio);a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,_,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(s,c){var u=0;if(c&&c.length>0)for(var a=0;a<c.length;a++)s>c[a].start.row&&s<c[a].end.row?u+=s-c[a].start.row:s>=c[a].end.row&&(u+=c[a].end.row-c[a].start.row);return u},g}();y.implement(h.prototype,x),r.Decorator=h}),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(e,r,f){var m=e("./lib/oop"),y=e("./lib/dom"),x=e("./lib/lang"),h=e("./config"),g=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,a=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,l=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,E=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),_=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;y.importCssString($,"ace_editor.css",!1);var L=function(){function F(I,H){var P=this;this.container=I||y.createElement("div"),y.addCssClass(this.container,"ace_editor"),y.HI_DPI&&y.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=y.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=y.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=y.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var O=this.$textLayer=new c(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new a(this.container,this),this.scrollBarV.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollTop(S.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollLeft(S.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(S){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",S)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._signal("renderer",this)}return F.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(),y.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(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))},F.prototype.updateLines=function(I,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:I,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(I,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var S=this.container;O||(O=S.clientHeight||S.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",O=S.clientHeight||S.scrollHeight),P||(P=S.clientWidth||S.scrollWidth);var A=this.$updateCachedSize(I,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(I,H,P,O){O-=this.$extraHeight||0;var S=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(I||A.height!=O)&&(A.height=O,S|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),P&&(I||A.width!=P)){S|=this.CHANGE_SIZE,A.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,y.setStyle(this.scrollBarH.element.style,"left",H+"px"),y.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),A.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),y.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";y.setStyle(this.scrollBarH.element.style,"right",B),y.setStyle(this.scroller.style,"right",B),y.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(S|=this.CHANGE_FULL)}return A.$dirty=!P||!O,S&&this._signal("resize",N),S},F.prototype.onGutterResize=function(I){var H=this.$showGutter?I:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,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()},F.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},F.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},F.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=y.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=y.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){y.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var O=this.layerConfig,S=P.top,A=P.left;S-=O.offset;var N=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(S<0||S>O.height-N){y.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!H)S+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else S+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,y.setStyle(I,"height",N+"px"),y.setStyle(I,"width",B+"px"),y.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(S,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,H=I.lastRow,P=this.session.documentToScreenRow(H,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(I,H,P,O){var S=this.scrollMargin;S.top=I|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},F.prototype.setMargin=function(I,H,P,O){var S=this.margin;S.top=I|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},F.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-H&&(I=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(I,H){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!H){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),y.translate(this.content,-this.scrollLeft,-P.offset);var S=P.width+2*this.$padding+"px",A=P.minHeight+"px";y.setStyle(this.content.style,"width",S),y.setStyle(this.content.style,"height",A)}if(I&this.CHANGE_H_SCROLL&&(y.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",I)},F.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,S=!O&&I>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var I=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),S=O*this.lineHeight,A=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-A-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,S-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,A+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-S+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ce=Math.ceil(K/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),ye=ue+ce,Ae,$e,Ie=this.lineHeight;ue=I.screenToDocumentRow(ue,0);var Ge=I.getFoldLine(ue);Ge&&(ue=Ge.start.row),Ae=I.documentToScreenRow(ue,0),$e=I.getRowLength(ue)*Ie,ye=Math.min(I.screenToDocumentRow(ye,0),I.getLength()-1),K=H.scrollerHeight+I.getRowLength(ye)*Ie+$e,ae=this.scrollTop-Ae*Ie;var qe=0;return(this.layerConfig.width!=A||B)&&(qe=this.CHANGE_H_SCROLL),(B||ne)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ue,firstRowScreen:Ae,lastRow:ye,lineHeight:Ie,characterWidth:this.characterWidth,minHeight:K,maxHeight:S,offset:ae,gutterOffset:Ie?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ie)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),qe},F.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,H),!0}}},F.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(I,H){this.$gutterLayer.addGutterDecoration(I,H)},F.prototype.removeGutterDecoration=function(I,H){this.$gutterLayer.removeGutterDecoration(I,H)},F.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(I,H,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(I,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),S=O.left,A=O.top,N=P&&P.top||0,B=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>A?(H&&U+N>A+this.lineHeight&&(A-=H*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(H&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=H*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;S-Z<K?(S-=Z,S<this.$padding+Z&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=Z,K+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&S-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},F.prototype.alignCursor=function(I,H){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),O=this.$size.scrollerHeight-this.lineHeight,S=P.top-O*(H||0);return this.session.setScrollTop(S),S},F.prototype.$calcSteps=function(I,H){var P=0,O=this.STEPS,S=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(P=0;P<O;++P)S.push(A(P/this.STEPS,I,H-I));return S},F.prototype.scrollToLine=function(I,H,P,O){var S=this.$cursorLayer.getPixelPosition({row:I,column:0}),A=S.top;H&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(N,O)},F.prototype.animateScrolling=function(I,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(I=S[0],I==P))return}var A=O.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=P;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},F.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(I,H){this.session.setScrollTop(H),this.session.setScrollLeft(I)},F.prototype.scrollBy=function(I,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},F.prototype.isScrollableBy=function(I,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=I+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,N=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:S}},F.prototype.screenToTextCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=I+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),S)},F.prototype.textToScreenCoordinates=function(I,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,H),S=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,I)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:P.left+S-this.scrollLeft,pageY:P.top+A-this.scrollTop}},F.prototype.visualizeFocus=function(){y.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){y.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(y.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(I){var H=this.session.selection.cursor;this.addToken(I,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),y.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(I,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(I,O);this.addToken(S[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var A=y.createElement("div");if(S.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;S.slice(1).forEach(function(ne){var ae=y.createElement("div"),ce=y.createElement("span");ce.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ce.appendChild(y.createTextNode(ne.text)),ae.appendChild(ce),A.appendChild(ae),B=ae}),N.forEach(function(ne){var ae=y.createElement("span");R(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(y.createTextNode(ne.value)),B.appendChild(ae)}),this.$ghostTextWidget={el:A,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),K=this.container,Z=K.getBoundingClientRect().height,te=S.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(I,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var S=I.split(/\r?\n/),A=[],N=0;N<S.length;N++){var B=this.session.$getDisplayTokens(S[N],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(S[N].length);for(var Z=0;Z<U.length;Z++){var te=S[N].slice(K,U[Z]);A.push({text:te,wrapped:!0}),K=U[Z]}}else A.push({text:S[N],wrapped:!1})}return A},F.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(I,H,P,O){var S=this.session;S.bgTokenizer.lines[P]=null;var A={type:H,value:I},N=S.getTokens(P);if(O==null||!N.length)N.push(A);else for(var B=0,U=0;U<N.length;U++){var K=N[U];if(B+=K.value.length,O<=B){var Z=K.value.length-(B-O),te=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:te},A,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(I,H){for(var P=this.session.getTokens(I),O=0,S=!1,A=[],N=0;N<P.length;N++){var B=P[N];if(O+=B.value.length,B.type!=="ghost_text"){if(S){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===H&&(S=!0)}}return this.updateLines(I,I),A},F.prototype.removeExtraToken=function(I,H){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},F.prototype.setTheme=function(I,H){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var O=I||this.$options.theme.initialValue;h.loadModule(["theme",O],S)}else S(I);function S(A){if(P.$themeId!=I)return H&&H();if(!A||!A.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");A.$id&&(P.$themeId=A.$id),y.importCssString(A.cssText,A.cssClass,P.container),P.theme&&y.removeCssClass(P.container,P.theme.cssClass);var N="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=A.cssClass,P.theme=A,y.addCssClass(P.container,A.cssClass),y.setCssClass(P.container,"ace_dark",A.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:A}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(I,H){y.setCssClass(this.container,I,H!==!1)},F.prototype.unsetStyle=function(I){y.removeCssClass(this.container,I)},F.prototype.setCursorStyle=function(I){y.setStyle(this.scroller.style,"cursor",I)},F.prototype.setMouseCursor=function(I){y.setStyle(this.scroller.style,"cursor",I)},F.prototype.attachToShadowRoot=function(){y.importCssString($,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(I){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,I===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new a(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=x.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-O)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,m.implement(L.prototype,E),h.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&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(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){y.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,h=e("../config");function g(a){var o="importScripts('"+y.qualifyURL(a)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new l;return d.append(o),d.getBlob("application/javascript")}}function s(a){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=g(a),l=window.URL||window.webkitURL,d=l.createObjectURL(o);return new Worker(d)}return new Worker(a)}var c=function(a){a.postMessage||(a=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=a,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(){m.implement(this,x),this.$createWorkerFromOldConfig=function(a,o,l,d,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)d=d||h.moduleUrl(o,"worker");else{var b=this.$normalizePath;d=d||b(e.toUrl("ace/worker/worker.js",null,"_"));var E={};a.forEach(function($){E[$]=b(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(d),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:l}),this.$worker},this.onMessage=function(a){var o=a.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(a){window.console&&console.error&&console.error(a)},this.$normalizePath=function(a){return y.qualifyURL(a)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(a){a.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(a,o){this.$worker.postMessage({command:a,args:o})},this.call=function(a,o,l){if(l){var d=this.callbackId++;this.callbacks[d]=l,o.push(d)}this.send(a,o)},this.emit=function(a,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:a,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener,!0)},this.changeListener=function(a){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),a.action=="insert"?this.deltaQueue.push(a.start,a.lines):this.deltaQueue.push(a.start,a.end)},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>50&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))}}).call(c.prototype);var u=function(a,o,l){var d=null,w=!1,b=Object.create(x),E=[],$=new c({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),d&&(w?setTimeout(_):_())}});$.setEmitSync=function(C){w=C};var _=function(){var C=E.shift();C.command?d[C.command].apply(d,C.args):C.event&&b._signal(C.event,C.data)};return b.postMessage=function(C){$.onMessage({data:C})},b.callback=function(C,R){this.postMessage({type:"call",id:R,data:C})},b.emit=function(C,R){this.postMessage({type:"event",name:C,data:R})},h.loadModule(["worker",o],function(C){for(d=new C[l](b);E.length;)_()}),$};r.UIWorkerClient=u,r.WorkerClient=c,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,f){var m=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),h=function(){function g(s,c,u,a,o,l){var d=this;this.length=c,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=a,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=u;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var s=this,c=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=c.createAnchor(this.$pos.row,this.$pos.column);var a=this.pos;a.$insertRight=!0,a.detach(),a.markerId=u.addMarker(new m(a.row,a.column,a.row,a.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=c.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),s.others.push(l)}),u.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,c=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=s.addMarker(new m(u.row,u.column,u.row,u.column+c.length),c.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},g.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var c=s;if(c.start.row===c.end.row&&c.start.row===this.pos.row){this.$updating=!0;var u=s.action==="insert"?c.end.column-c.start.column:c.start.column-c.end.column,a=c.start.column>=this.pos.column&&c.start.column<=this.pos.column+this.length+1,o=c.start.column-this.pos.column;if(this.updateAnchors(s),a&&(this.length+=u),a&&!this.session.$fromUndo){if(s.action==="insert")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+o};this.doc.remove(new m(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var c=this.others.length;c--;)this.others[c].onChange(s);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var s=this,c=this.session,u=function(o,l){c.removeMarker(o.markerId),o.markerId=c.addMarker(new m(o.row,o.column,o.row,o.column+s.length),l,null,!1)};u(this.pos,this.mainClass);for(var a=this.others.length;a--;)u(this.others[a],this.othersClass)}},g.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var c=this.session.selection.getCursor();c.row===this.pos.row&&c.column>=this.pos.column&&c.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},g.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},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),c=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,u=0;u<c;u++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();x.implement(h.prototype,y),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,f){var m=e("../lib/event"),y=e("../lib/useragent");function x(g,s){return g.row==s.row&&g.column==s.column}function h(g){var s=g.domEvent,c=s.altKey,u=s.shiftKey,a=s.ctrlKey,o=g.getAccelKey(),l=g.getButton();if(a&&y.isMac&&(l=s.button),g.editor.inMultiSelectMode&&l==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!a&&!c&&!o){l===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(l===0){var d=g.editor,w=d.selection,b=d.inMultiSelectMode,E=g.getDocumentPosition(),$=w.getCursor(),_=g.inSelection()||w.isEmpty()&&x(E,$),C=g.x,R=g.y,L=function(te){C=te.clientX,R=te.clientY},F=d.session,I=d.renderer.pixelToScreenCoordinates(C,R),H=I,P;if(d.$mouseHandler.$enableJumpToDef)a&&c||o&&c?P=u?"block":"add":c&&d.$blockSelectEnabled&&(P="block");else if(o&&!c){if(P="add",!b&&u)return}else c&&d.$blockSelectEnabled&&(P="block");if(P&&y.isMac&&s.ctrlKey&&d.$mouseHandler.cancelContextMenu(),P=="add"){if(!b&&_)return;if(!b){var O=w.toOrientedRange();d.addSelectionMarker(O)}var S=w.rangeList.rangeAtPoint(E);d.inVirtualSelectionMode=!0,u&&(S=null,O=w.ranges[0]||O,d.removeSelectionMarker(O)),d.once("mouseup",function(){var te=w.toOrientedRange();S&&te.isEmpty()&&x(S.cursor,te.cursor)?w.substractPoint(te.cursor):(u?w.substractPoint(O.cursor):O&&(d.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),d.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),d.inVirtualSelectionMode=!0;var A,N=[],B=function(){var te=d.renderer.pixelToScreenCoordinates(C,R),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);x(H,te)&&x(he,w.lead)||(H=te,d.selection.moveToPosition(he),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(N),N=w.rectangularRangeBlock(H,I),d.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=d.$mouseHandler.$clickSelection.clone()),N.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};b&&!o?w.toSingleRange():!b&&o&&(A=w.toOrientedRange(),d.addSelectionMarker(A)),u?I=F.documentToScreenPosition(w.lead):w.moveToPosition(E),H={row:-1,column:-1};var U=function(te){B(),clearInterval(Z),d.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),A&&(d.removeSelectionMarker(A),w.toSingleRange(A));for(var he=0;he<N.length;he++)w.addRange(N[he]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},K=B;m.capture(d.container,L,U);var Z=setInterval(function(){K()},20);return g.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,f){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(y){y.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(y){y.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(y){y.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(y){y.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(y){y.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(y){y.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(y){y.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(y){y.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(y){y.multiSelect.rangeCount>1?y.multiSelect.joinSelections():y.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(y){y.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(y){y.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(y){y.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(y){y.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(y){return y&&y.inMultiSelectMode}}];var m=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new m(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,f){var m=e("./range_list").RangeList,y=e("./range").Range,x=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,g=e("./lib/event"),s=e("./lib/lang"),c=e("./commands/multi_select_commands");r.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=e("./search").Search,a=new u;function o($,_,C){return a.$options.wrap=!0,a.$options.needle=_,a.$options.backwards=C==-1,a.find($)}var l=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,_){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var R=this.rangeList.add($);return this.$onAddRange($),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),$&&this.fromOrientedRange($)},this.substractPoint=function($){var _=this.rangeList.substractPoint($);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();$.push(_),this.rangeCount=0}for(var C=$.length;C--;){var R=this.ranges.indexOf($[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new m,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<$.length;C++){var R=$[C],L=R.start.row,F=R.end.row;if(L===F)_.push(R.clone());else{for(_.push(new y(L,R.start.column,L,this.session.getLine(L).length));++L<F;)_.push(this.getLineRange(L,!0));_.push(new y(F,0,F,R.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var $=this.rangeList.ranges,_=$[$.length-1],C=y.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,_=$[$.length-1],C=y.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var R=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(R,L);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,_,C){var R=[],L=$.column<_.column;if(L)var F=$.column,I=_.column,H=$.offsetX,P=_.offsetX;else var F=_.column,I=$.column,H=_.offsetX,P=$.offsetX;var O=$.row<_.row;if(O)var S=$.row,A=_.row;else var S=_.row,A=$.row;F<0&&(F=0),S<0&&(S=0),S==A&&(C=!0);for(var N,B=S;B<=A;B++){var U=y.fromPoints(this.session.screenToDocumentPosition(B,F,H),this.session.screenToDocumentPosition(B,I,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=L?U.start:U.end,R.push(U)}if(O&&R.reverse(),!C){for(var K=R.length-1;R[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(x.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var _=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",_),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var _=this.session.$selectionMarkers.indexOf($);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var _=this.session.$selectionMarkers,C=$.length;C--;){var R=$[C];if(R.marker){this.session.removeMarker(R.marker);var L=_.indexOf(R);L!=-1&&_.splice(L,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var _=$.command,C=$.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?R=C.forEachSelection(_,$.args):_.multiSelectAction=="forEachLine"?R=C.forEachSelection(_,$.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=_.exec(C,$.args||{})):R=_.multiSelectAction(C,$.args||{});else{var R=_.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function($,_,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,L=C==!0||C&&C.$byLines,F=this.session,I=this.selection,H=I.rangeList,P=(R?I:H).ranges,O;if(!P.length)return $.exec?$.exec(this,_||{}):$(this,_||{});var S=I._eventRegistry;I._eventRegistry={};var A=new x(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(L)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;A.fromOrientedRange(P[N]),A.index=N,this.selection=F.selection=A;var B=$.exec?$.exec(this,_||{}):$(this,_||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[N])}A.detach(),this.selection=F.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=S,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],R=0;R<_.length;R++)C.push(this.session.getTextRange(_[R]));var L=this.session.getDocument().getNewLineCharacter();$=C.join(L),$.length==(C.length-1)*L.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var R=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=_.row||this.session.$clipPositionToDocument(R.row,R.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,_,C){if(_=_||{},_.needle=$||_.needle,_.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(R)}this.$search.set(_);var L=this.$search.findAll(this.session);if(!L.length)return 0;var F=this.multiSelect;C||F.toSingleRange(L[0]);for(var I=L.length;I--;)F.addRange(L[I],!0);return R&&F.rangeList.rangeAtPoint(R.start)&&F.addRange(R,!0),L.length},this.selectMoreLines=function($,_){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,L=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(L.row+$,L.column);if(C.isEmpty())var H=F;else var I=this.session.documentToScreenPosition(R?C.end:C.start),H=this.session.screenToDocumentPosition(I.row+$,I.column);if(R){var P=y.fromPoints(F,H);P.cursor=P.start}else{var P=y.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var _=this.session,C=_.multiSelect,R=C.ranges,L=R.length;L--;){var F=R[L];if(F.isEmpty()){var I=_.getWordRange(F.start.row,F.start.column);F.start.row=I.start.row,F.start.column=I.start.column,F.end.row=I.end.row,F.end.column=I.end.column}}C.mergeOverlappingRanges();for(var H=[],L=R.length;L--;){var F=R[L];H.unshift(_.getTextRange(F))}$<0?H.unshift(H.pop()):H.push(H.shift());for(var L=R.length;L--;){var F=R[L],P=F.clone();_.replace(F,H[L]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,_,C){var R=this.session,L=R.multiSelect,F=L.toOrientedRange();if(!(F.isEmpty()&&(F=R.getWordRange(F.start.row,F.start.column),F.cursor=$==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var I=R.getTextRange(F),H=o(R,I,$);H&&(H.cursor=$==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var $=this.session,_=$.multiSelect,C=_.ranges,R=-1,L=C.filter(function(K){if(K.cursor.row==R)return!0;R=K.cursor.row});if(!C.length||L.length==C.length-1){var F=this.selection.getRange(),I=F.start.row,H=F.end.row,P=I==H;if(P){var O=this.session.getLength(),S;do S=this.session.getLine(H);while(/[=:]/.test(S)&&++H<O);do S=this.session.getLine(I);while(/[=:]/.test(S)&&--I>0);I<0&&(I=0),H>=O&&(H=O-1)}var A=this.session.removeFullLines(I,H);A=this.$reAlignText(A,P),this.session.insert({row:I,column:0},A.join(`
|
946
|
+
`)+`
|
947
|
+
`),P||(F.start.column=0,F.end.column=A[A.length-1].length),this.selection.setRange(F)}else{L.forEach(function(K){_.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,te=$.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>N&&(N=Z.column),he<B&&(B=he),he});C.forEach(function(K,Z){var te=K.cursor,he=N-te.column,ne=U[Z]-B;he>ne?$.insert(te,s.stringRepeat(" ",he-ne)):$.remove(new y(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=te.row,K.cursor=K.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,_){var C=!0,R=!0,L,F,I;return $.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?L==null?(L=N[1].length,F=N[2].length,I=N[3].length,N):(L+F+I!=N[1].length+N[2].length+N[3].length&&(R=!1),L!=N[1].length&&(C=!1),L>N[1].length&&(L=N[1].length),F<N[2].length&&(F=N[2].length),I>N[3].length&&(I=N[3].length),N):[A]}).map(_?P:C?R?O:P:S);function H(A){return s.stringRepeat(" ",A)}function P(A){return A[2]?H(L)+A[2]+H(F-A[2].length+I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?H(L+F-A[2].length)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function S(A){return A[2]?H(L)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(d.prototype);function w($,_){return $.row==_.row&&$.column==_.column}r.onSessionChange=function($){var _=$.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",h),$.commands.addCommands(c.defaultCommands),E($))}function E($){if(!$.textInput)return;var _=$.textInput.getElement(),C=!1;g.addListener(_,"keydown",function(L){var F=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);$.$blockSelectEnabled&&F?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},$),g.addListener(_,"keyup",R,$),g.addListener(_,"blur",R,$);function R(L){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=b,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function($){b(this),$?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,f){var m=e("../../range").Range,y=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,h,g){var s=x.getLine(g);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(x,h,g){return null},this.indentationBlock=function(x,h,g){var s=/\S/,c=x.getLine(h),u=c.search(s);if(u!=-1){for(var a=g||c.length,o=x.getLength(),l=h,d=h;++h<o;){var w=x.getLine(h).search(s);if(w!=-1){if(w<=u){var b=x.getTokenAt(h,0);if(!b||b.type!=="string")break}d=h}}if(d>l){var E=x.getLine(d).length;return new m(l,a,d,E)}}},this.openingBracketBlock=function(x,h,g,s,c){var u={row:g,column:s+1},a=x.$findClosingBracket(h,u,c);if(a){var o=x.foldWidgets[a.row];return o==null&&(o=x.getFoldWidget(a.row)),o=="start"&&a.row>u.row&&(a.row--,a.column=x.getLine(a.row).length),m.fromPoints(u,a)}},this.closingBracketBlock=function(x,h,g,s,c){var u={row:g,column:s},a=x.$findOpeningBracket(h,u);if(a)return a.column++,u.column--,m.fromPoints(a,u)}}).call(y.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,f){var m=e("../lib/dom"),y=e("../range").Range,x=e("../config").nls;function h(s,c,u){for(var a=0,o=s.length-1;a<=o;){var l=a+o>>1,d=u(c,s[l]);if(d>0)a=l+1;else if(d<0)o=l-1;else return l}return-(a+1)}function g(s,c,u){var a=s.getAnnotations().sort(y.comparePoints);if(a.length){var o=h(a,{row:c,column:-1},y.comparePoints);o<0&&(o=-o-1),o>=a.length?o=u>0?0:a.length-1:o===0&&u<0&&(o=a.length-1);var l=a[o];if(!(!l||!u)){if(l.row===c){do l=a[o+=u];while(l&&l.row===c);if(!l)return a.slice()}var d=[];c=l.row;do d[u<0?"unshift":"push"](l),l=a[o+=u];while(l&&l.row==c);return d.length&&d}}}r.showErrorMarker=function(s,c){var u=s.session,a=s.getCursorPosition(),o=a.row,l=u.widgetManager.getWidgetsAtRow(o).filter(function(L){return L.type=="errorMarker"})[0];l?l.destroy():o-=c;var d=g(u,o,c),w;if(d){var b=d[0];a.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,a.row=b.row,w=s.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;w={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(a.row),s.selection.moveToPosition(a);var E={row:a.row,fixedWidth:!0,coverGutter:!0,el:m.createElement("div"),type:"errorMarker"},$=E.el.appendChild(m.createElement("div")),_=E.el.appendChild(m.createElement("div"));_.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(a).left;_.style.left=C+s.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(L,F){$.appendChild(m.createTextNode(L)),F<w.displayText.length-1&&$.appendChild(m.createElement("br"))}),$.appendChild(m.createElement("div"));var R=function(L,F,I){if(F===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(E),s.off("changeSelection",E.destroy),s.off("changeSession",E.destroy),s.off("mouseup",E.destroy),s.off("change",E.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",E.destroy),s.on("changeSession",E.destroy),s.on("mouseup",E.destroy),s.on("change",E.destroy),s.session.widgetManager.addLineWidget(E),E.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},m.importCssString(`
|
948
|
+
.error_widget_wrapper {
|
949
|
+
background: inherit;
|
950
|
+
color: inherit;
|
951
|
+
border:none
|
952
|
+
}
|
953
|
+
.error_widget {
|
954
|
+
border-top: solid 2px;
|
955
|
+
border-bottom: solid 2px;
|
956
|
+
margin: 5px 0;
|
957
|
+
padding: 10px 40px;
|
958
|
+
white-space: pre-wrap;
|
959
|
+
}
|
960
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
961
|
+
border-color: #ff5a5a
|
962
|
+
}
|
963
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
964
|
+
border-color: #F1D817
|
965
|
+
}
|
966
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
967
|
+
border-color: #5a5a5a
|
968
|
+
}
|
969
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
970
|
+
border-color: #5aaa5a
|
971
|
+
}
|
972
|
+
.error_widget_arrow {
|
973
|
+
position: absolute;
|
974
|
+
border: solid 5px;
|
975
|
+
border-top-color: transparent!important;
|
976
|
+
border-right-color: transparent!important;
|
977
|
+
border-left-color: transparent!important;
|
978
|
+
top: -5px;
|
979
|
+
}
|
980
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,f){e("./loader_build")(r);var m=e("./lib/dom"),y=e("./range").Range,x=e("./editor").Editor,h=e("./edit_session").EditSession,g=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,a){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof x)return u.env.editor;var l="";if(u&&/input|textarea/i.test(u.tagName)){var d=u;l=d.value,u=m.createElement("pre"),d.parentNode.replaceChild(u,d)}else u&&(l=u.textContent,u.innerHTML="");var w=r.createEditSession(l),b=new x(new s(u),w,a),E={document:w,editor:b,onResize:b.resize.bind(b,null)};return d&&(E.textarea=d),b.on("destroy",function(){E.editor.container.env=null}),b.container.env=b.env=E,b},r.createEditSession=function(u,a){var o=new h(u,a);return o.setUndoManager(new g),o},r.Range=y,r.Editor=x,r.EditSession=h,r.UndoManager=g,r.VirtualRenderer=s;var c=r.config.version;r.version=c}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var f in e)e.hasOwnProperty(f)&&(r.ace[f]=e[f]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}(Ep)),Ep.exports}$b();var Op={exports:{}},Np;function Mb(){return Np||(Np=1,function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var h=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},c=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},a=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",b="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:b,"constant.language":E,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,a,x,h,o,g,s,c,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(L,F,I){var H=L[2]=="-"||L[2]=="~"?"indentedHeredoc":"heredoc",P=L.split(this.splitRegex);return I.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(L,F,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(L,F,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(L,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:L}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(L,F,I){return this.next="",L=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(L,F,I){return I.length&&L[0]===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};m.inherits(d,y),r.RubyHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var c=s[1].length,u=x.findMatchingBracket({row:h,column:c});if(!u||u.row==h)return 0;var a=this.$getIndent(x.getLine(u.row));x.replace(new m(h,0,h,c-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,f){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=e("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};m.inherits(g,y),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(s,c,u){var a=s.getLine(u),o=this.foldingStartMarker.test(a),l=this.foldingStopMarker.test(a);if(o&&!l){var d=a.match(this.foldingStartMarker);if(d[1]){if((d[1]=="if"||d[1]=="else"||d[1]=="while"||d[1]=="until"||d[1]=="unless")&&(d[1]=="else"&&/^\s*else\s*$/.test(a)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(a)===!1)||d[1]=="when"&&/\sthen\s/.test(a)===!0)return;if(s.getTokenAt(u,d.index+2).type==="keyword")return"start"}else if(!d[3]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"start"}if(c!="markbeginend"||!l||o&&l)return"";var d=a.match(this.foldingStopMarker);if(d[3]==="end"){if(s.getTokenAt(u,d.index+1).type==="keyword")return"end"}else if(!d[1]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,c,u){var a=s.doc.getLine(u),o=this.foldingStartMarker.exec(a);if(o)return o[1]||o[3]?this.rubyBlock(s,u,o.index+2):this.openingBracketBlock(s,"{",u,o.index);var o=this.foldingStopMarker.exec(a);if(o)return o[3]==="end"&&s.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(s,u,o.index+1):o[1]==="=end"&&s.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(s,u,o.index+1):this.closingBracketBlock(s,"}",u,o.index+o[0].length)},this.rubyBlock=function(s,c,u,a){var o=new h(s,c,u),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var d=l.value,w=s.getLine(c);switch(l.value){case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+l.value);if(!b.test(w))return;var E=this.indentKeywords[d];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var b=new RegExp("^\\s*"+l.value+"\\s*$");if(!b.test(w))return;var E=1;break;default:var E=this.indentKeywords[d]}var $=[d];if(E){var _=E===-1?s.getLine(c-1).length:s.getLine(c).length,C=c,R=[];if(R.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(E==1){if(_=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var L=!1;if(l.type==="keyword"){var F=E*this.indentKeywords[l.value];switch(w=s.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var H=o.$rowTokens[I];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var b=new RegExp("^\\s*"+l.value+"\\s*$");(!b.test(w)||d=="case")&&(F=0,L=!0);break;case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+l.value);b.test(w)||(F=0,L=!0);break;case"when":(/\sthen\s/.test(w)||d=="case")&&(F=0,L=!0)}if(F>0)$.unshift(l.value);else if(F<=0&&L===!1){if($.shift(),!$.length&&((d=="while"||d=="until"||d=="for")&&l.value!="do"||l.value=="do"&&E==-1&&F!=0||l.value!="do"))break;F===0&&$.unshift(l.value)}}}if(!l)return null;if(a)return R.push(o.getCurrentTokenRange()),R;var c=o.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var P=6;else var P=s.getLine(c).length;return new x(c,P,C-1,_)}return new x(C,_,c-1,s.getLine(c-1).length)}}}}).call(g.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../range").Range,s=e("./folding/ruby").FoldMode,c=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};m.inherits(c,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,a,o){var l=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=a.match(/^.*[\{\(\[]\s*$/),E=a.match(/^\s*(class|def|module)\s.*$/),$=a.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=a.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(b||E||$||_)&&(l+=o)}return l},this.checkOutdent=function(u,a,o){return/^\s+(end|else|rescue|ensure)$/.test(a+o)||this.$outdent.checkOutdent(a,o)},this.autoOutdent=function(u,a,o){var l=a.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(a,o);var d=this.$getIndent(l),w=a.getLine(o-1),b=this.$getIndent(w),E=a.getTabString();b.length<=d.length&&d.slice(-E.length)==E&&a.remove(new g(o,d.length-E.length,o,d.length))},this.getMatching=function(u,a,o){if(a==null){var l=u.selection.lead;o=l.column,a=l.row}var d=u.getTokenAt(a,o);if(d&&d.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,a,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})}()}(Op)),Op.exports}Mb();var Dp={exports:{}},Fp;function Ib(){return Fp||(Fp=1,function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){var h="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",c=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":g,keyword:h},"identifier"),u="[uU]?",a="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",d="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",b="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",$="(?:"+d+"|"+w+"|"+b+"|"+E+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",L="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",F="(?:(?:"+L+"|"+R+")"+_+")",I="(?:"+F+"|"+L+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:a+'"{3}',next:"rawqqstring3"},{token:"string",regex:a+'"(?=.)',next:"rawqqstring"},{token:"string",regex:a+"'{3}",next:"rawqstring3"},{token:"string",regex:a+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:c,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};m.inherits(x,y),r.PythonHighlightRules=x}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,f){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};m.inherits(x,y),(function(){this.getFoldWidgetRange=function(h,g,s){var c=h.getLine(s),u=c.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],s,u.index):u[2]?this.indentationBlock(h,s,u.index+u[2].length):this.indentationBlock(h,s)}}).call(x.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,g=e("../range").Range,s=function(){this.HighlightRules=x,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};m.inherits(s,y),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,a,o){var l=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=a.match(/^.*[\{\(\[:]\s*$/);b&&(l+=o)}return l};var c={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,a,o){if(o!==`\r
|
981
|
+
`&&o!=="\r"&&o!==`
|
982
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(a.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&c[d.value]:!1},this.autoOutdent=function(u,a,o){o+=1;var l=this.$getIndent(a.getLine(o)),d=a.getTabString();l.slice(-d.length)==d&&a.remove(new g(o,l.length-d.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})}()}(Dp)),Dp.exports}Ib();var Pp={exports:{}},Wp;function Rb(){return Wp||(Wp=1,function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};m.inherits(x,y),r.JsonHighlightRules=x}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var c=s[1].length,u=x.findMatchingBracket({row:h,column:c});if(!u||u.row==h)return 0;var a=this.$getIndent(x.getLine(u.row));x.replace(new m(h,0,h,c-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,f){var m=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};m.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,c){var u=g.getLine(c);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var a=this._getFoldWidgetBase(g,s,c);return!a&&this.startRegionRe.test(u)?"start":a},this.getFoldWidgetRange=function(g,s,c,u){var a=g.getLine(c);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(g,a,c);var o=a.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],c,l);var d=g.getCommentFoldRange(c,l+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(g,c):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=a.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],c,l):g.getCommentFoldRange(c,l,-1)}}},this.getSectionRange=function(g,s){var c=g.getLine(s),u=c.search(/\S/),a=s,o=c.length;s+=1;for(var l=s,d=g.getLength();++s<d;){c=g.getLine(s);var w=c.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(g,"all",s);if(b){if(b.start.row<=a)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}l=s}}return new y(a,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,s,c){for(var u=s.search(/\s*$/),a=g.getLength(),o=c,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++c<a;){s=g.getLine(c);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=c;if(b>o)return new y(o,u,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};m.inherits(c,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,a,o){var l=this.$getIndent(a);if(u=="start"){var d=a.match(/^.*[\{\(\[]\s*$/);d&&(l+=o)}return l},this.checkOutdent=function(u,a,o){return this.$outdent.checkOutdent(a,o)},this.autoOutdent=function(u,a,o){this.$outdent.autoOutdent(a,o)},this.createWorker=function(u){var a=new s(["ace"],"ace/mode/json_worker","JsonWorker");return a.attachToDocument(u.getDocument()),a.on("annotate",function(o){u.setAnnotations(o.data)}),a.on("terminate",function(){u.clearAnnotations()}),a},this.$id="ace/mode/json"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()}(Pp)),Pp.exports}Rb();var Bp={exports:{}},zp;function Eb(){return zp||(zp=1,function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop");e("../lib/lang");var y=e("./text_highlight_rules").TextHighlightRules,x=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",h=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",a=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var d=this.createKeywordMapper({"support.function":h,"support.constant":g,"support.type":x,"support.constant.color":s,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:a},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:d,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};m.inherits(l,y),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},x.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};m.inherits(x,y),x.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},x.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},x.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=x}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,f){function m(){var u=s.replace("\\d","\\d\\-"),a={onMatch:function(l,d,w){var b=l.charAt(1)=="/"?2:1;return b==1?(d!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):b==2&&d==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(b==1?"":"end-")+"tag-open.xml",value:l.slice(0,b)},{type:"meta.tag.tag-name.xml",value:l.substr(b)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(a);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,a,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,d,w){return d==w[0]&&w.shift(),l.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},o,y("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},a],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function y(u){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var x=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",c=function(u){var a={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(a,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",d="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",b={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(a).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),y("no_regex"),b,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),y("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[y("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,$,_){if(this.next=E=="{"?this.nextState:"",E=="{"&&_.length)_.unshift("start",$);else if(E=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&m.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};x.inherits(c,g),r.JavaScriptHighlightRules=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(h){var g="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===x&&this.normalizeRules()};(function(){this.embedTagRules=function(h,g,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(c,u,a){return a.splice(0),this.token}}],this.embedRules(h,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(y.prototype),m.inherits(x,y),r.XmlHighlightRules=x}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,g=e("./xml_highlight_rules").XmlHighlightRules,s=y.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,a){var o=s[a];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(x,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};m.inherits(c,g),r.HtmlHighlightRules=c}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,f){var m=e("../config").$modes,y=e("../lib/oop"),x=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,g=e("./html_highlight_rules").HtmlHighlightRules,s=function(u){return"(?:[^"+x.escapeRegExp(u)+"\\\\]|\\\\.)*"},c=function(){g.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,d,w){var b=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(b[3])[0];return m[E]||(E=""),d.unshift("githubblock",[],[b[1],b[2],E],l),this.token},next:"githubblock"},a=[{token:"support.function",regex:".*",onMatch:function(o,l,d,w){var b=d[1],E=d[2][0],$=d[2][1],_=d[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return d.splice(0,3),this.next=d.shift(),this.token;if(this.next="",_&&m[_]){var R=m[_].getTokenizer().getLineTokens(o,b.slice(0));return d[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:a}),this.normalizeRules()};y.inherits(c,h),r.MarkdownHighlightRules=c}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,f){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=r.FoldMode=function(){};m.inherits(h,y),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,s,c){var u=g.getLine(c);return this.foldingStartMarker.test(u)?u[0]=="`"&&g.bgTokenizer.getState(c)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,s,c){function u(L){return E=g.getTokens(L)[0],E&&E.type.lastIndexOf($,0)===0}function a(){var L=E.value[0];return L=="="?6:L=="-"?5:7-E.value.search(/[^#]|$/)}var o=g.getLine(c),l=o.length,d=g.getLength(),w=c,b=c;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(c)!=="start"){for(;++c<d&&(o=g.getLine(c),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(w,l,c,0)}for(;c-- >0&&(o=g.getLine(c),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(c,o.length,w,0)}var E,$="markup.heading";if(u(c)){for(var _=a();++c<d;)if(u(c)){var C=a();if(C>=_)break}if(b=c-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),b>w)for(;b>w&&/^\s*$/.test(g.getLine(b));)b--;if(b>w){var R=g.getLine(b).length;return new x(w,l,b,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var c=s[1].length,u=x.findMatchingBracket({row:h,column:c});if(!u||u.row==h)return 0;var a=this.$getIndent(x.getLine(u.row));x.replace(new m(h,0,h,c-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,f){function m(s,c){return s&&s.type.lastIndexOf(c+".xml")>-1}var y=e("../../lib/oop"),x=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(s,c,u,a,o){if(o=='"'||o=="'"){var l=o,d=a.doc.getTextRange(u.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&u.getWrapBehavioursEnabled())return{text:l+d+l,selection:!1};var w=u.getCursorPosition(),b=a.doc.getLine(w.row),E=b.substring(w.column,w.column+1),$=new h(a,w.row,w.column),_=$.getCurrentToken();if(E==l&&(m(_,"attribute-value")||m(_,"string")))return{text:"",selection:[1,1]};if(_||(_=$.stepBackward()),!_)return;for(;m(_,"tag-whitespace")||m(_,"whitespace");)_=$.stepBackward();var C=!E||E.match(/\s/);if(m(_,"attribute-equals")&&(C||E==">")||m(_,"decl-attribute-equals")&&(C||E=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,c,u,a,o){var l=a.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var d=a.doc.getLine(o.start.row),w=d.substring(o.start.column+1,o.start.column+2);if(w==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,c,u,a,o){if(o==">"){var l=u.getSelectionRange().start,d=new h(a,l.row,l.column),w=d.getCurrentToken()||d.stepBackward();if(!w||!(m(w,"tag-name")||m(w,"tag-whitespace")||m(w,"attribute-name")||m(w,"attribute-equals")||m(w,"attribute-value"))||m(w,"reference.attribute-value"))return;if(m(w,"attribute-value")){var b=d.getCurrentTokenColumn()+w.value.length;if(l.column<b)return;if(l.column==b){var E=d.stepForward();if(E&&m(E,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(a.getLine(l.row).slice(l.column)))return;for(;!m(w,"tag-name");)if(w=d.stepBackward(),w.value=="<"){w=d.stepForward();break}var $=d.getCurrentTokenRow(),_=d.getCurrentTokenColumn();if(m(d.stepBackward(),"end-tag-open"))return;var C=w.value;return $==l.row&&(C=C.substring(0,l.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,c,u,a,o){if(o==`
|
983
|
+
`){var l=u.getCursorPosition(),d=a.getLine(l.row),w=new h(a,l.row,l.column),b=w.getCurrentToken();if(m(b,"")&&b.type.indexOf("tag-close")!==-1){if(b.value=="/>")return;for(;b&&b.type.indexOf("tag-name")===-1;)b=w.stepBackward();if(!b)return;var E=b.value,$=w.getCurrentTokenRow();if(b=w.stepBackward(),!b||b.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var _=a.getTokenAt(l.row,l.column+1),d=a.getLine($),C=this.$getIndent(d),R=C+a.getTabString();return _&&_.value==="</"?{text:`
|
984
|
+
`+R+`
|
985
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
986
|
+
`+R}}}}})};y.inherits(g,x),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,f){var m=e("../../lib/oop"),y=e("../../token_iterator").TokenIterator,x=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,g=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(x),this.add("autoclosing-fragment","insertion",function(c,u,a,o,l){if(l==">"){var d=a.getSelectionRange().start,w=new y(o,d.row,d.column),b=w.getCurrentToken()||w.stepBackward();if(!b)return;if(b.value=="<")return{text:"></>",selection:[1,1]}}})};m.inherits(g,x),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,f){function m(c,u){return c&&c.type&&c.type.lastIndexOf(u+".xml")>-1}var y=e("../../lib/oop"),x=e("../../range").Range,h=e("./fold_mode").FoldMode,g=r.FoldMode=function(c,u){h.call(this),this.voidElements=c||{},this.optionalEndTags=y.mixin({},this.voidElements),u&&y.mixin(this.optionalEndTags,u)};y.inherits(g,h);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(c,u,a){var o=this._getFirstTagInLine(c,a);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(c,a,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(c,a)},this.getCommentFoldWidget=function(c,u){return/comment/.test(c.getState(u))&&/<!-/.test(c.getLine(u))?"start":""},this._getFirstTagInLine=function(c,u){for(var a=c.getTokens(u),o=new s,l=0;l<a.length;l++){var d=a[l];if(m(d,"tag-open")){if(o.end.column=o.start.column+d.value.length,o.closing=m(d,"end-tag-open"),d=a[++l],!d)return null;if(o.tagName=d.value,d.value===""){if(d=a[++l],!d)return null;o.tagName=d.value}for(o.end.column+=d.value.length,l++;l<a.length;l++)if(d=a[l],o.end.column+=d.value.length,m(d,"tag-close")){o.selfClosing=d.value=="/>";break}return o}if(m(d,"tag-close"))return o.selfClosing=d.value=="/>",o;o.start.column+=d.value.length}return null},this._findEndTagInLine=function(c,u,a,o){for(var l=c.getTokens(u),d=0,w=0;w<l.length;w++){var b=l[w];if(d+=b.value.length,!(d<o-1)&&m(b,"end-tag-open")&&(b=l[w+1],m(b,"tag-name")&&b.value===""&&(b=l[w+2]),b&&b.value==a))return!0}return!1},this.getFoldWidgetRange=function(c,u,a){var o=this._getFirstTagInLine(c,a);if(!o)return this.getCommentFoldWidget(c,a)&&c.getCommentFoldRange(a,c.getLine(a).length);var l=c.getMatchingTags({row:a,column:0});if(l)return new x(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,f){var m=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};m.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,c){var u=g.getLine(c);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var a=this._getFoldWidgetBase(g,s,c);return!a&&this.startRegionRe.test(u)?"start":a},this.getFoldWidgetRange=function(g,s,c,u){var a=g.getLine(c);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(g,a,c);var o=a.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],c,l);var d=g.getCommentFoldRange(c,l+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(g,c):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=a.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],c,l):g.getCommentFoldRange(c,l,-1)}}},this.getSectionRange=function(g,s){var c=g.getLine(s),u=c.search(/\S/),a=s,o=c.length;s+=1;for(var l=s,d=g.getLength();++s<d;){c=g.getLine(s);var w=c.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(g,"all",s);if(b){if(b.start.row<=a)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}l=s}}return new y(a,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,s,c){for(var u=s.search(/\s*$/),a=g.getLength(),o=c,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++c<a;){s=g.getLine(c);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=c;if(b>o)return new y(o,u,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,f){var m=e("../../lib/oop"),y=e("./xml").FoldMode,x=e("./cstyle").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new y};m.inherits(h,x),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,c){var u=this.getFoldWidgetBase(g,s,c);return u||this.xmlFoldMode.getFoldWidget(g,s,c)},this.getFoldWidgetRange=function(g,s,c,u){var a=this.getFoldWidgetRangeBase(g,s,c,u);return a||this.xmlFoldMode.getFoldWidgetRange(g,s,c)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new c};m.inherits(u,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(a,o,l){var d=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,a),b=w.tokens,E=w.state;if(b.length&&b[b.length-1].type=="comment")return d;if(a=="start"||a=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(d+=l)}else if(a=="doc-start"&&(E=="start"||E=="no_regex"))return"";return d},this.checkOutdent=function(a,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(a,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(a){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(a.getDocument()),o.on("annotate",function(l){a.setAnnotations(l.data)}),o.on("terminate",function(){a.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,f){var m={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},y=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var x=document.createElement("c").style;for(var h in x)if(typeof x[h]=="string"){var g=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});m.hasOwnProperty(g)||(m[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(x,h,g,s){if(this.completionsDefined||this.defineCompletions(),x==="ruleset"||h.$mode.$id=="ace/mode/scss"){var c=h.getLine(g.row).substr(0,g.column),u=/\([^)]*$/.test(c);return u&&(c=c.substr(c.lastIndexOf("(")+1)),/:[^;]+$/.test(c)?this.getPropertyValueCompletions(x,h,g,s):this.getPropertyCompletions(x,h,g,s,u)}return[]},this.getPropertyCompletions=function(x,h,g,s,c){c=c||!1;var u=Object.keys(m);return u.map(function(a){return{caption:a,snippet:a+": $0"+(c?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(x,h,g,s){var c=h.getLine(g.row).substr(0,g.column),u=(/([\w\-]+):[^:]*$/.exec(c)||{})[1];if(!u)return[];var a=[];return u in m&&typeof m[u]=="object"&&(a=Object.keys(m[u])),a.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(y.prototype),r.CssCompletions=y}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,f){var m=e("../../lib/oop");e("../behaviour").Behaviour;var y=e("./cstyle").CstyleBehaviour,x=e("../../token_iterator").TokenIterator,h=function(){this.inherit(y),this.add("colon","insertion",function(g,s,c,u,a){if(a===":"&&c.selection.isEmpty()){var o=c.getCursorPosition(),l=new x(u,o.row,o.column),d=l.getCurrentToken();if(d&&d.value.match(/\s+/)&&(d=l.stepBackward()),d&&d.type==="support.type"){var w=u.doc.getLine(o.row),b=w.substring(o.column,o.column+1);if(b===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,s,c,u,a){var o=u.doc.getTextRange(a);if(!a.isMultiLine()&&o===":"){var l=c.getCursorPosition(),d=new x(u,l.row,l.column),w=d.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=d.stepBackward()),w&&w.type==="support.type"){var b=u.doc.getLine(a.start.row),E=b.substring(a.end.column,a.end.column+1);if(E===";")return a.end.column++,a}}}),this.add("semicolon","insertion",function(g,s,c,u,a){if(a===";"&&c.selection.isEmpty()){var o=c.getCursorPosition(),l=u.doc.getLine(o.row),d=l.substring(o.column,o.column+1);if(d===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,s,c,u,a){if(a==="!"&&c.selection.isEmpty()){var o=c.getCursorPosition(),l=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};m.inherits(h,y),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new c,this.$completer=new s,this.foldingRules=new u};m.inherits(a,y),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,d){var w=this.$getIndent(l),b=this.getTokenizer().getLineTokens(l,o).tokens;if(b.length&&b[b.length-1].type=="comment")return w;var E=l.match(/^.*\{\s*$/);return E&&(w+=d),w},this.checkOutdent=function(o,l,d){return this.$outdent.checkOutdent(l,d)},this.autoOutdent=function(o,l,d){this.$outdent.autoOutdent(l,d)},this.getCompletions=function(o,l,d,w){return this.$completer.getCompletions(o,l,d,w)},this.createWorker=function(o){var l=new g(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(d){o.setAnnotations(d.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(a.prototype),r.Mode=a}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,f){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h,g){this.defaultMode=h,this.subModes=g};m.inherits(x,y),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var g in this.subModes)if(h.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(h,g,s,c){var u=this.$getMode(h);return u?u.getFoldWidget(g,s,c):""},this.getFoldWidget=function(h,g,s){return this.$tryMode(h.getState(s-1),h,g,s)||this.$tryMode(h.getState(s),h,g,s)||this.defaultMode.getFoldWidget(h,g,s)},this.getFoldWidgetRange=function(h,g,s){var c=this.$getMode(h.getState(s-1));return(!c||!c.getFoldWidget(h,g,s))&&(c=this.$getMode(h.getState(s))),(!c||!c.getFoldWidget(h,g,s))&&(c=this.defaultMode),c.getFoldWidgetRange(h,g,s)}}).call(x.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,f){var m=e("../../lib/oop"),y=e("./mixed").FoldMode,x=e("./xml").FoldMode,h=e("./cstyle").FoldMode,g=r.FoldMode=function(s,c){y.call(this,new x(s,c),{"js-":new h,"css-":new h})};m.inherits(g,y)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,f){function m(l,d){return l.type.lastIndexOf(d+".xml")>-1}function y(l,d){for(var w=new h(l,d.row,d.column),b=w.getCurrentToken();b&&!m(b,"tag-name");)b=w.stepBackward();if(b)return b.value}function x(l,d){for(var w=new h(l,d.row,d.column),b=w.getCurrentToken();b&&!m(b,"attribute-name");)b=w.stepBackward();if(b)return b.value}var h=e("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],c=g.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),o=function(){};(function(){this.getCompletions=function(l,d,w,b){var E=d.getTokenAt(w.row,w.column);if(!E)return[];if(m(E,"tag-name")||m(E,"tag-open")||m(E,"end-tag-open"))return this.getTagCompletions(l,d,w,b);if(m(E,"tag-whitespace")||m(E,"attribute-name"))return this.getAttributeCompletions(l,d,w,b);if(m(E,"attribute-value"))return this.getAttributeValueCompletions(l,d,w,b);var $=d.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(l,d,w,b):[]},this.getTagCompletions=function(l,d,w,b){return a.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,d,w,b){var E=y(d,w);if(!E)return[];var $=c;return E in u&&($=$.concat(Object.keys(u[E]))),$.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,d,w,b){var E=y(d,w),$=x(d,w);if(!E)return[];var _=[];return E in u&&$ in u[E]&&typeof u[E][$]=="object"&&(_=Object.keys(u[E][$])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,d,w,b){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./javascript").Mode,g=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,a=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(b){this.fragmentContext=b&&b.fragmentContext,this.HighlightRules=s,this.$behaviour=new c,this.$completer=new a,this.createModeDelegates({"js-":h,"css-":g}),this.foldingRules=new u(this.voidElements,y.arrayToMap(d))};m.inherits(w,x),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=y.arrayToMap(l),this.getNextLineIndent=function(b,E,$){return this.$getIndent(E)},this.checkOutdent=function(b,E,$){return!1},this.getCompletions=function(b,E,$,_){return this.$completer.getCompletions(b,E,$,_)},this.createWorker=function(b){if(this.constructor==w){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(b.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function($){b.setAnnotations($.data)}),E.on("terminate",function(){b.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",h=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var s=this.createKeywordMapper({keyword:x,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),c="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",a="(?:\\d+)",o="(?:(?:"+a+"?"+u+")|(?:"+a+"\\.))",l="(?:(?:"+o+"|"+a+"))",d="(?:"+l+"|"+o+")",w="(?:&"+a+")",b="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+b+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+b+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,R,L){var F=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return L.push(F,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,R,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:c+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};m.inherits(g,y),r.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,f){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,g=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=x,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};m.inherits(s,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,a,o){var l=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=a.match(/^.*[\{\(\[:]\s*$/);b&&(l+=o)}return l};var c={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,a,o){if(o!==`\r
|
987
|
+
`&&o!=="\r"&&o!==`
|
988
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(a.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&c[d.value]:!1},this.autoOutdent=function(u,a,o){o+=1;var l=this.$getIndent(a.getLine(o)),d=a.getTabString();l.slice(-d.length)==d&&a.remove(new h(o,l.length-d.length,o,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,f){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,g=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,c=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new g,this.foldingRules=new s};m.inherits(u,x),(function(){this.voidElements=y.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(a){var o=new c(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(a.getDocument()),o.on("error",function(l){a.setAnnotations(l.data)}),o.on("terminate",function(){a.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,f){var m=e("../lib/oop"),y=e("./behaviour/cstyle").CstyleBehaviour,x=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,g=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new g,this.$behaviour=new y({braces:!0})};m.inherits(s,x),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(c,u,a){if(c=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})}()}(Bp)),Bp.exports}Eb();var jp={exports:{}},Hp;function Lb(){return Hp||(Hp=1,function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,f){f.exports=`.ace-twilight .ace_gutter {
|
989
|
+
background: #232323;
|
990
|
+
color: #E2E2E2
|
991
|
+
}
|
992
|
+
|
993
|
+
.ace-twilight .ace_print-margin {
|
994
|
+
width: 1px;
|
995
|
+
background: #232323
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight {
|
999
|
+
background-color: #141414;
|
1000
|
+
color: #F8F8F8
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight .ace_cursor {
|
1004
|
+
color: #A7A7A7
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1008
|
+
background: rgba(221, 240, 255, 0.20)
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1012
|
+
box-shadow: 0 0 3px 0px #141414;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1016
|
+
background: rgb(102, 82, 0)
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1020
|
+
margin: -1px 0 0 -1px;
|
1021
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1025
|
+
background: rgba(255, 255, 255, 0.031)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_gutter-active-line {
|
1029
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1033
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_invisible {
|
1037
|
+
color: rgba(255, 255, 255, 0.25)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_keyword,
|
1041
|
+
.ace-twilight .ace_meta {
|
1042
|
+
color: #CDA869
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_constant,
|
1046
|
+
.ace-twilight .ace_constant.ace_character,
|
1047
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1048
|
+
.ace-twilight .ace_constant.ace_other,
|
1049
|
+
.ace-twilight .ace_heading,
|
1050
|
+
.ace-twilight .ace_markup.ace_heading,
|
1051
|
+
.ace-twilight .ace_support.ace_constant {
|
1052
|
+
color: #CF6A4C
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1056
|
+
color: #F8F8F8;
|
1057
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1061
|
+
text-decoration: underline;
|
1062
|
+
font-style: italic;
|
1063
|
+
color: #D2A8A1
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
.ace-twilight .ace_support {
|
1067
|
+
color: #9B859D
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_fold {
|
1071
|
+
background-color: #AC885B;
|
1072
|
+
border-color: #F8F8F8
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_support.ace_function {
|
1076
|
+
color: #DAD085
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_list,
|
1080
|
+
.ace-twilight .ace_markup.ace_list,
|
1081
|
+
.ace-twilight .ace_storage {
|
1082
|
+
color: #F9EE98
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1086
|
+
.ace-twilight .ace_meta.ace_tag {
|
1087
|
+
color: #AC885B
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_string {
|
1091
|
+
color: #8F9D6A
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string.ace_regexp {
|
1095
|
+
color: #E9C062
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_comment {
|
1099
|
+
font-style: italic;
|
1100
|
+
color: #5F5A60
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_variable {
|
1104
|
+
color: #7587A6
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_xml-pe {
|
1108
|
+
color: #494949
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_indent-guide {
|
1112
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide-active {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1117
|
+
}
|
1118
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,f){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var m=e("../lib/dom");m.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})}()}(jp)),jp.exports}Lb();var Up={exports:{}},Vp;function Ob(){return Vp||(Vp=1,function(n,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,f){function m(C){var R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var y=e("./lib/dom"),x=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,g=e("./lib/lang"),s=e("./range").Range,c=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,a=e("./tokenizer").Tokenizer,o=e("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,L){var F=C.session.getTextRange();return L?F.replace(/\n\r?([ \t]*\S)/g,`
|
1119
|
+
`+L+"$1"):F},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(C){var R=C.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var d=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function L(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var F={regex:"/("+L("/")+"+)/",onMatch:function(I,H,P){var O=P[0];return O.fmtString=!0,O.guard=I.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new a({start:[{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(I=O),[I]}},{regex:/}/,onMatch:function(I,H,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,H,P){var O=R(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+L("\\|")+"*\\|",onMatch:function(I,H,P){var O=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?I=O:O=="n"?I=`
|
1120
|
+
`:O=="t"?I=" ":"ulULE".indexOf(O)!=-1&&(I={changeCase:O,local:O>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,H,P){var O=P.shift();return O&&(O.flag=I.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,H,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,H,P){var O={text:I.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,H,P){var O=P[0];return O.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(I,H,P){I[1]=="+"&&(P[0].ifEnd=P[0]),I[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(R,L){return this.getTokenizer().getLineTokens(R,L).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(R,L,F){if(/^\d+$/.test(L))return(this.variables.__||{})[L]||"";if(/^[A-Z]\d+$/.test(L))return(this.variables[L[0]+"__"]||{})[L.substr(1)]||"";if(L=L.replace(/^TM_/,""),!this.variables.hasOwnProperty(L))return"";var I=this.variables[L];return typeof I=="function"&&(I=this.variables[L](R,L,F)),I??""},C.prototype.tmStrFormat=function(R,L,F){if(!L.fmt)return R;var I=L.flag||"",H=L.guard;H=new RegExp(H,I.replace(/[^gim]/g,""));var P=typeof L.fmt=="string"?this.tokenizeTmSnippet(L.fmt,"formatString"):L.fmt,O=this,S=R.replace(H,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,F),B="E",U=0;U<N.length;U++){var K=N[U];if(typeof K=="object")if(N[U]="",K.changeCase&&K.local){var Z=N[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?N[U]=Z[0].toUpperCase():N[U]=Z[0].toLowerCase(),N[U+1]=Z.substr(1))}else K.changeCase&&(B=K.changeCase);else B=="U"?N[U]=K.toUpperCase():B=="L"&&(N[U]=K.toLowerCase())}return O.variables.__=A,N.join("")});return S},C.prototype.tmFormatFunction=function(R,L,F){return L.formatFunction=="upcase"?R.toUpperCase():L.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,L){function F(B){var U=R.indexOf(B,O+1);U!=-1&&(O=U)}for(var I=[],H="",P=!0,O=0;O<R.length;O++){var S=R[O];if(typeof S=="string"){I.push(S),S==`
|
1121
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec(S)[0],P=/\S/.test(S));continue}if(S){if(P=!1,S.fmtString){var A=R.indexOf(S,O+1);A==-1&&(A=R.length),S.fmt=R.slice(O+1,A),O=A}if(S.text){var N=this.getVariableValue(L,S.text,H)+"";S.fmtString&&(N=this.tmStrFormat(N,S,L)),S.formatFunction&&(N=this.tmFormatFunction(N,S,L)),N&&!S.ifEnd?(I.push(N),F(S)):!N&&S.ifEnd&&F(S.ifEnd)}else S.elseEnd?F(S.elseEnd):(S.tabstopId!=null||S.changeCase!=null)&&I.push(S)}}return I},C.prototype.getDisplayTextForSnippet=function(R,L){var F=w.call(this,R,L);return F.text},C.prototype.insertSnippetForSelection=function(R,L,F){F===void 0&&(F={});var I=w.call(this,R,L,F),H=R.getSelectionRange(),P=R.session.replace(H,I.text),O=new b(R),S=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(I.tabstops,H.start,P,S)},C.prototype.insertSnippet=function(R,L,F){F===void 0&&(F={});var I=this;if(R.inVirtualSelectionMode)return I.insertSnippetForSelection(R,L,F);R.forEachSelection(function(){I.insertSnippetForSelection(R,L,F)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var L=R.session.$mode.$id||"";if(L=L.split("/").pop(),L==="html"||L==="php"){L==="php"&&!R.session.$mode.inlinePhp&&(L="html");var F=R.getCursorPosition(),I=R.session.getState(F.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?L="javascript":I.substring(0,4)=="css-"?L="css":I.substring(0,4)=="php-"&&(L="php"))}return L},C.prototype.getActiveScopes=function(R){var L=this.$getScope(R),F=[L],I=this.snippetMap;return I[L]&&I[L].includeScopes&&F.push.apply(F,I[L].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(R,L){var F=this,I=R.forEachSelection(function(){return F.expandSnippetForSelection(R,L)},null,{keepOrder:!0});return I&&R.tabstopManager&&R.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(R,L){var F=R.getCursorPosition(),I=R.session.getLine(F.row),H=I.substring(0,F.column),P=I.substr(F.column),O=this.snippetMap,S;return this.getActiveScopes(R).some(function(A){var N=O[A];return N&&(S=this.findMatchingSnippet(N,H,P)),!!S},this),S?(L&&L.dryRun||(R.session.doc.removeInLine(F.row,F.column-S.replaceBefore.length,F.column+S.replaceAfter.length),this.variables.M__=S.matchBefore,this.variables.T__=S.matchAfter,this.insertSnippetForSelection(R,S.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,L,F){for(var I=R.length;I--;){var H=R[I];if(!(H.startRe&&!H.startRe.test(L))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(L):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(L)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(R,L){function F(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function I(A,N,B){return A=F(A),N=F(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function H(A){A.scope||(A.scope=L||"_"),L=A.scope,P[L]||(P[L]=[],O[L]={});var N=O[L];if(A.name){var B=N[A.name];B&&S.unregister(B),N[A.name]=A}P[L].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
1122
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=g.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=I(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=I(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,S=this;R||(R=[]),Array.isArray(R)?R.forEach(H):Object.keys(R).forEach(function(A){H(R[A])}),this._signal("registerSnippets",{scope:L})},C.prototype.unregister=function(R,L){function F(P){var O=H[P.scope||L];if(O&&O[P.name]){delete O[P.name];var S=I[P.scope||L],A=S&&S.indexOf(P);A>=0&&S.splice(A,1)}}var I=this.snippetMap,H=this.snippetNameMap;R.content?F(R):Array.isArray(R)&&R.forEach(F)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var L=[],F={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=I.exec(R);){if(H[1])try{F=JSON.parse(H[1]),L.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),L.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=S.exec(O)[1],F.trigger=S.exec(O)[1],F.endTrigger=S.exec(O)[1],F.endGuard=S.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return L},C.prototype.getSnippetByName=function(R,L){var F=this.snippetNameMap,I;return this.getActiveScopes(L).some(function(H){var P=F[H];return P&&(I=P[R]),!!I},this),I},C}();x.implement(d.prototype,h);var w=function(C,R,L){function F(ue){for(var ye=[],Ae=0;Ae<ue.length;Ae++){var $e=ue[Ae];if(typeof $e=="object"){if(N[$e.tabstopId])continue;var Ie=ue.lastIndexOf($e,Ae-1);$e=ye[Ie]||{tabstopId:$e.tabstopId}}ye[Ae]=$e}return ye}L===void 0&&(L={});var I=C.getCursorPosition(),H=C.session.getLine(I.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];I.column<O.length&&(O=O.slice(0,I.column)),R=R.replace(/\r/g,"");var S=this.tokenizeTmSnippet(R);S=this.resolveVariables(S,C),S=S.map(function(ue){return ue==`
|
1123
|
+
`&&!L.excludeExtraIndent?ue+O:typeof ue=="string"?ue.replace(/\t/g,P):ue});var A=[];S.forEach(function(ue,ye){if(typeof ue=="object"){var Ae=ue.tabstopId,$e=A[Ae];if($e||($e=A[Ae]=[],$e.index=Ae,$e.value="",$e.parents={}),$e.indexOf(ue)===-1){ue.choices&&!$e.choices&&($e.choices=ue.choices),$e.push(ue);var Ie=S.indexOf(ue,ye+1);if(Ie!==-1){var Ge=S.slice(ye+1,Ie),qe=Ge.some(function(ut){return typeof ut=="object"});qe&&!$e.value?$e.value=Ge:Ge.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ge.join(""))}}}}),A.forEach(function(ue){ue.length=0});for(var N={},B=0;B<S.length;B++){var U=S[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],te=S.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(ue){Z.parents[ue]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),S.splice.apply(S,[B+1,Math.max(0,te-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ce="";return S.forEach(function(ue){if(typeof ue=="string"){var ye=ue.split(`
|
1124
|
+
`);ye.length>1?(ae=ye[ye.length-1].length,ne+=ye.length-1):ae+=ue.length,ce+=ue}else ue&&(ue.start?ue.end={row:ne,column:ae}:ue.start={row:ne,column:ae})}),{text:ce,tabstops:A,tokens:S}},b=function(){function C(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return C.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.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)},C.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},C.prototype.onChange=function(R){for(var L=R.action[0]=="r",F=this.selectedTabstop||{},I=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],S=O==F||I[O.index];if(O.rangeList.$bias=S?0:1,R.action=="remove"&&O!==F){var A=O.parents&&O.parents[F.index],N=O.rangeList.pointIndex(R.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(R.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&L&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var L=this.session,F=L.getTextRange(R.firstNonLinked),I=0;I<R.length;I++){var H=R[I];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);L.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,L=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var H=this.ranges[I].contains(R.row,R.column),P=F||this.ranges[I].contains(L.row,L.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var L=this.tabstops.length,F=this.index+(R||1);F=Math.min(Math.max(F,1),L),F==L&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var L=this.tabstops[this.index];if(L&&this.addTabstopMarkers(L),this.index=R,L=this.tabstops[this.index],!(!L||!L.length)){this.selectedTabstop=L;var F=L.firstNonLinked||L;if(L.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var I=this.editor.multiSelect;I.toSingleRange(F);for(var H=0;H<L.length;H++)L.hasLinkedRanges&&L[H].linked||I.addRange(L[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(R,L,F){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var H=s.fromPoints(F,F);$(H.start,L),$(H.end,L),R[0]=[H],R[0].index=0}var P=this.index,O=[P+1,0],S=this.ranges,A=this.snippetId=(this.snippetId||0)+1;R.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var K=0;K<N.length;K++){var Z=N[K],te=s.fromPoints(Z.start,Z.end||Z.start);E(te.start,L),E(te.end,L),te.original=Z,te.tabstop=U,S.push(te),U!=N?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new c,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){F.markerId||(F.markerId=L.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){L.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(L){L.snippetId===R?this.addTabstopMarkers(L):this.removeTabstopMarkers(L)},this)}},C.prototype.removeRange=function(R){var L=R.tabstop.indexOf(R);L!=-1&&R.tabstop.splice(L,1),L=this.ranges.indexOf(R),L!=-1&&this.ranges.splice(L,1),L=R.tabstop.rangeList.ranges.indexOf(R),L!=-1&&R.tabstop.splice(L,1),this.session.removeMarker(R.markerId),R.tabstop.length||(L=this.tabstops.indexOf(R.tabstop),L!=-1&&this.tabstops.splice(L,1),this.tabstops.length||this.detach())},C}();b.prototype.keyboardHandler=new u,b.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},$=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};y.importCssString(`
|
1125
|
+
.ace_snippet-marker {
|
1126
|
+
-moz-box-sizing: border-box;
|
1127
|
+
box-sizing: border-box;
|
1128
|
+
background: rgba(194, 193, 208, 0.09);
|
1129
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1130
|
+
position: absolute;
|
1131
|
+
}`,"snippets.css",!1),r.snippetManager=new d;var _=e("./editor").Editor;(function(){this.insertSnippet=function(C,R){return r.snippetManager.insertSnippet(this,C,R)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,f){var m=e("../virtual_renderer").VirtualRenderer,y=e("../editor").Editor,x=e("../range").Range,h=e("../lib/event"),g=e("../lib/lang"),s=e("../lib/dom"),c=e("../config").nls,u=e("./../lib/useragent"),a=function(E){return"suggest-aria-id:".concat(E)},o=u.isSafari?"menu":"listbox",l=u.isSafari?"menuitem":"option",d=u.isSafari?"aria-current":"aria-selected",w=function(E){var $=new m(E);$.$maxLines=4;var _=new y($);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},b=function(){function E($){var _=s.createElement("div"),C=w(_);$&&$.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(S){var A=S.getDocumentPosition();C.selection.moveToPosition(A),I.start.row=I.end.row=A.row,S.stop()});var L,F=new x(-1,0,-1,1/0),I=new x(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(S){S?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(S){if(!L){L=S;return}if(!(L.x==S.x&&L.y==S.y)){L=S,L.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=L.getDocumentPosition().row;F.start.row!=A&&(F.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(L&&F.start.row!=-1){L.$pos=null;var S=L.getDocumentPosition().row;F.id||C.setRow(S),P(S,!0)}}),C.renderer.on("afterRender",function(){for(var S=C.renderer.$textLayer,A=S.config.firstRow,N=S.config.lastRow;A<=N;A++){var B=S.element.childNodes[A-S.config.firstRow];B.setAttribute("role",l),B.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",K)}var Z=B.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var S=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[S-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(d),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=a(S);s.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(d,"true")}});var H=function(){P(-1)},P=function(S,A){S!==F.start.row&&(F.start.row=F.end.row=S,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,H()}),C.on("hide",H),C.on("changeSelection",H),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(S){var A=C.data[S];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(S){function A(ue,ye){ue&&B.push({type:(N.className||"")+(ye||""),value:ue})}var N=C.data[S],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ce=K.indexOf(ae,te);if(ce==-1)continue;A(U.slice(te,ce),""),te=ce+ae.length,A(U.slice(ce,te),"completion-highlight")}return A(U.slice(te,U.length),""),B.push({type:"completion-spacer",value:" "}),N.meta&&B.push({type:"completion-meta",value:N.meta}),N.message&&B.push({type:"completion-message",value:N.message}),B},O.$updateOnChange=R,O.start=R,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(S,A){C.filterText=A||"",C.setValue(g.stringRepeat(`
|
1132
|
+
`,S.length),-1),C.data=S||[],C.setRow(0)},C.getData=function(S){return C.data[S]},C.getRow=function(){return I.start.row},C.setRow=function(S){S=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,S)),I.start.row!=S&&(C.selection.clearSelection(),I.start.row=I.end.row=S||0,C.session._emit("changeBackMarker"),C.moveCursorTo(S||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(S,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===S.top&&C.anchorPos.left===S.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,ae={top:0,bottom:0},ce=Z-S.top-3*this.$borderSize-A,ue=S.top-3*this.$borderSize;N||(ue<=ce||ce>=ne?N="bottom":N="top"),N==="top"?(ae.bottom=S.top-this.$borderSize,ae.top=ae.bottom-ne):N==="bottom"&&(ae.top=S.top+A+this.$borderSize,ae.bottom=ae.top+ne);var ye=ae.top>=0&&ae.bottom<=Z;if(!B&&!ye)return!1;ye?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ue:he.$maxPixelHeight=ce,N==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var Ae=S.left;return Ae+U.offsetWidth>te&&(Ae=te-U.offsetWidth),U.style.left=Ae+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),L=null),C.anchorPos=S,C.anchor=N,!0},C.show=function(S,A,N){this.tryShow(S,A,N?"bottom":void 0,!0)},C.goTo=function(S){var A=this.getRow(),N=this.session.getLength()-1;switch(S){case"up":A=A<=0?N:A-1;break;case"down":A=A>=N?-1:A+1;break;case"start":A=0;break;case"end":A=N}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E}();s.importCssString(`
|
1133
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1134
|
+
background-color: #CAD6FA;
|
1135
|
+
z-index: 1;
|
1136
|
+
}
|
1137
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1138
|
+
background-color: #3a674e;
|
1139
|
+
}
|
1140
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1141
|
+
border: 1px solid #abbffe;
|
1142
|
+
margin-top: -1px;
|
1143
|
+
background: rgba(233,233,253,0.4);
|
1144
|
+
position: absolute;
|
1145
|
+
z-index: 2;
|
1146
|
+
}
|
1147
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1148
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1149
|
+
background: rgba(58, 103, 78, 0.62);
|
1150
|
+
}
|
1151
|
+
.ace_completion-meta {
|
1152
|
+
opacity: 0.5;
|
1153
|
+
margin-left: 0.9em;
|
1154
|
+
}
|
1155
|
+
.ace_completion-message {
|
1156
|
+
margin-left: 0.9em;
|
1157
|
+
color: blue;
|
1158
|
+
}
|
1159
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1160
|
+
color: #2d69c7;
|
1161
|
+
}
|
1162
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1163
|
+
color: #93ca12;
|
1164
|
+
}
|
1165
|
+
.ace_editor.ace_autocomplete {
|
1166
|
+
width: 300px;
|
1167
|
+
z-index: 200000;
|
1168
|
+
border: 1px lightgray solid;
|
1169
|
+
position: fixed;
|
1170
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1171
|
+
line-height: 1.4;
|
1172
|
+
background: #fefefe;
|
1173
|
+
color: #111;
|
1174
|
+
}
|
1175
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1176
|
+
border: 1px #484747 solid;
|
1177
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1178
|
+
line-height: 1.4;
|
1179
|
+
background: #25282c;
|
1180
|
+
color: #c1c1c1;
|
1181
|
+
}
|
1182
|
+
.ace_autocomplete .ace_text-layer {
|
1183
|
+
width: calc(100% - 8px);
|
1184
|
+
}
|
1185
|
+
.ace_autocomplete .ace_line {
|
1186
|
+
display: flex;
|
1187
|
+
align-items: center;
|
1188
|
+
}
|
1189
|
+
.ace_autocomplete .ace_line > * {
|
1190
|
+
min-width: 0;
|
1191
|
+
flex: 0 0 auto;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_line .ace_ {
|
1194
|
+
flex: 0 1 auto;
|
1195
|
+
overflow: hidden;
|
1196
|
+
text-overflow: ellipsis;
|
1197
|
+
}
|
1198
|
+
.ace_autocomplete .ace_completion-spacer {
|
1199
|
+
flex: 1;
|
1200
|
+
}
|
1201
|
+
.ace_autocomplete.ace_loading:after {
|
1202
|
+
content: "";
|
1203
|
+
position: absolute;
|
1204
|
+
top: 0px;
|
1205
|
+
height: 2px;
|
1206
|
+
width: 8%;
|
1207
|
+
background: blue;
|
1208
|
+
z-index: 100;
|
1209
|
+
animation: ace_progress 3s infinite linear;
|
1210
|
+
animation-delay: 300ms;
|
1211
|
+
transform: translateX(-100%) scaleX(1);
|
1212
|
+
}
|
1213
|
+
@keyframes ace_progress {
|
1214
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1215
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1216
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1217
|
+
}
|
1218
|
+
@media (prefers-reduced-motion) {
|
1219
|
+
.ace_autocomplete.ace_loading:after {
|
1220
|
+
transform: translateX(625%) scaleX(2);
|
1221
|
+
animation: none;
|
1222
|
+
}
|
1223
|
+
}
|
1224
|
+
`,"autocompletion.css",!1),r.AcePopup=b,r.$singleLineEditor=w,r.getAriaId=a}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,f){var m=function(){function y(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return y.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),s=this.popup.renderer.$textLayer,c=s.element.childNodes[g-s.config.firstRow];if(c){for(var u="doc-tooltip ",a=0;a<this._lines.length;a++)u+="ace-inline-screenreader-line-".concat(a," ");c.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},y.prototype.destroy=function(){this.screenReaderDiv.remove()},y.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);g.appendChild(s),x.appendChild(g)}return x},y}();r.AceInlineScreenReader=m}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,f){var m=e("../snippets").snippetManager,y=e("./inline_screenreader").AceInlineScreenReader,x=function(){function h(){this.editor=null}return h.prototype.show=function(g,s,c){if(c=c||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new y(g));var u=s.snippet?m.getDisplayTextForSnippet(g,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(c)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(c.length),u===""?g.removeGhostText():g.setGhostText(u),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h}();r.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,f){r.parForEach=function(y,x,h){var g=0,s=y.length;s===0&&h();for(var c=0;c<s;c++)x(y[c],function(u,a){g++,g===s&&h(u,a)})};var m=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(y,x,h){h=h||m;for(var g=[],s=x-1;s>=0&&h.test(y[s]);s--)g.push(y[s]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(y,x,h){h=h||m;for(var g=[],s=x;s<y.length&&h.test(y[s]);s++)g.push(y[s]);return g},r.getCompletionPrefix=function(y){var x=y.getCursorPosition(),h=y.session.getLine(x.row),g;return y.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(c){!g&&c&&(g=this.retrievePrecedingIdentifier(h,x.column,c))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(h,x.column)},r.triggerAutocomplete=function(y,h){var h=h??y.session.getPrecedingCharacter();return y.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(h)})}}),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(e,r,f){var m=e("./keyboard/hash_handler").HashHandler,y=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,g=e("./autocomplete/util"),s=e("./lib/lang"),c=e("./lib/dom"),u=e("./snippets").snippetManager,a=e("./config"),o=e("./lib/event"),l=e("./lib/scroll").preventParentScroll,d=function($,_){_.completer&&_.completer.destroy()},w=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new m,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=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new E($.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:a.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new y(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.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)),o.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},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},$.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),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)},$.prototype.$updateGhostText=function(_){var C=this.base.row,R=this.base.column,L=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(R,L);this.inlineRenderer.show(this.editor,_,F)?this.$seen(_):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!_||R.hideInlinePreview)&&this.$seen(R)}},$.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,R=C.layerConfig.lineHeight,L=C.$cursorLayer.getPixelPosition(this.base,!0);L.left-=this.popup.getTextLeftOffset();var F=_.container.getBoundingClientRect();L.top+=F.top-C.layerConfig.offset,L.left+=F.left-_.renderer.scrollLeft,L.left+=C.gutterWidth;var I={top:L.top,left:L.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var H=_.container.getBoundingClientRect().bottom-R,P=H<I.top?{top:H,left:I.left}:I;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(L,R,"top")||this.popup.show(L,R)},$.prototype.openPopup=function(_,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var L=this.popup.getRow(),F=this.popup.data[L];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(F)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===L&&F!==this.completions.filtered[I]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(I===L&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.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()},$.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(_){var C=document.activeElement,R=this.editor.textInput.getElement(),L=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),F=this.popup&&this.popup.container;C!=R&&C.parentNode!=F&&!L&&C!=this.tooltipNode&&_.relatedTarget!=R&&this.detach()},$.prototype.mousedownListener=function(_){this.detach()},$.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(_){this.popup.goTo(_)},$.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var R=this.completions,L=this.getCompletionProvider().insertMatch(this.editor,_,R.filterText,C);return this.completions==R&&this.detach(),L},$.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new b(_)),this.completionProvider},$.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},$.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var L=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:L});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,_);return}if(C&&C.matches){var L=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(L.row,L.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var R=this.editor.getSession(),L=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(L.row,L.column-F.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:L}).provideCompletions(this.editor,I,(function(H,P,O){var S=P.filtered,A=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!S.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(S.length==1&&S[0].value==A&&!S[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&S.length==1)return this.insertMatch(S[0])}this.completions=!O&&this.showLoadingState?new E($.completionsForLoading.concat(S),P.filterText):P,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[_.getHoveredRow()]||C[_.getRow()]),L=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,I=0;I<F;I++){var H=this.editor.completers[I];if(H.getDocTooltip&&R.completerId===H.id){L=H.getDocTooltip(R);break}}if(!L&&typeof R!="string"&&(L=R),typeof L=="string"&&(L={docText:L}),!L||!L.docHTML&&!L.docText)return this.hideDocTooltip();this.showDocTooltip(L)},$.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=c.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",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;_.docHTML?R.innerHTML=_.docHTML:_.docText&&(R.textContent=_.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var L=this.popup,F=L.container.getBoundingClientRect(),I=400,H=300,P=L.renderer.scrollBar.width||10,O=F.left,S=window.innerWidth-F.right-P,A=L.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min(S/I,1),Math.min(O/I,1),Math.min(A/H*.9)],B=Math.max.apply(Math,N),U=R.style;U.display="block",B==N[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",L.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=L.container.offsetTop-R.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(L.container.offsetTop,H)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},$.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",d),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(_){return _.completer instanceof $||(_.completer&&(_.completer.destroy(),_.completer=null),a.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),_.completer=$.$sharedInstance):(_.completer=new $,_.once("destroy",d))),_.completer},$}();w.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var _=$.completer.insertMatch();if(_||$.tabstopManager)return _;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var _=g.getCompletionPrefix($);!_&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,_){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function $(_){this.initialPosition=_,this.active=!0}return $.prototype.insertByIndex=function(_,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],R)},$.prototype.insertMatch=function(_,C,R){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var L=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(L-=this.initialPosition.prefix.length,L+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),L||F){var I;_.selection.getAllRanges?I=_.selection.getAllRanges():I=[_.getSelectionRange()];for(var H=0,P;P=I[H];H++)P.start.column-=L,P.end.column+=F,_.session.remove(P)}C.snippet?u.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},$.prototype.$insertString=function(_,C){var R=C.value||C;_.execCommand("insertstring",R)},$.prototype.gatherCompletions=function(_,C){var R=_.getSession(),L=_.getCursorPosition(),F=g.getCompletionPrefix(_),I=[];this.completers=_.completers;var H=_.completers.length;return _.completers.forEach(function(P,O){P.getCompletions(_,R,L,F,function(S,A){P.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!S&&A&&(I=I.concat(A)),C(null,{prefix:g.getCompletionPrefix(_),matches:I,finished:--H===0})})}),!0},$.prototype.provideCompletions=function(_,C,R){var L=(function(P){var O=P.prefix,S=P.matches;this.completions=new E(S),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),F=!0,I=null;if(this.gatherCompletions(_,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var S=O.prefix;if(S.indexOf(O.prefix)===0){if(F){I=O;return}L(O)}}}).bind(this)),F=!1,I){var H=I;I=null,L(H)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},$}(),E=function(){function $(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(L,F){return F.exactMatch-L.exactMatch||F.$score-L.$score||(L.caption||L.value).localeCompare(F.caption||F.value)});var R=null;C=C.filter(function(L){var F=L.snippet||L.caption||L.value;return F===R?!1:(R=F,!0)}),this.filtered=C},$.prototype.filterCompletions=function(_,C){var R=[],L=C.toUpperCase(),F=C.toLowerCase();e:for(var I=0,H;H=_[I];I++){if(H.skipFilter){H.$score=H.score,R.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,S=0,A=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(L[K],O+1);if(N=Z>=0&&(te<0||Z<te)?Z:te,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,S|=1<<K),O=N}}H.matchMask=S,H.exactMatch=A?0:1,H.$score=(H.score||0)-A,R.push(H)}}return R},$}();r.Autocomplete=w,r.CompletionProvider=b,r.FilteredList=E}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,f){function m(g,s){var c=g.getTextRange(x.fromPoints({row:0,column:0},s));return c.split(h).length-1}function y(g,s){var c=m(g,s),u=g.getValue().split(h),a=Object.create(null),o=u[c];return u.forEach(function(l,d){if(!(!l||l===o)){var w=Math.abs(c-d),b=u.length-w;a[l]?a[l]=Math.max(b,a[l]):a[l]=b}}),a}var x=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,s,c,u,a){var o=y(s,c),l=Object.keys(o);a(null,l.map(function(d){return{caption:d,value:d,score:o[d],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(e,r,f){var m=e("../snippets").snippetManager,y=e("../autocomplete").Autocomplete,x=e("../config"),h=e("../lib/lang"),g=e("../autocomplete/util"),s=e("../autocomplete/text_completer"),c={getCompletions:function(L,F,I,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(L,F,I,H,P);var O=L.session.getState(I.row),S=F.$mode.getCompletions(O,F,I,H);S=S.map(function(A){return A.completerId=c.id,A}),P(null,S)},id:"keywordCompleter"},u=function(L){var F={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(I,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(I,H){return F[H]})},a={getCompletions:function(L,F,I,H,P){var O=[],S=F.getTokenAt(I.row,I.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=m.getActiveScopes(L);var A=m.snippetMap,N=[];O.forEach(function(B){for(var U=A[B]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&N.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:a.id})}},this),P(null,N)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(u(L.snippet))].join(""))},id:"snippetCompleter"},o=[a,s,c];r.setCompleters=function(L){o.length=0,L&&o.push.apply(o,L)},r.addCompleter=function(L){o.push(L)},r.textCompleter=s,r.keyWordCompleter=c,r.snippetCompleter=a;var l={name:"expandSnippet",exec:function(L){return m.expandWithTab(L)},bindKey:"Tab"},d=function(L,F){w(F.session.$mode)},w=function(L){typeof L=="string"&&(L=x.$modes[L]),L&&(m.files||(m.files={}),b(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(w))},b=function(L,F){!F||!L||m.files[L]||(m.files[L]={},x.loadModule(F,function(I){I&&(m.files[L]=I,!I.snippets&&I.snippetText&&(I.snippets=m.parseSnippetFile(I.snippetText)),m.register(I.snippets||[],I.scope),I.includeScopes&&(m.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},E=function(L){var F=L.editor,I=F.completer&&F.completer.activated;if(L.command.name==="backspace")I&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(L.command.name==="insertstring"&&!I){$=L;var H=L.editor.$liveAutocompletionDelay;H?_.delay(H):C(L)}},$,_=h.delayedCall(function(){C($)},0),C=function(L){var F=L.editor,I=g.getCompletionPrefix(F),H=L.args,P=g.triggerAutocomplete(F,H);if(I&&I.length>=F.$liveAutocompletionThreshold||P){var O=y.for(F);O.autoShown=!0,O.showPopup(F)}},R=e("../editor").Editor;e("../config").defineOptions(R.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:o),this.commands.addCommand(y.startCommand)):this.commands.removeCommand(y.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:o),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(l),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(l),this.off("changeMode",d))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()}(Up)),Up.exports}Ob();var qp={exports:{}},Kp;function Nb(){return Kp||(Kp=1,function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,f){f.exports=`
|
1225
|
+
|
1226
|
+
/* ------------------------------------------------------------------------------------------
|
1227
|
+
* Editor Search Form
|
1228
|
+
* --------------------------------------------------------------------------------------- */
|
1229
|
+
.ace_search {
|
1230
|
+
background-color: #ddd;
|
1231
|
+
color: #666;
|
1232
|
+
border: 1px solid #cbcbcb;
|
1233
|
+
border-top: 0 none;
|
1234
|
+
overflow: hidden;
|
1235
|
+
margin: 0;
|
1236
|
+
padding: 4px 6px 0 4px;
|
1237
|
+
position: absolute;
|
1238
|
+
top: 0;
|
1239
|
+
z-index: 99;
|
1240
|
+
white-space: normal;
|
1241
|
+
}
|
1242
|
+
.ace_search.left {
|
1243
|
+
border-left: 0 none;
|
1244
|
+
border-radius: 0px 0px 5px 0px;
|
1245
|
+
left: 0;
|
1246
|
+
}
|
1247
|
+
.ace_search.right {
|
1248
|
+
border-radius: 0px 0px 0px 5px;
|
1249
|
+
border-right: 0 none;
|
1250
|
+
right: 0;
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
.ace_search_form, .ace_replace_form {
|
1254
|
+
margin: 0 20px 4px 0;
|
1255
|
+
overflow: hidden;
|
1256
|
+
line-height: 1.9;
|
1257
|
+
}
|
1258
|
+
.ace_replace_form {
|
1259
|
+
margin-right: 0;
|
1260
|
+
}
|
1261
|
+
.ace_search_form.ace_nomatch {
|
1262
|
+
outline: 1px solid red;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
.ace_search_field {
|
1266
|
+
border-radius: 3px 0 0 3px;
|
1267
|
+
background-color: white;
|
1268
|
+
color: black;
|
1269
|
+
border: 1px solid #cbcbcb;
|
1270
|
+
border-right: 0 none;
|
1271
|
+
outline: 0;
|
1272
|
+
padding: 0;
|
1273
|
+
font-size: inherit;
|
1274
|
+
margin: 0;
|
1275
|
+
line-height: inherit;
|
1276
|
+
padding: 0 6px;
|
1277
|
+
min-width: 17em;
|
1278
|
+
vertical-align: top;
|
1279
|
+
min-height: 1.8em;
|
1280
|
+
box-sizing: content-box;
|
1281
|
+
}
|
1282
|
+
.ace_searchbtn {
|
1283
|
+
border: 1px solid #cbcbcb;
|
1284
|
+
line-height: inherit;
|
1285
|
+
display: inline-block;
|
1286
|
+
padding: 0 6px;
|
1287
|
+
background: #fff;
|
1288
|
+
border-right: 0 none;
|
1289
|
+
border-left: 1px solid #dcdcdc;
|
1290
|
+
cursor: pointer;
|
1291
|
+
margin: 0;
|
1292
|
+
position: relative;
|
1293
|
+
color: #666;
|
1294
|
+
}
|
1295
|
+
.ace_searchbtn:last-child {
|
1296
|
+
border-radius: 0 3px 3px 0;
|
1297
|
+
border-right: 1px solid #cbcbcb;
|
1298
|
+
}
|
1299
|
+
.ace_searchbtn:disabled {
|
1300
|
+
background: none;
|
1301
|
+
cursor: default;
|
1302
|
+
}
|
1303
|
+
.ace_searchbtn:hover {
|
1304
|
+
background-color: #eef1f6;
|
1305
|
+
}
|
1306
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1307
|
+
padding: 0px 0.7em
|
1308
|
+
}
|
1309
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1310
|
+
content: "";
|
1311
|
+
border: solid 2px #888;
|
1312
|
+
width: 0.5em;
|
1313
|
+
height: 0.5em;
|
1314
|
+
border-width: 2px 0 0 2px;
|
1315
|
+
display:inline-block;
|
1316
|
+
transform: rotate(-45deg);
|
1317
|
+
}
|
1318
|
+
.ace_searchbtn.next:after {
|
1319
|
+
border-width: 0 2px 2px 0 ;
|
1320
|
+
}
|
1321
|
+
.ace_searchbtn_close {
|
1322
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1323
|
+
border-radius: 50%;
|
1324
|
+
border: 0 none;
|
1325
|
+
color: #656565;
|
1326
|
+
cursor: pointer;
|
1327
|
+
font: 16px/16px Arial;
|
1328
|
+
padding: 0;
|
1329
|
+
height: 14px;
|
1330
|
+
width: 14px;
|
1331
|
+
top: 9px;
|
1332
|
+
right: 7px;
|
1333
|
+
position: absolute;
|
1334
|
+
}
|
1335
|
+
.ace_searchbtn_close:hover {
|
1336
|
+
background-color: #656565;
|
1337
|
+
background-position: 50% 100%;
|
1338
|
+
color: white;
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
.ace_button {
|
1342
|
+
margin-left: 2px;
|
1343
|
+
cursor: pointer;
|
1344
|
+
-webkit-user-select: none;
|
1345
|
+
-moz-user-select: none;
|
1346
|
+
-o-user-select: none;
|
1347
|
+
-ms-user-select: none;
|
1348
|
+
user-select: none;
|
1349
|
+
overflow: hidden;
|
1350
|
+
opacity: 0.7;
|
1351
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1352
|
+
padding: 1px;
|
1353
|
+
box-sizing: border-box!important;
|
1354
|
+
color: black;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
.ace_button:hover {
|
1358
|
+
background-color: #eee;
|
1359
|
+
opacity:1;
|
1360
|
+
}
|
1361
|
+
.ace_button:active {
|
1362
|
+
background-color: #ddd;
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
.ace_button.checked {
|
1366
|
+
border-color: #3399ff;
|
1367
|
+
opacity:1;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
.ace_search_options{
|
1371
|
+
margin-bottom: 3px;
|
1372
|
+
text-align: right;
|
1373
|
+
-webkit-user-select: none;
|
1374
|
+
-moz-user-select: none;
|
1375
|
+
-o-user-select: none;
|
1376
|
+
-ms-user-select: none;
|
1377
|
+
user-select: none;
|
1378
|
+
clear: both;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
.ace_search_counter {
|
1382
|
+
float: left;
|
1383
|
+
font-family: arial;
|
1384
|
+
padding: 0 8px;
|
1385
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,f){var m=e("../lib/dom"),y=e("../lib/lang"),x=e("../lib/event"),h=e("./searchbox-css"),g=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),c=e("../config").nls,u=999;m.importCssString(h,"ace_searchbox",!1);var a=function(){function d(w,b,E){this.activeInput,this.element=m.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),m.importCssString(h,"ace_searchbox",w.container),x.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return d.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},d.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},d.prototype.onEditorInput=function(){this.find(!1,!1,!0)},d.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},d.prototype.$init=function(){var w=this.element;this.$initElements(w);var b=this;x.addListener(w,"mousedown",function(E){setTimeout(function(){b.activeInput.focus()},0),x.stopPropagation(E)}),x.addListener(w,"click",function(E){var $=E.target||E.srcElement,_=$.getAttribute("action");_&&b[_]?b[_]():b.$searchBarKb.commands[_]&&b.$searchBarKb.commands[_].exec(b),x.stopPropagation(E)}),x.addCommandKeyListener(w,function(E,$,_){var C=s.keyCodeToString(_),R=b.$searchBarKb.findKeyCommand($,C);R&&R.exec&&(R.exec(b),x.stopEvent(E))}),this.$onChange=y.delayedCall(function(){b.find(!1,!1)}),x.addListener(this.searchInput,"input",function(){b.$onChange.schedule(20)}),x.addListener(this.searchInput,"focus",function(){b.activeInput=b.searchInput,b.searchInput.value&&b.highlight()}),x.addListener(this.replaceInput,"focus",function(){b.activeInput=b.replaceInput,b.searchInput.value&&b.highlight()})},d.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},d.prototype.$syncOptions=function(w){m.setCssClass(this.replaceOption,"checked",this.searchRange),m.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",m.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),m.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),m.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var b=this.editor.getReadOnly();this.replaceOption.style.display=b?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!b?"":"none",this.find(!1,!1,w)},d.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(w,b,E){var $=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:b,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),_=!$&&this.searchInput.value;m.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()},d.prototype.updateCounter=function(){var w=this.editor,b=w.$search.$options.re,E=b.unicode,$=0,_=0;if(b){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
1386
|
+
`),w.session.doc.$autoNewLine=`
|
1387
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var L=b.lastIndex=0,F;(F=b.exec(C))&&($++,L=F.index,L<=R&&_++,!($>u||!F[0]&&(b.lastIndex=L+=y.skipEmptyMatch(C,L,E),L>=C.length))););}this.searchCounter.textContent=c("search-box.search-counter","$0 of $1",[_,$>u?u+"+":$])},d.prototype.findNext=function(){this.find(!0,!1)},d.prototype.findPrev=function(){this.find(!0,!0)},d.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),b=!w&&this.searchInput.value;m.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},d.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},d.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},d.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},d.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},d.prototype.show=function(w,b){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=b,this.editor.$search.$options.regExp&&(w=y.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},d.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},d}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(d){var w=d.isReplace=!d.isReplace;d.replaceBox.style.display=w?"":"none",d.replaceOption.checked=!1,d.$syncOptions(),d.searchInput.focus()},"Ctrl-H|Command-Option-F":function(d){d.editor.getReadOnly()||(d.replaceOption.checked=!0,d.$syncOptions(),d.replaceInput.focus())},"Ctrl-G|Command-G":function(d){d.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(d){d.findPrev()},esc:function(d){setTimeout(function(){d.hide()})},Return:function(d){d.activeInput==d.replaceInput&&d.replace(),d.findNext()},"Shift-Return":function(d){d.activeInput==d.replaceInput&&d.replace(),d.findPrev()},"Alt-Return":function(d){d.activeInput==d.replaceInput&&d.replaceAll(),d.findAll()},Tab:function(d){(d.activeInput==d.replaceInput?d.searchInput:d.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(d){d.regExpOption.checked=!d.regExpOption.checked,d.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(d){d.caseSensitiveOption.checked=!d.caseSensitiveOption.checked,d.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(d){d.wholeWordOption.checked=!d.wholeWordOption.checked,d.$syncOptions()}},{name:"toggleReplace",exec:function(d){d.replaceOption.checked=!d.replaceOption.checked,d.$syncOptions()}},{name:"searchInSelection",exec:function(d){d.searchOption.checked=!d.searchRange,d.setSearchRange(d.searchOption.checked&&d.editor.getSelectionRange()),d.$syncOptions()}}]);var l=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);a.prototype.$searchBarKb=o,a.prototype.$closeSearchBarKb=l,r.SearchBox=a,r.Search=function(d,w){var b=d.searchBox||new a(d);b.show(d.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})}()}(qp)),qp.exports}Nb();var Db=Object.defineProperty,Fb=(n,t,e)=>t in n?Db(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,dl=(n,t,e)=>Fb(n,typeof t!="symbol"?t+"":t,e);function Gp(n,t){return function(){return n.apply(t,arguments)}}const{toString:Pb}=Object.prototype,{getPrototypeOf:Qc}=Object,pl=(n=>t=>{const e=Pb.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ti=n=>(n=n.toLowerCase(),t=>pl(t)===n),gl=n=>t=>typeof t===n,{isArray:Bs}=Array,ba=gl("undefined");function Wb(n){return n!==null&&!ba(n)&&n.constructor!==null&&!ba(n.constructor)&&Yr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Yp=Ti("ArrayBuffer");function Bb(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Yp(n.buffer),t}const zb=gl("string"),Yr=gl("function"),Xp=gl("number"),fl=n=>n!==null&&typeof n=="object",jb=n=>n===!0||n===!1,ml=n=>{if(pl(n)!=="object")return!1;const t=Qc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Hb=Ti("Date"),Ub=Ti("File"),Vb=Ti("Blob"),qb=Ti("FileList"),Kb=n=>fl(n)&&Yr(n.pipe),Gb=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Yr(n.append)&&((t=pl(n))==="formdata"||t==="object"&&Yr(n.toString)&&n.toString()==="[object FormData]"))},Yb=Ti("URLSearchParams"),[Xb,Qb,Zb,Jb]=["ReadableStream","Request","Response","Headers"].map(Ti),ex=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xa(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,f;if(typeof n!="object"&&(n=[n]),Bs(n))for(r=0,f=n.length;r<f;r++)t.call(null,n[r],r,n);else{const m=e?Object.getOwnPropertyNames(n):Object.keys(n),y=m.length;let x;for(r=0;r<y;r++)x=m[r],t.call(null,n[x],x,n)}}function Qp(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,f;for(;r-- >0;)if(f=e[r],t===f.toLowerCase())return f;return null}const rs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zp=n=>!ba(n)&&n!==rs;function Zc(){const{caseless:n}=Zp(this)&&this||{},t={},e=(r,f)=>{const m=n&&Qp(t,f)||f;ml(t[m])&&ml(r)?t[m]=Zc(t[m],r):ml(r)?t[m]=Zc({},r):Bs(r)?t[m]=r.slice():t[m]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&xa(arguments[r],e);return t}const tx=(n,t,e,{allOwnKeys:r}={})=>(xa(t,(f,m)=>{e&&Yr(f)?n[m]=Gp(f,e):n[m]=f},{allOwnKeys:r}),n),nx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),rx=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},ix=(n,t,e,r)=>{let f,m,y;const x={};if(t=t||{},n==null)return t;do{for(f=Object.getOwnPropertyNames(n),m=f.length;m-- >0;)y=f[m],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Qc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},ox=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},sx=n=>{if(!n)return null;if(Bs(n))return n;let t=n.length;if(!Xp(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},ax=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Qc(Uint8Array)),lx=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const f=r.value;t.call(n,f[0],f[1])}},cx=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},ux=Ti("HTMLFormElement"),hx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Jp=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),dx=Ti("RegExp"),eg=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};xa(e,(f,m)=>{let y;(y=t(f,m,n))!==!1&&(r[m]=y||f)}),Object.defineProperties(n,r)},px=n=>{eg(n,(t,e)=>{if(Yr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Yr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},gx=(n,t)=>{const e={},r=f=>{f.forEach(m=>{e[m]=!0})};return Bs(n)?r(n):r(String(n).split(t)),e},fx=()=>{},mx=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function vx(n){return!!(n&&Yr(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const yx=n=>{const t=new Array(10),e=(r,f)=>{if(fl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[f]=r;const m=Bs(r)?[]:{};return xa(r,(y,x)=>{const h=e(y,f+1);!ba(h)&&(m[x]=h)}),t[f]=void 0,m}}return r};return e(n,0)},wx=Ti("AsyncFunction"),bx=n=>n&&(fl(n)||Yr(n))&&Yr(n.then)&&Yr(n.catch),tg=((n,t)=>n?setImmediate:t?((e,r)=>(rs.addEventListener("message",({source:f,data:m})=>{f===rs&&m===e&&r.length&&r.shift()()},!1),f=>{r.push(f),rs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Yr(rs.postMessage)),xx=typeof queueMicrotask<"u"?queueMicrotask.bind(rs):typeof process<"u"&&process.nextTick||tg,Se={isArray:Bs,isArrayBuffer:Yp,isBuffer:Wb,isFormData:Gb,isArrayBufferView:Bb,isString:zb,isNumber:Xp,isBoolean:jb,isObject:fl,isPlainObject:ml,isReadableStream:Xb,isRequest:Qb,isResponse:Zb,isHeaders:Jb,isUndefined:ba,isDate:Hb,isFile:Ub,isBlob:Vb,isRegExp:dx,isFunction:Yr,isStream:Kb,isURLSearchParams:Yb,isTypedArray:ax,isFileList:qb,forEach:xa,merge:Zc,extend:tx,trim:ex,stripBOM:nx,inherits:rx,toFlatObject:ix,kindOf:pl,kindOfTest:Ti,endsWith:ox,toArray:sx,forEachEntry:lx,matchAll:cx,isHTMLForm:ux,hasOwnProperty:Jp,hasOwnProp:Jp,reduceDescriptors:eg,freezeMethods:px,toObjectSet:gx,toCamelCase:hx,noop:fx,toFiniteNumber:mx,findKey:Qp,global:rs,isContextDefined:Zp,isSpecCompliantForm:vx,toJSONObject:yx,isAsyncFn:wx,isThenable:bx,setImmediate:tg,asap:xx};function St(n,t,e,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Se.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const ng=St.prototype,rg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{rg[n]={value:n}}),Object.defineProperties(St,rg),Object.defineProperty(ng,"isAxiosError",{value:!0}),St.from=(n,t,e,r,f,m)=>{const y=Object.create(ng);return Se.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),St.call(y,n.message,t,e,r,f),y.cause=n,y.name=n.name,m&&Object.assign(y,m),y};const Cx=null;function Jc(n){return Se.isPlainObject(n)||Se.isArray(n)}function ig(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function og(n,t,e){return n?n.concat(t).map(function(r,f){return r=ig(r),!e&&f?"["+r+"]":r}).join(e?".":""):t}function kx(n){return Se.isArray(n)&&!n.some(Jc)}const _x=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function vl(n,t,e){if(!Se.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Se.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,o){return!Se.isUndefined(o[a])});const r=e.metaTokens,f=e.visitor||g,m=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function h(a){if(a===null)return"";if(Se.isDate(a))return a.toISOString();if(!x&&Se.isBlob(a))throw new St("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(a)||Se.isTypedArray(a)?x&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function g(a,o,l){let d=a;if(a&&!l&&typeof a=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),a=JSON.stringify(a);else if(Se.isArray(a)&&kx(a)||(Se.isFileList(a)||Se.endsWith(o,"[]"))&&(d=Se.toArray(a)))return o=ig(o),d.forEach(function(w,b){!(Se.isUndefined(w)||w===null)&&t.append(y===!0?og([o],b,m):y===null?o:o+"[]",h(w))}),!1}return Jc(a)?!0:(t.append(og(l,o,m),h(a)),!1)}const s=[],c=Object.assign(_x,{defaultVisitor:g,convertValue:h,isVisitable:Jc});function u(a,o){if(!Se.isUndefined(a)){if(s.indexOf(a)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(a),Se.forEach(a,function(l,d){(!(Se.isUndefined(l)||l===null)&&f.call(t,l,Se.isString(d)?d.trim():d,o,c))===!0&&u(l,o?o.concat(d):[d])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),t}function sg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function eu(n,t){this._pairs=[],n&&vl(n,this,t)}const ag=eu.prototype;ag.append=function(n,t){this._pairs.push([n,t])},ag.toString=function(n){const t=n?function(e){return n.call(this,e,sg)}:sg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Ax(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lg(n,t,e){if(!t)return n;const r=e&&e.encode||Ax;Se.isFunction(e)&&(e={serialize:e});const f=e&&e.serialize;let m;if(f?m=f(t,e):m=Se.isURLSearchParams(t)?t.toString():new eu(t,e).toString(r),m){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}class cg{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Se.forEach(this.handlers,function(e){e!==null&&t(e)})}}const ug={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sx=typeof URLSearchParams<"u"?URLSearchParams:eu,Tx=typeof FormData<"u"?FormData:null,$x=typeof Blob<"u"?Blob:null,Mx={isBrowser:!0,classes:{URLSearchParams:Sx,FormData:Tx,Blob:$x},protocols:["http","https","file","blob","url","data"]},tu=typeof window<"u"&&typeof document<"u",nu=typeof navigator=="object"&&navigator||void 0,Ix=tu&&(!nu||["ReactNative","NativeScript","NS"].indexOf(nu.product)<0),Rx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ex=tu&&window.location.href||"http://localhost",Lx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tu,hasStandardBrowserEnv:Ix,hasStandardBrowserWebWorkerEnv:Rx,navigator:nu,origin:Ex},Symbol.toStringTag,{value:"Module"})),wr={...Lx,...Mx};function Ox(n,t){return vl(n,new wr.classes.URLSearchParams,Object.assign({visitor:function(e,r,f,m){return wr.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},t))}function Nx(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dx(n){const t={},e=Object.keys(n);let r;const f=e.length;let m;for(r=0;r<f;r++)m=e[r],t[m]=n[m];return t}function hg(n){function t(e,r,f,m){let y=e[m++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=m>=e.length;return y=!y&&Se.isArray(f)?f.length:y,h?(Se.hasOwnProp(f,y)?f[y]=[f[y],r]:f[y]=r,!x):((!f[y]||!Se.isObject(f[y]))&&(f[y]=[]),t(e,r,f[y],m)&&Se.isArray(f[y])&&(f[y]=Dx(f[y])),!x)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,f)=>{t(Nx(r),f,e,0)}),e}return null}function Fx(n,t,e){if(Se.isString(n))try{return(t||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Ca={transitional:ug,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,f=Se.isObject(n);if(f&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(hg(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let m;if(f){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Ox(n,this.formSerializer).toString();if((m=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return vl(m?{"files[]":n}:n,y&&new y,this.formSerializer)}}return f||r?(t.setContentType("application/json",!1),Fx(n)):n}],transformResponse:[function(n){const t=this.transitional||Ca.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(e&&!this.responseType||r)){const f=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(m){if(f)throw m.name==="SyntaxError"?St.from(m,St.ERR_BAD_RESPONSE,this,null,this.response):m}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Ca.headers[n]={}});const Px=Se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wx=n=>{const t={};let e,r,f;return n&&n.split(`
|
1388
|
+
`).forEach(function(m){f=m.indexOf(":"),e=m.substring(0,f).trim().toLowerCase(),r=m.substring(f+1).trim(),!(!e||t[e]&&Px[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},dg=Symbol("internals");function ka(n){return n&&String(n).trim().toLowerCase()}function yl(n){return n===!1||n==null?n:Se.isArray(n)?n.map(yl):String(n)}function Bx(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const zx=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ru(n,t,e,r,f){if(Se.isFunction(r))return r.call(this,t,e);if(f&&(t=e),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function jx(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Hx(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(f,m,y){return this[r].call(this,t,f,m,y)},configurable:!0})})}let Wr=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function f(y,x,h){const g=ka(x);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=yl(y))}const m=(y,x)=>Se.forEach(y,(h,g)=>f(h,g,x));if(Se.isPlainObject(n)||n instanceof this.constructor)m(n,t);else if(Se.isString(n)&&(n=n.trim())&&!zx(n))m(Wx(n),t);else if(Se.isHeaders(n))for(const[y,x]of n.entries())f(x,y,e);else n!=null&&f(t,n,e);return this}get(n,t){if(n=ka(n),n){const e=Se.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return Bx(r);if(Se.isFunction(t))return t.call(this,r,e);if(Se.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=ka(n),n){const e=Se.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||ru(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function f(m){if(m=ka(m),m){const y=Se.findKey(e,m);y&&(!t||ru(e,e[y],y,t))&&(delete e[y],r=!0)}}return Se.isArray(n)?n.forEach(f):f(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const f=t[e];(!n||ru(this,this[f],f,n,!0))&&(delete this[f],r=!0)}return r}normalize(n){const t=this,e={};return Se.forEach(this,(r,f)=>{const m=Se.findKey(e,f);if(m){t[m]=yl(r),delete t[f];return}const y=n?jx(f):String(f).trim();y!==f&&delete t[f],t[y]=yl(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Se.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Se.isArray(e)?e.join(", "):e)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
|
1389
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[dg]=this[dg]={accessors:{}}).accessors,e=this.prototype;function r(f){const m=ka(f);t[m]||(Hx(e,f),t[m]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};Wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Wr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(Wr);function iu(n,t){const e=this||Ca,r=t||e,f=Wr.from(r.headers);let m=r.data;return Se.forEach(n,function(y){m=y.call(e,m,f.normalize(),t?t.status:void 0)}),f.normalize(),m}function pg(n){return!!(n&&n.__CANCEL__)}function zs(n,t,e){St.call(this,n??"canceled",St.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(zs,St,{__CANCEL__:!0});function gg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new St("Request failed with status code "+e.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Ux(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function Vx(n,t){n=n||10;const e=new Array(n),r=new Array(n);let f=0,m=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),g=r[m];y||(y=h),e[f]=x,r[f]=h;let s=m,c=0;for(;s!==f;)c+=e[s++],s=s%n;if(f=(f+1)%n,f===m&&(m=(m+1)%n),h-y<t)return;const u=g&&h-g;return u?Math.round(c*1e3/u):void 0}}function qx(n,t){let e=0,r=1e3/t,f,m;const y=(x,h=Date.now())=>{e=h,f=null,m&&(clearTimeout(m),m=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),g=h-e;g>=r?y(x,h):(f=x,m||(m=setTimeout(()=>{m=null,y(f)},r-g)))},()=>f&&y(f)]}const wl=(n,t,e=3)=>{let r=0;const f=Vx(50,250);return qx(m=>{const y=m.loaded,x=m.lengthComputable?m.total:void 0,h=y-r,g=f(h),s=y<=x;r=y;const c={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:g||void 0,estimated:g&&x&&s?(x-y)/g:void 0,event:m,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(c)},e)},fg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},mg=n=>(...t)=>Se.asap(()=>n(...t)),Kx=wr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,wr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0,Gx=wr.hasStandardBrowserEnv?{write(n,t,e,r,f,m){const y=[n+"="+encodeURIComponent(t)];Se.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Se.isString(r)&&y.push("path="+r),Se.isString(f)&&y.push("domain="+f),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Yx(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Xx(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function vg(n,t,e){let r=!Yx(t);return n&&(r||e==!1)?Xx(n,t):t}const yg=n=>n instanceof Wr?{...n}:n;function is(n,t){t=t||{};const e={};function r(g,s,c,u){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:u},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function f(g,s,c,u){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,c,u)}else return r(g,s,c,u)}function m(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function y(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function x(g,s,c){if(c in t)return r(g,s);if(c in n)return r(void 0,g)}const h={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(g,s,c)=>f(yg(g),yg(s),c,!0)};return Se.forEach(Object.keys(Object.assign({},n,t)),function(g){const s=h[g]||f,c=s(n[g],t[g],g);Se.isUndefined(c)&&s!==x||(e[g]=c)}),e}const wg=n=>{const t=is({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:m,headers:y,auth:x}=t;t.headers=y=Wr.from(y),t.url=lg(vg(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Se.isFormData(e)){if(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[g,...s]=h?h.split(";").map(c=>c.trim()).filter(Boolean):[];y.setContentType([g||"multipart/form-data",...s].join("; "))}}if(wr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&Kx(t.url))){const g=f&&m&&Gx.read(m);g&&y.set(f,g)}return t},Qx=typeof XMLHttpRequest<"u",Zx=Qx&&function(n){return new Promise(function(t,e){const r=wg(n);let f=r.data;const m=Wr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,g,s,c,u,a;function o(){u&&u(),a&&a(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const b=Wr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:b,config:n,request:l};gg(function($){t($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new St("Request aborted",St.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new St("Network Error",St.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||ug;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new St(b,E.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,n,l)),l=null},f===void 0&&m.setContentType(null),"setRequestHeader"in l&&Se.forEach(m.toJSON(),function(b,E){l.setRequestHeader(E,b)}),Se.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),y&&y!=="json"&&(l.responseType=r.responseType),h&&([c,a]=wl(h,!0),l.addEventListener("progress",c)),x&&l.upload&&([s,u]=wl(x),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(g=b=>{l&&(e(!b||b.type?new zs(null,n,l):b),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Ux(r.url);if(w&&wr.protocols.indexOf(w)===-1){e(new St("Unsupported protocol "+w+":",St.ERR_BAD_REQUEST,n));return}l.send(f||null)})},Jx=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,f;const m=function(g){if(!f){f=!0,x();const s=g instanceof Error?g:this.reason;r.abort(s instanceof St?s:new zs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,m(new St(`timeout ${t} of ms exceeded`,St.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(m):g.removeEventListener("abort",m)}),n=null)};n.forEach(g=>g.addEventListener("abort",m));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(x),h}},e1=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,f;for(;r<e;)f=r+t,yield n.slice(r,f),r=f},t1=async function*(n,t){for await(const e of n1(n))yield*e1(e,t)},n1=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},bg=(n,t,e,r)=>{const f=t1(n,t);let m=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){x(),h.close();return}let c=s.byteLength;if(e){let u=m+=c;e(u)}h.enqueue(new Uint8Array(s))}catch(g){throw x(g),g}},cancel(h){return x(h),f.return()}},{highWaterMark:2})},bl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xg=bl&&typeof ReadableStream=="function",r1=bl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Cg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},i1=xg&&Cg(()=>{let n=!1;const t=new Request(wr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),kg=64*1024,ou=xg&&Cg(()=>Se.isReadableStream(new Response("").body)),xl={stream:ou&&(n=>n.body)};bl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xl[t]&&(xl[t]=Se.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new St(`Response type '${t}' is not supported`,St.ERR_NOT_SUPPORT,r)})})})(new Response);const o1=async n=>{if(n==null)return 0;if(Se.isBlob(n))return n.size;if(Se.isSpecCompliantForm(n))return(await new Request(wr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(n)||Se.isArrayBuffer(n))return n.byteLength;if(Se.isURLSearchParams(n)&&(n=n+""),Se.isString(n))return(await r1(n)).byteLength},s1=async(n,t)=>Se.toFiniteNumber(n.getContentLength())??o1(t),a1=bl&&(async n=>{let{url:t,method:e,data:r,signal:f,cancelToken:m,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:g,headers:s,withCredentials:c="same-origin",fetchOptions:u}=wg(n);g=g?(g+"").toLowerCase():"text";let a=Jx([f,m&&m.toAbortSignal()],y),o;const l=a&&a.unsubscribe&&(()=>{a.unsubscribe()});let d;try{if(h&&i1&&e!=="get"&&e!=="head"&&(d=await s1(s,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[R,L]=fg(d,wl(mg(h)));r=bg(_.body,kg,R,L)}}Se.isString(c)||(c=c?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:a,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?c:void 0});let b=await fetch(o);const E=ou&&(g==="stream"||g==="response");if(ou&&(x||E&&l)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=b[F]});const C=Se.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&fg(C,wl(mg(x),!0))||[];b=new Response(bg(b.body,kg,R,()=>{L&&L(),l&&l()}),_)}g=g||"text";let $=await xl[Se.findKey(xl,g)||"text"](b,n);return!E&&l&&l(),await new Promise((_,C)=>{gg(_,C,{data:$,headers:Wr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,n,o),{cause:w.cause||w}):St.from(w,w&&w.code,n,o)}}),su={http:Cx,xhr:Zx,fetch:a1};Se.forEach(su,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const _g=n=>`- ${n}`,l1=n=>Se.isFunction(n)||n===null||n===!1,Ag={getAdapter:n=>{n=Se.isArray(n)?n:[n];const{length:t}=n;let e,r;const f={};for(let m=0;m<t;m++){e=n[m];let y;if(r=e,!l1(e)&&(r=su[(y=String(e)).toLowerCase()],r===void 0))throw new St(`Unknown adapter '${y}'`);if(r)break;f[y||"#"+m]=r}if(!r){const m=Object.entries(f).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?m.length>1?`since :
|
1390
|
+
`+m.map(_g).join(`
|
1391
|
+
`):" "+_g(m[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:su};function au(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new zs(null,n)}function Sg(n){return au(n),n.headers=Wr.from(n.headers),n.data=iu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ag.getAdapter(n.adapter||Ca.adapter)(n).then(function(t){return au(n),t.data=iu.call(n,n.transformResponse,t),t.headers=Wr.from(t.headers),t},function(t){return pg(t)||(au(n),t&&t.response&&(t.response.data=iu.call(n,n.transformResponse,t.response),t.response.headers=Wr.from(t.response.headers))),Promise.reject(t)})}const Tg="1.8.4",Cl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Cl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const $g={};Cl.transitional=function(n,t,e){function r(f,m){return"[Axios v"+Tg+"] Transitional option '"+f+"'"+m+(e?". "+e:"")}return(f,m,y)=>{if(n===!1)throw new St(r(m," has been removed"+(t?" in "+t:"")),St.ERR_DEPRECATED);return t&&!$g[m]&&($g[m]=!0,console.warn(r(m," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(f,m,y):!0}},Cl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function c1(n,t,e){if(typeof n!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let f=r.length;for(;f-- >0;){const m=r[f],y=t[m];if(y){const x=n[m],h=x===void 0||y(x,m,n);if(h!==!0)throw new St("option "+m+" must be "+h,St.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new St("Unknown option "+m,St.ERR_BAD_OPTION)}}const kl={assertOptions:c1,validators:Cl},Ui=kl.validators;let os=class{constructor(n){this.defaults=n,this.interceptors={request:new cg,response:new cg}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const f=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?f&&!String(e.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1392
|
+
`+f):e.stack=f}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=is(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:f}=t;e!==void 0&&kl.assertOptions(e,{silentJSONParsing:Ui.transitional(Ui.boolean),forcedJSONParsing:Ui.transitional(Ui.boolean),clarifyTimeoutError:Ui.transitional(Ui.boolean)},!1),r!=null&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:kl.assertOptions(r,{encode:Ui.function,serialize:Ui.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),kl.assertOptions(t,{baseUrl:Ui.spelling("baseURL"),withXsrfToken:Ui.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let m=f&&Se.merge(f.common,f[t.method]);f&&Se.forEach(["delete","get","head","post","put","patch","common"],a=>{delete f[a]}),t.headers=Wr.concat(m,f);const y=[];let x=!0;this.interceptors.request.forEach(function(a){typeof a.runWhen=="function"&&a.runWhen(t)===!1||(x=x&&a.synchronous,y.unshift(a.fulfilled,a.rejected))});const h=[];this.interceptors.response.forEach(function(a){h.push(a.fulfilled,a.rejected)});let g,s=0,c;if(!x){const a=[Sg.bind(this),void 0];for(a.unshift.apply(a,y),a.push.apply(a,h),c=a.length,g=Promise.resolve(t);s<c;)g=g.then(a[s++],a[s++]);return g}c=y.length;let u=t;for(s=0;s<c;){const a=y[s++],o=y[s++];try{u=a(u)}catch(l){o.call(this,l);break}}try{g=Sg.call(this,u)}catch(a){return Promise.reject(a)}for(s=0,c=h.length;s<c;)g=g.then(h[s++],h[s++]);return g}getUri(n){n=is(this.defaults,n);const t=vg(n.baseURL,n.url,n.allowAbsoluteUrls);return lg(t,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){os.prototype[n]=function(t,e){return this.request(is(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,f,m){return this.request(is(m||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}os.prototype[n]=t(),os.prototype[n+"Form"]=t(!0)});let u1=class h0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(f){e=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const y=new Promise(x=>{r.subscribe(x),m=x}).then(f);return y.cancel=function(){r.unsubscribe(m)},y},t(function(f,m,y){r.reason||(r.reason=new zs(f,m,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new h0(function(e){t=e}),cancel:t}}};function h1(n){return function(t){return n.apply(null,t)}}function d1(n){return Se.isObject(n)&&n.isAxiosError===!0}const lu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lu).forEach(([n,t])=>{lu[t]=n});function Mg(n){const t=new os(n),e=Gp(os.prototype.request,t);return Se.extend(e,os.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Mg(is(n,r))},e}const Pn=Mg(Ca);Pn.Axios=os,Pn.CanceledError=zs,Pn.CancelToken=u1,Pn.isCancel=pg,Pn.VERSION=Tg,Pn.toFormData=vl,Pn.AxiosError=St,Pn.Cancel=Pn.CanceledError,Pn.all=function(n){return Promise.all(n)},Pn.spread=h1,Pn.isAxiosError=d1,Pn.mergeConfig=is,Pn.AxiosHeaders=Wr,Pn.formToJSON=n=>hg(Se.isHTMLForm(n)?new FormData(n):n),Pn.getAdapter=Ag.getAdapter,Pn.HttpStatusCode=lu,Pn.default=Pn;const{Axios:L2,AxiosError:O2,CanceledError:N2,isCancel:D2,CancelToken:F2,VERSION:P2,all:W2,Cancel:B2,isAxiosError:z2,spread:j2,toFormData:H2,AxiosHeaders:U2,HttpStatusCode:V2,formToJSON:q2,getAdapter:K2,mergeConfig:G2}=Pn,cu=Pn.create({baseURL:location.origin,timeout:6e4,params:{}});cu.interceptors.response.use(n=>n,n=>{var t,e,r,f,m,y,x,h,g,s,c;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(m=(f=n.response)==null?void 0:f.data)!=null&&m.message?u+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?u+=`${n.response.data.exception}`:(s=(g=(h=n.response)==null?void 0:h.data)==null?void 0:g.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(c=n.response)==null?void 0:c.data}`;const{$cosmosNotify:a}=window;throw a&&a.serious({title:"Network error",body:u}),n}else throw n});const _l=async function(n,t,{data:e,params:r={},headers:f,noAuth:m=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!m){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),cu({method:n,url:t,data:e,params:r,headers:f,onUploadProgress:x})},uu={Accept:"application/json"},Ig={...uu,"Content-Type":"application/json"},Y2=yr("O",{get:function(n,{params:t,headers:e=uu,noScope:r,noAuth:f,onUploadProgress:m}={}){return _l("get",n,{params:t,headers:e,noScope:r,noAuth:f,onUploadProgress:m})},put:function(n,{data:t,params:e,headers:r=Ig,noScope:f,noAuth:m,onUploadProgress:y}={}){return _l("put",n,{data:t,params:e,headers:r,noScope:f,noAuth:m,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Ig,noScope:f,noAuth:m,onUploadProgress:y}={}){return _l("post",n,{data:t,params:e,headers:r,noScope:f,noAuth:m,onUploadProgress:y})},delete:function(n,{params:t,headers:e=uu,noScope:r,noAuth:f,onUploadProgress:m}={}){return _l("delete",n,{params:t,headers:e,noScope:r,noAuth:f,onUploadProgress:m})}});let Al=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,f=e.length;r<f;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(f=>t!==f)}}});class _a extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class hu extends _a{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class p1 extends _a{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class $i extends _a{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class g1 extends $i{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Rg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class f1{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:t,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:f})=>(e[r]=f,e),{})}}const ss=Symbol("state");class Eg{constructor(t={}){this.emitter=Al(),this.params=Object.freeze(t),this.presence=new f1(this),this.initialConnect=!0,this[ss]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Rg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ss]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[ss]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ss]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[ss]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[ss]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[ss]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...f)=>{r(),e(...f)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(f=>f()),t()})),r.push(this.on("close",f=>{r.forEach(m=>m()),e(f||new _a("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class m1{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(m=>{e=m}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},f=this._pendingTop;return this._pendings.push(r),f&&await f.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class v1{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class y1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new v1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let f=this._subscriptions[t]=new m1(t);return f.remoteId=this._localToRemote[t],f.subscriber=e,f.unsubscriber=r,f.gvl=this.glv,f}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class w1{constructor(t={}){this.subscriptions=new y1(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let f=this._remoteToLocal[t];if(!f){this._pendingMessages.push([t,e,r]);return}let m=this.subscriptions.get(f);m&&m.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let f=this._remoteToLocal[t];if(!f)return;let m=this.subscriptions.get(f);m&&m.channels.forEach(y=>y.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const Lg={debug:0,info:1,warn:2,error:3};class Og{constructor(t){this.level=t||"warn"}log(t,e,r){Lg[t]<Lg[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}}class Aa extends Og{writeLogEntry(){}}class b1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let x1=0;class Ng{constructor(t={}){let{logger:e}=t;this.logger=e||new Aa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let f=Rg(r);if(this.pendingUnsubscriptions[f]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,f),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let m=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++x1;this.pendingSubscriptions[f]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(h,f,m)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let f=this.pendingSubscriptions[e];f&&f.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let f=this.pendingSubscriptions[e];f&&f.id===t&&(delete this.pendingSubscriptions[e],f.reject(new p1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:f,reason:m,reconnect:y}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let x=t.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new $i(m);this.reset(x),y===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[r];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],x.resolve(r)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[r];return x?(delete this.pendingSubscriptions[r],x.reject(new hu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(f)return{identifier:r,message:f};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Dg=()=>Date.now()/1e3|0;class C1 extends Ng{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Dg()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:f}=t;if(e==="disconnect"||e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=Dg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),t.restored){let m=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of m)this.cable.send({identifier:y,command:"history",history:this.historyRequestFor(y)}),this.presenceInfo[y]&&this.cable.send({identifier:y,command:"join",presence:this.presenceInfo[y]});return this.cable.restored(m)}return this.cable.connected(this.sessionId)}if(e==="presence"){let m=f.type;if(m==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(f))}else if(m==="error"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:f}}if(f){let m=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:f,meta:m}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let f=this.presenceInfo[t];return f&&(e.presence=f),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let f of this.subscriptionStreams[t]){let m=this.streamsPositions[f];m&&(r=!0,e[f]=m)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,f){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:f},{stream:e,epoch:r,offset:f}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,f)=>{this.pendingPresence[t]={resolve:r,reject:f},this.cable.send({command:"presence",identifier:t,data:e})})}}class k1 extends _a{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class du extends Eg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}dl(du,"identifier","__ghost__");const _1="$pubsub";class pu extends Eg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}dl(pu,"identifier",_1);const as=Symbol("state");let A1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:f,hubOptions:m,performFailures:y,transportConfigurator:x}){this.emitter=Al(),this.transport=n,this.encoder=e,this.logger=r||new Aa,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new w1(m||{}),this[as]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,f===!1&&this.connect().catch(()=>{})}get state(){return this[as]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[as]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[as]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new $i("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[as]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new $i("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new $i(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[as]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof $i?n:new $i(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[as]="closed";let e=t||new $i("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:f,message:m,meta:y}=e;r?this.hub.notify(f,r,m):this.hub.transmit(f,m,y)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new pu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new pu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=du),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let f=await n.acquire("subscribed");if(f.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),f.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),f.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),f.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),f.release();return}let m={identifier:t,params:e};this.logger.debug("subscribing",m);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...m,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof hu&&this.logger.warn("rejected",m),y instanceof $i){this.logger.debug("disconnected during subscription; will retry on connect",m),f.release();return}this.logger.error("failed to subscribe",{error:y,...m})}n.close(y),this.hub.unsubscribe(r)}f.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(f){f&&(f instanceof $i?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:f}):this.logger.error("unsubscribe failed",{id:t,error:f}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new k1;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let f=r.remoteId,m={id:f,action:t,payload:e};this.logger.debug("perform",m);try{let y=await this.protocol.perform(f,t,e);return y&&this.logger.debug("perform result",{message:y,request:m}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:m}),y}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(f=>f()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(f=>f()),t(r)}))}),this._pendingConnect)}};const S1={maxMissingPings:2,maxReconnectAttempts:1/0},js=()=>Date.now(),Fg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:f}=t;return e=e||2,r===void 0&&(r=.5),m=>{let y=n*e**m,x=y*e,h=y+(x-y)*Math.random(),g=2*(Math.random()-.5)*r;return h=h*(1+g),f&&f<h&&(h=f),h}};let Pg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},S1,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Aa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=js()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=js(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=js(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=js(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=js()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=js()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new g1))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class T1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Al(),this.unbind=[],this.logger=e.logger||new Aa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...f)=>{r(),e(...f)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}class $1{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Al();let{format:f,subprotocol:m,authStrategy:y}=e;this.format=f||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=m}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let f=[];f.push(this.once("open",()=>{f.forEach(m=>m()),e()})),f.push(this.once("close",()=>{f.forEach(m=>m()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let f=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(f)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(f=>f.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...f)=>{r(),e(...f)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Wg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function M1(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},Wg,t);let{protocol:e,websocketImplementation:r,websocketFormat:f,websocketOptions:m,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:g,transport:s,encoder:c,lazy:u,monitor:a,pingInterval:o,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:E,historyTimestamp:$,protocolOptions:_,concurrentSubscribes:C,performFailures:R,transportConfigurator:L,auth:F}=t;if(g=g||new Aa(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(_=_||{},P==="actioncable-v1")e=new Ng({logger:g,..._});else if(P==="actioncable-v1-ext")e=new C1({logger:g,historyTimestamp:$,..._});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")c=c||new b1,f=f||"text";else if(O==="msgpack"){if(f="binary",!c)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(f=f||"binary",!c)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new $1(n,{websocketImplementation:r,websocketOptions:m,subprotocol:b,authStrategy:y,format:f}),x&&(s=new T1([s,...x],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),l=l||Fg(o),a!==!1&&(a=a||new Pg({pingInterval:o,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},H=new A1({protocol:e,transport:s,encoder:c,logger:g,lazy:u,hubOptions:I,performFailures:R,transportConfigurator:L});return a&&(a.watch(H),H.monitor=a),E&&I1(H,async()=>{try{await E(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function I1(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class R1{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class E1 extends du{constructor(t,e,r){super(t,e),this.subscription=new R1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:f})=>this.subscription.notify("connected",{reconnected:f})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",f=>this.subscription.notify("received",f)),this.on("close",f=>{f&&f instanceof hu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class L1{constructor(t){this.cable=t}create(t,e){let r,f;typeof t=="object"?(r=t.channel,delete t.channel,f=t):(r=t,f={});let m=new E1(r,f,e);return m.subscription.notify("initialized"),this.cable.subscribe(m),m.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class O1{constructor(t){this.cable=t,this.subscriptions=new L1(t)}}class N1 extends Og{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class D1 extends Pg{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=f=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:f})},r=()=>this.disconnect(new $i("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const F1=["cable","action-cable"],P1="/cable",Sl=(n,t)=>{for(let e of F1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},Bg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,W1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"url");if(n)return Bg(n)}return Bg(P1)},B1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"history-timestamp");if(n)return n|0}},z1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token")},j1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token-param")};function H1(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||W1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=B1());let e=z1();if(e){let g=j1();t.auth=Object.assign({token:e,param:g},t.auth||{})}t=Object.assign({},Wg,t);let{logLevel:r,logger:f,pingInterval:m,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return f=t.logger=t.logger||new N1(r),y=t.reconnectStrategy=t.reconnectStrategy||Fg(m),t.monitor!==!1&&(t.monitor=t.monitor||new D1({pingInterval:m,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:f})),M1(n,t)}function U1(n,t){let e=H1(n,t);return new O1(e)}class zg{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},f={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(m=>{if(m&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=U1(y)}return this._cable.subscriptions.create({channel:t,...f},r)})}recordPing(){}}yr("D",zg);class V1{constructor(t,e,r="",f=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=f}}yr("b",V1);function gu(n){return q1.test(n)}const q1=/^-?[0-9]+$/;function jg(n){return K1.test(n)}const K1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Hg(n,t){const e=Number.parseFloat(n),r=String(e),f=Ug(n),m=Ug(r);return!!(f===m||(t==null?void 0:t.approx)===!0&&!gu(n)&&m.length>=14&&f.startsWith(m.substring(0,14)))}let Sa=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function G1(n){if(Hg(n,{approx:!1}))return;if(gu(n))return Sa.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Sa.underflow:Sa.truncate_float:Sa.overflow}function Ug(n){return n.replace(Y1,"").replace(Q1,"").replace(Z1,"").replace(X1,"")}const Y1=/[eE][+-]?\d+$/,X1=/^-?(0*)?/,Q1=/\./,Z1=/0+$/;class J1{constructor(t){if(dl(this,"isLosslessNumber",!0),!jg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=G1(this.value);if(t===void 0||t===Sa.truncate_float)return Number.parseFloat(this.value);if(gu(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function eC(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function tC(n){return new J1(n)}function nC(n,t){return fu({"":n},"",n,t)}function fu(n,t,e,r){return Array.isArray(e)?r.call(n,t,iC(e,r)):e&&typeof e=="object"&&!eC(e)?r.call(n,t,rC(e,r)):r.call(n,t,e)}function rC(n,t){for(const e of Object.keys(n)){const r=fu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function iC(n,t){for(let e=0;e<n.length;e++)n[e]=fu(n,String(e),n[e],t);return n}function oC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tC,r=0;const f=x();return o(f),d(),t?nC(f,t):f;function m(){if(n.charCodeAt(r)===hC){r++,g();const S={};let A=!0;for(;r<n.length&&n.charCodeAt(r)!==qg;){A?A=!1:(u(),g());const N=r,B=s();if(B===void 0){E();return}g(),a();const U=x();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(S,B)&&!mu(U,S[B])&&$(B,N+1),S[B]=U}return n.charCodeAt(r)!==qg&&_(),r++,S}}function y(){if(n.charCodeAt(r)===dC){r++,g();const S=[];let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Kg;){A?A=!1:u();const N=x();l(N),S.push(N)}return n.charCodeAt(r)!==Kg&&C(),r++,S}}function x(){g();const S=s()??c()??m()??y()??h("true",!0)??h("false",!1)??h("null",null);return g(),S}function h(S,A){if(n.slice(r,r+S.length)===S)return r+=S.length,A}function g(){for(;sC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===vu){r++;let S="";for(;r<n.length&&n.charCodeAt(r)!==vu;){if(n.charCodeAt(r)===uC){const A=n[r+1],N=cC[A];N!==void 0?(S+=N,r++):A==="u"?Tl(n.charCodeAt(r+2))&&Tl(n.charCodeAt(r+3))&&Tl(n.charCodeAt(r+4))&&Tl(n.charCodeAt(r+5))?(S+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):I(r):L(r)}else lC(n.charCodeAt(r))?S+=n[r]:R(n[r]);r++}return b(),r++,S}}function c(){const S=r;if(n.charCodeAt(r)===Gg&&(r++,w(S)),n.charCodeAt(r)===yu)r++;else if(aC(n.charCodeAt(r)))for(r++;$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===bC)for(r++,w(S);$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===AC||n.charCodeAt(r)===_C)for(r++,(n.charCodeAt(r)===Gg||n.charCodeAt(r)===vC)&&r++,w(S);$l(n.charCodeAt(r));)r++;if(r>S)return e(n.slice(S,r))}function u(){if(n.charCodeAt(r)!==wC)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function a(){if(n.charCodeAt(r)!==xC)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function l(S){if(S===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(S){if(!$l(n.charCodeAt(r))){const A=n.slice(S,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function b(){if(n.charCodeAt(r)!==vu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(S,A){throw new SyntaxError(`Duplicate key '${S}' encountered at position ${A}`)}function _(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(S){throw new SyntaxError(`Invalid character '${S}' ${H()}`)}function L(S){const A=n.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(S){const A=n.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function sC(n){return n===pC||n===gC||n===fC||n===mC}function Tl(n){return n>=yu&&n<=wu||n>=CC&&n<=SC||n>=kC&&n<=TC}function $l(n){return n>=yu&&n<=wu}function aC(n){return n>=yC&&n<=wu}function lC(n){return n>=32&&n<=1114111}function mu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>mu(e,t[r])):Vg(n)&&Vg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>mu(n[e],t[e])):!1}function Vg(n){return typeof n=="object"&&n!==null}const cC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1393
|
+
`,r:"\r",t:" "},uC=92,hC=123,qg=125,dC=91,Kg=93,pC=32,gC=10,fC=9,mC=13,vu=34,vC=43,Gg=45,yu=48,yC=49,wu=57,wC=44,bC=46,xC=58,CC=65,kC=97,_C=69,AC=101,SC=70,TC=102;function Yg(n,t,e,r){return f(n);function f(h,g){if(Array.isArray(r)){const s=r.find(c=>c.test(h));if(s){const c=s.stringify(h);if(typeof c!="string"||!jg(c))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${c})`);return c}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return m(h);if(h&&typeof h=="object")return y(h)}function m(h,g){if(h.length===0)return"[]";let s="[";for(let c=0;c<h.length;c++){const u=h[c];typeof u<"u"&&typeof u!="function"?s+=f(u):s+="null",c<h.length-1&&(s+=",")}return s+="]",s}function y(h,g){if(typeof h.toJSON=="function")return Yg(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let c=!0,u="{";for(const a of s){const o=h[a];if(x(a,o)){c?c=!1:u+=",";const l=JSON.stringify(a);u+=`${l}:`,u+=f(o)}}return u+="}",u}function x(h,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function $C(n){return Hg(n)?parseFloat(n):BigInt(n)}class MC{constructor(){dl(this,"id",1)}async exec(t,e,r={},f={},m=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,f.manual=!0,(await cu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...f},timeout:m,transformRequest:[(y,x)=>Yg(y)],transformResponse:[y=>oC(y,void 0,$C)]})).data.result}catch(y){let x=new Error;throw y.response?(x.name=y.response.data.error.data.class,x.message=y.response.data.error.data.message,x.object=y.response.data.error):y.request?(x.name="Request error",x.message="Request error, no response received"):x.name="Unknown error",x}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e){return this.exec("map_target_to_interface",[t,e])}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,f=30){const m=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:f});if(m!=null){let y=m.length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(m[h][1]),x!==null&&(m[h][1]=x)}return m}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}async get_tlm_values(t,e=30,r=null){let f={stale_time:e};r!==null&&(f.cache_timeout=r);const m=await this.exec("get_tlm_values",[t],f,{},1e4);let y=m[0].length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(m[0][h]),x!==null&&(m[0][h]=x);return m}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,f="CONVERTED"){let m=null;if(e===void 0)m=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))m=await this.exec("tlm",[t],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else m=await this.exec("tlm",[t,e,r],{type:f});let y=this.decode_openc3_type(m);return y!==null&&(m=y),m}async inject_tlm(t,e,r=null,f="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:f})}set_tlm(t,e,r,f){return this.exec("set_tlm",[t,e,r],{type:f})}override_tlm(t,e,r,f){return this.exec("override_tlm",[t,e,r],{type:f})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,f){return this.exec("normalize_tlm",[t,e,r],{type:f})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,f="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,f])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,f,m){let y=null;for(let x in f)Object.prototype.hasOwnProperty.call(f,x)&&(y=this.encode_openc3_type(f[x]),y!==null&&(f[x]=y));return this.exec(t,[e,r,f],{},m)}get_cmd_hazardous(t,e,r,f={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},f):this._cmd("get_cmd_hazardous",t,e,r,f)}cmd(t,e,r,f={}){return e===void 0?this.exec("cmd",t,{},f):this._cmd("cmd",t,e,r,f)}cmd_no_range_check(t,e,r,f={}){return e===void 0?this.exec("cmd_no_range_check",t,{},f):this._cmd("cmd_no_range_check",t,e,r,f)}cmd_raw(t,e,r,f={}){return e===void 0?this.exec("cmd_raw",t,{},f):this._cmd("cmd_raw",t,e,r,f)}cmd_raw_no_range_check(t,e,r,f={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},f):this._cmd("cmd_raw_no_range_check",t,e,r,f)}cmd_no_hazardous_check(t,e,r,f={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},f):this._cmd("cmd_no_hazardous_check",t,e,r,f)}cmd_no_checks(t,e,r,f={}){return e===void 0?this.exec("cmd_no_checks",t,{},f):this._cmd("cmd_no_checks",t,e,r,f)}cmd_raw_no_hazardous_check(t,e,r,f={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},f):this._cmd("cmd_raw_no_hazardous_check",t,e,r,f)}cmd_raw_no_checks(t,e,r,f={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},f):this._cmd("cmd_raw_no_checks",t,e,r,f)}build_cmd(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}build_command(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t){return this.exec("get_setting",[t])}get_settings(t){return this.exec("get_settings",t)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),f=new Uint8Array(r);return Array.from(f).map(m=>m.toString(16).padStart(2,"0")).join("")}}}yr("F",MC);var Xg={exports:{}},Qg;function IC(){return Qg||(Qg=1,function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,f){function m(g,s){function c(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),S=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(A&&!A[2]&&(N=I-A[1].length,B=I),S&&!S[2]&&(N||(N=I),B=I+S[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if(S&&S[2])return N=I+S[2].length,{start:N,end:N+S[3].length}}}for(var u=s.column||g.getOption("printMarginColumn"),a=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),l=Math.max(s.startRow,s.endRow),d=g.session;o<=l;){var w=d.getLine(o);if(w.length>u){var b=c(w,u,5);if(b){var E=/^\s*/.exec(w)[0];d.replace(new x(o,b.start,o,b.end),`
|
1394
|
+
`+E)}l++}else if(a&&/\S/.test(w)&&o!=l){var $=d.getLine(o+1);if($&&/\S/.test($)){var _=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),R=_+" "+C,b=c(R,u,5);if(b&&b.start>_.length||R.length<u){var L=new x(o,_.length,o+1,$.length-C.length);d.replace(L," "),o--,l--}else _.length<w.length&&d.remove(new x(o,_.length,o,w.length))}}o++}}function y(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,c=s.selection.cursor;if(c.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;m(s,{startRow:c.row,endRow:c.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=m}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,f){function m(v){return{row:v.line,column:v.ch}}function y(v){return new Ne(v.row,v.column)}function x(v,T,k){if(T.line===k.line&&T.ch>=k.ch-1){var D=v.getLine(T.line),W=D.charCodeAt(T.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:T,end:k}}function h(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),Pe.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",Wo),R(v),Pe.on(v.getInputField(),"paste",s(v))}function g(v){v.setOption("disableInput",!1),v.off("cursorActivity",Wo),Pe.off(v.getInputField(),"paste",s(v)),v.state.vim=null,ar&&clearTimeout(ar)}function s(v){var T=v.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(v.setCursor(ye(v.getCursor(),0,1)),Nn.enterInsertMode(v,{},T))}),T.onPasteFn}function c(v,T){return T>=v.firstLine()&&T<=v.lastLine()}function u(v){return/^[a-z]$/.test(v)}function a(v){return"()[]{}".indexOf(v)!=-1}function o(v){return ca.test(v)}function l(v){return nn.test(v)}function d(v){return/^\s*$/.test(v)}function w(v){return".?!".indexOf(v)!=-1}function b(v,T){for(var k=0;k<T.length;k++)if(T[k]==v)return!0;return!1}function E(v,T,k,D,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Ht[v]={type:k,defaultValue:T,callback:W},D)for(var z=0;z<D.length;z++)Ht[D[z]]=Ht[v];T&&$(v,T)}function $(v,T,k,D){var W=Ht[v];D=D||{};var z=D.scope;if(!W)return new Error("Unknown option: "+v);if(W.type=="boolean"){if(T&&T!==!0)return new Error("Invalid argument: "+v+"="+T);T!==!1&&(T=!0)}W.callback?(z!=="local"&&W.callback(T,void 0),z!=="global"&&k&&W.callback(T,k)):(z!=="local"&&(W.value=W.type=="boolean"?!!T:T),z!=="global"&&k&&(k.state.vim.options[v]={value:T}))}function _(v,T,k){var D=Ht[v];k=k||{};var W=k.scope;if(!D)return new Error("Unknown option: "+v);if(D.callback){var z=T&&D.callback(void 0,T);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&T&&T.state.vim.options[v];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ln()}function R(v){return v.state.vim||(v.state.vim={inputState:new S,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function L(){Be={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:vi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Ht){var T=Ht[v];T.value=T.defaultValue}}function F(v){function T(Y){typeof Y=="string"?wn.value=Y:wn=null}if(v[0]=="<"){var k=v.toLowerCase().slice(1,-1),D=k.split("-");if(k=D.pop()||"",k=="lt")v="<";else if(k=="space")v=" ";else if(k=="cr")v=`
|
1395
|
+
`;else if(yi[k]){var W=wn.value,z={key:yi[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};wn.onKeyDown&&wn.onKeyDown(z,wn.value,T),wn&&wn.onKeyUp&&wn.onKeyUp(z,wn.value,T);return}}if(v==`
|
1396
|
+
`){var q=wn;wn=null,q.onClose&&q.onClose(q.value)}else wn.value=(wn.value||"")+v}function I(v,T,k){var D=cn;if(k){if(Lr.indexOf(k)!=-1)return;Lr.push(k),cn=k.noremap!=0}try{for(var W=R(v),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec(T);){var Y=q[0],Q=W.insertMode;if(wn){F(Y);continue}var re=wt.handleKey(v,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ve=se.split("-");if(se=ve.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1397
|
+
`;else{if(yi.hasOwnProperty(se)){Y=yi[se],zo(v,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}v.replaceSelection(Y)}}}finally{if(Lr.pop(),cn=Lr.length?D:!1,!Lr.length&&wn){var Ce=wn;wn=null,Ar(v,Ce)}}}function H(v,T){var k=v.key;if(!Or[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Xn[k]||k;var D="";if(v.ctrlKey&&(D+="C-"),v.altKey&&(D+="A-"),v.metaKey&&(D+="M-"),Pe.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(D=D.slice(2)),(D||k.length>1)&&v.shiftKey&&(D+="S-"),T&&!T.expectLiteralNext&&k.length==1){if(Hn.keymap&&k in Hn.keymap)(Hn.remapCtrl!=0||!D)&&(k=Hn.keymap[k]);else if(k.charCodeAt(0)>255){var W=v.code&&v.code.slice(-1)||"";v.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return D+=k,D.length>1&&(D="<"+D+">"),D}}function P(v,T){Hn.string!==v&&(Hn=O(v)),Hn.remapCtrl=T}function O(v){function T(D){return D.split(/\\?(.)/).filter(Boolean)}var k={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=T(W[1]),q=T(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)k[z[Y]]=q[Y]}else if(W.length==1){var Q=T(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:v}):{keymap:k,string:""}}function S(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(v,T){v.state.vim.inputState=new S,v.state.vim.expectLiteralNext=!1,Pe.signal(v,"vim-command-done",T)}function N(){this.removed=[],this.inserted=""}function B(v,T,k){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!k}function U(v,T){var k=Be.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");k[v]=T,tn.push(v)}function K(v){this.registers=v,this.unnamedRegister=v['"']=new B,v["."]=new B,v[":"]=new B,v["/"]=new B,v["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,T){Ur[v]=T}function he(v,T){for(var k=[],D=0;D<T;D++)k.push(v);return k}function ne(v,T){Vo[v]=T}function ae(v,T){Nn[v]=T}function ce(v,T,k){var D=v.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(v.firstLine(),T.line),v.lastLine()),q=v.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==z&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ue(v){var T={};for(var k in v)v.hasOwnProperty(k)&&(T[k]=v[k]);return T}function ye(v,T,k){return typeof T=="object"&&(k=T.ch,T=T.line),new Ne(v.line+T,v.ch+k)}function Ae(v,T,k,D){D.operator&&(k="operatorPending");for(var W,z=[],q=[],Y=cn?T.length-mo:0,Q=Y;Q<T.length;Q++){var re=T[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||D.operator&&re.type=="action"||!(W=$e(v,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function $e(v,T){var k=T.slice(-11)=="<character>",D=T.slice(-10)=="<register>";if(k||D){var W=T.length-(k?11:10),z=v.slice(0,W),q=T.slice(0,W);return z==q&&v.length>W?"full":q.indexOf(z)==0?"partial":!1}return v==T?"full":T.indexOf(v)==0?"partial":!1}function Ie(v){var T=/^.*(<[^>]+>)$/.exec(v),k=T?T[1]:v.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
1398
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(v,T,k){return function(){for(var D=0;D<k;D++)T(v)}}function qe(v){return new Ne(v.line,v.ch)}function ut(v,T){return v.ch==T.ch&&v.line==T.line}function rt(v,T){return v.line<T.line?!0:v.line==T.line&&v.ch<T.ch}function ht(v,T){return arguments.length>2&&(T=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,T)?v:T}function en(v,T){return arguments.length>2&&(T=en.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,T)?T:v}function pn(v,T,k){var D=rt(v,T),W=rt(T,k);return D&&W}function Kt(v,T){return v.getLine(T).length}function pr(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function gn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function In(v,T,k){var D=Kt(v,T),W=new Array(k-D+1).join(" ");v.setCursor(new Ne(T,D)),v.replaceRange(W,v.getCursor())}function Rn(v,T){var k=[],D=v.listSelections(),W=qe(v.clipPos(T)),z=!ut(T,W),q=v.getCursor("head"),Y=vt(D,q),Q=ut(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ve=D[se].anchor,Ce=Math.min(ve.line,W.line),fe=Math.max(ve.line,W.line),we=ve.ch,Oe=W.ch,Le=D[se].head.ch-we,Ue=Oe-we;Le>0&&Ue<=0?(we++,z||Oe--):Le<0&&Ue>=0?(we--,Q||Oe++):Le<0&&Ue==-1&&(we--,Oe++);for(var st=Ce;st<=fe;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};k.push(Qe)}return v.setSelections(k),T.ch=Oe,ve.ch=we,ve}function Yn(v,T,k){for(var D=[],W=0;W<k;W++){var z=ye(T,W,0);D.push({anchor:z,head:z})}v.setSelections(D,0)}function vt(v,T,k){for(var D=0;D<v.length;D++){var W=ut(v[D].anchor,T),z=ut(v[D].head,T);if(W||z)return D}return-1}function He(v,T){var k=T.lastSelection,D=function(){var z=v.listSelections(),q=z[0],Y=z[z.length-1],Q=rt(q.anchor,q.head)?q.anchor:q.head,re=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=v.getCursor(),q=v.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ve=z.line;ve<q.line;ve++){var Ce=new Ne(ve,z.ch),fe=new Ne(ve,q.ch),we={anchor:Ce,head:fe};se.push(we)}v.setSelections(se)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Ue=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ue,ch:Ue?q.ch:st+q.ch},k.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,Kt(v,q.line))),v.setSelection(z,q)}return[z,q]};return T.visualMode?D():W()}function ke(v,T){var k=T.sel.anchor,D=T.sel.head;T.lastPastedText&&(D=v.posFromIndex(v.indexFromPos(k)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:v.setBookmark(k),headMark:v.setBookmark(D),anchor:qe(k),head:qe(D),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function ze(v,T,k,D){var W=v.state.vim.sel,z=D?T:W.head,q=D?T:W.anchor,Y;return rt(k,T)&&(Y=k,k=T,T=Y),rt(z,q)?(z=ht(T,z),q=en(q,k)):(q=ht(T,q),z=en(z,k),z=ye(z,0,-1),z.ch==-1&&z.line!=v.firstLine()&&(z=new Ne(z.line-1,Kt(v,z.line-1)))),[q,z]}function Ye(v,T,W){var D=v.state.vim;T=T||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=dt(v,T,W);v.setSelections(z.ranges,z.primary)}function dt(v,T,k,D){var W=qe(T.head),z=qe(T.anchor);if(k=="char"){var q=!D&&!rt(T.head,T.anchor)?1:0,Y=rt(T.head,T.anchor)?1:0;return W=ye(T.head,0,q),z=ye(T.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(k=="line"){if(rt(T.head,T.anchor))W.ch=0,z.ch=Kt(v,z.line);else{z.ch=0;var Q=v.lastLine();W.line>Q&&(W.line=Q),W.ch=Kt(v,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(k=="block"){var re=Math.min(z.line,W.line),se=z.ch,ve=Math.max(z.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var fe=ve-re+1,we=W.line==re?0:fe-1,Oe=[],Le=0;Le<fe;Le++)Oe.push({anchor:new Ne(re+Le,se),head:new Ne(re+Le,Ce)});return{ranges:Oe,primary:we}}}function Ct(v){var T=v.getCursor("head");return v.getSelection().length==1&&(T=ht(T,v.getCursor("anchor"))),T}function xt(v,T){var k=v.state.vim;T!==!1&&v.setCursor(ce(v,k.sel.head)),ke(v,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||Pe.signal(v,"vim-mode-change",{mode:"normal"})}function Ot(v,T,k){var D=v.getRange(T,k);if(/\n\s*$/.test(D)){var W=D.split(`
|
1399
|
+
`);W.pop();for(var z,z=W.pop();W.length>0&&z&&d(z);z=W.pop())k.line--,k.ch=0;z?(k.line--,k.ch=Kt(v,k.line)):k.ch=0}}function It(v,T,k){T.ch=0,k.ch=0,k.line++}function ct(v){if(!v)return 0;var T=v.search(/\S/);return T==-1?v.length:T}function yt(v,T,k){var D=T.inclusive,W=T.innerWord,z=T.bigWord,q=T.noSymbol,Y=T.multiline,Q=k||Ct(v),re=v.getLine(Q.line),se=re,ve=Q.line,Ce=ve,fe=Q.ch,we,Oe=q?vo[0]:mi[0];if(W&&/\s/.test(re.charAt(fe)))Oe=function(vn){return/\s/.test(vn)};else{for(;!Oe(re.charAt(fe));)if(fe++,fe>=re.length){if(!Y)return null;fe--,we=ao(v,Q,!0,z,!0);break}z?Oe=mi[0]:(Oe=vo[0],Oe(re.charAt(fe))||(Oe=vo[1]))}for(var Le=fe,Ue=fe;Oe(re.charAt(Ue))&&Ue>=0;)Ue--;if(Ue++,we)Le=we.to,Ce=we.line,se=v.getLine(Ce),!se&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(D){var st=Le,Qe=Q.ch<=Ue&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(st==Le||Qe){for(var nt=Ue;/\s/.test(re.charAt(Ue-1))&&Ue>0;)Ue--;!Ue&&!Qe&&(Ue=nt)}}return{start:new Ne(ve,Ue),end:new Ne(Ce,Le)}}function xn(v,T,k){var D=T;if(!Pe.findMatchingTag||!Pe.findEnclosingTag)return{start:D,end:D};var W=Pe.findMatchingTag(v,T)||Pe.findEnclosingTag(v,T);return!W||!W.open||!W.close?{start:D,end:D}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Cr(v,T,k){ut(T,k)||Be.jumpList.add(v,T,k)}function zr(v,T){Be.lastCharacterSearch.increment=v,Be.lastCharacterSearch.forward=T.forward,Be.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Li(v,T,k,D){var W=qe(v.getCursor()),z=k?1:-1,q=k?v.lineCount():-1,Y=W.ch,Q=W.line,re=v.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:k,depth:0,curMoveThrough:!1},ve=ri[D];if(!ve)return W;var Ce=ii[ve].init,fe=ii[ve].isComplete;for(Ce&&Ce(se);Q!==q&&T;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=v.getLine(Q)||"",z>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}fe(se)&&(W.line=Q,W.ch=se.index,T--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function ao(v,T,k,D,W){var z=T.line,q=T.ch,Y=v.getLine(z),Q=k?1:-1,re=D?mi:vo;if(W&&Y==""){if(z+=Q,Y=v.getLine(z),!c(v,z))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ve=se,Ce=se;q!=se;){for(var fe=!1,we=0;we<re.length&&!fe;++we)if(re[we](Y.charAt(q))){for(ve=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(Ce=q,fe=ve!=Ce,ve==T.ch&&z==T.line&&Ce==ve+Q)continue;return{from:Math.min(ve,Ce+1),to:Math.max(ve,Ce),line:z}}fe||(q+=Q)}if(z+=Q,!c(v,z))return null;Y=v.getLine(z),q=Q>0?0:Y.length}}function gr(v,T,k,D,W,z){var q=qe(T),Y=[];(D&&!W||!D&&W)&&k++;for(var Q=!D||!W,re=0;re<k;re++){var se=ao(v,T,D,z,Q);if(!se){var ve=Kt(v,v.lastLine());Y.push(D?{line:v.lastLine(),from:ve,to:ve}:{line:0,from:0,to:0});break}Y.push(se),T=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=k,fe=Y[0],we=Y.pop();return D&&!W?(!Ce&&(fe.from!=q.ch||fe.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):D&&W?new Ne(we.line,we.to-1):!D&&W?(!Ce&&(fe.to!=q.ch||fe.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function lo(v,T,k,D,W){var z=T,q=new Ne(z.line+k.repeat-1,1/0),Y=v.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=v.charCoords(Y,"div").left),q}function Oo(v,T,k,D,W){for(var z=W||v.getCursor(),q=z.ch,Y,Q=0;Q<T;Q++){var re=v.getLine(z.line);if(Y=Ha(q,re,D,k),Y==-1)return null;q=Y}return new Ne(v.getCursor().line,Y)}function ja(v,T){var k=v.getCursor().line;return ce(v,new Ne(k,T-1))}function ei(v,T,k,D){!b(k,eo)&&!Xt.test(k)||(T.marks[k]&&T.marks[k].clear(),T.marks[k]=v.setBookmark(D))}function Ha(v,T,k,D,W){var z;return D?(z=T.indexOf(k,v+1),z!=-1):(z=T.lastIndexOf(k,v-1),z!=-1),z}function vs(v,T,k,D,W){function z(Ue){return!/\S/.test(v.getLine(Ue))}function q(Ue,st,Qe){return Qe?z(Ue)!=z(Ue+st):!z(Ue)&&z(Ue+st)}function Y(Ue){D=D>0?1:-1;var st=v.ace.session.getFoldLine(Ue);st&&Ue+D>st.start.row&&Ue+D<st.end.row&&(D=(D>0?st.end.row:st.start.row)-Ue)}var Q=T.line,re=v.firstLine(),se=v.lastLine(),ve,Ce,fe=Q;if(D){for(;re<=fe&&fe<=se&&k>0;)Y(fe),q(fe,D)&&k--,fe+=D;return new Ne(fe,0)}var we=v.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(fe=Q;fe<=se&&k;fe++)q(fe,1,!0)&&(!W||z(fe)!=Le)&&k--;for(Ce=new Ne(fe,0),fe>se&&!Le?Le=!0:W=!1,fe=Q;fe>re&&!((!W||z(fe)==Le||fe==Q)&&q(fe,-1,!0));fe--);return ve=new Ne(fe,0),{start:ve,end:Ce}}function na(v,T,k,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ve,Ce){var fe=re.getLine(se),we={line:fe,ln:se,pos:ve,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&d(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,se,ve,Ce){var fe=re.getLine(se),we={line:fe,ln:se,pos:ve,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?d(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=fe,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};k>0;)D<0?Q=Y(v,Q.ln,Q.pos,D):Q=q(v,Q.ln,Q.pos,D),k--;return new Ne(Q.ln,Q.pos)}function Oi(v,T,k,D){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!c(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function z(Q,re,se,ve){var Le=Q.getLine(re),Ce=Le==="",fe={line:Le,ln:re,pos:se,dir:ve},we={ln:fe.ln,pos:fe.pos},Oe=fe.line==="";for(W(Q,fe);fe.line!==null;){if(we.ln=fe.ln,we.pos=fe.pos,fe.line===""&&!Oe)return{ln:fe.ln,pos:fe.pos};if(Ce&&fe.line!==""&&!d(fe.line[fe.pos]))return{ln:fe.ln,pos:fe.pos};w(fe.line[fe.pos])&&!Ce&&(fe.pos===fe.line.length-1||d(fe.line[fe.pos+1]))&&(Ce=!0),W(Q,fe)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ue=Le.length-1;Ue>=0;--Ue)if(!d(Le[Ue])){we.pos=Ue;break}return we}function q(Q,re,se,ve){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ve},fe={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return fe.pos!==null?fe:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||fe.pos===null||Ce.ln===fe.ln&&Ce.pos+1===fe.pos))return fe;Ce.line!==""&&!d(Ce.line[Ce.pos])&&(we=!1,fe={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(fe.ln);fe.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!d(Oe[Le])){fe.pos=Le;break}return fe}for(var Y={ln:T.line,pos:T.ch};k>0;)D<0?Y=q(v,Y.ln,Y.pos,D):Y=z(v,Y.ln,Y.pos,D),k--;return new Ne(Y.ln,Y.pos)}function zn(v,T,k,D){var W=T,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=v.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=v.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=v.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ve=z;z=q,q=ve}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function kr(v,T,k,D){var W=qe(T),z=v.getLine(W.line),q=z.split(""),Y,Q,re,se,ve=q.indexOf(k);if(W.ch<ve)W.ch=ve;else if(ve<W.ch&&q[W.ch]==k){var Ce=/string/.test(v.getTokenTypeAt(ye(T,0,1))),fe=/string/.test(v.getTokenTypeAt(T)),we=Ce&&!fe;we||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Ni(){}function Sn(v){var T=v.state.vim;return T.searchState_||(T.searchState_=new Ni)}function _r(v){return Di(v,"/")}function Yi(v){return ys(v,"/")}function Di(v,T){var k=ys(v,T)||[];if(!k.length)return[];var D=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&D.push(v.substring(k[W]+1,k[W+1]));return D}}function ys(v,T){T||(T="/");for(var k=!1,D=[],W=0;W<v.length;W++){var z=v.charAt(W);!k&&z==T&&D.push(W),k=!k&&z=="\\"}return D}function ra(v){for(var T="|(){",k="}",D=!1,W=[],z=-1;z<v.length;z++){var q=v.charAt(z)||"",Y=v.charAt(z+1)||"",Q=Y&&T.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ua(v){for(var T=!1,k=[],D=-1;D<v.length;D++){var W=v.charAt(D)||"",z=v.charAt(D+1)||"";wi[W+z]?(k.push(wi[W+z]),D++):T?(k.push(W),T=!1):W==="\\"?(T=!0,o(z)||z==="$"?k.push("$"):z!=="/"&&z!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),z==="/"&&k.push("\\"))}return k.join("")}function Va(v){for(var T=new Pe.StringStream(v),k=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)k.push(T.next());var D=!1;for(var W in sr)if(T.match(W,!0)){D=!0,k.push(sr[W]);break}D||k.push(T.next())}return k.join("")}function Fi(v,T,k){var D=Be.registerController.getRegister("/");if(D.setText(v),v instanceof RegExp)return v;var W=Yi(v),z,q;if(!W.length)z=v;else{z=v.substring(0,W[0]);var Y=v.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;_("pcre")||(z=ra(z)),k&&(T=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,T||q?"im":"m");return Q}function ti(v){typeof v=="string"&&(v=document.createElement(v));for(var T,k=1;k<arguments.length;k++)if(T=arguments[k])if(typeof T!="object"&&(T=document.createTextNode(T)),T.nodeType)v.appendChild(T);else for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(D[0]==="$"?v.style[D.slice(1)]=T[D]:v.setAttribute(D,T[D]));return v}function jt(v,T){var k=ti("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);v.openNotification?v.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ia(v,T){return ti("div",{$display:"flex"},ti("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,ti("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&ti("span",{$color:"#888"},T))}function Ar(v,T){if(Lr.length){T.value||(T.value=""),wn=T;return}var k=ia(T.prefix,T.desc);if(v.openDialog)v.openDialog(k,T.onClose,{onKeyDown:T.onKeyDown,onKeyUp:T.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:T.value});else{var D="";typeof T.prefix!="string"&&T.prefix&&(D+=T.prefix.textContent),T.desc&&(D+=" "+T.desc),T.onClose(prompt(D,""))}}function jn(v,T){if(v instanceof RegExp&&T instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],D=0;D<k.length;D++){var W=k[D];if(v[W]!==T[W])return!1}return!0}return!1}function fn(v,T,k,D){if(T){var W=Sn(v),z=Fi(T,!!k,!!D);if(z)return pi(v,z),jn(z,W.getQuery())||W.setQuery(z),z}}function En(v){if(v.source.charAt(0)=="^")var T=!0;return{token:function(k){if(T&&!k.sol()){k.skipToEnd();return}var D=k.match(v,!1);if(D)return D[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!v.exec(k.next()+D[0]))?(k.next(),null):(k.match(v),"searching");for(;!k.eol()&&(k.next(),!k.match(v,!1)););},query:v}}function pi(v,T){clearTimeout(ar);var k=Sn(v);k.highlightTimeout=ar,ar=setTimeout(function(){if(v.state.vim){var D=Sn(v);D.highlightTimeout=null;var W=D.getOverlay();(!W||T!=W.query)&&(W&&v.removeOverlay(W),W=En(T),v.addOverlay(W),v.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(v.showMatchesOnScrollbar(T))),D.setOverlay(W))}},50)}function Sr(v,T,k,D){return D===void 0&&(D=1),v.operation(function(){for(var W=v.getCursor(),z=v.getSearchCursor(k,W),q=0;q<D;q++){var Y=z.find(T);if(q==0&&Y&&ut(z.from(),W)){var Q=T?z.from():z.to();Y=z.find(T),Y&&!Y[0]&&ut(z.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=z.find(T))}if(!Y&&(z=v.getSearchCursor(k,T?new Ne(v.lastLine()):new Ne(v.firstLine(),0)),!z.find(T)))return}return z.from()})}function gi(v,T,k,D,W){return D===void 0&&(D=1),v.operation(function(){var z=v.getCursor(),q=v.getSearchCursor(k,z),Y=q.find(!T);!W.visualMode&&Y&&ut(q.from(),z)&&q.find(!T);for(var Q=0;Q<D;Q++)if(Y=q.find(T),!Y&&(q=v.getSearchCursor(k,T?new Ne(v.lastLine()):new Ne(v.firstLine(),0)),!q.find(T)))return;return[q.from(),q.to()]})}function No(v){var T=Sn(v);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),v.removeOverlay(Sn(v).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function ws(v,T,k){return typeof v!="number"&&(v=v.line),T instanceof Array?b(v,T):typeof k=="number"?v>=T&&v<=k:v==T}function Xi(v){var T=v.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function jr(v,T,k){if(k=="'"||k=="`")return Be.jumpList.find(v,-1)||new Ne(0,0);if(k==".")return co(v);var D=T.marks[k];return D&&D.find()}function co(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var T=v.doc.history.done,k=T.length;k--;)if(T[k].changes)return qe(T[k].changes[0].to)}function Do(v,T,k,D,W,z,q,Y,Q){function re(){v.operation(function(){for(;!Oe;)se(),Ce();fe()})}function se(){var Qe=v.getRange(z.from(),z.to()),nt=Qe.replace(q,Y),vn=z.to().line;z.replace(nt),Ue=z.to().line,W+=Ue-vn,st=Ue<vn}function ve(){var Qe=Le&&qe(z.to()),nt=z.findNext();return nt&&!nt[0]&&Qe&&ut(z.from(),Qe)&&(nt=z.findNext()),nt}function Ce(){for(;ve()&&ws(z.from(),D,W);)if(!(!k&&z.from().line==Ue&&!st)){v.scrollIntoView(z.from(),30),v.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function fe(Qe){if(Qe&&Qe(),v.focus(),Le){v.setCursor(Le);var nt=v.state.vim;nt.exMode=!1,nt.lastHPos=nt.lastHSPos=Le.ch}Q&&Q()}function we(Qe,nt,vn){Pe.e_stop(Qe);var at=H(Qe);switch(at){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Cn=Q;Q=void 0,v.operation(re),Q=Cn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":fe(vn)}return Oe&&fe(vn),!0}v.state.vim.exMode=!0;var Oe=!1,Le,Ue,st;if(Ce(),Oe){jt(v,"No matches for "+q.source);return}if(!T){re(),Q&&Q();return}Ar(v,{prefix:ti("span","replace with ",ti("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Hr(v,T){var k=v.state.vim,D=Be.macroModeState,W=Be.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(v.off("change",uo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,Pe.off(v.getInputField(),"keydown",ks)),!z&&k.insertModeRepeat>1&&(oa(v,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,T||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),W.setText(q.changes.join("")),Pe.signal(v,"vim-mode-change",{mode:"normal"}),D.isRecording&&nr(D)}function Fo(v){Tn.unshift(v)}function bs(v,T,k,D,W){var z={keys:v,type:T};z[T]=k,z[T+"Args"]=D;for(var q in W)z[q]=W[q];Fo(z)}function xs(v,T,k,D){var W=Be.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&mr.processCommand(v,W.keyBuffer[0]),k.isPlaying=!1;return}var z=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),wt.handleKey(v,se,"macro"),T.insertMode){var ve=W.insertModeChanges[q++].changes;Be.macroModeState.lastInsertModeChanges.changes=ve,jo(v,ve,1),Hr(v)}k.isPlaying=!1}function Po(v,T){if(!v.isPlaying){var k=v.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushText(T)}}function nr(v){if(!v.isPlaying){var T=v.latestRegister,k=Be.registerController.getRegister(T);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(v.lastInsertModeChanges)}}function Cs(v,T){if(!v.isPlaying){var k=v.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushSearchQuery&&D.pushSearchQuery(T)}}function uo(v,T){var k=Be.macroModeState,D=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=v.state.vim;T;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var z=v.listSelections().length;z>1&&(D.ignoreCount=z);var q=T.text.join(`
|
1400
|
+
`);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(v.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=v.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}T=T.next}}function Wo(v){var T=v.state.vim;if(T.insertMode){var k=Be.macroModeState;if(k.isPlaying)return;var D=k.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||Bo(v,T)}function Bo(v,T,k){var D=v.getCursor("anchor"),W=v.getCursor("head");if(T.visualMode&&!v.somethingSelected()?xt(v,!1):!T.visualMode&&!T.insertMode&&v.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,Pe.signal(v,"vim-mode-change",{mode:"visual"})),T.visualMode){var z=rt(W,D)?0:-1,q=rt(W,D)?-1:0;W=ye(W,0,z),D=ye(D,0,q),T.sel={anchor:D,head:W},ei(v,T,"<",ht(W,D)),ei(v,T,">",en(W,D))}else!T.insertMode&&!k&&(T.lastHPos=v.getCursor().ch)}function Qi(v,T){this.keyName=v,this.key=T.key,this.ctrlKey=T.ctrlKey,this.altKey=T.altKey,this.metaKey=T.metaKey,this.shiftKey=T.shiftKey}function ks(v){var T=Be.macroModeState,k=T.lastInsertModeChanges,D=Pe.keyName?Pe.keyName(v):v.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Qi(D,v)))}function oa(v,T,k,D){function W(){Y?On.processAction(v,T,T.lastEditActionCommand):On.evalInput(v,T)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=T.lastEditActionCommand?se:1;var ve=q.lastInsertModeChanges;jo(v,ve.changes,se)}}var q=Be.macroModeState;q.isPlaying=!0;var Y=!!T.lastEditActionCommand,Q=T.inputState;if(T.inputState=T.lastEditInputState,Y&&T.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),z(1);else D||W(),z(k);T.inputState=Q,T.insertMode&&!D&&Hr(v),q.isPlaying=!1}function zo(v,T){Pe.lookupKey(T,"vim-insert",function(k){return typeof k=="string"?Pe.commands[k](v):k(v),!0})}function jo(v,T,k){var D=v.getCursor("head"),W=Be.macroModeState.lastInsertModeChanges.visualBlock;W&&(Yn(v,D,W+1),k=v.listSelections().length,v.setCursor(D));for(var z=0;z<k;z++){W&&v.setCursor(ye(D,z,0));for(var q=0;q<T.length;q++){var Y=T[q];if(Y instanceof Qi)zo(v,Y.keyName);else if(typeof Y=="string")v.replaceSelection(Y);else{var Q=v.getCursor(),re=ye(Q,0,Y[0].length-(Y[1]||0));v.replaceRange(Y[0],Q,Y[1]?Q:re),v.setCursor(re)}}}W&&v.setCursor(ye(D,0,1))}function _s(v,T,k,D){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Tr[T]||T;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||T.length>1)&&k.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&T.length==1){if(Hn.keymap&&T in Hn.keymap)(Hn.remapCtrl!==!1||!W)&&(T=Hn.keymap[T]);else if(T.charCodeAt(0)>255){var z=k.code&&k.code.slice(-1)||"";k.shiftKey||(z=z.toLowerCase()),z&&(T=z)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function Ho(v){var T=new v.constructor;return Object.keys(v).forEach(function(k){if(k!="insertEnd"){var D=v[k];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=Ho(D)),T[k]=D}}),v.sel&&(T.sel={head:v.sel.head&&qe(v.sel.head),anchor:v.sel.anchor&&qe(v.sel.anchor)}),T}function ho(v,T,k){var D=!1,W=wt.maybeInitVimState_(v),z=W.visualBlock||W.wasInVisualBlock,q=v.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)v.ace.exitMultiSelectMode();else if(z||!q||v.ace.inVirtualSelectionMode)D=wt.handleKey(v,T,k);else{var Y=Ho(W),Q=W.inputState.changeQueueList||[];v.operation(function(){v.curOp.isVimOp=!0;var re=0;v.ace.forEachSelection(function(){var se=v.ace.selection;v.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,v.state.vim.inputState.changeQueue=Q[re];var ve=v.getCursor("head"),Ce=v.getCursor("anchor"),fe=rt(ve,Ce)?0:-1,we=rt(ve,Ce)?-1:0;ve=ye(ve,0,fe),Ce=ye(Ce,0,we),v.state.vim.sel.head=ve,v.state.vim.sel.anchor=Ce,D=oi(v,T,k),se.$desiredColumn=v.state.vim.lastHPos==-1?null:v.state.vim.lastHPos,v.ace.inVirtualSelectionMode&&(Q[re]=v.state.vim.inputState.changeQueue),v.virtualSelectionMode()&&(v.state.vim=Ho(Y)),re++}),v.curOp.cursorActivity&&!D&&(v.curOp.cursorActivity=!1),W.status=v.state.vim.status,v.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=v.somethingSelected()&&Bo(v,W,!0),D}function fi(v,T){T.off("beforeEndOperation",fi);var k=T.state.cm.vimCmd;k&&T.execCommand(k.exec?k:k.name,k.args),T.curOp=T.prevOp}var rr=e("../range").Range,Zi=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),sa=e("../lib/oop"),qa=e("../lib/keys"),po=e("../lib/event"),Wi=e("../search").Search,go=e("../lib/useragent"),Uo=e("../search_highlight").SearchHighlight,fo=e("../commands/multi_select_commands"),aa=e("../mode/text").Mode.prototype.tokenRe,Ji=e("../ext/hardwrap").hardWrap;e("../multi_select");var Pe=function(v){this.ace=v,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Pe.Pos=function(v,T){if(!(this instanceof Ne))return new Ne(v,T);this.line=v,this.ch=T},Pe.defineOption=function(v,T,k){},Pe.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
|
1401
|
+
`)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},Pe.keyMap={},Pe.addClass=Pe.rmClass=function(){},Pe.e_stop=Pe.e_preventDefault=po.stopEvent,Pe.keyName=function(v){var T=qa[v.keyCode]||v.key||"";return T.length==1&&(T=T.toUpperCase()),T=po.getModifierString(v).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+T,T},Pe.keyMap.default=function(v){return function(T){var k=T.ace.commands.commandKeyBinding[v.toLowerCase()];return k&&T.ace.execCommand(k)!==!1}},Pe.lookupKey=function v(T,k,D){k||(k="default"),typeof k=="string"&&(k=Pe.keyMap[k]||Pe.keyMap.default);var W=typeof k=="function"?k(T):k[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return v(T,k.fallthrough,D);for(var z=0;z<k.fallthrough.length;z++){var q=v(T,k.fallthrough[z],D);if(q)return q}}},Pe.findMatchingTag=function(v,T){return v.findMatchingTag(T)},Pe.findEnclosingTag=function(v,T){},Pe.signal=function(v,T,k){return v._signal(T,k)},Pe.on=po.addListener,Pe.off=po.removeListener,Pe.isWordChar=function(v){return v<""?/^\w$/.test(v):(aa.lastIndex=0,aa.test(v))},(function(){sa.implement(Pe.prototype,Zi),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var D={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(fo.keyboardHandler)},this.operation=function(k,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return k();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=k();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!z.cursorActivity&&!z.lastChange&&W&&(this.ace.prevOp=W)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,D,W){var z=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,D){typeof k=="object"&&(D=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:D}),this.ace.selection.moveTo(k,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var D=this.ace.selection,W=k=="anchor"?D.isEmpty()?D.lead:D.anchor:k=="head"||!k?D.lead:D.getRange()[k];return y(W)},this.listSelections=function(k){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(k,D){var W=this.ace.multiSelect,z=k.map(function(re){var se=m(re.anchor),ve=m(re.head),Ce=rr.comparePoints(se,ve)<0?new rr.fromPoints(se,ve):new rr.fromPoints(ve,se);return Ce.cursor=rr.comparePoints(Ce.start,ve)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(k,D,W){var z=this.ace.selection;z.moveTo(k.line,k.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var D=this.ace.session.$clipPositionToDocument(k.line,k.ch);return y(D)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var D=k.action=="insert",W=k.start,z=k.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=rr.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ve=D?se:rr.comparePoints(re,z);if(ve>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ve<=0&&(re.row=W.row,re.column=W.column,ve===0&&(re.bias=1))}}};var v=function(k,D,W,z){this.cm=k,this.id=D,this.row=W,this.column=z,k.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return y(this)},this.setBookmark=function(k,D){var W=new v(this,this.$uid++,k.line,k.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);z!=null&&(Q.column=z),Q.row+=D,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return y(re)}debugger},this.charCoords=function(k,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return y(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(k,D,W){var z=!1,q=!1;k instanceof RegExp&&!k.global&&(z=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
1402
|
+
`,q=!1);var Y=new Wi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ve){Y.setOptions({needle:k,caseSensitive:z,wrap:!1,backwards:ve,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&y(se.start)},to:function(){return se&&y(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(k,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,D){if(k){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(m(k),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,D){return this.ace.session.getTextRange(new rr(k.line,k.ch,D.line,D.ch))},this.replaceRange=function(k,D,W){W||(W=D);var z=new rr(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,k)},this.replaceSelection=this.replaceSelections=function(k){var D=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var T={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,D){switch(this.state[k]=D,k){case"indentWithTabs":k=T[k],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:k=T[k]}k&&this.ace.setOption(k,D)},this.getOption=function(k){var D,W=T[k];switch(W&&(D=this.ace.getOption(W)),k){case"indentWithTabs":return k=T[k],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new Uo(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,D=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var D=this.ace.session.getTokenAt(k.line,k.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(k){var D=this.ace.session.findMatchingBracket(m(k));return{to:D&&y(D)}},this.findMatchingTag=function(k){var D=this.ace.session.getMatchingTags(m(k));if(D)return{open:{from:y(D.openTag.start),to:y(D.openTag.end)},close:{from:y(D.closeTag.start),to:y(D.closeTag.end)}}},this.indentLine=function(k,D){D===!0?this.ace.session.indentRows(k,k," "):D===!1&&this.ace.session.outdentRows(new rr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(m(k))},this.posFromIndex=function(k){return y(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),m(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:y(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(Pe.commands.hasOwnProperty(k))return Pe.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var D=this.$lineHandleChanges;if(!D)return null;for(var W=k.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return y(k.$lastDelta.end)}}).call(Pe.prototype);var la=Pe.StringStream=function(v,T){this.pos=this.start=0,this.string=v,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};la.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(v){var T=this.string.charAt(this.pos);if(typeof v=="string")var k=T==v;else var k=T&&(v.test?v.test(T):v(T));if(k)return++this.pos,T},eatWhile:function(v){for(var T=this.pos;this.eat(v););return this.pos>T},eatSpace:function(){for(var v=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>v},skipToEnd:function(){this.pos=this.string.length},skipTo:function(v){var T=this.string.indexOf(v,this.pos);if(T>-1)return this.pos=T,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,T,k){if(typeof v!="string"){var D=this.string.slice(this.pos).match(v);return D&&D.index>0?null:(D&&T!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return k?q.toLowerCase():q},z=this.string.substr(this.pos,v.length);if(W(z)==W(v))return T!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,T){this.lineStart+=v;try{return T()}finally{this.lineStart-=v}}},Pe.defineExtension=function(v,T){Pe.prototype[v]=T},Pi.importCssString(`.normal-mode .ace_cursor{
|
1403
|
+
border: none;
|
1404
|
+
background-color: rgba(255,0,0,0.5);
|
1405
|
+
}
|
1406
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1407
|
+
background-color: transparent;
|
1408
|
+
border: 1px solid red;
|
1409
|
+
opacity: 0.7
|
1410
|
+
}
|
1411
|
+
.ace_dialog {
|
1412
|
+
position: absolute;
|
1413
|
+
left: 0; right: 0;
|
1414
|
+
background: inherit;
|
1415
|
+
z-index: 15;
|
1416
|
+
padding: .1em .8em;
|
1417
|
+
overflow: hidden;
|
1418
|
+
color: inherit;
|
1419
|
+
}
|
1420
|
+
.ace_dialog-top {
|
1421
|
+
border-bottom: 1px solid #444;
|
1422
|
+
top: 0;
|
1423
|
+
}
|
1424
|
+
.ace_dialog-bottom {
|
1425
|
+
border-top: 1px solid #444;
|
1426
|
+
bottom: 0;
|
1427
|
+
}
|
1428
|
+
.ace_dialog input {
|
1429
|
+
border: none;
|
1430
|
+
outline: none;
|
1431
|
+
background: transparent;
|
1432
|
+
width: 20em;
|
1433
|
+
color: inherit;
|
1434
|
+
font-family: monospace;
|
1435
|
+
}`,"vimMode",!1),function(){function v(k,D,W){var z=k.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function T(k,D){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=D}Pe.defineExtension("openDialog",function(k,D,W){function z(ve){if(typeof ve=="string")re.value=ve;else{if(Y||ve&&ve.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),T(this,null);var q=v(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Pe.on(re,"input",function(ve){W.onInput(ve,re.value,z)}),W.onKeyUp&&Pe.on(re,"keyup",function(ve){W.onKeyUp(ve,re.value,z)}),Pe.on(re,"keydown",function(ve){W&&W.onKeyDown&&W.onKeyDown(ve,re.value,z)||(ve.keyCode==13&&D(re.value),(ve.keyCode==27||W.closeOnEnter!==!1&&ve.keyCode==13)&&(Pe.e_stop(ve),z()))}),W.closeOnBlur!==!1&&Pe.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Pe.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Pe.on(se,"blur",z),se.focus()),z}}),Pe.defineExtension("openNotification",function(k,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){T(this,W);var z=v(this,k,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Pe.on(z,"click",function(re){Pe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Pe.Pos,Tn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],mo=Tn.length,ni=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Hn=O(""),ca=/[\d]/,vo=[Pe.isWordChar,function(v){return v&&!Pe.isWordChar(v)&&!/\s/.test(v)}],mi=[function(v){return/\S/.test(v)}],eo=["<",">"],tn=["-",'"',".",":","_","/","+"],Xt=/^\w$/,nn;try{nn=new RegExp("^[\\p{Lu}]$","u")}catch{nn=/^[A-Z]$/}var Ht={};E("filetype",void 0,"string",["ft"],function(v,T){if(T!==void 0){if(v===void 0){var k=T.getOption("mode");return k=="null"?"":k}var k=v==""?"null":v;T.setOption("mode",k)}}),E("textwidth",80,"number",["tw"],function(v,T){if(T!==void 0){if(v===void 0){var k=T.getOption("textwidth");return k}var D=Math.round(v);D>1&&T.setOption("textwidth",D)}});var vi=function(){function v(Q,re,se){function ve(Oe){var Le=++W%D,Ue=Y[Le];Ue&&Ue.clear(),Y[Le]=Q.setBookmark(Oe)}var Ce=W%D,fe=Y[Ce];if(fe){var we=fe.find();we&&!ut(we,re)&&ve(re)}else ve(re);ve(se),z=W,q=W-D+1,q<0&&(q=0)}function T(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ve=re>0?1:-1,Ce,fe=Q.getCursor();do if(W+=ve,se=Y[(D+W)%D],se&&(Ce=se.find())&&!ut(fe,Ce))break;while(W<z&&W>q)}return se}function k(Q,re){var se=W,ve=T(Q,re);return W=se,ve&&ve.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:v,find:k,move:T}},Ln=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var v=Be.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,T){var k=Be.registerController.getRegister(T);if(k){if(k.clear(),this.latestRegister=T,v.openDialog){var D=ti("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=v.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var Be,mn,wt={enterVimMode:h,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return Be.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return Be},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Qi,map:function(v,T,k){mr.map(v,T,k)},unmap:function(v,T){return mr.unmap(v,T)},noremap:function(v,T,k){mr.map(v,T,k,!0)},mapclear:function(v){var T=Tn.length,k=mo,D=Tn.slice(0,T-k);if(Tn=Tn.slice(T-k),v)for(var W=D.length-1;W>=0;W--){var z=D[W];if(v!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==v){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:$,getOption:_,defineOption:E,defineEx:function(v,T,k){if(!T)T=v;else if(v.indexOf(T)!==0)throw new Error('(Vim.defineEx) "'+T+'" is not a prefix of "'+v+'", command not registered');As[v]=k,mr.commandMap_[T]={name:v,shortName:T,type:"api"}},handleKey:function(v,T,k){var D=this.findKey(v,T,k);if(typeof D=="function")return D()},multiSelectHandleKey:ho,findKey:function(v,T,k){function D(){var re=Be.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),A(v),!0;k!="mapping"&&Po(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)xt(v);else{if(!Y.insertMode)return;Hr(v)}return A(v),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),se=T.length==1,ve=On.matchCommand(re,Tn,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ve.type=="none")return A(v),!1;if(ve.type=="partial"){if(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),mn&&window.clearTimeout(mn),mn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(v)},_("insertModeEscKeysTimeout")),se){var fe=v.listSelections();(!Ce||Ce.removed.length!=fe.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=T;for(var we=0;we<fe.length;we++){var Oe=ht(fe[we].anchor,fe[we].head),Le=en(fe[we].anchor,fe[we].head),Ue=v.getRange(Oe,v.state.overwrite?ye(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+Ue}}return!se}if(Y.expectLiteralNext=!1,mn&&window.clearTimeout(mn),ve.command&&Ce){for(var fe=v.listSelections(),we=0;we<fe.length;we++){var st=fe[we].head;v.replaceRange(Ce.removed[we]||"",ye(st,0,-Ce.inserted.length),st,"+input")}Be.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||A(v),ve.command}function q(){if(D()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return A(v),!1;var ve=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var fe=On.matchCommand(Ce,Tn,Y.inputState,ve);return fe.type=="none"?(A(v),!1):fe.type=="partial"?(fe.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):fe.type=="clear"?(A(v),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),fe.command)}var Y=R(v),Q;return Y.insertMode?Q=z():Q=q(),Q===!1?!Y.insertMode&&T.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&v.getOption("readOnly")))return v.operation(function(){v.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(v,Q.toKeys,Q):On.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(v),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,T){mr.processCommand(v,T)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:bs,_mapCommand:Fo,defineRegister:U,exitVisualMode:xt,exitInsertMode:Hr},Lr=[],cn=!1,wn,Xn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Or={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},yi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Xn)).forEach(function(v){yi[(Xn[v]||"").toLowerCase()]=yi[v.toLowerCase()]=v}),E("langmap",void 0,"string",["lmap"],function(v,T){if(v===void 0)return Hn.string;P(v)}),S.prototype.pushRepeatDigit=function(v){this.operator?this.motionRepeat=this.motionRepeat.concat(v):this.prefixRepeat=this.prefixRepeat.concat(v)},S.prototype.getRepeat=function(){var v=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(v=1,this.prefixRepeat.length>0&&(v*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(v*=parseInt(this.motionRepeat.join(""),10))),v},B.prototype={setText:function(v,T,k){this.keyBuffer=[v||""],this.linewise=!!T,this.blockwise=!!k},pushText:function(v,T){T&&(this.linewise||this.keyBuffer.push(`
|
1436
|
+
`),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(Ln(v))},pushSearchQuery:function(v){this.searchQueries.push(v)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(v,T,k,D,W){if(v!=="_"){D&&k.charAt(k.length-1)!==`
|
1437
|
+
`&&(k+=`
|
1438
|
+
`);var z=this.isValidRegister(v)?this.getRegister(v):null;if(!z){switch(T){case"yank":this.registers[0]=new B(k,D,W);break;case"delete":case"change":k.indexOf(`
|
1439
|
+
`)==-1?this.registers["-"]=new B(k,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,D))}this.unnamedRegister.setText(k,D,W);return}var q=l(v);q?z.pushText(k,D):z.setText(k,D,W),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new B),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(b(v,tn)||Xt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,T){var k=this.historyBuffer,D=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var W=this.iterator+D;T?W>=0:W<k.length;W+=D)for(var z=k[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return v},pushInput:function(v){var T=this.historyBuffer.indexOf(v);T>-1&&this.historyBuffer.splice(T,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var On={matchCommand:function(v,T,k,D){var W=Ae(v,T,D,k);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ie(v);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(v,T,k){switch(T.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(v,T,k);break;case"operator":this.processOperator(v,T,k);break;case"operatorMotion":this.processOperatorMotion(v,T,k);break;case"action":this.processAction(v,T,k);break;case"search":this.processSearch(v,T,k);break;case"ex":case"keyToEx":this.processEx(v,T,k);break}},processMotion:function(v,T,k){T.inputState.motion=k.motion,T.inputState.motionArgs=ue(k.motionArgs),this.evalInput(v,T)},processOperator:function(v,T,k){var D=T.inputState;if(D.operator){if(D.operator==k.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(v,T);return}A(v)}D.operator=k.operator,D.operatorArgs=ue(k.operatorArgs),k.keys.length>1&&(D.operatorShortcut=k.keys),k.exitVisualBlock&&(T.visualBlock=!1,Ye(v)),T.visualMode&&this.evalInput(v,T)},processOperatorMotion:function(v,T,k){var D=T.visualMode,W=ue(k.operatorMotionArgs);W&&D&&W.visualLine&&(T.visualLine=!0),this.processOperator(v,T,k),D||this.processMotion(v,T,k)},processAction:function(v,T,k){var D=T.inputState,W=D.getRepeat(),z=!!W,q=ue(k.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),k.operator&&this.processOperator(v,T,k),k.motion&&this.processMotion(v,T,k),(k.motion||k.operator)&&this.evalInput(v,T),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,A(v),T.lastMotion=null,k.isEdit&&this.recordLastEdit(T,D,k),Nn[k.action](v,q,T)},processSearch:function(v,T,k){function D(Le,Ue,st){Be.searchHistoryController.pushInput(Le),Be.searchHistoryController.reset();try{fn(v,Le,Ue,st)}catch{jt(v,"Invalid regex: "+Le),A(v);return}On.processMotion(v,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){D(Le,!0,!0);var Ue=Be.macroModeState;Ue.isRecording&&Cs(Ue,Le)}function z(Le,Ue,st){var Qe=H(Le),nt,vn;Qe=="<Up>"||Qe=="<Down>"?(nt=Qe=="<Up>",vn=Le.target?Le.target.selectionEnd:0,Ue=Be.searchHistoryController.nextMatch(Ue,nt)||"",st(Ue),vn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(vn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Be.searchHistoryController.reset();var at;try{at=fn(v,Ue,!0,!0)}catch{}at?v.scrollIntoView(Sr(v,!Y,at),30):(No(v),v.scrollTo(ve.left,ve.top))}function q(Le,Ue,st){var Qe=H(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ue==""?(Be.searchHistoryController.pushInput(Ue),Be.searchHistoryController.reset(),fn(v,se),No(v),v.scrollTo(ve.left,ve.top),Pe.e_stop(Le),A(v),st(),v.focus()):Qe=="<Up>"||Qe=="<Down>"?Pe.e_stop(Le):Qe=="<C-u>"&&(Pe.e_stop(Le),st(""))}if(v.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;Sn(v).setReversed(!Y);var re=Y?"/":"?",se=Sn(v).getQuery(),ve=v.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=Be.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else Ar(v,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var fe=yt(v,{noSymbol:!0}),we=!0;if(fe||(fe=yt(v,{noSymbol:!1}),we=!1),!fe){jt(v,"No word under cursor"),A(v);return}var Oe=v.getLine(fe.start.line).substring(fe.start.ch,fe.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=gn(Oe),Be.jumpList.cachedCursor=v.getCursor(),v.setCursor(fe.start),D(Oe,!0,!1)}}},processEx:function(v,T,k){function D(z){Be.exCommandHistoryController.pushInput(z),Be.exCommandHistoryController.reset(),mr.processCommand(v,z),v.state.vim&&A(v)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Be.exCommandHistoryController.pushInput(q),Be.exCommandHistoryController.reset(),Pe.e_stop(z),A(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Pe.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=Be.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Pe.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Be.exCommandHistoryController.reset()}k.type=="keyToEx"?mr.processCommand(v,k.exArgs.input):T.visualMode?Ar(v,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):Ar(v,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(v,T){var k=T.inputState,D=k.motion,W=k.motionArgs||{},z=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=T.sel,re=qe(T.visualMode?ce(v,Q.head):v.getCursor("head")),se=qe(T.visualMode?ce(v,Q.anchor):v.getCursor("anchor")),ve=qe(re),Ce=qe(se),fe,we,Oe;if(z&&this.recordLastEdit(T,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(v),D){var Le=Ur[D](v,re,W,T,k);if(T.lastMotion=Ur[D],!Le)return;if(W.toJumplist){!z&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var Ue=Be.jumpList,st=Ue.cachedCursor;st?(Cr(v,st,Le),delete Ue.cachedCursor):Cr(v,re,Le)}Le instanceof Array?(we=Le[0],fe=Le[1]):fe=Le,fe||(fe=qe(re)),T.visualMode?((!T.visualBlock||fe.ch!==1/0)&&(fe=ce(v,fe,ve)),we&&(we=ce(v,we)),we=we||Ce,Q.anchor=we,Q.head=fe,Ye(v),ei(v,T,"<",rt(we,fe)?we:fe),ei(v,T,">",rt(we,fe)?fe:we)):z||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),fe=ce(v,fe,ve),v.setCursor(fe.line,fe.ch))}if(z){if(q.lastSel){we=Ce;var Qe=q.lastSel,nt=Math.abs(Qe.head.line-Qe.anchor.line),vn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?fe=new Ne(Ce.line+nt,Ce.ch):Qe.visualBlock?fe=new Ne(Ce.line+nt,Ce.ch+vn):Qe.head.line==Qe.anchor.line?fe=new Ne(Ce.line,Ce.ch+vn):fe=new Ne(Ce.line+nt,Ce.ch),T.visualMode=!0,T.visualLine=Qe.visualLine,T.visualBlock=Qe.visualBlock,Q=T.sel={anchor:we,head:fe},Ye(v)}else T.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var at,Cn,kt,$t,Qn;if(T.visualMode){at=ht(Q.head,Q.anchor),Cn=en(Q.head,Q.anchor),kt=T.visualLine||q.linewise,$t=T.visualBlock?"block":kt?"line":"char";var lr=x(v,at,Cn);if(Qn=dt(v,{anchor:lr.start,head:lr.end},$t),kt){var kn=Qn.ranges;if($t=="block")for(var V=0;V<kn.length;V++)kn[V].head.ch=Kt(v,kn[V].head.line);else $t=="line"&&(kn[0].head=new Ne(kn[0].head.line+1,0))}}else{if(at=qe(we||Ce),Cn=qe(fe||ve),rt(Cn,at)){var X=at;at=Cn,Cn=X}kt=W.linewise||q.linewise,kt?It(v,at,Cn):W.forward&&Ot(v,at,Cn),$t="char";var ie=!W.inclusive||kt,lr=x(v,at,Cn);Qn=dt(v,{anchor:lr.start,head:lr.end},$t,ie)}v.setSelections(Qn.ranges,Qn.primary),T.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=kt;var oe=Vo[z](v,q,Qn.ranges,Ce,fe);T.visualMode&&xt(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,T,k){var D=Be.macroModeState;D.isPlaying||(v.lastEditInputState=T,v.lastEditActionCommand=k,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},Ur={moveToTopLine:function(v,T,k){var D=Xi(v).top+k.repeat-1;return new Ne(D,ct(v.getLine(D)))},moveToMiddleLine:function(v){var T=Xi(v),k=Math.floor((T.top+T.bottom)*.5);return new Ne(k,ct(v.getLine(k)))},moveToBottomLine:function(v,T,k){var D=Xi(v).bottom-k.repeat+1;return new Ne(D,ct(v.getLine(D)))},expandToLine:function(v,T,k){var D=T;return new Ne(D.line+k.repeat-1,1/0)},findNext:function(v,T,k){var D=Sn(v),W=D.getQuery();if(W){var z=!k.forward;return z=D.isReversed()?!z:z,pi(v,W),Sr(v,z,W,k.repeat)}},findAndSelectNextInclusive:function(v,T,k,D,W){var z=Sn(v),q=z.getQuery();if(q){var Y=!k.forward;Y=z.isReversed()?!Y:Y;var Q=gi(v,Y,q,k.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ve=D.sel.anchor;if(ve)return z.isReversed()?k.forward?[ve,re]:[ve,se]:k.forward?[ve,se]:[ve,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,T,k,D){var W=jr(v,D,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:ct(v.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(v,T,k,D){if(D.visualBlock&&k.sameLine){var W=D.sel;return[ce(v,new Ne(W.anchor.line,W.head.ch)),ce(v,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(v,T,k,D){for(var W=T,z=0;z<k.repeat;z++){var q=W;for(var Y in D.marks)if(u(Y)){var Q=D.marks[Y].find(),re=k.forward?rt(Q,q):rt(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=ut(q,W),ve=k.forward?pn(q,Q,W):pn(W,Q,q);(se||ve)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,ct(v.getLine(W.line)))),W},moveByCharacters:function(v,T,k){var D=T,W=k.repeat,z=k.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(v,T,k,D){var W=T,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(v,T,k,D);if(Y>re&&W.line==re)return lo(v,T,k,D,!0);var se=v.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(z=ct(v.getLine(Y)),D.lastHPos=z),D.lastHSPos=v.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(v,T,k,D){var W=T;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=v.charCoords(W,"div").left}var z=k.repeat,Q=v.findPosV(W,k.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(k.forward)var q=v.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new Ne(v.firstLine(),0),"div");re.left=D.lastHSPos,Q=v.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(v,T,k){var D=T,W=k.repeat;return v.findPosV(D,k.forward?W:-W,"page")},moveByParagraph:function(v,T,k){var D=k.forward?1:-1;return vs(v,T,k.repeat,D)},moveBySentence:function(v,T,k){var D=k.forward?1:-1;return Oi(v,T,k.repeat,D)},moveByScroll:function(v,T,k,D){var W=v.getScrollInfo(),z=null,q=k.repeat;q||(q=W.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords(T,"local");if(k.repeat=q,z=Ur.moveByDisplayLines(v,T,k,D),!z)return null;var Q=v.charCoords(z,"local");return v.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(v,T,k){return gr(v,T,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(v,T,k){var D=k.repeat,W=Oo(v,D,k.forward,k.selectedCharacter,T),z=k.forward?-1:1;return zr(z,k),W?(W.ch+=z,W):null},moveToCharacter:function(v,T,k){var D=k.repeat;return zr(0,k),Oo(v,D,k.forward,k.selectedCharacter,T)||T},moveToSymbol:function(v,T,k){var D=k.repeat;return Li(v,D,k.forward,k.selectedCharacter)||T},moveToColumn:function(v,T,k,D){var W=k.repeat;return D.lastHPos=W-1,D.lastHSPos=v.charCoords(T,"div").left,ja(v,W)},moveToEol:function(v,T,k,D){return lo(v,T,k,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,T){var k=T;return new Ne(k.line,ct(v.getLine(k.line)))},moveToMatchedSymbol:function(v,T){for(var k=T,D=k.line,W=k.ch,z=v.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&a(q)){var Y=v.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(v,T){return new Ne(T.line,0)},moveToLineOrEdgeOfDocument:function(v,T,k){var D=k.forward?v.lastLine():v.firstLine();return k.repeatIsExplicit&&(D=k.repeat-v.getOption("firstLineNumber")),new Ne(D,ct(v.getLine(D)))},moveToStartOfDisplayLine:function(v){return v.execCommand("goLineLeft"),v.getCursor()},moveToEndOfDisplayLine:function(v){v.execCommand("goLineRight");var T=v.getCursor();return T.sticky=="before"&&T.ch--,T},textObjectManipulation:function(v,T,k,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=zn(v,T,q,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+q,"g"),T);se.find()&&(Q=zn(v,se.from(),q,Y))}}else if(z[q])re=!0,Q=kr(v,T,q,Y);else if(q==="W"||q==="w")for(var ve=k.repeat||1;ve-- >0;){var Ce=yt(v,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=vs(v,T,k.repeat,0,Y),k.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var fe=D.inputState.operatorArgs;fe&&(fe.linewise=!0),Q.end.line--}else if(q==="t")Q=xn(v,T,Y);else if(q==="s"){var we=v.getLine(T.line);T.ch>0&&w(we[T.ch])&&(T.ch-=1);var Oe=na(v,T,k.repeat,1,Y),Le=na(v,T,k.repeat,-1,Y);d(v.getLine(Le.line)[Le.ch])&&d(v.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?v.state.vim.visualMode?ze(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,T,k){var D=Be.lastCharacterSearch,W=k.repeat,z=k.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);v.moveH(-q,"char"),k.inclusive=!!z;var Y=Oo(v,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(v.moveH(q,"char"),T)}},Vo={change:function(v,T,k){var D,W,z=v.state.vim,q=k[0].anchor,Y=k[0].head;if(z.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(q,Y),W=v.getSelection(),v.replaceSelection(""),D=q;else{W=v.getSelection();var Q=he("",k.length);v.replaceSelections(Q),D=ht(k[0].head,k[0].anchor)}else{W=v.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ye(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}T.linewise&&(q=new Ne(q.line,ct(v.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",q,Y),D=q}Be.registerController.pushText(T.registerName,"change",W,T.linewise,k.length>1),Nn.enterInsertMode(v,{head:D},v.state.vim)},delete:function(v,T,k){var D,W,z=v.state.vim;if(z.visualBlock){W=v.getSelection();var q=he("",k.length);v.replaceSelections(q),D=ht(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[0].head;T.linewise&&Q.line!=v.firstLine()&&Y.line==v.lastLine()&&Y.line==Q.line-1&&(Y.line==v.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,Kt(v,Y.line-1))),W=v.getRange(Y,Q),v.replaceRange("",Y,Q),D=Y,T.linewise&&(D=Ur.moveToFirstNonWhiteSpaceCharacter(v,Y))}return Be.registerController.pushText(T.registerName,"delete",W,T.linewise,z.visualBlock),ce(v,D)},indent:function(v,T,k){var D=v.state.vim,W=D.visualMode?T.repeat:1;if(D.visualBlock){for(var z=v.getOption("tabSize"),q=v.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=k.length-1;Q>=0;Q--)if(Y=ht(k[Q].anchor,k[Q].head),T.indentRight)v.replaceRange(q.repeat(W),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ve=0;ve<W;ve++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var fe=1;fe<q.length&&(Ce=re[Y.ch+se],Ce===" ");fe++)se++}}v.replaceRange("",Y,ye(Y,0,se))}return Y}if(v.indentMore)for(var ve=0;ve<W;ve++)T.indentRight?v.indentMore():v.indentLess();else{var we=k[0].anchor.line,Oe=D.visualBlock?k[k.length-1].anchor.line:k[0].head.line;T.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ve=0;ve<W;ve++)v.indentLine(Q,T.indentRight)}return Ur.moveToFirstNonWhiteSpaceCharacter(v,k[0].anchor)},indentAuto:function(v,T,k){return v.execCommand("indentAuto"),Ur.moveToFirstNonWhiteSpaceCharacter(v,k[0].anchor)},hardWrap:function(v,T,k,D,W){if(v.hardWrap){var z=k[0].anchor.line,q=k[0].head.line;T.linewise&&q--;var Y=v.hardWrap({from:z,to:q});return Y>z&&T.linewise&&Y--,T.keepCursor?D:new Ne(Y,0)}},changeCase:function(v,T,k,D,W){for(var z=v.getSelections(),q=[],Y=T.toLower,Q=0;Q<z.length;Q++){var re=z[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ve=0;ve<re.length;ve++){var Ce=re.charAt(ve);se+=l(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return v.replaceSelections(q),T.shouldMoveCursor?W:!v.state.vim.visualMode&&T.linewise&&k[0].anchor.line+1==k[0].head.line?Ur.moveToFirstNonWhiteSpaceCharacter(v,D):T.linewise?D:ht(k[0].anchor,k[0].head)},yank:function(v,T,k,D){var W=v.state.vim,z=v.getSelection(),q=W.visualMode?ht(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):D;return Be.registerController.pushText(T.registerName,"yank",z,T.linewise,W.visualBlock),q}},Nn={jumpListWalk:function(v,T,k){if(!k.visualMode){var D=T.repeat,W=T.forward,z=Be.jumpList,q=z.move(v,W?D:-D),Y=q?q.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,T,k){if(!k.visualMode){var D=T.repeat||1,W=v.defaultTextHeight(),z=v.getScrollInfo().top,q=W*D,Y=T.forward?z+q:z-q,Q=qe(v.getCursor()),re=v.charCoords(Q,"local");if(T.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.top)):v.scrollTo(null,Y);else{var se=Y+v.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.bottom-v.getScrollInfo().clientHeight)):v.scrollTo(null,Y)}}},scrollToCursor:function(v,T){var k=v.getCursor().line,D=v.charCoords(new Ne(k,0),"local"),W=v.getScrollInfo().clientHeight,z=D.top;switch(T.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(k,v.getLine(k).length-1),Y=v.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}v.scrollTo(null,z)},replayMacro:function(v,T,k){var D=T.selectedCharacter,W=T.repeat,z=Be.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)xs(v,k,z,D)},enterMacroRecordMode:function(v,T){var k=Be.macroModeState,D=T.selectedCharacter;Be.registerController.isValidRegister(D)&&k.enterMacroRecordMode(v,D)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Pe.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Pe.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,T,k){if(!v.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=T&&T.repeat||1;var D=T?T.insertAt:null,W=k.sel,z=T.head||v.getCursor("head"),q=v.listSelections().length;if(D=="eol")z=new Ne(z.line,Kt(v,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=x(v,z,ye(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=x(v,z,Ur.moveToFirstNonWhiteSpaceCharacter(v,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=ye(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(k.visualMode)return}else D=="lastEdit"&&(z=co(v)||z);v.setOption("disableInput",!1),T&&T.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Pe.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Pe.signal(v,"vim-mode-change",{mode:"insert"})),Be.macroModeState.isPlaying||(v.on("change",uo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=v.setBookmark(z,{insertLeft:!0}),Pe.on(v.getInputField(),"keydown",ks)),k.visualMode&&xt(v),Yn(v,z,q)}},toggleVisualMode:function(v,T,k){var D=T.repeat,W=v.getCursor(),z;if(k.visualMode)k.visualLine^T.linewise||k.visualBlock^T.blockwise?(k.visualLine=!!T.linewise,k.visualBlock=!!T.blockwise,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(v)):xt(v);else{k.visualMode=!0,k.visualLine=!!T.linewise,k.visualBlock=!!T.blockwise,z=ce(v,new Ne(W.line,W.ch+D-1));var q=x(v,W,z);k.sel={anchor:q.start,head:q.end},Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(v),ei(v,k,"<",ht(W,z)),ei(v,k,">",en(W,z))}},reselectLastSelection:function(v,T,k){var D=k.lastSelection;if(k.visualMode&&ke(v,k),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;k.sel={anchor:W,head:z},k.visualMode=!0,k.visualLine=D.visualLine,k.visualBlock=D.visualBlock,Ye(v),ei(v,k,"<",ht(W,z)),ei(v,k,">",en(W,z)),Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(v,T,k){var D,W;if(k.visualMode){if(D=v.getCursor("anchor"),W=v.getCursor("head"),rt(W,D)){var z=W;W=D,D=z}W.ch=Kt(v,W.line)-1}else{var q=Math.max(T.repeat,2);D=v.getCursor(),W=ce(v,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=Kt(v,D.line);var re="",se=0;if(!T.keepSpaces){var ve=v.getLine(D.line+1);se=ve.search(/\S/),se==-1?se=ve.length:re=" "}v.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ce(v,new Ne(D.line,Y));k.visualMode&&xt(v,!1),v.setCursor(Ce)},newLineAndEnterInsertMode:function(v,T,k){k.insertMode=!0;var D=qe(v.getCursor());if(D.line===v.firstLine()&&!T.after)v.replaceRange(`
|
1440
|
+
`,new Ne(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{D.line=T.after?D.line:D.line-1,D.ch=Kt(v,D.line),v.setCursor(D);var W=Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent;W(v)}this.enterInsertMode(v,{repeat:T.repeat},k)},paste:function(v,T,k){var D=this,W=Be.registerController.getRegister(T.registerName),z=function(){var q=W.toString();D.continuePaste(v,T,k,q,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(v,T,k,q,W)},function(){z()}):z()},continuePaste:function(v,T,k,D,W){var z=qe(v.getCursor());if(D){if(T.matchIndent){var q=v.getOption("tabSize"),Y=function(kn){var V=kn.split(" ").length-1,X=kn.split(" ").length-1;return V*q+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ve=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(kn){var V=re+(Y(kn)-Ce);if(V<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ve?`
|
1441
|
+
`:""}if(T.repeat>1)var D=Array(T.repeat+1).join(D);var fe=W.linewise,we=W.blockwise;if(we){D=D.split(`
|
1442
|
+
`),fe&&D.pop();for(var Oe=0;Oe<D.length;Oe++)D[Oe]=D[Oe]==""?" ":D[Oe];z.ch+=T.after?1:0,z.ch=Math.min(Kt(v,z.line),z.ch)}else fe?k.visualMode?D=k.visualLine?D.slice(0,-1):`
|
1443
|
+
`+D.slice(0,D.length-1)+`
|
1444
|
+
`:T.after?(D=`
|
1445
|
+
`+D.slice(0,D.length-1),z.ch=Kt(v,z.line)):z.ch=0:z.ch+=T.after?1:0;var Le;if(k.visualMode){k.lastPastedText=D;var Ue,st=He(v,k),Qe=st[0],nt=st[1],vn=v.getSelection(),at=v.listSelections(),Cn=new Array(at.length).join("1").split("1");k.lastSelection&&(Ue=k.lastSelection.headMark.find()),Be.registerController.unnamedRegister.setText(vn),we?(v.replaceSelections(Cn),nt=new Ne(Qe.line+D.length-1,Qe.ch),v.setCursor(Qe),Rn(v,nt),v.replaceSelections(D),Le=Qe):k.visualBlock?(v.replaceSelections(Cn),v.setCursor(Qe),v.replaceRange(D,Qe,Qe),Le=Qe):(v.replaceRange(D,Qe,nt),Le=v.posFromIndex(v.indexFromPos(Qe)+D.length-1)),Ue&&(k.lastSelection.headMark=v.setBookmark(Ue)),fe&&(Le.ch=0)}else if(we){v.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var kt=z.line+Oe;kt>v.lastLine()&&v.replaceRange(`
|
1446
|
+
`,new Ne(kt,0));var $t=Kt(v,kt);$t<z.ch&&In(v,kt,z.ch)}v.setCursor(z),Rn(v,new Ne(z.line+D.length-1,z.ch)),v.replaceSelections(D),Le=z}else if(v.replaceRange(D,z),fe){var kt=T.after?z.line+1:z.line;Le=new Ne(kt,ct(v.getLine(kt)))}else Le=qe(z),/\n/.test(D)||(Le.ch+=D.length-(T.after?1:0));k.visualMode&&xt(v,!1),v.setCursor(Le)}},undo:function(v,T){v.operation(function(){Ge(v,Pe.commands.undo,T.repeat)(),v.setCursor(ce(v,v.getCursor("start")))})},redo:function(v,T){Ge(v,Pe.commands.redo,T.repeat)()},setRegister:function(v,T,k){k.inputState.registerName=T.selectedCharacter},insertRegister:function(v,T,k){var D=T.selectedCharacter,W=Be.registerController.getRegister(D),z=W&&W.toString();z&&v.replaceSelection(z)},oneNormalCommand:function(v,T,k){Hr(v,!0),k.insertModeReturn=!0,Pe.on(v,"vim-command-done",function D(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Nn.enterInsertMode(v,{},k)),Pe.off(v,"vim-command-done",D))})},setMark:function(v,T,k){var D=T.selectedCharacter;ei(v,k,D,v.getCursor())},replace:function(v,T,k){var D=T.selectedCharacter,W=v.getCursor(),z,q,Y=v.listSelections();if(k.visualMode)W=v.getCursor("start"),q=v.getCursor("end");else{var Q=v.getLine(W.line);z=W.ch+T.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=x(v,W,q);if(W=re.start,q=re.end,D==`
|
1447
|
+
`)k.visualMode||v.replaceRange("",W,q),(Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent)(v);else{var se=v.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),k.visualBlock){var ve=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ve).replace(/[^\n]/g,D).split(`
|
1448
|
+
`),v.replaceSelections(se)}else v.replaceRange(se,W,q);k.visualMode?(W=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(W),xt(v,!1)):v.setCursor(ye(q,0,-1))}},incrementNumberToken:function(v,T){for(var k=v.getCursor(),D=v.getLine(k.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(D))!==null&&(q=z.index,Y=q+z[0].length,!(k.ch<Y)););if(!(!T.backtrack&&Y<=k.ch)&&z){var re=z[2]||z[4],se=z[3]||z[5],ve=T.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],fe=parseInt(z[1]+se,Ce)+ve*T.repeat;Q=fe.toString(Ce);var we=re?new Array(se.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(k.line,q),Le=new Ne(k.line,Y);v.replaceRange(Q,Oe,Le),v.setCursor(new Ne(k.line,q+Q.length-1))}},repeatLastEdit:function(v,T,k){var D=k.lastEditInputState;if(D){var W=T.repeat;W&&T.repeatIsExplicit?k.lastEditInputState.repeatOverride=W:W=k.lastEditInputState.repeatOverride||W,oa(v,k,W,!1)}},indent:function(v,T){v.indentLine(v.getCursor().line,T.indentRight)},exitInsertMode:Hr},ri={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ii={bracket:{isComplete:function(v){if(v.nextCh===v.symb){if(v.depth++,v.depth>=1)return!0}else v.nextCh===v.reverseSymb&&v.depth--;return!1}},section:{init:function(v){v.curMoveThrough=!0,v.symb=(v.forward?"]":"[")===v.symb?"{":"}"},isComplete:function(v){return v.index===0&&v.nextCh===v.symb}},comment:{isComplete:function(v){var T=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,T}},method:{init:function(v){v.symb=v.symb==="m"?"{":"}",v.reverseSymb=v.symb==="{"?"}":"{"},isComplete:function(v){return v.nextCh===v.symb}},preprocess:{init:function(v){v.index=0},isComplete:function(v){if(v.nextCh==="#"){var T=v.lineText.match(/^#(\w+)/)[1];if(T==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if(T==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if(T==="else"&&v.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Ni.prototype={getQuery:function(){return Be.query},setQuery:function(v){Be.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return Be.isReversed},setReversed:function(v){Be.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var wi={"\\n":`
|
1449
|
+
`,"\\r":"\r","\\t":" "},sr={"\\/":"/","\\\\":"\\","\\n":`
|
1450
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},ar=0,fr=function(){this.buildCommandMap_()};fr.prototype={processCommand:function(v,T,k){var D=this;v.operation(function(){v.curOp.isVimOp=!0,D._processCommand(v,T,k)})},_processCommand:function(v,T,k){var D=v.state.vim,W=Be.registerController.getRegister(":"),z=W.toString(),q=new Pe.StringStream(T);W.setText(T);var Y=k||{};Y.input=T;try{this.parseInput_(v,q,Y)}catch(se){throw jt(v,se.toString()),se}D.visualMode&&xt(v);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&W.setText(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){jt(v,'Not an editor command ":'+T+'"');return}try{As[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw jt(v,se.toString()),se}},parseInput_:function(v,T,k){if(T.eatWhile(":"),T.eat("%")?(k.line=v.firstLine(),k.lineEnd=v.lastLine()):(k.line=this.parseLineSpec_(v,T),k.line!==void 0&&T.eat(",")&&(k.lineEnd=this.parseLineSpec_(v,T))),k.line==null)if(v.state.vim.visualMode){var D=jr(v,v.state.vim,"<");k.selectionLine=D&&D.line,D=jr(v,v.state.vim,">"),k.selectionLineEnd=D&&D.line}else k.selectionLine=v.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=T.match(/.*/)[0],k},parseLineSpec_:function(v,T){var k=T.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(T.next()){case".":return this.parseLineSpecOffset_(T,v.getCursor().line);case"$":return this.parseLineSpecOffset_(T,v.lastLine());case"'":var D=T.next(),W=jr(v,v.state.vim,D);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_(T,W.line);case"-":case"+":return T.backUp(1),this.parseLineSpecOffset_(T,v.getCursor().line);default:return T.backUp(1),void 0}},parseLineSpecOffset_:function(v,T){var k=v.match(/^([+-])?(\d+)/);if(k){var D=parseInt(k[2],10);k[1]=="-"?T-=D:T+=D}return T},parseCommandArgs_:function(v,T,k){if(!v.eol()){T.argString=v.match(/.*/)[0];var D=k.argDelimiter||/\s+/,W=pr(T.argString).split(D);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(v){for(var T=v.length;T>0;T--){var k=v.substring(0,T);if(this.commandMap_[k]){var D=this.commandMap_[k];if(D.name.indexOf(v)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<ni.length;v++){var T=ni[v],k=T.shortName||T.name;this.commandMap_[k]=T}},map:function(v,T,k,D){if(v!=":"&&v.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var W=v.substring(1);T!=":"&&T.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:T.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:T,user:!0}}else{var z={keys:v,type:"keyToKey",toKeys:T,noremap:!!D};k&&(z.context=k),Tn.unshift(z)}},unmap:function(v,T){if(v!=":"&&v.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var k=v.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var D=v,W=0;W<Tn.length;W++)if(D==Tn[W].keys&&Tn[W].context===T)return Tn.splice(W,1),!0}};var As={colorscheme:function(v,T){if(!T.args||T.args.length<1){jt(v,v.getOption("theme"));return}v.setOption("theme",T.args[0])},map:function(v,T,k,D){var W=T.args;if(!W||W.length<2){v&&jt(v,"Invalid mapping: "+T.input);return}mr.map(W[0],W[1],k,D)},imap:function(v,T){this.map(v,T,"insert")},nmap:function(v,T){this.map(v,T,"normal")},vmap:function(v,T){this.map(v,T,"visual")},omap:function(v,T){this.map(v,T,"operatorPending")},noremap:function(v,T){this.map(v,T,void 0,!0)},inoremap:function(v,T){this.map(v,T,"insert",!0)},nnoremap:function(v,T){this.map(v,T,"normal",!0)},vnoremap:function(v,T){this.map(v,T,"visual",!0)},onoremap:function(v,T){this.map(v,T,"operatorPending",!0)},unmap:function(v,T,k){var D=T.args;(!D||D.length<1||!mr.unmap(D[0],k))&&v&&jt(v,"No such mapping: "+T.input)},mapclear:function(v,T){wt.mapclear()},imapclear:function(v,T){wt.mapclear("insert")},nmapclear:function(v,T){wt.mapclear("normal")},vmapclear:function(v,T){wt.mapclear("visual")},omapclear:function(v,T){wt.mapclear("operatorPending")},move:function(v,T){On.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:T.line+1})},set:function(v,T){var k=T.args,D=T.setCfg||{};if(!k||k.length<1){v&&jt(v,"Invalid mapping: "+T.input);return}var W=k[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+T.argString);z=z.substring(0,z.length-1),Y=!0}else z.charAt(z.length-1)=="!"&&(z=z.substring(0,z.length-1),Q=!0);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=Ht[z]&&Ht[z].type=="boolean";if(re&&(Q?q=!_(z,v,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=_(z,v,D);se instanceof Error?jt(v,se.message):se===!0||se===!1?jt(v," "+(se?"":"no")+z):jt(v," "+z+"="+se)}else{var ve=$(z,q,v,D);ve instanceof Error&&jt(v,ve.message)}},setlocal:function(v,T){T.setCfg={scope:"local"},this.set(v,T)},setglobal:function(v,T){T.setCfg={scope:"global"},this.set(v,T)},registers:function(v,T){var k=T.args,D=Be.registerController.registers,W=`----------Registers----------
|
1451
|
+
|
1452
|
+
`;if(k){var z;k=k.join("");for(var q=0;q<k.length;q++)if(z=k.charAt(q),!!Be.registerController.isValidRegister(z)){var Y=D[z]||new B;W+='"'+z+" "+Y.toString()+`
|
1453
|
+
`}}else for(var z in D){var Q=D[z].toString();Q.length&&(W+='"'+z+" "+Q+`
|
1454
|
+
`)}jt(v,W)},sort:function(v,T){function k(){if(T.argString){var kt=new Pe.StringStream(T.argString);if(kt.eat("!")&&(z=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var $t=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!kt.eol())return"Invalid arguments";if($t[1]){q=$t[1].indexOf("i")!=-1,Y=$t[1].indexOf("u")!=-1;var Qn=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,lr=$t[1].indexOf("x")!=-1&&1,kn=$t[1].indexOf("o")!=-1&&1;if(Qn+lr+kn>1)return"Invalid arguments";Q=Qn&&"decimal"||lr&&"hex"||kn&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),q?"i":""))}}function D(kt,$t){if(z){var Qn;Qn=kt,kt=$t,$t=Qn}q&&(kt=kt.toLowerCase(),$t=$t.toLowerCase());var lr=Q&&Le.exec(kt),kn=Q&&Le.exec($t);return lr?(lr=parseInt((lr[1]+lr[2]).toLowerCase(),Ue),kn=parseInt((kn[1]+kn[2]).toLowerCase(),Ue),lr-kn):kt<$t?-1:1}function W(kt,$t){if(z){var Qn;Qn=kt,kt=$t,$t=Qn}return q&&(kt[0]=kt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),kt[0]<$t[0]?-1:1}var z,q,Y,Q,re,se=k();if(se){jt(v,se+": "+T.argString);return}var ve=T.line||v.firstLine(),Ce=T.lineEnd||T.line||v.lastLine();if(ve!=Ce){var fe=new Ne(ve,0),we=new Ne(Ce,Kt(v,Ce)),Oe=v.getRange(fe,we).split(`
|
1455
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ue=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var nt=0;nt<Oe.length;nt++){var vn=re?Oe[nt].match(re):null;vn&&vn[0]!=""?st.push(vn):!re&&Le.exec(Oe[nt])?st.push(Oe[nt]):Qe.push(Oe[nt])}else Qe=Oe;if(st.sort(re?W:D),re)for(var nt=0;nt<st.length;nt++)st[nt]=st[nt].input;else Q||Qe.sort(D);if(Oe=z?st.concat(Qe):Qe.concat(st),Y){var at=Oe,Cn;Oe=[];for(var nt=0;nt<at.length;nt++)at[nt]!=Cn&&Oe.push(at[nt]),Cn=at[nt]}v.replaceRange(Oe.join(`
|
1456
|
+
`),fe,we)}},vglobal:function(v,T){this.global(v,T)},normal:function(v,T){var k=T.argString;if(k&&k[0]=="!"&&(k=k.slice(1),cn=!0),k=k.trimStart(),!k){jt(v,"Argument is required.");return}var D=T.line;if(typeof D=="number")for(var W=isNaN(T.lineEnd)?D:T.lineEnd,z=D;z<=W;z++)v.setCursor(z,0),I(v,T.argString.trimStart()),v.state.vim.insertMode&&Hr(v,!0);else I(v,T.argString.trimStart()),v.state.vim.insertMode&&Hr(v,!0)},global:function(v,T){var k=T.argString;if(!k){jt(v,"Regular Expression missing from global");return}var D=T.commandName[0]==="v";k[0]==="!"&&T.commandName[0]==="g"&&(D=!0,k=k.slice(1));var W=T.line!==void 0?T.line:v.firstLine(),z=T.lineEnd||T.line||v.lastLine(),q=_r(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{fn(v,Y,!0,!0)}catch{jt(v,"Invalid regex: "+Y);return}for(var re=Sn(v).getQuery(),se=[],ve=W;ve<=z;ve++){var Ce=v.getLine(ve),fe=re.test(Ce);fe!==D&&se.push(Q?v.getLineHandle(ve):Ce)}if(!Q){jt(v,se.join(`
|
1457
|
+
`));return}var we=0,Oe=function(){if(we<se.length){var Le=se[we++],Ue=v.getLineNumber(Le);if(Ue==null){Oe();return}var st=Ue+1+Q;mr.processCommand(v,st,{callback:Oe})}else v.releaseLineHandles&&v.releaseLineHandles()};Oe()},substitute:function(v,T){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=T.argString,D=k?Di(k,k[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],_("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(_("pcre")?z=Va(z.replace(/([^\\])&/g,"$1$$&")):z=Ua(z),Be.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(k&&k.length){jt(v,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),_("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{fn(v,W,!0,!0)}catch{jt(v,"Invalid regex: "+W);return}if(z=z||Be.lastSubstituteReplacePart,z===void 0){jt(v,"No previous substitute regular expression");return}var ve=Sn(v),Ce=ve.getQuery(),fe=T.line!==void 0?T.line:v.getCursor().line,we=T.lineEnd||fe;fe==v.firstLine()&&we==v.lastLine()&&(we=1/0),Q&&(fe=we,we=fe+Q-1);var Oe=ce(v,new Ne(fe,0)),Le=v.getSearchCursor(Ce,Oe);Do(v,re,se,fe,we,Le,Ce,z,T.callback)},startinsert:function(v,T){I(v,T.argString=="!"?"A":"i",{})},redo:Pe.commands.redo,undo:Pe.commands.undo,write:function(v){Pe.commands.save?Pe.commands.save(v):v.save&&v.save()},nohlsearch:function(v){No(v)},yank:function(v){var T=qe(v.getCursor()),k=T.line,D=v.getLine(k);Be.registerController.pushText("0","yank",D,!0,!0)},delete:function(v,T){var k=T.selectionLine,D=isNaN(T.selectionLineEnd)?k:T.selectionLineEnd;Vo.delete(v,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(D+1,0)}])},join:function(v,T){var k=T.selectionLine,D=isNaN(T.selectionLineEnd)?k:T.selectionLineEnd;v.setCursor(new Ne(k,0)),Nn.joinLines(v,{repeat:D-k},v.state.vim)},delmarks:function(v,T){if(!T.argString||!pr(T.argString)){jt(v,"Argument required");return}for(var k=v.state.vim,D=new Pe.StringStream(pr(T.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){jt(v,"Invalid argument: "+T.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){jt(v,"Invalid argument: "+T.argString.substring(W));return}var q=z,Y=D.next();if(!(u(q)&&u(Y)||l(q)&&l(Y))){jt(v,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){jt(v,"Invalid argument: "+T.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete k.marks[ve]}}else delete k.marks[z]}}},mr=new fr;E("insertModeEscKeysTimeout",200,"number"),Pe.Vim=wt;var Tr={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},oi=wt.handleKey.bind(wt);wt.handleKey=function(v,T,k){return v.operation(function(){return oi(v,T,k)},!0)},L(),r.CodeMirror=Pe;var si=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,T,k,D,W){var z=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=T.top,re=T.left;if(!z.insertMode){var se=D.cursor?rr.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Pi.translate(v,re,Q),Pi.setStyle(v.style,"width",q+"px"),Pi.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var T=v.state.cm,k=si(T);if(!k.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,T,k,D,W){var z=v.editor,q=z.state.cm,Y=si(q);if(D!=-1){if(Y.insertMode||(T==-1?(k.charCodeAt(0)>255&&v.inputKey&&(k=v.inputKey,k&&v.inputHash==4&&(k=k.toUpperCase())),v.inputChar=k):T==4||T==0?v.inputKey==k&&v.inputHash==T&&v.inputChar?(k=v.inputChar,T=-1):(v.inputChar=null,v.inputKey=k,v.inputHash=T):v.inputChar=v.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&T==0)return{command:"gotoleft"};if(k=="c"&&T==1&&!go.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){xt(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Sn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(T==-1||T&1||T===0&&k.length>1){var se=Y.insertMode,ve=_s(T,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=ho(q,ve,"user");return Y=si(q),Ce&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&(T!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(v){function T(){var D=si(k).insertMode;k.ace.renderer.setStyle("normal-mode",!D),v.textInput.setCommandMode(!D),v.renderer.$keepTextAreaAtCursor=D,v.renderer.$blockCursor=!D}v.state||(v.state={});var k=new Pe(v);v.state.cm=k,v.$vimModeHandler=this,h(k),si(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(si(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(T(),k._signal("changeStatus"))}),T(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(v){var T=v.state.cm;g(T),T.destroy(),v.state.cm=null,v.$vimModeHandler=null,v.renderer.$cursorLayer.drawCursor=null,v.renderer.setStyle("normal-mode",!1),v.textInput.setCommandMode(!1),v.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(v){var T=v.state.cm,k=si(T);if(k.insertMode)return"INSERT";var D="";return k.visualMode&&(D+="VISUAL",k.visualLine&&(D+=" LINE"),k.visualBlock&&(D+=" BLOCK")),k.status&&(D+=(D?" ":"")+k.status),D}},wt.defineOption({name:"wrap",set:function(v,T){T&&T.ace.setOption("wrap",v)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),Tn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Tn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(v,T,k,D,W){var z=k[0].anchor.line,q=k[0].head.line;return T.linewise&&q--,Ji(v.ace,{startRow:z,endRow:q}),Ne(q,0)}),E("textwidth",void 0,"number",["tw"],function(v,T){if(T!==void 0){if(v===void 0){var k=T.ace.getOption("printMarginColumn");return k}var D=Math.round(v);D>1&&T.ace.setOption("printMarginColumn",D)}}),Nn.aceCommand=function(v,T,k){v.vimCmd=T,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",fi):fi(null,v.ace)},Nn.fold=function(v,T,k){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},mo=Tn.length,r.handler.defaultKeymap=Tn,r.handler.actions=Nn,r.Vim=wt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(Xg)),Xg.exports}IC();var Ml={exports:{}};/**
|
1458
|
+
* @license
|
1459
|
+
* Lodash <https://lodash.com/>
|
1460
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1461
|
+
* Released under MIT license <https://lodash.com/license>
|
1462
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1463
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1464
|
+
*/var RC=Ml.exports,Zg;function EC(){return Zg||(Zg=1,function(n,t){(function(){var e,r="4.17.21",f=200,m="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",x="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",c=1,u=2,a=4,o=1,l=2,d=1,w=2,b=4,E=8,$=16,_=32,C=64,R=128,L=256,F=512,I=30,H="...",P=800,O=16,S=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",R],["bind",d],["bindKey",w],["curry",E],["curryRight",$],["flip",F],["partial",_],["partialRight",C],["rearg",L]],ce="[object Arguments]",ue="[object Array]",ye="[object AsyncFunction]",Ae="[object Boolean]",$e="[object Date]",Ie="[object DOMException]",Ge="[object Error]",qe="[object Function]",ut="[object GeneratorFunction]",rt="[object Map]",ht="[object Number]",en="[object Null]",pn="[object Object]",Kt="[object Promise]",pr="[object Proxy]",gn="[object RegExp]",In="[object Set]",Rn="[object String]",Yn="[object Symbol]",vt="[object Undefined]",He="[object WeakMap]",ke="[object WeakSet]",ze="[object ArrayBuffer]",Ye="[object DataView]",dt="[object Float32Array]",Ct="[object Float64Array]",xt="[object Int8Array]",Ot="[object Int16Array]",It="[object Int32Array]",ct="[object Uint8Array]",yt="[object Uint8ClampedArray]",xn="[object Uint16Array]",Cr="[object Uint32Array]",zr=/\b__p \+= '';/g,Li=/\b(__p \+=) '' \+/g,ao=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gr=/&(?:amp|lt|gt|quot|#39);/g,lo=/[&<>"']/g,Oo=RegExp(gr.source),ja=RegExp(lo.source),ei=/<%-([\s\S]+?)%>/g,Ha=/<%([\s\S]+?)%>/g,vs=/<%=([\s\S]+?)%>/g,na=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(kr.source),Sn=/^\s+/,_r=/\s/,Yi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,ys=/,? & /,ra=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ua=/[()=,{}\[\]\/\s]/,Va=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ti=/\w*$/,jt=/^[-+]0x[0-9a-f]+$/i,ia=/^0b[01]+$/i,Ar=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,fn=/^(?:0|[1-9]\d*)$/,En=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pi=/($^)/,Sr=/['\n\r\u2028\u2029\\]/g,gi="\\ud800-\\udfff",No="\\u0300-\\u036f",ws="\\ufe20-\\ufe2f",Xi="\\u20d0-\\u20ff",jr=No+ws+Xi,co="\\u2700-\\u27bf",Do="a-z\\xdf-\\xf6\\xf8-\\xff",Hr="\\xac\\xb1\\xd7\\xf7",Fo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bs="\\u2000-\\u206f",xs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Po="A-Z\\xc0-\\xd6\\xd8-\\xde",nr="\\ufe0e\\ufe0f",Cs=Hr+Fo+bs+xs,uo="['’]",Wo="["+gi+"]",Bo="["+Cs+"]",Qi="["+jr+"]",ks="\\d+",oa="["+co+"]",zo="["+Do+"]",jo="[^"+gi+Cs+ks+co+Do+Po+"]",_s="\\ud83c[\\udffb-\\udfff]",Ho="(?:"+Qi+"|"+_s+")",ho="[^"+gi+"]",fi="(?:\\ud83c[\\udde6-\\uddff]){2}",rr="[\\ud800-\\udbff][\\udc00-\\udfff]",Zi="["+Po+"]",Pi="\\u200d",sa="(?:"+zo+"|"+jo+")",qa="(?:"+Zi+"|"+jo+")",po="(?:"+uo+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+uo+"(?:D|LL|M|RE|S|T|VE))?",go=Ho+"?",Uo="["+nr+"]?",fo="(?:"+Pi+"(?:"+[ho,fi,rr].join("|")+")"+Uo+go+")*",aa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ji="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pe=Uo+go+fo,la="(?:"+[oa,fi,rr].join("|")+")"+Pe,Ne="(?:"+[ho+Qi+"?",Qi,fi,rr,Wo].join("|")+")",Tn=RegExp(uo,"g"),mo=RegExp(Qi,"g"),ni=RegExp(_s+"(?="+_s+")|"+Ne+Pe,"g"),Hn=RegExp([Zi+"?"+zo+"+"+po+"(?="+[Bo,Zi,"$"].join("|")+")",qa+"+"+Wi+"(?="+[Bo,Zi+sa,"$"].join("|")+")",Zi+"?"+sa+"+"+po,Zi+"+"+Wi,Ji,aa,ks,la].join("|"),"g"),ca=RegExp("["+Pi+gi+jr+nr+"]"),vo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eo=-1,tn={};tn[dt]=tn[Ct]=tn[xt]=tn[Ot]=tn[It]=tn[ct]=tn[yt]=tn[xn]=tn[Cr]=!0,tn[ce]=tn[ue]=tn[ze]=tn[Ae]=tn[Ye]=tn[$e]=tn[Ge]=tn[qe]=tn[rt]=tn[ht]=tn[pn]=tn[gn]=tn[In]=tn[Rn]=tn[He]=!1;var Xt={};Xt[ce]=Xt[ue]=Xt[ze]=Xt[Ye]=Xt[Ae]=Xt[$e]=Xt[dt]=Xt[Ct]=Xt[xt]=Xt[Ot]=Xt[It]=Xt[rt]=Xt[ht]=Xt[pn]=Xt[gn]=Xt[In]=Xt[Rn]=Xt[Yn]=Xt[ct]=Xt[yt]=Xt[xn]=Xt[Cr]=!0,Xt[Ge]=Xt[qe]=Xt[He]=!1;var nn={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ht={"&":"&","<":"<",">":">",'"':""","'":"'"},vi={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,mn=parseInt,wt=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro,Lr=typeof self=="object"&&self&&self.Object===Object&&self,cn=wt||Lr||Function("return this")(),wn=t&&!t.nodeType&&t,Xn=wn&&!0&&n&&!n.nodeType&&n,Or=Xn&&Xn.exports===wn,yi=Or&&wt.process,On=function(){try{var pe=Xn&&Xn.require&&Xn.require("util").types;return pe||yi&&yi.binding&&yi.binding("util")}catch{}}(),Ur=On&&On.isArrayBuffer,Vo=On&&On.isDate,Nn=On&&On.isMap,ri=On&&On.isRegExp,ii=On&&On.isSet,wi=On&&On.isTypedArray;function sr(pe,_e,xe){switch(xe.length){case 0:return pe.call(_e);case 1:return pe.call(_e,xe[0]);case 2:return pe.call(_e,xe[0],xe[1]);case 3:return pe.call(_e,xe[0],xe[1],xe[2])}return pe.apply(_e,xe)}function ar(pe,_e,xe,je){for(var lt=-1,Mt=pe==null?0:pe.length;++lt<Mt;){var Gt=pe[lt];_e(je,Gt,xe(Gt),pe)}return je}function fr(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je&&_e(pe[xe],xe,pe)!==!1;);return pe}function As(pe,_e){for(var xe=pe==null?0:pe.length;xe--&&_e(pe[xe],xe,pe)!==!1;);return pe}function mr(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(!_e(pe[xe],xe,pe))return!1;return!0}function Tr(pe,_e){for(var xe=-1,je=pe==null?0:pe.length,lt=0,Mt=[];++xe<je;){var Gt=pe[xe];_e(Gt,xe,pe)&&(Mt[lt++]=Gt)}return Mt}function oi(pe,_e){var xe=pe==null?0:pe.length;return!!xe&&se(pe,_e,0)>-1}function si(pe,_e,xe){for(var je=-1,lt=pe==null?0:pe.length;++je<lt;)if(xe(_e,pe[je]))return!0;return!1}function v(pe,_e){for(var xe=-1,je=pe==null?0:pe.length,lt=Array(je);++xe<je;)lt[xe]=_e(pe[xe],xe,pe);return lt}function T(pe,_e){for(var xe=-1,je=_e.length,lt=pe.length;++xe<je;)pe[lt+xe]=_e[xe];return pe}function k(pe,_e,xe,je){var lt=-1,Mt=pe==null?0:pe.length;for(je&&Mt&&(xe=pe[++lt]);++lt<Mt;)xe=_e(xe,pe[lt],lt,pe);return xe}function D(pe,_e,xe,je){var lt=pe==null?0:pe.length;for(je&<&&(xe=pe[--lt]);lt--;)xe=_e(xe,pe[lt],lt,pe);return xe}function W(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(_e(pe[xe],xe,pe))return!0;return!1}var z=we("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(ra)||[]}function Q(pe,_e,xe){var je;return xe(pe,function(lt,Mt,Gt){if(_e(lt,Mt,Gt))return je=Mt,!1}),je}function re(pe,_e,xe,je){for(var lt=pe.length,Mt=xe+(je?1:-1);je?Mt--:++Mt<lt;)if(_e(pe[Mt],Mt,pe))return Mt;return-1}function se(pe,_e,xe){return _e===_e?Ze(pe,_e,xe):re(pe,Ce,xe)}function ve(pe,_e,xe,je){for(var lt=xe-1,Mt=pe.length;++lt<Mt;)if(je(pe[lt],_e))return lt;return-1}function Ce(pe){return pe!==pe}function fe(pe,_e){var xe=pe==null?0:pe.length;return xe?st(pe,_e)/xe:Z}function we(pe){return function(_e){return _e==null?e:_e[pe]}}function Oe(pe){return function(_e){return pe==null?e:pe[_e]}}function Le(pe,_e,xe,je,lt){return lt(pe,function(Mt,Gt,Nt){xe=je?(je=!1,Mt):_e(xe,Mt,Gt,Nt)}),xe}function Ue(pe,_e){var xe=pe.length;for(pe.sort(_e);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,_e){for(var xe,je=-1,lt=pe.length;++je<lt;){var Mt=_e(pe[je]);Mt!==e&&(xe=xe===e?Mt:xe+Mt)}return xe}function Qe(pe,_e){for(var xe=-1,je=Array(pe);++xe<pe;)je[xe]=_e(xe);return je}function nt(pe,_e){return v(_e,function(xe){return[xe,pe[xe]]})}function vn(pe){return pe&&pe.slice(0,Ft(pe)+1).replace(Sn,"")}function at(pe){return function(_e){return pe(_e)}}function Cn(pe,_e){return v(_e,function(xe){return pe[xe]})}function kt(pe,_e){return pe.has(_e)}function $t(pe,_e){for(var xe=-1,je=pe.length;++xe<je&&se(_e,pe[xe],0)>-1;);return xe}function Qn(pe,_e){for(var xe=pe.length;xe--&&se(_e,pe[xe],0)>-1;);return xe}function lr(pe,_e){for(var xe=pe.length,je=0;xe--;)pe[xe]===_e&&++je;return je}var kn=Oe(nn),V=Oe(Ht);function X(pe){return"\\"+Ln[pe]}function ie(pe,_e){return pe==null?e:pe[_e]}function oe(pe){return ca.test(pe)}function ge(pe){return vo.test(pe)}function be(pe){for(var _e,xe=[];!(_e=pe.next()).done;)xe.push(_e.value);return xe}function Me(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je,lt){xe[++_e]=[lt,je]}),xe}function Fe(pe,_e){return function(xe){return pe(_e(xe))}}function We(pe,_e){for(var xe=-1,je=pe.length,lt=0,Mt=[];++xe<je;){var Gt=pe[xe];(Gt===_e||Gt===s)&&(pe[xe]=s,Mt[lt++]=xe)}return Mt}function Ve(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++_e]=je}),xe}function Xe(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++_e]=[je,je]}),xe}function Ze(pe,_e,xe){for(var je=xe-1,lt=pe.length;++je<lt;)if(pe[je]===_e)return je;return-1}function bt(pe,_e,xe){for(var je=xe+1;je--;)if(pe[je]===_e)return je;return je}function Wt(pe){return oe(pe)?ot(pe):z(pe)}function _t(pe){return oe(pe)?dn(pe):q(pe)}function Ft(pe){for(var _e=pe.length;_e--&&_r.test(pe.charAt(_e)););return _e}var pt=Oe(vi);function ot(pe){for(var _e=ni.lastIndex=0;ni.test(pe);)++_e;return _e}function dn(pe){return pe.match(ni)||[]}function _n(pe){return pe.match(Hn)||[]}var Zn=function pe(_e){_e=_e==null?cn:Vt.defaults(cn.Object(),_e,Vt.pick(cn,mi));var xe=_e.Array,je=_e.Date,lt=_e.Error,Mt=_e.Function,Gt=_e.Math,Nt=_e.Object,Nr=_e.RegExp,bi=_e.String,un=_e.TypeError,cr=xe.prototype,yo=Mt.prototype,Dn=Nt.prototype,Ss=_e["__core-js_shared__"],cc=yo.toString,ln=Dn.hasOwnProperty,AM=0,Cy=function(){var i=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),uc=Dn.toString,SM=cc.call(Nt),TM=cn._,$M=Nr("^"+cc.call(ln).replace(kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hc=Or?_e.Buffer:e,qo=_e.Symbol,dc=_e.Uint8Array,ky=hc?hc.allocUnsafe:e,pc=Fe(Nt.getPrototypeOf,Nt),_y=Nt.create,Ay=Dn.propertyIsEnumerable,gc=cr.splice,Sy=qo?qo.isConcatSpreadable:e,Ka=qo?qo.iterator:e,Ts=qo?qo.toStringTag:e,fc=function(){try{var i=Es(Nt,"defineProperty");return i({},"",{}),i}catch{}}(),MM=_e.clearTimeout!==cn.clearTimeout&&_e.clearTimeout,IM=je&&je.now!==cn.Date.now&&je.now,RM=_e.setTimeout!==cn.setTimeout&&_e.setTimeout,mc=Gt.ceil,vc=Gt.floor,rd=Nt.getOwnPropertySymbols,EM=hc?hc.isBuffer:e,Ty=_e.isFinite,LM=cr.join,OM=Fe(Nt.keys,Nt),ir=Gt.max,$r=Gt.min,NM=je.now,DM=_e.parseInt,$y=Gt.random,FM=cr.reverse,id=Es(_e,"DataView"),Ga=Es(_e,"Map"),od=Es(_e,"Promise"),ua=Es(_e,"Set"),Ya=Es(_e,"WeakMap"),Xa=Es(Nt,"create"),yc=Ya&&new Ya,ha={},PM=Ls(id),WM=Ls(Ga),BM=Ls(od),zM=Ls(ua),jM=Ls(Ya),wc=qo?qo.prototype:e,Qa=wc?wc.valueOf:e,My=wc?wc.toString:e;function J(i){if(Fn(i)&&!At(i)&&!(i instanceof Ut)){if(i instanceof xi)return i;if(ln.call(i,"__wrapped__"))return Iw(i)}return new xi(i)}var da=function(){function i(){}return function(p){if(!$n(p))return{};if(_y)return _y(p);i.prototype=p;var M=new i;return i.prototype=e,M}}();function bc(){}function xi(i,p){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=e}J.templateSettings={escape:ei,evaluate:Ha,interpolate:vs,variable:"",imports:{_:J}},J.prototype=bc.prototype,J.prototype.constructor=J,xi.prototype=da(bc.prototype),xi.prototype.constructor=xi;function Ut(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function HM(){var i=new Ut(this.__wrapped__);return i.__actions__=Vr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Vr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Vr(this.__views__),i}function UM(){if(this.__filtered__){var i=new Ut(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function VM(){var i=this.__wrapped__.value(),p=this.__dir__,M=At(i),j=p<0,G=M?i.length:0,ee=rR(0,G,this.__views__),le=ee.start,de=ee.end,me=de-le,Re=j?de:le-1,Ee=this.__iteratees__,De=Ee.length,Ke=0,it=$r(me,this.__takeCount__);if(!M||!j&&G==me&&it==me)return Jy(i,this.__actions__);var ft=[];e:for(;me--&&Ke<it;){Re+=p;for(var Dt=-1,mt=i[Re];++Dt<De;){var Bt=Ee[Dt],qt=Bt.iteratee,ci=Bt.type,Pr=qt(mt);if(ci==A)mt=Pr;else if(!Pr){if(ci==S)continue e;break e}}ft[Ke++]=mt}return ft}Ut.prototype=da(bc.prototype),Ut.prototype.constructor=Ut;function $s(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function qM(){this.__data__=Xa?Xa(null):{},this.size=0}function KM(i){var p=this.has(i)&&delete this.__data__[i];return this.size-=p?1:0,p}function GM(i){var p=this.__data__;if(Xa){var M=p[i];return M===h?e:M}return ln.call(p,i)?p[i]:e}function YM(i){var p=this.__data__;return Xa?p[i]!==e:ln.call(p,i)}function XM(i,p){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=Xa&&p===e?h:p,this}$s.prototype.clear=qM,$s.prototype.delete=KM,$s.prototype.get=GM,$s.prototype.has=YM,$s.prototype.set=XM;function wo(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function QM(){this.__data__=[],this.size=0}function ZM(i){var p=this.__data__,M=xc(p,i);if(M<0)return!1;var j=p.length-1;return M==j?p.pop():gc.call(p,M,1),--this.size,!0}function JM(i){var p=this.__data__,M=xc(p,i);return M<0?e:p[M][1]}function eI(i){return xc(this.__data__,i)>-1}function tI(i,p){var M=this.__data__,j=xc(M,i);return j<0?(++this.size,M.push([i,p])):M[j][1]=p,this}wo.prototype.clear=QM,wo.prototype.delete=ZM,wo.prototype.get=JM,wo.prototype.has=eI,wo.prototype.set=tI;function bo(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function nI(){this.size=0,this.__data__={hash:new $s,map:new(Ga||wo),string:new $s}}function rI(i){var p=Lc(this,i).delete(i);return this.size-=p?1:0,p}function iI(i){return Lc(this,i).get(i)}function oI(i){return Lc(this,i).has(i)}function sI(i,p){var M=Lc(this,i),j=M.size;return M.set(i,p),this.size+=M.size==j?0:1,this}bo.prototype.clear=nI,bo.prototype.delete=rI,bo.prototype.get=iI,bo.prototype.has=oI,bo.prototype.set=sI;function Ms(i){var p=-1,M=i==null?0:i.length;for(this.__data__=new bo;++p<M;)this.add(i[p])}function aI(i){return this.__data__.set(i,h),this}function lI(i){return this.__data__.has(i)}Ms.prototype.add=Ms.prototype.push=aI,Ms.prototype.has=lI;function Bi(i){var p=this.__data__=new wo(i);this.size=p.size}function cI(){this.__data__=new wo,this.size=0}function uI(i){var p=this.__data__,M=p.delete(i);return this.size=p.size,M}function hI(i){return this.__data__.get(i)}function dI(i){return this.__data__.has(i)}function pI(i,p){var M=this.__data__;if(M instanceof wo){var j=M.__data__;if(!Ga||j.length<f-1)return j.push([i,p]),this.size=++M.size,this;M=this.__data__=new bo(j)}return M.set(i,p),this.size=M.size,this}Bi.prototype.clear=cI,Bi.prototype.delete=uI,Bi.prototype.get=hI,Bi.prototype.has=dI,Bi.prototype.set=pI;function Iy(i,p){var M=At(i),j=!M&&Os(i),G=!M&&!j&&Qo(i),ee=!M&&!j&&!G&&ma(i),le=M||j||G||ee,de=le?Qe(i.length,bi):[],me=de.length;for(var Re in i)(p||ln.call(i,Re))&&!(le&&(Re=="length"||G&&(Re=="offset"||Re=="parent")||ee&&(Re=="buffer"||Re=="byteLength"||Re=="byteOffset")||_o(Re,me)))&&de.push(Re);return de}function Ry(i){var p=i.length;return p?i[md(0,p-1)]:e}function gI(i,p){return Oc(Vr(i),Is(p,0,i.length))}function fI(i){return Oc(Vr(i))}function sd(i,p,M){(M!==e&&!zi(i[p],M)||M===e&&!(p in i))&&xo(i,p,M)}function Za(i,p,M){var j=i[p];(!(ln.call(i,p)&&zi(j,M))||M===e&&!(p in i))&&xo(i,p,M)}function xc(i,p){for(var M=i.length;M--;)if(zi(i[M][0],p))return M;return-1}function mI(i,p,M,j){return Ko(i,function(G,ee,le){p(j,G,M(G),le)}),j}function Ey(i,p){return i&&no(p,ur(p),i)}function vI(i,p){return i&&no(p,Kr(p),i)}function xo(i,p,M){p=="__proto__"&&fc?fc(i,p,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[p]=M}function ad(i,p){for(var M=-1,j=p.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?e:zd(i,p[M]);return G}function Is(i,p,M){return i===i&&(M!==e&&(i=i<=M?i:M),p!==e&&(i=i>=p?i:p)),i}function Ci(i,p,M,j,G,ee){var le,de=p&c,me=p&u,Re=p&a;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==e)return le;if(!$n(i))return i;var Ee=At(i);if(Ee){if(le=oR(i),!de)return Vr(i,le)}else{var De=Mr(i),Ke=De==qe||De==ut;if(Qo(i))return nw(i,de);if(De==pn||De==ce||Ke&&!G){if(le=me||Ke?{}:xw(i),!de)return me?GI(i,vI(le,i)):KI(i,Ey(le,i))}else{if(!Xt[De])return G?i:{};le=sR(i,De,de)}}ee||(ee=new Bi);var it=ee.get(i);if(it)return it;ee.set(i,le),Xw(i)?i.forEach(function(mt){le.add(Ci(mt,p,M,mt,i,ee))}):Gw(i)&&i.forEach(function(mt,Bt){le.set(Bt,Ci(mt,p,M,Bt,i,ee))});var ft=Re?me?Td:Sd:me?Kr:ur,Dt=Ee?e:ft(i);return fr(Dt||i,function(mt,Bt){Dt&&(Bt=mt,mt=i[Bt]),Za(le,Bt,Ci(mt,p,M,Bt,i,ee))}),le}function yI(i){var p=ur(i);return function(M){return Ly(M,i,p)}}function Ly(i,p,M){var j=M.length;if(i==null)return!j;for(i=Nt(i);j--;){var G=M[j],ee=p[G],le=i[G];if(le===e&&!(G in i)||!ee(le))return!1}return!0}function Oy(i,p,M){if(typeof i!="function")throw new un(y);return ol(function(){i.apply(e,M)},p)}function Ja(i,p,M,j){var G=-1,ee=oi,le=!0,de=i.length,me=[],Re=p.length;if(!de)return me;M&&(p=v(p,at(M))),j?(ee=si,le=!1):p.length>=f&&(ee=kt,le=!1,p=new Ms(p));e:for(;++G<de;){var Ee=i[G],De=M==null?Ee:M(Ee);if(Ee=j||Ee!==0?Ee:0,le&&De===De){for(var Ke=Re;Ke--;)if(p[Ke]===De)continue e;me.push(Ee)}else ee(p,De,j)||me.push(Ee)}return me}var Ko=aw(to),Ny=aw(cd,!0);function wI(i,p){var M=!0;return Ko(i,function(j,G,ee){return M=!!p(j,G,ee),M}),M}function Cc(i,p,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=p(ee);if(le!=null&&(de===e?le===le&&!li(le):M(le,de)))var de=le,me=ee}return me}function bI(i,p,M,j){var G=i.length;for(M=Rt(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:Rt(j),j<0&&(j+=G),j=M>j?0:Zw(j);M<j;)i[M++]=p;return i}function Dy(i,p){var M=[];return Ko(i,function(j,G,ee){p(j,G,ee)&&M.push(j)}),M}function vr(i,p,M,j,G){var ee=-1,le=i.length;for(M||(M=lR),G||(G=[]);++ee<le;){var de=i[ee];p>0&&M(de)?p>1?vr(de,p-1,M,j,G):T(G,de):j||(G[G.length]=de)}return G}var ld=lw(),Fy=lw(!0);function to(i,p){return i&&ld(i,p,ur)}function cd(i,p){return i&&Fy(i,p,ur)}function kc(i,p){return Tr(p,function(M){return Ao(i[M])})}function Rs(i,p){p=Yo(p,i);for(var M=0,j=p.length;i!=null&&M<j;)i=i[ro(p[M++])];return M&&M==j?i:e}function Py(i,p,M){var j=p(i);return At(i)?j:T(j,M(i))}function Dr(i){return i==null?i===e?vt:en:Ts&&Ts in Nt(i)?nR(i):fR(i)}function ud(i,p){return i>p}function xI(i,p){return i!=null&&ln.call(i,p)}function CI(i,p){return i!=null&&p in Nt(i)}function kI(i,p,M){return i>=$r(p,M)&&i<ir(p,M)}function hd(i,p,M){for(var j=M?si:oi,G=i[0].length,ee=i.length,le=ee,de=xe(ee),me=1/0,Re=[];le--;){var Ee=i[le];le&&p&&(Ee=v(Ee,at(p))),me=$r(Ee.length,me),de[le]=!M&&(p||G>=120&&Ee.length>=120)?new Ms(le&&Ee):e}Ee=i[0];var De=-1,Ke=de[0];e:for(;++De<G&&Re.length<me;){var it=Ee[De],ft=p?p(it):it;if(it=M||it!==0?it:0,!(Ke?kt(Ke,ft):j(Re,ft,M))){for(le=ee;--le;){var Dt=de[le];if(!(Dt?kt(Dt,ft):j(i[le],ft,M)))continue e}Ke&&Ke.push(ft),Re.push(it)}}return Re}function _I(i,p,M,j){return to(i,function(G,ee,le){p(j,M(G),ee,le)}),j}function el(i,p,M){p=Yo(p,i),i=Aw(i,p);var j=i==null?i:i[ro(_i(p))];return j==null?e:sr(j,i,M)}function Wy(i){return Fn(i)&&Dr(i)==ce}function AI(i){return Fn(i)&&Dr(i)==ze}function SI(i){return Fn(i)&&Dr(i)==$e}function tl(i,p,M,j,G){return i===p?!0:i==null||p==null||!Fn(i)&&!Fn(p)?i!==i&&p!==p:TI(i,p,M,j,tl,G)}function TI(i,p,M,j,G,ee){var le=At(i),de=At(p),me=le?ue:Mr(i),Re=de?ue:Mr(p);me=me==ce?pn:me,Re=Re==ce?pn:Re;var Ee=me==pn,De=Re==pn,Ke=me==Re;if(Ke&&Qo(i)){if(!Qo(p))return!1;le=!0,Ee=!1}if(Ke&&!Ee)return ee||(ee=new Bi),le||ma(i)?yw(i,p,M,j,G,ee):eR(i,p,me,M,j,G,ee);if(!(M&o)){var it=Ee&&ln.call(i,"__wrapped__"),ft=De&&ln.call(p,"__wrapped__");if(it||ft){var Dt=it?i.value():i,mt=ft?p.value():p;return ee||(ee=new Bi),G(Dt,mt,M,j,ee)}}return Ke?(ee||(ee=new Bi),tR(i,p,M,j,G,ee)):!1}function $I(i){return Fn(i)&&Mr(i)==rt}function dd(i,p,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Nt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var me=de[0],Re=i[me],Ee=de[1];if(le&&de[2]){if(Re===e&&!(me in i))return!1}else{var De=new Bi;if(j)var Ke=j(Re,Ee,me,i,p,De);if(!(Ke===e?tl(Ee,Re,o|l,j,De):Ke))return!1}}return!0}function By(i){if(!$n(i)||uR(i))return!1;var p=Ao(i)?$M:Ar;return p.test(Ls(i))}function MI(i){return Fn(i)&&Dr(i)==gn}function II(i){return Fn(i)&&Mr(i)==In}function RI(i){return Fn(i)&&Bc(i.length)&&!!tn[Dr(i)]}function zy(i){return typeof i=="function"?i:i==null?Gr:typeof i=="object"?At(i)?Uy(i[0],i[1]):Hy(i):c0(i)}function pd(i){if(!il(i))return OM(i);var p=[];for(var M in Nt(i))ln.call(i,M)&&M!="constructor"&&p.push(M);return p}function EI(i){if(!$n(i))return gR(i);var p=il(i),M=[];for(var j in i)j=="constructor"&&(p||!ln.call(i,j))||M.push(j);return M}function gd(i,p){return i<p}function jy(i,p){var M=-1,j=qr(i)?xe(i.length):[];return Ko(i,function(G,ee,le){j[++M]=p(G,ee,le)}),j}function Hy(i){var p=Md(i);return p.length==1&&p[0][2]?kw(p[0][0],p[0][1]):function(M){return M===i||dd(M,i,p)}}function Uy(i,p){return Rd(i)&&Cw(p)?kw(ro(i),p):function(M){var j=zd(M,i);return j===e&&j===p?jd(M,i):tl(p,j,o|l)}}function _c(i,p,M,j,G){i!==p&&ld(p,function(ee,le){if(G||(G=new Bi),$n(ee))LI(i,p,le,M,_c,j,G);else{var de=j?j(Ld(i,le),ee,le+"",i,p,G):e;de===e&&(de=ee),sd(i,le,de)}},Kr)}function LI(i,p,M,j,G,ee,le){var de=Ld(i,M),me=Ld(p,M),Re=le.get(me);if(Re){sd(i,M,Re);return}var Ee=ee?ee(de,me,M+"",i,p,le):e,De=Ee===e;if(De){var Ke=At(me),it=!Ke&&Qo(me),ft=!Ke&&!it&&ma(me);Ee=me,Ke||it||ft?At(de)?Ee=de:Un(de)?Ee=Vr(de):it?(De=!1,Ee=nw(me,!0)):ft?(De=!1,Ee=rw(me,!0)):Ee=[]:sl(me)||Os(me)?(Ee=de,Os(de)?Ee=Jw(de):(!$n(de)||Ao(de))&&(Ee=xw(me))):De=!1}De&&(le.set(me,Ee),G(Ee,me,j,ee,le),le.delete(me)),sd(i,M,Ee)}function Vy(i,p){var M=i.length;if(M)return p+=p<0?M:0,_o(p,M)?i[p]:e}function qy(i,p,M){p.length?p=v(p,function(ee){return At(ee)?function(le){return Rs(le,ee.length===1?ee[0]:ee)}:ee}):p=[Gr];var j=-1;p=v(p,at(gt()));var G=jy(i,function(ee,le,de){var me=v(p,function(Re){return Re(ee)});return{criteria:me,index:++j,value:ee}});return Ue(G,function(ee,le){return qI(ee,le,M)})}function OI(i,p){return Ky(i,p,function(M,j){return jd(i,j)})}function Ky(i,p,M){for(var j=-1,G=p.length,ee={};++j<G;){var le=p[j],de=Rs(i,le);M(de,le)&&nl(ee,Yo(le,i),de)}return ee}function NI(i){return function(p){return Rs(p,i)}}function fd(i,p,M,j){var G=j?ve:se,ee=-1,le=p.length,de=i;for(i===p&&(p=Vr(p)),M&&(de=v(i,at(M)));++ee<le;)for(var me=0,Re=p[ee],Ee=M?M(Re):Re;(me=G(de,Ee,me,j))>-1;)de!==i&&gc.call(de,me,1),gc.call(i,me,1);return i}function Gy(i,p){for(var M=i?p.length:0,j=M-1;M--;){var G=p[M];if(M==j||G!==ee){var ee=G;_o(G)?gc.call(i,G,1):wd(i,G)}}return i}function md(i,p){return i+vc($y()*(p-i+1))}function DI(i,p,M,j){for(var G=-1,ee=ir(mc((p-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function vd(i,p){var M="";if(!i||p<1||p>U)return M;do p%2&&(M+=i),p=vc(p/2),p&&(i+=i);while(p);return M}function Pt(i,p){return Od(_w(i,p,Gr),i+"")}function FI(i){return Ry(va(i))}function PI(i,p){var M=va(i);return Oc(M,Is(p,0,M.length))}function nl(i,p,M,j){if(!$n(i))return i;p=Yo(p,i);for(var G=-1,ee=p.length,le=ee-1,de=i;de!=null&&++G<ee;){var me=ro(p[G]),Re=M;if(me==="__proto__"||me==="constructor"||me==="prototype")return i;if(G!=le){var Ee=de[me];Re=j?j(Ee,me,de):e,Re===e&&(Re=$n(Ee)?Ee:_o(p[G+1])?[]:{})}Za(de,me,Re),de=de[me]}return i}var Yy=yc?function(i,p){return yc.set(i,p),i}:Gr,WI=fc?function(i,p){return fc(i,"toString",{configurable:!0,enumerable:!1,value:Ud(p),writable:!0})}:Gr;function BI(i){return Oc(va(i))}function ki(i,p,M){var j=-1,G=i.length;p<0&&(p=-p>G?0:G+p),M=M>G?G:M,M<0&&(M+=G),G=p>M?0:M-p>>>0,p>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+p];return ee}function zI(i,p){var M;return Ko(i,function(j,G,ee){return M=p(j,G,ee),!M}),!!M}function Ac(i,p,M){var j=0,G=i==null?j:i.length;if(typeof p=="number"&&p===p&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!li(le)&&(M?le<=p:le<p)?j=ee+1:G=ee}return G}return yd(i,p,Gr,M)}function yd(i,p,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;p=M(p);for(var le=p!==p,de=p===null,me=li(p),Re=p===e;G<ee;){var Ee=vc((G+ee)/2),De=M(i[Ee]),Ke=De!==e,it=De===null,ft=De===De,Dt=li(De);if(le)var mt=j||ft;else Re?mt=ft&&(j||Ke):de?mt=ft&&Ke&&(j||!it):me?mt=ft&&Ke&&!it&&(j||!Dt):it||Dt?mt=!1:mt=j?De<=p:De<p;mt?G=Ee+1:ee=Ee}return $r(ee,he)}function Xy(i,p){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=p?p(le):le;if(!M||!zi(de,me)){var me=de;ee[G++]=le===0?0:le}}return ee}function Qy(i){return typeof i=="number"?i:li(i)?Z:+i}function ai(i){if(typeof i=="string")return i;if(At(i))return v(i,ai)+"";if(li(i))return My?My.call(i):"";var p=i+"";return p=="0"&&1/i==-1/0?"-0":p}function Go(i,p,M){var j=-1,G=oi,ee=i.length,le=!0,de=[],me=de;if(M)le=!1,G=si;else if(ee>=f){var Re=p?null:ZI(i);if(Re)return Ve(Re);le=!1,G=kt,me=new Ms}else me=p?[]:de;e:for(;++j<ee;){var Ee=i[j],De=p?p(Ee):Ee;if(Ee=M||Ee!==0?Ee:0,le&&De===De){for(var Ke=me.length;Ke--;)if(me[Ke]===De)continue e;p&&me.push(De),de.push(Ee)}else G(me,De,M)||(me!==de&&me.push(De),de.push(Ee))}return de}function wd(i,p){return p=Yo(p,i),i=Aw(i,p),i==null||delete i[ro(_i(p))]}function Zy(i,p,M,j){return nl(i,p,M(Rs(i,p)),j)}function Sc(i,p,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&p(i[ee],ee,i););return M?ki(i,j?0:ee,j?ee+1:G):ki(i,j?ee+1:0,j?G:ee)}function Jy(i,p){var M=i;return M instanceof Ut&&(M=M.value()),k(p,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function bd(i,p,M){var j=i.length;if(j<2)return j?Go(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=Ja(ee[G]||le,i[de],p,M));return Go(vr(ee,1),p,M)}function ew(i,p,M){for(var j=-1,G=i.length,ee=p.length,le={};++j<G;){var de=j<ee?p[j]:e;M(le,i[j],de)}return le}function xd(i){return Un(i)?i:[]}function Cd(i){return typeof i=="function"?i:Gr}function Yo(i,p){return At(i)?i:Rd(i,p)?[i]:Mw(on(i))}var jI=Pt;function Xo(i,p,M){var j=i.length;return M=M===e?j:M,!p&&M>=j?i:ki(i,p,M)}var tw=MM||function(i){return cn.clearTimeout(i)};function nw(i,p){if(p)return i.slice();var M=i.length,j=ky?ky(M):new i.constructor(M);return i.copy(j),j}function kd(i){var p=new i.constructor(i.byteLength);return new dc(p).set(new dc(i)),p}function HI(i,p){var M=p?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function UI(i){var p=new i.constructor(i.source,ti.exec(i));return p.lastIndex=i.lastIndex,p}function VI(i){return Qa?Nt(Qa.call(i)):{}}function rw(i,p){var M=p?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function iw(i,p){if(i!==p){var M=i!==e,j=i===null,G=i===i,ee=li(i),le=p!==e,de=p===null,me=p===p,Re=li(p);if(!de&&!Re&&!ee&&i>p||ee&&le&&me&&!de&&!Re||j&&le&&me||!M&&me||!G)return 1;if(!j&&!ee&&!Re&&i<p||Re&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!me)return-1}return 0}function qI(i,p,M){for(var j=-1,G=i.criteria,ee=p.criteria,le=G.length,de=M.length;++j<le;){var me=iw(G[j],ee[j]);if(me){if(j>=de)return me;var Re=M[j];return me*(Re=="desc"?-1:1)}}return i.index-p.index}function ow(i,p,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,me=p.length,Re=ir(ee-le,0),Ee=xe(me+Re),De=!j;++de<me;)Ee[de]=p[de];for(;++G<le;)(De||G<ee)&&(Ee[M[G]]=i[G]);for(;Re--;)Ee[de++]=i[G++];return Ee}function sw(i,p,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,me=-1,Re=p.length,Ee=ir(ee-de,0),De=xe(Ee+Re),Ke=!j;++G<Ee;)De[G]=i[G];for(var it=G;++me<Re;)De[it+me]=p[me];for(;++le<de;)(Ke||G<ee)&&(De[it+M[le]]=i[G++]);return De}function Vr(i,p){var M=-1,j=i.length;for(p||(p=xe(j));++M<j;)p[M]=i[M];return p}function no(i,p,M,j){var G=!M;M||(M={});for(var ee=-1,le=p.length;++ee<le;){var de=p[ee],me=j?j(M[de],i[de],de,M,i):e;me===e&&(me=i[de]),G?xo(M,de,me):Za(M,de,me)}return M}function KI(i,p){return no(i,Id(i),p)}function GI(i,p){return no(i,ww(i),p)}function Tc(i,p){return function(M,j){var G=At(M)?ar:mI,ee=p?p():{};return G(M,i,gt(j,2),ee)}}function pa(i){return Pt(function(p,M){var j=-1,G=M.length,ee=G>1?M[G-1]:e,le=G>2?M[2]:e;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):e,le&&Fr(M[0],M[1],le)&&(ee=G<3?e:ee,G=1),p=Nt(p);++j<G;){var de=M[j];de&&i(p,de,j,ee)}return p})}function aw(i,p){return function(M,j){if(M==null)return M;if(!qr(M))return i(M,j);for(var G=M.length,ee=p?G:-1,le=Nt(M);(p?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function lw(i){return function(p,M,j){for(var G=-1,ee=Nt(p),le=j(p),de=le.length;de--;){var me=le[i?de:++G];if(M(ee[me],me,ee)===!1)break}return p}}function YI(i,p,M){var j=p&d,G=rl(i);function ee(){var le=this&&this!==cn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function cw(i){return function(p){p=on(p);var M=oe(p)?_t(p):e,j=M?M[0]:p.charAt(0),G=M?Xo(M,1).join(""):p.slice(1);return j[i]()+G}}function ga(i){return function(p){return k(a0(s0(p).replace(Tn,"")),i,"")}}function rl(i){return function(){var p=arguments;switch(p.length){case 0:return new i;case 1:return new i(p[0]);case 2:return new i(p[0],p[1]);case 3:return new i(p[0],p[1],p[2]);case 4:return new i(p[0],p[1],p[2],p[3]);case 5:return new i(p[0],p[1],p[2],p[3],p[4]);case 6:return new i(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new i(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var M=da(i.prototype),j=i.apply(M,p);return $n(j)?j:M}}function XI(i,p,M){var j=rl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,me=fa(G);de--;)le[de]=arguments[de];var Re=ee<3&&le[0]!==me&&le[ee-1]!==me?[]:We(le,me);if(ee-=Re.length,ee<M)return gw(i,p,$c,G.placeholder,e,le,Re,e,e,M-ee);var Ee=this&&this!==cn&&this instanceof G?j:i;return sr(Ee,this,le)}return G}function uw(i){return function(p,M,j){var G=Nt(p);if(!qr(p)){var ee=gt(M,3);p=ur(p),M=function(de){return ee(G[de],de,G)}}var le=i(p,M,j);return le>-1?G[ee?p[le]:le]:e}}function hw(i){return ko(function(p){var M=p.length,j=M,G=xi.prototype.thru;for(i&&p.reverse();j--;){var ee=p[j];if(typeof ee!="function")throw new un(y);if(G&&!le&&Ec(ee)=="wrapper")var le=new xi([],!0)}for(j=le?j:M;++j<M;){ee=p[j];var de=Ec(ee),me=de=="wrapper"?$d(ee):e;me&&Ed(me[0])&&me[1]==(R|E|_|L)&&!me[4].length&&me[9]==1?le=le[Ec(me[0])].apply(le,me[3]):le=ee.length==1&&Ed(ee)?le[de]():le.thru(ee)}return function(){var Re=arguments,Ee=Re[0];if(le&&Re.length==1&&At(Ee))return le.plant(Ee).value();for(var De=0,Ke=M?p[De].apply(this,Re):Ee;++De<M;)Ke=p[De].call(this,Ke);return Ke}})}function $c(i,p,M,j,G,ee,le,de,me,Re){var Ee=p&R,De=p&d,Ke=p&w,it=p&(E|$),ft=p&F,Dt=Ke?e:rl(i);function mt(){for(var Bt=arguments.length,qt=xe(Bt),ci=Bt;ci--;)qt[ci]=arguments[ci];if(it)var Pr=fa(mt),ui=lr(qt,Pr);if(j&&(qt=ow(qt,j,G,it)),ee&&(qt=sw(qt,ee,le,it)),Bt-=ui,it&&Bt<Re){var Vn=We(qt,Pr);return gw(i,p,$c,mt.placeholder,M,qt,Vn,de,me,Re-Bt)}var ji=De?M:this,To=Ke?ji[i]:i;return Bt=qt.length,de?qt=mR(qt,de):ft&&Bt>1&&qt.reverse(),Ee&&me<Bt&&(qt.length=me),this&&this!==cn&&this instanceof mt&&(To=Dt||rl(To)),To.apply(ji,qt)}return mt}function dw(i,p){return function(M,j){return _I(M,i,p(j),{})}}function Mc(i,p){return function(M,j){var G;if(M===e&&j===e)return p;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=ai(M),j=ai(j)):(M=Qy(M),j=Qy(j)),G=i(M,j)}return G}}function _d(i){return ko(function(p){return p=v(p,at(gt())),Pt(function(M){var j=this;return i(p,function(G){return sr(G,j,M)})})})}function Ic(i,p){p=p===e?" ":ai(p);var M=p.length;if(M<2)return M?vd(p,i):p;var j=vd(p,mc(i/Wt(p)));return oe(p)?Xo(_t(j),0,i).join(""):j.slice(0,i)}function QI(i,p,M,j){var G=p&d,ee=rl(i);function le(){for(var de=-1,me=arguments.length,Re=-1,Ee=j.length,De=xe(Ee+me),Ke=this&&this!==cn&&this instanceof le?ee:i;++Re<Ee;)De[Re]=j[Re];for(;me--;)De[Re++]=arguments[++de];return sr(Ke,G?M:this,De)}return le}function pw(i){return function(p,M,j){return j&&typeof j!="number"&&Fr(p,M,j)&&(M=j=e),p=So(p),M===e?(M=p,p=0):M=So(M),j=j===e?p<M?1:-1:So(j),DI(p,M,j,i)}}function Rc(i){return function(p,M){return typeof p=="string"&&typeof M=="string"||(p=Ai(p),M=Ai(M)),i(p,M)}}function gw(i,p,M,j,G,ee,le,de,me,Re){var Ee=p&E,De=Ee?le:e,Ke=Ee?e:le,it=Ee?ee:e,ft=Ee?e:ee;p|=Ee?_:C,p&=~(Ee?C:_),p&b||(p&=-4);var Dt=[i,p,G,it,De,ft,Ke,de,me,Re],mt=M.apply(e,Dt);return Ed(i)&&Sw(mt,Dt),mt.placeholder=j,Tw(mt,i,p)}function Ad(i){var p=Gt[i];return function(M,j){if(M=Ai(M),j=j==null?0:$r(Rt(j),292),j&&Ty(M)){var G=(on(M)+"e").split("e"),ee=p(G[0]+"e"+(+G[1]+j));return G=(on(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return p(M)}}var ZI=ua&&1/Ve(new ua([,-0]))[1]==B?function(i){return new ua(i)}:Kd;function fw(i){return function(p){var M=Mr(p);return M==rt?Me(p):M==In?Xe(p):nt(p,i(p))}}function Co(i,p,M,j,G,ee,le,de){var me=p&w;if(!me&&typeof i!="function")throw new un(y);var Re=j?j.length:0;if(Re||(p&=-97,j=G=e),le=le===e?le:ir(Rt(le),0),de=de===e?de:Rt(de),Re-=G?G.length:0,p&C){var Ee=j,De=G;j=G=e}var Ke=me?e:$d(i),it=[i,p,M,j,G,Ee,De,ee,le,de];if(Ke&&pR(it,Ke),i=it[0],p=it[1],M=it[2],j=it[3],G=it[4],de=it[9]=it[9]===e?me?0:i.length:ir(it[9]-Re,0),!de&&p&(E|$)&&(p&=-25),!p||p==d)var ft=YI(i,p,M);else p==E||p==$?ft=XI(i,p,de):(p==_||p==(d|_))&&!G.length?ft=QI(i,p,M,j):ft=$c.apply(e,it);var Dt=Ke?Yy:Sw;return Tw(Dt(ft,it),i,p)}function mw(i,p,M,j){return i===e||zi(i,Dn[M])&&!ln.call(j,M)?p:i}function vw(i,p,M,j,G,ee){return $n(i)&&$n(p)&&(ee.set(p,i),_c(i,p,e,vw,ee),ee.delete(p)),i}function JI(i){return sl(i)?e:i}function yw(i,p,M,j,G,ee){var le=M&o,de=i.length,me=p.length;if(de!=me&&!(le&&me>de))return!1;var Re=ee.get(i),Ee=ee.get(p);if(Re&&Ee)return Re==p&&Ee==i;var De=-1,Ke=!0,it=M&l?new Ms:e;for(ee.set(i,p),ee.set(p,i);++De<de;){var ft=i[De],Dt=p[De];if(j)var mt=le?j(Dt,ft,De,p,i,ee):j(ft,Dt,De,i,p,ee);if(mt!==e){if(mt)continue;Ke=!1;break}if(it){if(!W(p,function(Bt,qt){if(!kt(it,qt)&&(ft===Bt||G(ft,Bt,M,j,ee)))return it.push(qt)})){Ke=!1;break}}else if(!(ft===Dt||G(ft,Dt,M,j,ee))){Ke=!1;break}}return ee.delete(i),ee.delete(p),Ke}function eR(i,p,M,j,G,ee,le){switch(M){case Ye:if(i.byteLength!=p.byteLength||i.byteOffset!=p.byteOffset)return!1;i=i.buffer,p=p.buffer;case ze:return!(i.byteLength!=p.byteLength||!ee(new dc(i),new dc(p)));case Ae:case $e:case ht:return zi(+i,+p);case Ge:return i.name==p.name&&i.message==p.message;case gn:case Rn:return i==p+"";case rt:var de=Me;case In:var me=j&o;if(de||(de=Ve),i.size!=p.size&&!me)return!1;var Re=le.get(i);if(Re)return Re==p;j|=l,le.set(i,p);var Ee=yw(de(i),de(p),j,G,ee,le);return le.delete(i),Ee;case Yn:if(Qa)return Qa.call(i)==Qa.call(p)}return!1}function tR(i,p,M,j,G,ee){var le=M&o,de=Sd(i),me=de.length,Re=Sd(p),Ee=Re.length;if(me!=Ee&&!le)return!1;for(var De=me;De--;){var Ke=de[De];if(!(le?Ke in p:ln.call(p,Ke)))return!1}var it=ee.get(i),ft=ee.get(p);if(it&&ft)return it==p&&ft==i;var Dt=!0;ee.set(i,p),ee.set(p,i);for(var mt=le;++De<me;){Ke=de[De];var Bt=i[Ke],qt=p[Ke];if(j)var ci=le?j(qt,Bt,Ke,p,i,ee):j(Bt,qt,Ke,i,p,ee);if(!(ci===e?Bt===qt||G(Bt,qt,M,j,ee):ci)){Dt=!1;break}mt||(mt=Ke=="constructor")}if(Dt&&!mt){var Pr=i.constructor,ui=p.constructor;Pr!=ui&&"constructor"in i&&"constructor"in p&&!(typeof Pr=="function"&&Pr instanceof Pr&&typeof ui=="function"&&ui instanceof ui)&&(Dt=!1)}return ee.delete(i),ee.delete(p),Dt}function ko(i){return Od(_w(i,e,Lw),i+"")}function Sd(i){return Py(i,ur,Id)}function Td(i){return Py(i,Kr,ww)}var $d=yc?function(i){return yc.get(i)}:Kd;function Ec(i){for(var p=i.name+"",M=ha[p],j=ln.call(ha,p)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return p}function fa(i){var p=ln.call(J,"placeholder")?J:i;return p.placeholder}function gt(){var i=J.iteratee||Vd;return i=i===Vd?zy:i,arguments.length?i(arguments[0],arguments[1]):i}function Lc(i,p){var M=i.__data__;return cR(p)?M[typeof p=="string"?"string":"hash"]:M.map}function Md(i){for(var p=ur(i),M=p.length;M--;){var j=p[M],G=i[j];p[M]=[j,G,Cw(G)]}return p}function Es(i,p){var M=ie(i,p);return By(M)?M:e}function nR(i){var p=ln.call(i,Ts),M=i[Ts];try{i[Ts]=e;var j=!0}catch{}var G=uc.call(i);return j&&(p?i[Ts]=M:delete i[Ts]),G}var Id=rd?function(i){return i==null?[]:(i=Nt(i),Tr(rd(i),function(p){return Ay.call(i,p)}))}:Gd,ww=rd?function(i){for(var p=[];i;)T(p,Id(i)),i=pc(i);return p}:Gd,Mr=Dr;(id&&Mr(new id(new ArrayBuffer(1)))!=Ye||Ga&&Mr(new Ga)!=rt||od&&Mr(od.resolve())!=Kt||ua&&Mr(new ua)!=In||Ya&&Mr(new Ya)!=He)&&(Mr=function(i){var p=Dr(i),M=p==pn?i.constructor:e,j=M?Ls(M):"";if(j)switch(j){case PM:return Ye;case WM:return rt;case BM:return Kt;case zM:return In;case jM:return He}return p});function rR(i,p,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":p-=le;break;case"take":p=$r(p,i+le);break;case"takeRight":i=ir(i,p-le);break}}return{start:i,end:p}}function iR(i){var p=i.match(Di);return p?p[1].split(ys):[]}function bw(i,p,M){p=Yo(p,i);for(var j=-1,G=p.length,ee=!1;++j<G;){var le=ro(p[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&Bc(G)&&_o(le,G)&&(At(i)||Os(i)))}function oR(i){var p=i.length,M=new i.constructor(p);return p&&typeof i[0]=="string"&&ln.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function xw(i){return typeof i.constructor=="function"&&!il(i)?da(pc(i)):{}}function sR(i,p,M){var j=i.constructor;switch(p){case ze:return kd(i);case Ae:case $e:return new j(+i);case Ye:return HI(i,M);case dt:case Ct:case xt:case Ot:case It:case ct:case yt:case xn:case Cr:return rw(i,M);case rt:return new j;case ht:case Rn:return new j(i);case gn:return UI(i);case In:return new j;case Yn:return VI(i)}}function aR(i,p){var M=p.length;if(!M)return i;var j=M-1;return p[j]=(M>1?"& ":"")+p[j],p=p.join(M>2?", ":" "),i.replace(Yi,`{
|
1465
|
+
/* [wrapped with `+p+`] */
|
1466
|
+
`)}function lR(i){return At(i)||Os(i)||!!(Sy&&i&&i[Sy])}function _o(i,p){var M=typeof i;return p=p??U,!!p&&(M=="number"||M!="symbol"&&fn.test(i))&&i>-1&&i%1==0&&i<p}function Fr(i,p,M){if(!$n(M))return!1;var j=typeof p;return(j=="number"?qr(M)&&_o(p,M.length):j=="string"&&p in M)?zi(M[p],i):!1}function Rd(i,p){if(At(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||li(i)?!0:Oi.test(i)||!na.test(i)||p!=null&&i in Nt(p)}function cR(i){var p=typeof i;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?i!=="__proto__":i===null}function Ed(i){var p=Ec(i),M=J[p];if(typeof M!="function"||!(p in Ut.prototype))return!1;if(i===M)return!0;var j=$d(M);return!!j&&i===j[0]}function uR(i){return!!Cy&&Cy in i}var hR=Ss?Ao:Yd;function il(i){var p=i&&i.constructor,M=typeof p=="function"&&p.prototype||Dn;return i===M}function Cw(i){return i===i&&!$n(i)}function kw(i,p){return function(M){return M==null?!1:M[i]===p&&(p!==e||i in Nt(M))}}function dR(i){var p=Pc(i,function(j){return M.size===g&&M.clear(),j}),M=p.cache;return p}function pR(i,p){var M=i[1],j=p[1],G=M|j,ee=G<(d|w|R),le=j==R&&M==E||j==R&&M==L&&i[7].length<=p[8]||j==(R|L)&&p[7].length<=p[8]&&M==E;if(!(ee||le))return i;j&d&&(i[2]=p[2],G|=M&d?0:b);var de=p[3];if(de){var me=i[3];i[3]=me?ow(me,de,p[4]):de,i[4]=me?We(i[3],s):p[4]}return de=p[5],de&&(me=i[5],i[5]=me?sw(me,de,p[6]):de,i[6]=me?We(i[5],s):p[6]),de=p[7],de&&(i[7]=de),j&R&&(i[8]=i[8]==null?p[8]:$r(i[8],p[8])),i[9]==null&&(i[9]=p[9]),i[0]=p[0],i[1]=G,i}function gR(i){var p=[];if(i!=null)for(var M in Nt(i))p.push(M);return p}function fR(i){return uc.call(i)}function _w(i,p,M){return p=ir(p===e?i.length-1:p,0),function(){for(var j=arguments,G=-1,ee=ir(j.length-p,0),le=xe(ee);++G<ee;)le[G]=j[p+G];G=-1;for(var de=xe(p+1);++G<p;)de[G]=j[G];return de[p]=M(le),sr(i,this,de)}}function Aw(i,p){return p.length<2?i:Rs(i,ki(p,0,-1))}function mR(i,p){for(var M=i.length,j=$r(p.length,M),G=Vr(i);j--;){var ee=p[j];i[j]=_o(ee,M)?G[ee]:e}return i}function Ld(i,p){if(!(p==="constructor"&&typeof i[p]=="function")&&p!="__proto__")return i[p]}var Sw=$w(Yy),ol=RM||function(i,p){return cn.setTimeout(i,p)},Od=$w(WI);function Tw(i,p,M){var j=p+"";return Od(i,aR(j,vR(iR(j),M)))}function $w(i){var p=0,M=0;return function(){var j=NM(),G=O-(j-M);if(M=j,G>0){if(++p>=P)return arguments[0]}else p=0;return i.apply(e,arguments)}}function Oc(i,p){var M=-1,j=i.length,G=j-1;for(p=p===e?j:p;++M<p;){var ee=md(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=p,i}var Mw=dR(function(i){var p=[];return i.charCodeAt(0)===46&&p.push(""),i.replace(zn,function(M,j,G,ee){p.push(G?ee.replace(Va,"$1"):j||M)}),p});function ro(i){if(typeof i=="string"||li(i))return i;var p=i+"";return p=="0"&&1/i==-1/0?"-0":p}function Ls(i){if(i!=null){try{return cc.call(i)}catch{}try{return i+""}catch{}}return""}function vR(i,p){return fr(ae,function(M){var j="_."+M[0];p&M[1]&&!oi(i,j)&&i.push(j)}),i.sort()}function Iw(i){if(i instanceof Ut)return i.clone();var p=new xi(i.__wrapped__,i.__chain__);return p.__actions__=Vr(i.__actions__),p.__index__=i.__index__,p.__values__=i.__values__,p}function yR(i,p,M){(M?Fr(i,p,M):p===e)?p=1:p=ir(Rt(p),0);var j=i==null?0:i.length;if(!j||p<1)return[];for(var G=0,ee=0,le=xe(mc(j/p));G<j;)le[ee++]=ki(i,G,G+=p);return le}function wR(i){for(var p=-1,M=i==null?0:i.length,j=0,G=[];++p<M;){var ee=i[p];ee&&(G[j++]=ee)}return G}function bR(){var i=arguments.length;if(!i)return[];for(var p=xe(i-1),M=arguments[0],j=i;j--;)p[j-1]=arguments[j];return T(At(M)?Vr(M):[M],vr(p,1))}var xR=Pt(function(i,p){return Un(i)?Ja(i,vr(p,1,Un,!0)):[]}),CR=Pt(function(i,p){var M=_i(p);return Un(M)&&(M=e),Un(i)?Ja(i,vr(p,1,Un,!0),gt(M,2)):[]}),kR=Pt(function(i,p){var M=_i(p);return Un(M)&&(M=e),Un(i)?Ja(i,vr(p,1,Un,!0),e,M):[]});function _R(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),ki(i,p<0?0:p,j)):[]}function AR(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),p=j-p,ki(i,0,p<0?0:p)):[]}function SR(i,p){return i&&i.length?Sc(i,gt(p,3),!0,!0):[]}function TR(i,p){return i&&i.length?Sc(i,gt(p,3),!0):[]}function $R(i,p,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&Fr(i,p,M)&&(M=0,j=G),bI(i,p,M,j)):[]}function Rw(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Rt(M);return G<0&&(G=ir(j+G,0)),re(i,gt(p,3),G)}function Ew(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==e&&(G=Rt(M),G=M<0?ir(j+G,0):$r(G,j-1)),re(i,gt(p,3),G,!0)}function Lw(i){var p=i==null?0:i.length;return p?vr(i,1):[]}function MR(i){var p=i==null?0:i.length;return p?vr(i,B):[]}function IR(i,p){var M=i==null?0:i.length;return M?(p=p===e?1:Rt(p),vr(i,p)):[]}function RR(i){for(var p=-1,M=i==null?0:i.length,j={};++p<M;){var G=i[p];j[G[0]]=G[1]}return j}function Ow(i){return i&&i.length?i[0]:e}function ER(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Rt(M);return G<0&&(G=ir(j+G,0)),se(i,p,G)}function LR(i){var p=i==null?0:i.length;return p?ki(i,0,-1):[]}var OR=Pt(function(i){var p=v(i,xd);return p.length&&p[0]===i[0]?hd(p):[]}),NR=Pt(function(i){var p=_i(i),M=v(i,xd);return p===_i(M)?p=e:M.pop(),M.length&&M[0]===i[0]?hd(M,gt(p,2)):[]}),DR=Pt(function(i){var p=_i(i),M=v(i,xd);return p=typeof p=="function"?p:e,p&&M.pop(),M.length&&M[0]===i[0]?hd(M,e,p):[]});function FR(i,p){return i==null?"":LM.call(i,p)}function _i(i){var p=i==null?0:i.length;return p?i[p-1]:e}function PR(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==e&&(G=Rt(M),G=G<0?ir(j+G,0):$r(G,j-1)),p===p?bt(i,p,G):re(i,Ce,G,!0)}function WR(i,p){return i&&i.length?Vy(i,Rt(p)):e}var BR=Pt(Nw);function Nw(i,p){return i&&i.length&&p&&p.length?fd(i,p):i}function zR(i,p,M){return i&&i.length&&p&&p.length?fd(i,p,gt(M,2)):i}function jR(i,p,M){return i&&i.length&&p&&p.length?fd(i,p,e,M):i}var HR=ko(function(i,p){var M=i==null?0:i.length,j=ad(i,p);return Gy(i,v(p,function(G){return _o(G,M)?+G:G}).sort(iw)),j});function UR(i,p){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(p=gt(p,3);++j<ee;){var le=i[j];p(le,j,i)&&(M.push(le),G.push(j))}return Gy(i,G),M}function Nd(i){return i==null?i:FM.call(i)}function VR(i,p,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&Fr(i,p,M)?(p=0,M=j):(p=p==null?0:Rt(p),M=M===e?j:Rt(M)),ki(i,p,M)):[]}function qR(i,p){return Ac(i,p)}function KR(i,p,M){return yd(i,p,gt(M,2))}function GR(i,p){var M=i==null?0:i.length;if(M){var j=Ac(i,p);if(j<M&&zi(i[j],p))return j}return-1}function YR(i,p){return Ac(i,p,!0)}function XR(i,p,M){return yd(i,p,gt(M,2),!0)}function QR(i,p){var M=i==null?0:i.length;if(M){var j=Ac(i,p,!0)-1;if(zi(i[j],p))return j}return-1}function ZR(i){return i&&i.length?Xy(i):[]}function JR(i,p){return i&&i.length?Xy(i,gt(p,2)):[]}function eE(i){var p=i==null?0:i.length;return p?ki(i,1,p):[]}function tE(i,p,M){return i&&i.length?(p=M||p===e?1:Rt(p),ki(i,0,p<0?0:p)):[]}function nE(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),p=j-p,ki(i,p<0?0:p,j)):[]}function rE(i,p){return i&&i.length?Sc(i,gt(p,3),!1,!0):[]}function iE(i,p){return i&&i.length?Sc(i,gt(p,3)):[]}var oE=Pt(function(i){return Go(vr(i,1,Un,!0))}),sE=Pt(function(i){var p=_i(i);return Un(p)&&(p=e),Go(vr(i,1,Un,!0),gt(p,2))}),aE=Pt(function(i){var p=_i(i);return p=typeof p=="function"?p:e,Go(vr(i,1,Un,!0),e,p)});function lE(i){return i&&i.length?Go(i):[]}function cE(i,p){return i&&i.length?Go(i,gt(p,2)):[]}function uE(i,p){return p=typeof p=="function"?p:e,i&&i.length?Go(i,e,p):[]}function Dd(i){if(!(i&&i.length))return[];var p=0;return i=Tr(i,function(M){if(Un(M))return p=ir(M.length,p),!0}),Qe(p,function(M){return v(i,we(M))})}function Dw(i,p){if(!(i&&i.length))return[];var M=Dd(i);return p==null?M:v(M,function(j){return sr(p,e,j)})}var hE=Pt(function(i,p){return Un(i)?Ja(i,p):[]}),dE=Pt(function(i){return bd(Tr(i,Un))}),pE=Pt(function(i){var p=_i(i);return Un(p)&&(p=e),bd(Tr(i,Un),gt(p,2))}),gE=Pt(function(i){var p=_i(i);return p=typeof p=="function"?p:e,bd(Tr(i,Un),e,p)}),fE=Pt(Dd);function mE(i,p){return ew(i||[],p||[],Za)}function vE(i,p){return ew(i||[],p||[],nl)}var yE=Pt(function(i){var p=i.length,M=p>1?i[p-1]:e;return M=typeof M=="function"?(i.pop(),M):e,Dw(i,M)});function Fw(i){var p=J(i);return p.__chain__=!0,p}function wE(i,p){return p(i),i}function Nc(i,p){return p(i)}var bE=ko(function(i){var p=i.length,M=p?i[0]:0,j=this.__wrapped__,G=function(ee){return ad(ee,i)};return p>1||this.__actions__.length||!(j instanceof Ut)||!_o(M)?this.thru(G):(j=j.slice(M,+M+(p?1:0)),j.__actions__.push({func:Nc,args:[G],thisArg:e}),new xi(j,this.__chain__).thru(function(ee){return p&&!ee.length&&ee.push(e),ee}))});function xE(){return Fw(this)}function CE(){return new xi(this.value(),this.__chain__)}function kE(){this.__values__===e&&(this.__values__=Qw(this.value()));var i=this.__index__>=this.__values__.length,p=i?e:this.__values__[this.__index__++];return{done:i,value:p}}function _E(){return this}function AE(i){for(var p,M=this;M instanceof bc;){var j=Iw(M);j.__index__=0,j.__values__=e,p?G.__wrapped__=j:p=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,p}function SE(){var i=this.__wrapped__;if(i instanceof Ut){var p=i;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:Nc,args:[Nd],thisArg:e}),new xi(p,this.__chain__)}return this.thru(Nd)}function TE(){return Jy(this.__wrapped__,this.__actions__)}var $E=Tc(function(i,p,M){ln.call(i,M)?++i[M]:xo(i,M,1)});function ME(i,p,M){var j=At(i)?mr:wI;return M&&Fr(i,p,M)&&(p=e),j(i,gt(p,3))}function IE(i,p){var M=At(i)?Tr:Dy;return M(i,gt(p,3))}var RE=uw(Rw),EE=uw(Ew);function LE(i,p){return vr(Dc(i,p),1)}function OE(i,p){return vr(Dc(i,p),B)}function NE(i,p,M){return M=M===e?1:Rt(M),vr(Dc(i,p),M)}function Pw(i,p){var M=At(i)?fr:Ko;return M(i,gt(p,3))}function Ww(i,p){var M=At(i)?As:Ny;return M(i,gt(p,3))}var DE=Tc(function(i,p,M){ln.call(i,M)?i[M].push(p):xo(i,M,[p])});function FE(i,p,M,j){i=qr(i)?i:va(i),M=M&&!j?Rt(M):0;var G=i.length;return M<0&&(M=ir(G+M,0)),zc(i)?M<=G&&i.indexOf(p,M)>-1:!!G&&se(i,p,M)>-1}var PE=Pt(function(i,p,M){var j=-1,G=typeof p=="function",ee=qr(i)?xe(i.length):[];return Ko(i,function(le){ee[++j]=G?sr(p,le,M):el(le,p,M)}),ee}),WE=Tc(function(i,p,M){xo(i,M,p)});function Dc(i,p){var M=At(i)?v:jy;return M(i,gt(p,3))}function BE(i,p,M,j){return i==null?[]:(At(p)||(p=p==null?[]:[p]),M=j?e:M,At(M)||(M=M==null?[]:[M]),qy(i,p,M))}var zE=Tc(function(i,p,M){i[M?0:1].push(p)},function(){return[[],[]]});function jE(i,p,M){var j=At(i)?k:Le,G=arguments.length<3;return j(i,gt(p,4),M,G,Ko)}function HE(i,p,M){var j=At(i)?D:Le,G=arguments.length<3;return j(i,gt(p,4),M,G,Ny)}function UE(i,p){var M=At(i)?Tr:Dy;return M(i,Wc(gt(p,3)))}function VE(i){var p=At(i)?Ry:FI;return p(i)}function qE(i,p,M){(M?Fr(i,p,M):p===e)?p=1:p=Rt(p);var j=At(i)?gI:PI;return j(i,p)}function KE(i){var p=At(i)?fI:BI;return p(i)}function GE(i){if(i==null)return 0;if(qr(i))return zc(i)?Wt(i):i.length;var p=Mr(i);return p==rt||p==In?i.size:pd(i).length}function YE(i,p,M){var j=At(i)?W:zI;return M&&Fr(i,p,M)&&(p=e),j(i,gt(p,3))}var XE=Pt(function(i,p){if(i==null)return[];var M=p.length;return M>1&&Fr(i,p[0],p[1])?p=[]:M>2&&Fr(p[0],p[1],p[2])&&(p=[p[0]]),qy(i,vr(p,1),[])}),Fc=IM||function(){return cn.Date.now()};function QE(i,p){if(typeof p!="function")throw new un(y);return i=Rt(i),function(){if(--i<1)return p.apply(this,arguments)}}function Bw(i,p,M){return p=M?e:p,p=i&&p==null?i.length:p,Co(i,R,e,e,e,e,p)}function zw(i,p){var M;if(typeof p!="function")throw new un(y);return i=Rt(i),function(){return--i>0&&(M=p.apply(this,arguments)),i<=1&&(p=e),M}}var Fd=Pt(function(i,p,M){var j=d;if(M.length){var G=We(M,fa(Fd));j|=_}return Co(i,j,p,M,G)}),jw=Pt(function(i,p,M){var j=d|w;if(M.length){var G=We(M,fa(jw));j|=_}return Co(p,j,i,M,G)});function Hw(i,p,M){p=M?e:p;var j=Co(i,E,e,e,e,e,e,p);return j.placeholder=Hw.placeholder,j}function Uw(i,p,M){p=M?e:p;var j=Co(i,$,e,e,e,e,e,p);return j.placeholder=Uw.placeholder,j}function Vw(i,p,M){var j,G,ee,le,de,me,Re=0,Ee=!1,De=!1,Ke=!0;if(typeof i!="function")throw new un(y);p=Ai(p)||0,$n(M)&&(Ee=!!M.leading,De="maxWait"in M,ee=De?ir(Ai(M.maxWait)||0,p):ee,Ke="trailing"in M?!!M.trailing:Ke);function it(Vn){var ji=j,To=G;return j=G=e,Re=Vn,le=i.apply(To,ji),le}function ft(Vn){return Re=Vn,de=ol(Bt,p),Ee?it(Vn):le}function Dt(Vn){var ji=Vn-me,To=Vn-Re,u0=p-ji;return De?$r(u0,ee-To):u0}function mt(Vn){var ji=Vn-me,To=Vn-Re;return me===e||ji>=p||ji<0||De&&To>=ee}function Bt(){var Vn=Fc();if(mt(Vn))return qt(Vn);de=ol(Bt,Dt(Vn))}function qt(Vn){return de=e,Ke&&j?it(Vn):(j=G=e,le)}function ci(){de!==e&&tw(de),Re=0,j=me=G=de=e}function Pr(){return de===e?le:qt(Fc())}function ui(){var Vn=Fc(),ji=mt(Vn);if(j=arguments,G=this,me=Vn,ji){if(de===e)return ft(me);if(De)return tw(de),de=ol(Bt,p),it(me)}return de===e&&(de=ol(Bt,p)),le}return ui.cancel=ci,ui.flush=Pr,ui}var ZE=Pt(function(i,p){return Oy(i,1,p)}),JE=Pt(function(i,p,M){return Oy(i,Ai(p)||0,M)});function eL(i){return Co(i,F)}function Pc(i,p){if(typeof i!="function"||p!=null&&typeof p!="function")throw new un(y);var M=function(){var j=arguments,G=p?p.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Pc.Cache||bo),M}Pc.Cache=bo;function Wc(i){if(typeof i!="function")throw new un(y);return function(){var p=arguments;switch(p.length){case 0:return!i.call(this);case 1:return!i.call(this,p[0]);case 2:return!i.call(this,p[0],p[1]);case 3:return!i.call(this,p[0],p[1],p[2])}return!i.apply(this,p)}}function tL(i){return zw(2,i)}var nL=jI(function(i,p){p=p.length==1&&At(p[0])?v(p[0],at(gt())):v(vr(p,1),at(gt()));var M=p.length;return Pt(function(j){for(var G=-1,ee=$r(j.length,M);++G<ee;)j[G]=p[G].call(this,j[G]);return sr(i,this,j)})}),Pd=Pt(function(i,p){var M=We(p,fa(Pd));return Co(i,_,e,p,M)}),qw=Pt(function(i,p){var M=We(p,fa(qw));return Co(i,C,e,p,M)}),rL=ko(function(i,p){return Co(i,L,e,e,e,p)});function iL(i,p){if(typeof i!="function")throw new un(y);return p=p===e?p:Rt(p),Pt(i,p)}function oL(i,p){if(typeof i!="function")throw new un(y);return p=p==null?0:ir(Rt(p),0),Pt(function(M){var j=M[p],G=Xo(M,0,p);return j&&T(G,j),sr(i,this,G)})}function sL(i,p,M){var j=!0,G=!0;if(typeof i!="function")throw new un(y);return $n(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Vw(i,p,{leading:j,maxWait:p,trailing:G})}function aL(i){return Bw(i,1)}function lL(i,p){return Pd(Cd(p),i)}function cL(){if(!arguments.length)return[];var i=arguments[0];return At(i)?i:[i]}function uL(i){return Ci(i,a)}function hL(i,p){return p=typeof p=="function"?p:e,Ci(i,a,p)}function dL(i){return Ci(i,c|a)}function pL(i,p){return p=typeof p=="function"?p:e,Ci(i,c|a,p)}function gL(i,p){return p==null||Ly(i,p,ur(p))}function zi(i,p){return i===p||i!==i&&p!==p}var fL=Rc(ud),mL=Rc(function(i,p){return i>=p}),Os=Wy(function(){return arguments}())?Wy:function(i){return Fn(i)&&ln.call(i,"callee")&&!Ay.call(i,"callee")},At=xe.isArray,vL=Ur?at(Ur):AI;function qr(i){return i!=null&&Bc(i.length)&&!Ao(i)}function Un(i){return Fn(i)&&qr(i)}function yL(i){return i===!0||i===!1||Fn(i)&&Dr(i)==Ae}var Qo=EM||Yd,wL=Vo?at(Vo):SI;function bL(i){return Fn(i)&&i.nodeType===1&&!sl(i)}function xL(i){if(i==null)return!0;if(qr(i)&&(At(i)||typeof i=="string"||typeof i.splice=="function"||Qo(i)||ma(i)||Os(i)))return!i.length;var p=Mr(i);if(p==rt||p==In)return!i.size;if(il(i))return!pd(i).length;for(var M in i)if(ln.call(i,M))return!1;return!0}function CL(i,p){return tl(i,p)}function kL(i,p,M){M=typeof M=="function"?M:e;var j=M?M(i,p):e;return j===e?tl(i,p,e,M):!!j}function Wd(i){if(!Fn(i))return!1;var p=Dr(i);return p==Ge||p==Ie||typeof i.message=="string"&&typeof i.name=="string"&&!sl(i)}function _L(i){return typeof i=="number"&&Ty(i)}function Ao(i){if(!$n(i))return!1;var p=Dr(i);return p==qe||p==ut||p==ye||p==pr}function Kw(i){return typeof i=="number"&&i==Rt(i)}function Bc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function $n(i){var p=typeof i;return i!=null&&(p=="object"||p=="function")}function Fn(i){return i!=null&&typeof i=="object"}var Gw=Nn?at(Nn):$I;function AL(i,p){return i===p||dd(i,p,Md(p))}function SL(i,p,M){return M=typeof M=="function"?M:e,dd(i,p,Md(p),M)}function TL(i){return Yw(i)&&i!=+i}function $L(i){if(hR(i))throw new lt(m);return By(i)}function ML(i){return i===null}function IL(i){return i==null}function Yw(i){return typeof i=="number"||Fn(i)&&Dr(i)==ht}function sl(i){if(!Fn(i)||Dr(i)!=pn)return!1;var p=pc(i);if(p===null)return!0;var M=ln.call(p,"constructor")&&p.constructor;return typeof M=="function"&&M instanceof M&&cc.call(M)==SM}var Bd=ri?at(ri):MI;function RL(i){return Kw(i)&&i>=-9007199254740991&&i<=U}var Xw=ii?at(ii):II;function zc(i){return typeof i=="string"||!At(i)&&Fn(i)&&Dr(i)==Rn}function li(i){return typeof i=="symbol"||Fn(i)&&Dr(i)==Yn}var ma=wi?at(wi):RI;function EL(i){return i===e}function LL(i){return Fn(i)&&Mr(i)==He}function OL(i){return Fn(i)&&Dr(i)==ke}var NL=Rc(gd),DL=Rc(function(i,p){return i<=p});function Qw(i){if(!i)return[];if(qr(i))return zc(i)?_t(i):Vr(i);if(Ka&&i[Ka])return be(i[Ka]());var p=Mr(i),M=p==rt?Me:p==In?Ve:va;return M(i)}function So(i){if(!i)return i===0?i:0;if(i=Ai(i),i===B||i===-1/0){var p=i<0?-1:1;return p*K}return i===i?i:0}function Rt(i){var p=So(i),M=p%1;return p===p?M?p-M:p:0}function Zw(i){return i?Is(Rt(i),0,te):0}function Ai(i){if(typeof i=="number")return i;if(li(i))return Z;if($n(i)){var p=typeof i.valueOf=="function"?i.valueOf():i;i=$n(p)?p+"":p}if(typeof i!="string")return i===0?i:+i;i=vn(i);var M=ia.test(i);return M||jn.test(i)?mn(i.slice(2),M?2:8):jt.test(i)?Z:+i}function Jw(i){return no(i,Kr(i))}function FL(i){return i?Is(Rt(i),-9007199254740991,U):i===0?i:0}function on(i){return i==null?"":ai(i)}var PL=pa(function(i,p){if(il(p)||qr(p)){no(p,ur(p),i);return}for(var M in p)ln.call(p,M)&&Za(i,M,p[M])}),e0=pa(function(i,p){no(p,Kr(p),i)}),jc=pa(function(i,p,M,j){no(p,Kr(p),i,j)}),WL=pa(function(i,p,M,j){no(p,ur(p),i,j)}),BL=ko(ad);function zL(i,p){var M=da(i);return p==null?M:Ey(M,p)}var jL=Pt(function(i,p){i=Nt(i);var M=-1,j=p.length,G=j>2?p[2]:e;for(G&&Fr(p[0],p[1],G)&&(j=1);++M<j;)for(var ee=p[M],le=Kr(ee),de=-1,me=le.length;++de<me;){var Re=le[de],Ee=i[Re];(Ee===e||zi(Ee,Dn[Re])&&!ln.call(i,Re))&&(i[Re]=ee[Re])}return i}),HL=Pt(function(i){return i.push(e,vw),sr(t0,e,i)});function UL(i,p){return Q(i,gt(p,3),to)}function VL(i,p){return Q(i,gt(p,3),cd)}function qL(i,p){return i==null?i:ld(i,gt(p,3),Kr)}function KL(i,p){return i==null?i:Fy(i,gt(p,3),Kr)}function GL(i,p){return i&&to(i,gt(p,3))}function YL(i,p){return i&&cd(i,gt(p,3))}function XL(i){return i==null?[]:kc(i,ur(i))}function QL(i){return i==null?[]:kc(i,Kr(i))}function zd(i,p,M){var j=i==null?e:Rs(i,p);return j===e?M:j}function ZL(i,p){return i!=null&&bw(i,p,xI)}function jd(i,p){return i!=null&&bw(i,p,CI)}var JL=dw(function(i,p,M){p!=null&&typeof p.toString!="function"&&(p=uc.call(p)),i[p]=M},Ud(Gr)),eO=dw(function(i,p,M){p!=null&&typeof p.toString!="function"&&(p=uc.call(p)),ln.call(i,p)?i[p].push(M):i[p]=[M]},gt),tO=Pt(el);function ur(i){return qr(i)?Iy(i):pd(i)}function Kr(i){return qr(i)?Iy(i,!0):EI(i)}function nO(i,p){var M={};return p=gt(p,3),to(i,function(j,G,ee){xo(M,p(j,G,ee),j)}),M}function rO(i,p){var M={};return p=gt(p,3),to(i,function(j,G,ee){xo(M,G,p(j,G,ee))}),M}var iO=pa(function(i,p,M){_c(i,p,M)}),t0=pa(function(i,p,M,j){_c(i,p,M,j)}),oO=ko(function(i,p){var M={};if(i==null)return M;var j=!1;p=v(p,function(ee){return ee=Yo(ee,i),j||(j=ee.length>1),ee}),no(i,Td(i),M),j&&(M=Ci(M,c|u|a,JI));for(var G=p.length;G--;)wd(M,p[G]);return M});function sO(i,p){return n0(i,Wc(gt(p)))}var aO=ko(function(i,p){return i==null?{}:OI(i,p)});function n0(i,p){if(i==null)return{};var M=v(Td(i),function(j){return[j]});return p=gt(p),Ky(i,M,function(j,G){return p(j,G[0])})}function lO(i,p,M){p=Yo(p,i);var j=-1,G=p.length;for(G||(G=1,i=e);++j<G;){var ee=i==null?e:i[ro(p[j])];ee===e&&(j=G,ee=M),i=Ao(ee)?ee.call(i):ee}return i}function cO(i,p,M){return i==null?i:nl(i,p,M)}function uO(i,p,M,j){return j=typeof j=="function"?j:e,i==null?i:nl(i,p,M,j)}var r0=fw(ur),i0=fw(Kr);function hO(i,p,M){var j=At(i),G=j||Qo(i)||ma(i);if(p=gt(p,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:$n(i)?M=Ao(ee)?da(pc(i)):{}:M={}}return(G?fr:to)(i,function(le,de,me){return p(M,le,de,me)}),M}function dO(i,p){return i==null?!0:wd(i,p)}function pO(i,p,M){return i==null?i:Zy(i,p,Cd(M))}function gO(i,p,M,j){return j=typeof j=="function"?j:e,i==null?i:Zy(i,p,Cd(M),j)}function va(i){return i==null?[]:Cn(i,ur(i))}function fO(i){return i==null?[]:Cn(i,Kr(i))}function mO(i,p,M){return M===e&&(M=p,p=e),M!==e&&(M=Ai(M),M=M===M?M:0),p!==e&&(p=Ai(p),p=p===p?p:0),Is(Ai(i),p,M)}function vO(i,p,M){return p=So(p),M===e?(M=p,p=0):M=So(M),i=Ai(i),kI(i,p,M)}function yO(i,p,M){if(M&&typeof M!="boolean"&&Fr(i,p,M)&&(p=M=e),M===e&&(typeof p=="boolean"?(M=p,p=e):typeof i=="boolean"&&(M=i,i=e)),i===e&&p===e?(i=0,p=1):(i=So(i),p===e?(p=i,i=0):p=So(p)),i>p){var j=i;i=p,p=j}if(M||i%1||p%1){var G=$y();return $r(i+G*(p-i+Be("1e-"+((G+"").length-1))),p)}return md(i,p)}var wO=ga(function(i,p,M){return p=p.toLowerCase(),i+(M?o0(p):p)});function o0(i){return Hd(on(i).toLowerCase())}function s0(i){return i=on(i),i&&i.replace(En,kn).replace(mo,"")}function bO(i,p,M){i=on(i),p=ai(p);var j=i.length;M=M===e?j:Is(Rt(M),0,j);var G=M;return M-=p.length,M>=0&&i.slice(M,G)==p}function xO(i){return i=on(i),i&&ja.test(i)?i.replace(lo,V):i}function CO(i){return i=on(i),i&&Ni.test(i)?i.replace(kr,"\\$&"):i}var kO=ga(function(i,p,M){return i+(M?"-":"")+p.toLowerCase()}),_O=ga(function(i,p,M){return i+(M?" ":"")+p.toLowerCase()}),AO=cw("toLowerCase");function SO(i,p,M){i=on(i),p=Rt(p);var j=p?Wt(i):0;if(!p||j>=p)return i;var G=(p-j)/2;return Ic(vc(G),M)+i+Ic(mc(G),M)}function TO(i,p,M){i=on(i),p=Rt(p);var j=p?Wt(i):0;return p&&j<p?i+Ic(p-j,M):i}function $O(i,p,M){i=on(i),p=Rt(p);var j=p?Wt(i):0;return p&&j<p?Ic(p-j,M)+i:i}function MO(i,p,M){return M||p==null?p=0:p&&(p=+p),DM(on(i).replace(Sn,""),p||0)}function IO(i,p,M){return(M?Fr(i,p,M):p===e)?p=1:p=Rt(p),vd(on(i),p)}function RO(){var i=arguments,p=on(i[0]);return i.length<3?p:p.replace(i[1],i[2])}var EO=ga(function(i,p,M){return i+(M?"_":"")+p.toLowerCase()});function LO(i,p,M){return M&&typeof M!="number"&&Fr(i,p,M)&&(p=M=e),M=M===e?te:M>>>0,M?(i=on(i),i&&(typeof p=="string"||p!=null&&!Bd(p))&&(p=ai(p),!p&&oe(i))?Xo(_t(i),0,M):i.split(p,M)):[]}var OO=ga(function(i,p,M){return i+(M?" ":"")+Hd(p)});function NO(i,p,M){return i=on(i),M=M==null?0:Is(Rt(M),0,i.length),p=ai(p),i.slice(M,M+p.length)==p}function DO(i,p,M){var j=J.templateSettings;M&&Fr(i,p,M)&&(p=e),i=on(i),p=jc({},p,j,mw);var G=jc({},p.imports,j.imports,mw),ee=ur(G),le=Cn(G,ee),de,me,Re=0,Ee=p.interpolate||pi,De="__p += '",Ke=Nr((p.escape||pi).source+"|"+Ee.source+"|"+(Ee===vs?Fi:pi).source+"|"+(p.evaluate||pi).source+"|$","g"),it="//# sourceURL="+(ln.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eo+"]")+`
|
1467
|
+
`;i.replace(Ke,function(mt,Bt,qt,ci,Pr,ui){return qt||(qt=ci),De+=i.slice(Re,ui).replace(Sr,X),Bt&&(de=!0,De+=`' +
|
1468
|
+
__e(`+Bt+`) +
|
1469
|
+
'`),Pr&&(me=!0,De+=`';
|
1470
|
+
`+Pr+`;
|
1471
|
+
__p += '`),qt&&(De+=`' +
|
1472
|
+
((__t = (`+qt+`)) == null ? '' : __t) +
|
1473
|
+
'`),Re=ui+mt.length,mt}),De+=`';
|
1474
|
+
`;var ft=ln.call(p,"variable")&&p.variable;if(!ft)De=`with (obj) {
|
1475
|
+
`+De+`
|
1476
|
+
}
|
1477
|
+
`;else if(Ua.test(ft))throw new lt(x);De=(me?De.replace(zr,""):De).replace(Li,"$1").replace(ao,"$1;"),De="function("+(ft||"obj")+`) {
|
1478
|
+
`+(ft?"":`obj || (obj = {});
|
1479
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
1480
|
+
function print() { __p += __j.call(arguments, '') }
|
1481
|
+
`:`;
|
1482
|
+
`)+De+`return __p
|
1483
|
+
}`;var Dt=l0(function(){return Mt(ee,it+"return "+De).apply(e,le)});if(Dt.source=De,Wd(Dt))throw Dt;return Dt}function FO(i){return on(i).toLowerCase()}function PO(i){return on(i).toUpperCase()}function WO(i,p,M){if(i=on(i),i&&(M||p===e))return vn(i);if(!i||!(p=ai(p)))return i;var j=_t(i),G=_t(p),ee=$t(j,G),le=Qn(j,G)+1;return Xo(j,ee,le).join("")}function BO(i,p,M){if(i=on(i),i&&(M||p===e))return i.slice(0,Ft(i)+1);if(!i||!(p=ai(p)))return i;var j=_t(i),G=Qn(j,_t(p))+1;return Xo(j,0,G).join("")}function zO(i,p,M){if(i=on(i),i&&(M||p===e))return i.replace(Sn,"");if(!i||!(p=ai(p)))return i;var j=_t(i),G=$t(j,_t(p));return Xo(j,G).join("")}function jO(i,p){var M=I,j=H;if($n(p)){var G="separator"in p?p.separator:G;M="length"in p?Rt(p.length):M,j="omission"in p?ai(p.omission):j}i=on(i);var ee=i.length;if(oe(i)){var le=_t(i);ee=le.length}if(M>=ee)return i;var de=M-Wt(j);if(de<1)return j;var me=le?Xo(le,0,de).join(""):i.slice(0,de);if(G===e)return me+j;if(le&&(de+=me.length-de),Bd(G)){if(i.slice(de).search(G)){var Re,Ee=me;for(G.global||(G=Nr(G.source,on(ti.exec(G))+"g")),G.lastIndex=0;Re=G.exec(Ee);)var De=Re.index;me=me.slice(0,De===e?de:De)}}else if(i.indexOf(ai(G),de)!=de){var Ke=me.lastIndexOf(G);Ke>-1&&(me=me.slice(0,Ke))}return me+j}function HO(i){return i=on(i),i&&Oo.test(i)?i.replace(gr,pt):i}var UO=ga(function(i,p,M){return i+(M?" ":"")+p.toUpperCase()}),Hd=cw("toUpperCase");function a0(i,p,M){return i=on(i),p=M?e:p,p===e?ge(i)?_n(i):Y(i):i.match(p)||[]}var l0=Pt(function(i,p){try{return sr(i,e,p)}catch(M){return Wd(M)?M:new lt(M)}}),VO=ko(function(i,p){return fr(p,function(M){M=ro(M),xo(i,M,Fd(i[M],i))}),i});function qO(i){var p=i==null?0:i.length,M=gt();return i=p?v(i,function(j){if(typeof j[1]!="function")throw new un(y);return[M(j[0]),j[1]]}):[],Pt(function(j){for(var G=-1;++G<p;){var ee=i[G];if(sr(ee[0],this,j))return sr(ee[1],this,j)}})}function KO(i){return yI(Ci(i,c))}function Ud(i){return function(){return i}}function GO(i,p){return i==null||i!==i?p:i}var YO=hw(),XO=hw(!0);function Gr(i){return i}function Vd(i){return zy(typeof i=="function"?i:Ci(i,c))}function QO(i){return Hy(Ci(i,c))}function ZO(i,p){return Uy(i,Ci(p,c))}var JO=Pt(function(i,p){return function(M){return el(M,i,p)}}),e2=Pt(function(i,p){return function(M){return el(i,M,p)}});function qd(i,p,M){var j=ur(p),G=kc(p,j);M==null&&!($n(p)&&(G.length||!j.length))&&(M=p,p=i,i=this,G=kc(p,ur(p)));var ee=!($n(M)&&"chain"in M)||!!M.chain,le=Ao(i);return fr(G,function(de){var me=p[de];i[de]=me,le&&(i.prototype[de]=function(){var Re=this.__chain__;if(ee||Re){var Ee=i(this.__wrapped__),De=Ee.__actions__=Vr(this.__actions__);return De.push({func:me,args:arguments,thisArg:i}),Ee.__chain__=Re,Ee}return me.apply(i,T([this.value()],arguments))})}),i}function t2(){return cn._===this&&(cn._=TM),this}function Kd(){}function n2(i){return i=Rt(i),Pt(function(p){return Vy(p,i)})}var r2=_d(v),i2=_d(mr),o2=_d(W);function c0(i){return Rd(i)?we(ro(i)):NI(i)}function s2(i){return function(p){return i==null?e:Rs(i,p)}}var a2=pw(),l2=pw(!0);function Gd(){return[]}function Yd(){return!1}function c2(){return{}}function u2(){return""}function h2(){return!0}function d2(i,p){if(i=Rt(i),i<1||i>U)return[];var M=te,j=$r(i,te);p=gt(p),i-=te;for(var G=Qe(j,p);++M<i;)p(M);return G}function p2(i){return At(i)?v(i,ro):li(i)?[i]:Vr(Mw(on(i)))}function g2(i){var p=++AM;return on(i)+p}var f2=Mc(function(i,p){return i+p},0),m2=Ad("ceil"),v2=Mc(function(i,p){return i/p},1),y2=Ad("floor");function w2(i){return i&&i.length?Cc(i,Gr,ud):e}function b2(i,p){return i&&i.length?Cc(i,gt(p,2),ud):e}function x2(i){return fe(i,Gr)}function C2(i,p){return fe(i,gt(p,2))}function k2(i){return i&&i.length?Cc(i,Gr,gd):e}function _2(i,p){return i&&i.length?Cc(i,gt(p,2),gd):e}var A2=Mc(function(i,p){return i*p},1),S2=Ad("round"),T2=Mc(function(i,p){return i-p},0);function $2(i){return i&&i.length?st(i,Gr):0}function M2(i,p){return i&&i.length?st(i,gt(p,2)):0}return J.after=QE,J.ary=Bw,J.assign=PL,J.assignIn=e0,J.assignInWith=jc,J.assignWith=WL,J.at=BL,J.before=zw,J.bind=Fd,J.bindAll=VO,J.bindKey=jw,J.castArray=cL,J.chain=Fw,J.chunk=yR,J.compact=wR,J.concat=bR,J.cond=qO,J.conforms=KO,J.constant=Ud,J.countBy=$E,J.create=zL,J.curry=Hw,J.curryRight=Uw,J.debounce=Vw,J.defaults=jL,J.defaultsDeep=HL,J.defer=ZE,J.delay=JE,J.difference=xR,J.differenceBy=CR,J.differenceWith=kR,J.drop=_R,J.dropRight=AR,J.dropRightWhile=SR,J.dropWhile=TR,J.fill=$R,J.filter=IE,J.flatMap=LE,J.flatMapDeep=OE,J.flatMapDepth=NE,J.flatten=Lw,J.flattenDeep=MR,J.flattenDepth=IR,J.flip=eL,J.flow=YO,J.flowRight=XO,J.fromPairs=RR,J.functions=XL,J.functionsIn=QL,J.groupBy=DE,J.initial=LR,J.intersection=OR,J.intersectionBy=NR,J.intersectionWith=DR,J.invert=JL,J.invertBy=eO,J.invokeMap=PE,J.iteratee=Vd,J.keyBy=WE,J.keys=ur,J.keysIn=Kr,J.map=Dc,J.mapKeys=nO,J.mapValues=rO,J.matches=QO,J.matchesProperty=ZO,J.memoize=Pc,J.merge=iO,J.mergeWith=t0,J.method=JO,J.methodOf=e2,J.mixin=qd,J.negate=Wc,J.nthArg=n2,J.omit=oO,J.omitBy=sO,J.once=tL,J.orderBy=BE,J.over=r2,J.overArgs=nL,J.overEvery=i2,J.overSome=o2,J.partial=Pd,J.partialRight=qw,J.partition=zE,J.pick=aO,J.pickBy=n0,J.property=c0,J.propertyOf=s2,J.pull=BR,J.pullAll=Nw,J.pullAllBy=zR,J.pullAllWith=jR,J.pullAt=HR,J.range=a2,J.rangeRight=l2,J.rearg=rL,J.reject=UE,J.remove=UR,J.rest=iL,J.reverse=Nd,J.sampleSize=qE,J.set=cO,J.setWith=uO,J.shuffle=KE,J.slice=VR,J.sortBy=XE,J.sortedUniq=ZR,J.sortedUniqBy=JR,J.split=LO,J.spread=oL,J.tail=eE,J.take=tE,J.takeRight=nE,J.takeRightWhile=rE,J.takeWhile=iE,J.tap=wE,J.throttle=sL,J.thru=Nc,J.toArray=Qw,J.toPairs=r0,J.toPairsIn=i0,J.toPath=p2,J.toPlainObject=Jw,J.transform=hO,J.unary=aL,J.union=oE,J.unionBy=sE,J.unionWith=aE,J.uniq=lE,J.uniqBy=cE,J.uniqWith=uE,J.unset=dO,J.unzip=Dd,J.unzipWith=Dw,J.update=pO,J.updateWith=gO,J.values=va,J.valuesIn=fO,J.without=hE,J.words=a0,J.wrap=lL,J.xor=dE,J.xorBy=pE,J.xorWith=gE,J.zip=fE,J.zipObject=mE,J.zipObjectDeep=vE,J.zipWith=yE,J.entries=r0,J.entriesIn=i0,J.extend=e0,J.extendWith=jc,qd(J,J),J.add=f2,J.attempt=l0,J.camelCase=wO,J.capitalize=o0,J.ceil=m2,J.clamp=mO,J.clone=uL,J.cloneDeep=dL,J.cloneDeepWith=pL,J.cloneWith=hL,J.conformsTo=gL,J.deburr=s0,J.defaultTo=GO,J.divide=v2,J.endsWith=bO,J.eq=zi,J.escape=xO,J.escapeRegExp=CO,J.every=ME,J.find=RE,J.findIndex=Rw,J.findKey=UL,J.findLast=EE,J.findLastIndex=Ew,J.findLastKey=VL,J.floor=y2,J.forEach=Pw,J.forEachRight=Ww,J.forIn=qL,J.forInRight=KL,J.forOwn=GL,J.forOwnRight=YL,J.get=zd,J.gt=fL,J.gte=mL,J.has=ZL,J.hasIn=jd,J.head=Ow,J.identity=Gr,J.includes=FE,J.indexOf=ER,J.inRange=vO,J.invoke=tO,J.isArguments=Os,J.isArray=At,J.isArrayBuffer=vL,J.isArrayLike=qr,J.isArrayLikeObject=Un,J.isBoolean=yL,J.isBuffer=Qo,J.isDate=wL,J.isElement=bL,J.isEmpty=xL,J.isEqual=CL,J.isEqualWith=kL,J.isError=Wd,J.isFinite=_L,J.isFunction=Ao,J.isInteger=Kw,J.isLength=Bc,J.isMap=Gw,J.isMatch=AL,J.isMatchWith=SL,J.isNaN=TL,J.isNative=$L,J.isNil=IL,J.isNull=ML,J.isNumber=Yw,J.isObject=$n,J.isObjectLike=Fn,J.isPlainObject=sl,J.isRegExp=Bd,J.isSafeInteger=RL,J.isSet=Xw,J.isString=zc,J.isSymbol=li,J.isTypedArray=ma,J.isUndefined=EL,J.isWeakMap=LL,J.isWeakSet=OL,J.join=FR,J.kebabCase=kO,J.last=_i,J.lastIndexOf=PR,J.lowerCase=_O,J.lowerFirst=AO,J.lt=NL,J.lte=DL,J.max=w2,J.maxBy=b2,J.mean=x2,J.meanBy=C2,J.min=k2,J.minBy=_2,J.stubArray=Gd,J.stubFalse=Yd,J.stubObject=c2,J.stubString=u2,J.stubTrue=h2,J.multiply=A2,J.nth=WR,J.noConflict=t2,J.noop=Kd,J.now=Fc,J.pad=SO,J.padEnd=TO,J.padStart=$O,J.parseInt=MO,J.random=yO,J.reduce=jE,J.reduceRight=HE,J.repeat=IO,J.replace=RO,J.result=lO,J.round=S2,J.runInContext=pe,J.sample=VE,J.size=GE,J.snakeCase=EO,J.some=YE,J.sortedIndex=qR,J.sortedIndexBy=KR,J.sortedIndexOf=GR,J.sortedLastIndex=YR,J.sortedLastIndexBy=XR,J.sortedLastIndexOf=QR,J.startCase=OO,J.startsWith=NO,J.subtract=T2,J.sum=$2,J.sumBy=M2,J.template=DO,J.times=d2,J.toFinite=So,J.toInteger=Rt,J.toLength=Zw,J.toLower=FO,J.toNumber=Ai,J.toSafeInteger=FL,J.toString=on,J.toUpper=PO,J.trim=WO,J.trimEnd=BO,J.trimStart=zO,J.truncate=jO,J.unescape=HO,J.uniqueId=g2,J.upperCase=UO,J.upperFirst=Hd,J.each=Pw,J.eachRight=Ww,J.first=Ow,qd(J,function(){var i={};return to(J,function(p,M){ln.call(J.prototype,M)||(i[M]=p)}),i}(),{chain:!1}),J.VERSION=r,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),fr(["drop","take"],function(i,p){Ut.prototype[i]=function(M){M=M===e?1:ir(Rt(M),0);var j=this.__filtered__&&!p?new Ut(this):this.clone();return j.__filtered__?j.__takeCount__=$r(M,j.__takeCount__):j.__views__.push({size:$r(M,te),type:i+(j.__dir__<0?"Right":"")}),j},Ut.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),fr(["filter","map","takeWhile"],function(i,p){var M=p+1,j=M==S||M==N;Ut.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:gt(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),fr(["head","last"],function(i,p){var M="take"+(p?"Right":"");Ut.prototype[i]=function(){return this[M](1).value()[0]}}),fr(["initial","tail"],function(i,p){var M="drop"+(p?"":"Right");Ut.prototype[i]=function(){return this.__filtered__?new Ut(this):this[M](1)}}),Ut.prototype.compact=function(){return this.filter(Gr)},Ut.prototype.find=function(i){return this.filter(i).head()},Ut.prototype.findLast=function(i){return this.reverse().find(i)},Ut.prototype.invokeMap=Pt(function(i,p){return typeof i=="function"?new Ut(this):this.map(function(M){return el(M,i,p)})}),Ut.prototype.reject=function(i){return this.filter(Wc(gt(i)))},Ut.prototype.slice=function(i,p){i=Rt(i);var M=this;return M.__filtered__&&(i>0||p<0)?new Ut(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),p!==e&&(p=Rt(p),M=p<0?M.dropRight(-p):M.take(p-i)),M)},Ut.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ut.prototype.toArray=function(){return this.take(te)},to(Ut.prototype,function(i,p){var M=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),G=J[j?"take"+(p=="last"?"Right":""):p],ee=j||/^find/.test(p);G&&(J.prototype[p]=function(){var le=this.__wrapped__,de=j?[1]:arguments,me=le instanceof Ut,Re=de[0],Ee=me||At(le),De=function(Bt){var qt=G.apply(J,T([Bt],de));return j&&Ke?qt[0]:qt};Ee&&M&&typeof Re=="function"&&Re.length!=1&&(me=Ee=!1);var Ke=this.__chain__,it=!!this.__actions__.length,ft=ee&&!Ke,Dt=me&&!it;if(!ee&&Ee){le=Dt?le:new Ut(this);var mt=i.apply(le,de);return mt.__actions__.push({func:Nc,args:[De],thisArg:e}),new xi(mt,Ke)}return ft&&Dt?i.apply(this,de):(mt=this.thru(De),ft?j?mt.value()[0]:mt.value():mt)})}),fr(["pop","push","shift","sort","splice","unshift"],function(i){var p=cr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return p.apply(At(ee)?ee:[],G)}return this[M](function(le){return p.apply(At(le)?le:[],G)})}}),to(Ut.prototype,function(i,p){var M=J[p];if(M){var j=M.name+"";ln.call(ha,j)||(ha[j]=[]),ha[j].push({name:p,func:M})}}),ha[$c(e,w).name]=[{name:"wrapper",func:e}],Ut.prototype.clone=HM,Ut.prototype.reverse=UM,Ut.prototype.value=VM,J.prototype.at=bE,J.prototype.chain=xE,J.prototype.commit=CE,J.prototype.next=kE,J.prototype.plant=AE,J.prototype.reverse=SE,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=TE,J.prototype.first=J.prototype.head,Ka&&(J.prototype[Ka]=_E),J},Vt=Zn();Xn?((Xn.exports=Vt)._=Vt,wn._=Vt):cn._=Vt}).call(RC)}(Ml,Ml.exports)),Ml.exports}var LC=EC();yr("a",hl(LC)).debounce(function(){this.rebuildDisplayText()},300);var Jg={exports:{}},ef;function OC(){return ef||(ef=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Jg)),Jg.exports}OC();const NC=!0,Jn="u-",DC="uplot",FC=Jn+"hz",PC=Jn+"vt",WC=Jn+"title",BC=Jn+"wrap",zC=Jn+"under",jC=Jn+"over",HC=Jn+"axis",ls=Jn+"off",UC=Jn+"select",VC=Jn+"cursor-x",qC=Jn+"cursor-y",KC=Jn+"cursor-pt",GC=Jn+"legend",YC=Jn+"live",XC=Jn+"inline",QC=Jn+"series",ZC=Jn+"marker",tf=Jn+"label",JC=Jn+"value",Ta="width",$a="height",Ma="top",nf="bottom",Hs="left",bu="right",xu="#000",rf=xu+"0",Cu="mousemove",of="mousedown",ku="mouseup",sf="mouseenter",af="mouseleave",lf="dblclick",ek="resize",tk="scroll",cf="change",Il="dppxchange",_u="--",Us=typeof window<"u",Au=Us?document:null,Vs=Us?window:null,nk=Us?navigator:null;let Zt,Rl;function Su(){let n=devicePixelRatio;Zt!=n&&(Zt=n,Rl&&Mu(cf,Rl,Su),Rl=matchMedia(`(min-resolution: ${Zt-.001}dppx) and (max-resolution: ${Zt+.001}dppx)`),cs(cf,Rl,Su),Vs.dispatchEvent(new CustomEvent(Il)))}function Xr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Tu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function yn(n,t,e){n.style[t]=e+"px"}function Mi(n,t,e,r){let f=Au.createElement(n);return t!=null&&Xr(f,t),e!=null&&e.insertBefore(f,r),f}function hi(n,t){return Mi("div",n,t)}const uf=new WeakMap;function Vi(n,t,e,r,f){let m="translate("+t+"px,"+e+"px)",y=uf.get(n);m!=y&&(n.style.transform=m,uf.set(n,m),t<0||e<0||t>r||e>f?Xr(n,ls):Tu(n,ls))}const hf=new WeakMap;function df(n,t,e){let r=t+e,f=hf.get(n);r!=f&&(hf.set(n,r),n.style.background=t,n.style.borderColor=e)}const pf=new WeakMap;function gf(n,t,e,r){let f=t+""+e,m=pf.get(n);f!=m&&(pf.set(n,f),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const $u={passive:!0},rk={...$u,capture:!0};function cs(n,t,e,r){t.addEventListener(n,e,r?rk:$u)}function Mu(n,t,e,r){t.removeEventListener(n,e,$u)}Us&&Su();function Ii(n,t,e,r){let f;e=e||0,r=r||t.length-1;let m=r<=2147483647;for(;r-e>1;)f=m?e+r>>1:Zr((e+r)/2),t[f]<n?e=f:r=f;return n-t[e]<=t[r]-n?e:r}function ff(n){return(t,e,r)=>{let f=-1,m=-1;for(let y=e;y<=r;y++)if(n(t[y])){f=y;break}for(let y=r;y>=e;y--)if(n(t[y])){m=y;break}return[f,m]}}const mf=n=>n!=null,vf=n=>n!=null&&n>0,El=ff(mf),ik=ff(vf);function ok(n,t,e,r=0,f=!1){let m=f?ik:El,y=f?vf:mf;[t,e]=m(n,t,e);let x=n[t],h=n[t];if(t>-1)if(r==1)x=n[t],h=n[e];else if(r==-1)x=n[e],h=n[t];else for(let g=t;g<=e;g++){let s=n[g];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??dr,h??-1/0]}function Ll(n,t,e,r){let f=bf(n),m=bf(t);n==t&&(f==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?oo:xf,x=f==1?Zr:di,h=m==1?di:Zr,g=x(y(er(n))),s=h(y(er(t))),c=qs(e,g),u=qs(e,s);return e==10&&(g<0&&(c=hn(c,-g)),s<0&&(u=hn(u,-s))),r||e==2?(n=c*f,t=u*m):(n=$f(n,c),t=Dl(t,u)),[n,t]}function Iu(n,t,e,r){let f=Ll(n,t,e,r);return n==0&&(f[0]=0),t==0&&(f[1]=0),f}const Ru=.1,yf={mode:3,pad:Ru},Ia={pad:0,soft:null,mode:0},sk={min:Ia,max:Ia};function Ol(n,t,e,r){return Fl(e)?wf(n,t,e):(Ia.pad=e,Ia.soft=r?0:null,Ia.mode=r?3:0,wf(n,t,sk))}function Yt(n,t){return n??t}function ak(n,t,e){for(t=Yt(t,0),e=Yt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function wf(n,t,e){let r=e.min,f=e.max,m=Yt(r.pad,0),y=Yt(f.pad,0),x=Yt(r.hard,-1/0),h=Yt(f.hard,dr),g=Yt(r.soft,dr),s=Yt(f.soft,-1/0),c=Yt(r.mode,0),u=Yt(f.mode,0),a=t-n,o=oo(a),l=Rr(er(n),er(t)),d=oo(l),w=er(d-o);(a<1e-24||w>10)&&(a=0,(n==0||t==0)&&(a=1e-24,c==2&&g!=dr&&(m=0),u==2&&s!=-1/0&&(y=0)));let b=a||l||1e3,E=oo(b),$=qs(10,Zr(E)),_=b*(a==0?n==0?.1:1:m),C=hn($f(n-_,$/10),24),R=n>=g&&(c==1||c==3&&C<=g||c==2&&C>=g)?g:dr,L=Rr(x,C<R&&n>=R?R:Ri(R,C)),F=b*(a==0?t==0?.1:1:y),I=hn(Dl(t+F,$/10),24),H=t<=s&&(u==1||u==3&&I>=s||u==2&&I<=s)?s:-1/0,P=Ri(h,I>H&&t<=H?H:Rr(H,I));return L==P&&L==0&&(P=100),[L,P]}const lk=new Intl.NumberFormat(Us?nk.language:"en-US"),Eu=n=>lk.format(n),Qr=Math,Nl=Qr.PI,er=Qr.abs,Zr=Qr.floor,tr=Qr.round,di=Qr.ceil,Ri=Qr.min,Rr=Qr.max,qs=Qr.pow,bf=Qr.sign,oo=Qr.log10,xf=Qr.log2,ck=(n,t=1)=>Qr.sinh(n)*t,Lu=(n,t=1)=>Qr.asinh(n/t),dr=1/0;function Cf(n){return(oo((n^n>>31)-(n>>31))|0)+1}function Ou(n,t,e){return Ri(Rr(n,t),e)}function kf(n){return typeof n=="function"}function zt(n){return kf(n)?n:()=>n}const uk=()=>{},_f=n=>n,Af=(n,t)=>t,hk=n=>null,Sf=n=>!0,Tf=(n,t)=>n==t,dk=/\.\d*?(?=9{6,}|0{6,})/gm,us=n=>{if(If(n)||Eo.has(n))return n;const t=`${n}`,e=t.match(dk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[f,m]=t.split("e");return+`${us(f)}e${m}`}return hn(n,r)};function hs(n,t){return us(hn(us(n/t))*t)}function Dl(n,t){return us(di(us(n/t))*t)}function $f(n,t){return us(Zr(us(n/t))*t)}function hn(n,t=0){if(If(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return tr(r)/e}const Eo=new Map;function Mf(n){return((""+n).split(".")[1]||"").length}function Ra(n,t,e,r){let f=[],m=r.map(Mf);for(let y=t;y<e;y++){let x=er(y),h=hn(qs(n,y),x);for(let g=0;g<r.length;g++){let s=n==10?+`${r[g]}e${y}`:r[g]*h,c=(y>=0?0:x)+(y>=m[g]?0:m[g]),u=n==10?s:hn(s,c);f.push(u),Eo.set(u,c)}}return f}const Ea={},Nu=[],Ks=[null,null],Lo=Array.isArray,If=Number.isInteger,pk=n=>n===void 0;function Rf(n){return typeof n=="string"}function Fl(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function gk(n){return n!=null&&typeof n=="object"}const fk=Object.getPrototypeOf(Uint8Array),Ef="__proto__";function Gs(n,t=Fl){let e;if(Lo(n)){let r=n.find(f=>f!=null);if(Lo(r)||t(r)){e=Array(n.length);for(let f=0;f<n.length;f++)e[f]=Gs(n[f],t)}else e=n.slice()}else if(n instanceof fk)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Ef&&(e[r]=Gs(n[r],t))}else e=n;return e}function Kn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let f in r)f!=Ef&&(Fl(n[f])?Kn(n[f],Gs(r[f])):n[f]=Gs(r[f]))}return n}const mk=0,vk=1,yk=2;function wk(n,t,e){for(let r=0,f,m=-1;r<t.length;r++){let y=t[r];if(y>m){for(f=y-1;f>=0&&n[f]==null;)n[f--]=null;for(f=y+1;f<e&&n[f]==null;)n[m=f++]=null}}}function bk(n,t){if(kk(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return _k(y[0])||(y=Ck(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let g=0;g<h;g++)e.add(x[g])}let r=[Array.from(e).sort((y,x)=>y-x)],f=r[0].length,m=new Map;for(let y=0;y<f;y++)m.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let g=1;g<x.length;g++){let s=x[g],c=Array(f).fill(void 0),u=t?t[y][g]:vk,a=[];for(let o=0;o<s.length;o++){let l=s[o],d=m.get(h[o]);l===null?u!=mk&&(c[d]=l,u==yk&&a.push(d)):c[d]=l}wk(c,a,f),r.push(c)}}return r}const xk=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Ck(n){let t=n[0],e=t.length,r=Array(e);for(let m=0;m<r.length;m++)r[m]=m;r.sort((m,y)=>t[m]-t[y]);let f=[];for(let m=0;m<n.length;m++){let y=n[m],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];f.push(x)}return f}function kk(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let f=n[r][0];if(f.length!=e)return!1;if(f!=t){for(let m=0;m<e;m++)if(f[m]!=t[m])return!1}}return!0}function _k(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,f=e-1;for(;r<=f&&n[r]==null;)r++;for(;f>=r&&n[f]==null;)f--;if(f<=r)return!0;const m=Rr(1,Zr((f-r+1)/t));for(let y=n[r],x=r+m;x<=f;x+=m){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const Lf=["January","February","March","April","May","June","July","August","September","October","November","December"],Of=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Nf(n){return n.slice(0,3)}const Ak=Of.map(Nf),Sk=Lf.map(Nf),Tk={MMMM:Lf,MMM:Sk,WWWW:Of,WWW:Ak};function La(n){return(n<10?"0":"")+n}function $k(n){return(n<10?"00":n<100?"0":"")+n}const Mk={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>La(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>La(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>La(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>La(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>La(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>$k(n.getMilliseconds())};function Du(n,t){t=t||Tk;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(n);)e.push(f[0][0]=="{"?Mk[f[1]]:f[0]);return m=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](m,t);return y}}const Ik=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Rk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Ik?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Df=n=>n%1==0,Pl=[1,2,2.5,5],Ek=Ra(10,-32,0,Pl),Ff=Ra(10,0,32,Pl),Lk=Ff.filter(Df),ds=Ek.concat(Ff),Fu=`
|
1484
|
+
`,Pf="{YYYY}",Wf=Fu+Pf,Bf="{M}/{D}",Oa=Fu+Bf,Wl=Oa+"/{YY}",zf="{aa}",Ok="{h}:{mm}",Ys=Ok+zf,jf=Fu+Ys,Hf=":{ss}",rn=null;function Uf(n){let t=n*1e3,e=t*60,r=e*60,f=r*24,m=f*30,y=f*365,x=(n==1?Ra(10,0,3,Pl).filter(Df):Ra(10,-3,0,Pl)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,f,f*2,f*3,f*4,f*5,f*6,f*7,f*8,f*9,f*10,f*15,m,m*2,m*3,m*4,m*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Pf,rn,rn,rn,rn,rn,rn,1],[f*28,"{MMM}",Wf,rn,rn,rn,rn,rn,1],[f,Bf,Wf,rn,rn,rn,rn,rn,1],[r,"{h}"+zf,Wl,rn,Oa,rn,rn,rn,1],[e,Ys,Wl,rn,Oa,rn,rn,rn,1],[t,Hf,Wl+" "+Ys,rn,Oa+" "+Ys,rn,jf,rn,1],[n,Hf+".{fff}",Wl+" "+Ys,rn,Oa+" "+Ys,rn,jf,rn,1]];function g(s){return(c,u,a,o,l,d)=>{let w=[],b=l>=y,E=l>=m&&l<y,$=s(a),_=hn($*n,3),C=Pu($.getFullYear(),b?0:$.getMonth(),E||b?1:$.getDate()),R=hn(C*n,3);if(E||b){let L=E?l/m:0,F=b?l/y:0,I=_==R?_:hn(Pu(C.getFullYear()+F,C.getMonth()+L,1)*n,3),H=new Date(tr(I/n)),P=H.getFullYear(),O=H.getMonth();for(let S=0;I<=o;S++){let A=Pu(P+F*S,O+L*S,1),N=A-s(hn(A*n,3));I=hn((+A+N)*n,3),I<=o&&w.push(I)}}else{let L=l>=f?f:l,F=Zr(a)-Zr(_),I=R+F+Dl(_-R,L);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/e+H.getSeconds()/r,O=l/r,S=c.axes[u]._space,A=d/S;for(;I=hn(I+l,n==1?0:3),!(I>o);)if(O>1){let N=Zr(hn(P+O,6))%24,B=s(I).getHours()-N;B>1&&(B=-1),I-=B*r,P=(P+O)%24;let U=w[w.length-1];hn((I-U)/l,3)*A>=.7&&w.push(I)}else w.push(I)}return w}}return[x,h,g]}const[Nk,Dk,Fk]=Uf(1),[Pk,Wk,Bk]=Uf(.001);Ra(2,-53,53,[1]);function Vf(n,t){return n.map(e=>e.map((r,f)=>f==0||f==8||r==null?r:t(f==1||e[8]==0?r:e[1]+r)))}function qf(n,t){return(e,r,f,m,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,g,s,c,u,a;return r.map(o=>{let l=n(o),d=l.getFullYear(),w=l.getMonth(),b=l.getDate(),E=l.getHours(),$=l.getMinutes(),_=l.getSeconds(),C=d!=h&&x[2]||w!=g&&x[3]||b!=s&&x[4]||E!=c&&x[5]||$!=u&&x[6]||_!=a&&x[7]||x[1];return h=d,g=w,s=b,c=E,u=$,a=_,C(l)})}}function zk(n,t){let e=Du(t);return(r,f,m,y,x)=>f.map(h=>e(n(h)))}function Pu(n,t,e){return new Date(n,t,e)}function Kf(n,t){return t(n)}const jk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Gf(n,t){return(e,r,f,m)=>m==null?_u:t(n(r))}function Hk(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function Uk(n,t){return n.series[t].fill(n,t)}const Vk={show:!0,live:!0,isolate:!1,mount:uk,markers:{show:!0,width:2,stroke:Hk,fill:Uk,dash:"solid"},idx:null,idxs:null,values:[]};function qk(n,t){let e=n.cursor.points,r=hi(),f=e.size(n,t);yn(r,Ta,f),yn(r,$a,f);let m=f/-2;yn(r,"marginLeft",m),yn(r,"marginTop",m);let y=e.width(n,t,f);return y&&yn(r,"borderWidth",y),r}function Kk(n,t){let e=n.series[t].points;return e._fill||e._stroke}function Gk(n,t){let e=n.series[t].points;return e._stroke||e._fill}function Yk(n,t){return n.series[t].points.size}const Wu=[0,0];function Xk(n,t,e){return Wu[0]=t,Wu[1]=e,Wu}function Bl(n,t,e,r=!0){return f=>{f.button==0&&(!r||f.target==t)&&e(f)}}function Bu(n,t,e,r=!0){return f=>{(!r||f.target==t)&&e(f)}}const Qk={show:!0,x:!0,y:!0,lock:!1,move:Xk,points:{one:!1,show:qk,size:Yk,width:0,stroke:Gk,fill:Kk},bind:{mousedown:Bl,mouseup:Bl,click:Bl,dblclick:Bl,mousemove:Bu,mouseleave:Bu,mouseenter:Bu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,f)=>r-f,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Yf={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},zu=Kn({},Yf,{filter:Af}),Xf=Kn({},zu,{size:10}),Qf=Kn({},Yf,{show:!1}),ju='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Zf="bold "+ju,Jf=1.5,em={show:!0,scale:"x",stroke:xu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:2,grid:zu,ticks:Xf,border:Qf,font:ju,lineGap:Jf,rotate:0},Zk="Value",Jk="Time",tm={show:!0,scale:"x",auto:!1,sorted:1,min:dr,max:-1/0,idxs:[]};function e_(n,t,e,r,f){return t.map(m=>m==null?"":Eu(m))}function t_(n,t,e,r,f,m,y){let x=[],h=Eo.get(f)||0;e=y?e:hn(Dl(e,f),h);for(let g=e;g<=r;g=hn(g+f,h))x.push(Object.is(g,-0)?0:g);return x}function Hu(n,t,e,r,f,m,y){const x=[],h=n.scales[n.axes[t].scale].log,g=h==10?oo:xf,s=Zr(g(e));f=qs(h,s),h==10&&(f=ds[Ii(f,ds)]);let c=e,u=f*h;h==10&&(u=ds[Ii(u,ds)]);do x.push(c),c=c+f,h==10&&!Eo.has(c)&&(c=hn(c,Eo.get(f))),c>=u&&(f=c,u=f*h,h==10&&(u=ds[Ii(u,ds)]));while(c<=r);return x}function n_(n,t,e,r,f,m,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Hu(n,t,Rr(x,e),r,f):[x],g=r>=0&&e<=0?[0]:[];return(e<-x?Hu(n,t,Rr(x,-r),-e,f):[x]).reverse().map(s=>-s).concat(g,h)}const nm=/./,r_=/[12357]/,i_=/[125]/,rm=/1/,Uu=(n,t,e,r)=>n.map((f,m)=>t==4&&f==0||m%r==0&&e.test(f.toExponential()[f<0?1:0])?f:null);function o_(n,t,e,r,f){let m=n.axes[e],y=m.scale,x=n.scales[y],h=n.valToPos,g=m._space,s=h(10,y),c=h(9,y)-s>=g?nm:h(7,y)-s>=g?r_:h(5,y)-s>=g?i_:rm;if(c==rm){let u=er(h(1,y)-s);if(u<g)return Uu(t.slice().reverse(),x.distr,c,di(g/u)).reverse()}return Uu(t,x.distr,c,1)}function s_(n,t,e,r,f){let m=n.axes[e],y=m.scale,x=m._space,h=n.valToPos,g=er(h(1,y)-h(2,y));return g<x?Uu(t.slice().reverse(),3,nm,di(x/g)).reverse():t}function a_(n,t,e,r){return r==null?_u:t==null?"":Eu(t)}const im={show:!0,scale:"y",stroke:xu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:3,grid:zu,ticks:Xf,border:Qf,font:ju,lineGap:Jf,rotate:0};function l_(n,t){let e=3+(n||1)*2;return hn(e*t,3)}function c_(n,t){let{scale:e,idxs:r}=n.series[0],f=n._data[0],m=n.valToPos(f[r[0]],e,!0),y=n.valToPos(f[r[1]],e,!0),x=er(y-m),h=n.series[t],g=x/(h.points.space*Zt);return r[1]-r[0]<=g}const om={scale:null,auto:!0,sorted:0,min:dr,max:-1/0},sm=(n,t,e,r,f)=>f,am={show:!0,auto:!0,sorted:0,gaps:sm,alpha:1,facets:[Kn({},om,{scale:"x"}),Kn({},om,{scale:"y"})]},lm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:sm,alpha:1,points:{show:c_,filter:null},values:null,min:dr,max:-1/0,idxs:[],path:null,clip:null};function u_(n,t,e,r,f){return e/10}const cm={time:NC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},h_=Kn({},cm,{time:!1,ori:1}),um={};function hm(n,t){let e=um[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(f=>f!=r)},pub(r,f,m,y,x,h,g){for(let s=0;s<e.plots.length;s++)e.plots[s]!=f&&e.plots[s].pub(r,f,m,y,x,h,g)}},n!=null&&(um[n]=e)),e}const Xs=1,Vu=2;function ps(n,t,e){const r=n.mode,f=n.series[t],m=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=m[0],g=r==2?m[1]:m[t],s=r==2?y[f.facets[0].scale]:y[n.series[0].scale],c=r==2?y[f.facets[1].scale]:y[f.scale],u=x.left,a=x.top,o=x.width,l=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(f,h,g,s,c,d,w,u,a,o,l,jl,Qs,Ul,gm,mm):e(f,h,g,s,c,w,d,a,u,l,o,Hl,Zs,Gu,fm,vm)}function qu(n,t){let e=0,r=0,f=Yt(n.bands,Nu);for(let m=0;m<f.length;m++){let y=f[m];y.series[0]==t?e=y.dir:y.series[1]==t&&(y.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function d_(n,t,e,r,f){let m=n.mode,y=n.series[t],x=m==2?y.facets[1].scale:y.scale,h=n.scales[x];return f==-1?h.min:f==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function so(n,t,e,r,f,m){return ps(n,t,(y,x,h,g,s,c,u,a,o,l,d)=>{let w=y.pxRound;const b=g.dir*(g.ori==0?1:-1),E=g.ori==0?Qs:Zs;let $,_;b==1?($=e,_=r):($=r,_=e);let C=w(c(x[$],g,l,a)),R=w(u(h[$],s,d,o)),L=w(c(x[_],g,l,a)),F=w(u(m==1?s.max:s.min,s,d,o)),I=new Path2D(f);return E(I,L,F),E(I,C,F),E(I,C,R),I})}function zl(n,t,e,r,f,m){let y=null;if(n.length>0){y=new Path2D;const x=t==0?Ul:Gu;let h=e;for(let c=0;c<n.length;c++){let u=n[c];if(u[1]>u[0]){let a=u[0]-h;a>0&&x(y,h,r,a,r+m),h=u[1]}}let g=e+f-h,s=10;g>0&&x(y,h,r-s/2,g,r+m+s)}return y}function p_(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Ku(n,t,e,r,f,m,y){let x=[],h=n.length;for(let g=f==1?e:r;g>=e&&g<=r;g+=f)if(t[g]===null){let s=g,c=g;if(f==1)for(;++g<=r&&t[g]===null;)c=g;else for(;--g>=e&&t[g]===null;)c=g;let u=m(n[s]),a=c==s?u:m(n[c]),o=s-f;u=y<=0&&o>=0&&o<h?m(n[o]):u;let l=c+f;a=y>=0&&l>=0&&l<h?m(n[l]):a,a>=u&&x.push([u,a])}return x}function dm(n){return n==0?_f:n==1?tr:t=>hs(t,n)}function pm(n){let t=n==0?jl:Hl,e=n==0?(f,m,y,x,h,g)=>{f.arcTo(m,y,x,h,g)}:(f,m,y,x,h,g)=>{f.arcTo(y,m,h,x,g)},r=n==0?(f,m,y,x,h)=>{f.rect(m,y,x,h)}:(f,m,y,x,h)=>{f.rect(y,m,h,x)};return(f,m,y,x,h,g=0,s=0)=>{g==0&&s==0?r(f,m,y,x,h):(g=Ri(g,x/2,h/2),s=Ri(s,x/2,h/2),t(f,m+g,y),e(f,m+x,y,m+x,y+h,g),e(f,m+x,y+h,m,y+h,s),e(f,m,y+h,m,y,s),e(f,m,y,m+x,y,g),f.closePath())}}const jl=(n,t,e)=>{n.moveTo(t,e)},Hl=(n,t,e)=>{n.moveTo(e,t)},Qs=(n,t,e)=>{n.lineTo(t,e)},Zs=(n,t,e)=>{n.lineTo(e,t)},Ul=pm(0),Gu=pm(1),gm=(n,t,e,r,f,m)=>{n.arc(t,e,r,f,m)},fm=(n,t,e,r,f,m)=>{n.arc(e,t,r,f,m)},mm=(n,t,e,r,f,m,y)=>{n.bezierCurveTo(t,e,r,f,m,y)},vm=(n,t,e,r,f,m,y)=>{n.bezierCurveTo(e,t,f,r,y,m)};function ym(n){return(t,e,r,f,m)=>ps(t,e,(y,x,h,g,s,c,u,a,o,l,d)=>{let{pxRound:w,points:b}=y,E,$;g.ori==0?(E=jl,$=gm):(E=Hl,$=fm);const _=hn(b.width*Zt,3);let C=(b.size-b.width)/2*Zt,R=hn(C*2,3),L=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=t.bbox;Ul(F,I-R,H-R,P+R*2,O+R*2);const S=A=>{if(h[A]!=null){let N=w(c(x[A],g,l,a)),B=w(u(h[A],s,d,o));E(L,N+C,B),$(L,N,B,C,0,Nl*2)}};if(m)m.forEach(S);else for(let A=r;A<=f;A++)S(A);return{stroke:_>0?L:null,fill:L,clip:F,flags:Xs|Vu}})}function wm(n){return(t,e,r,f,m,y)=>{r!=f&&(m!=r&&y!=r&&n(t,e,r),m!=f&&y!=f&&n(t,e,f),n(t,e,y))}}const g_=wm(Qs),f_=wm(Zs);function bm(n){const t=Yt(n==null?void 0:n.alignGaps,0);return(e,r,f,m)=>ps(e,r,(y,x,h,g,s,c,u,a,o,l,d)=>{[f,m]=El(h,f,m);let w=y.pxRound,b=P=>w(c(P,g,l,a)),E=P=>w(u(P,s,d,o)),$,_;g.ori==0?($=Qs,_=g_):($=Zs,_=f_);const C=g.dir*(g.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Xs},L=R.stroke;let F=!1;if(m-f>=l*4){let P=he=>e.posToVal(he,g.key,!0),O=null,S=null,A,N,B,U=b(x[C==1?f:m]),K=b(x[f]),Z=b(x[m]),te=P(C==1?K+1:Z-1);for(let he=C==1?f:m;he>=f&&he<=m;he+=C){let ne=x[he],ae=(C==1?ne<te:ne>te)?U:b(ne),ce=h[he];ae==U?ce!=null?(N=ce,O==null?($(L,ae,E(N)),A=O=S=N):N<O?O=N:N>S&&(S=N)):ce===null&&(F=!0):(O!=null&&_(L,U,E(O),E(S),E(A),E(N)),ce!=null?(N=ce,$(L,ae,E(N)),O=S=A=N):(O=S=null,ce===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=S&&B!=U&&_(L,U,E(O),E(S),E(A),E(N))}else for(let P=C==1?f:m;P>=f&&P<=m;P+=C){let O=h[P];O===null?F=!0:O!=null&&$(L,b(x[P]),E(O))}let[I,H]=qu(e,r);if(y.fill!=null||I!=0){let P=R.fill=new Path2D(L),O=y.fillTo(e,r,y.min,y.max,I),S=E(O),A=b(x[f]),N=b(x[m]);C==-1&&([N,A]=[A,N]),$(P,N,S),$(P,A,S)}if(!y.spanGaps){let P=[];F&&P.push(...Ku(x,h,f,m,C,b,t)),R.gaps=P=y.gaps(e,r,f,m,P),R.clip=zl(P,g.ori,a,o,l,d)}return H!=0&&(R.band=H==2?[so(e,r,f,m,L,-1),so(e,r,f,m,L,1)]:so(e,r,f,m,L,H)),R})}function m_(n){const t=Yt(n.align,1),e=Yt(n.ascDesc,!1),r=Yt(n.alignGaps,0),f=Yt(n.extend,!1);return(m,y,x,h)=>ps(m,y,(g,s,c,u,a,o,l,d,w,b,E)=>{[x,h]=El(c,x,h);let $=g.pxRound,{left:_,width:C}=m.bbox,R=Z=>$(o(Z,u,b,d)),L=Z=>$(l(Z,a,E,w)),F=u.ori==0?Qs:Zs;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Xs},H=I.stroke,P=u.dir*(u.ori==0?1:-1);let O=L(c[P==1?x:h]),S=R(s[P==1?x:h]),A=S,N=S;f&&t==-1&&(N=_,F(H,N,O)),F(H,S,O);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=c[Z];if(te==null)continue;let he=R(s[Z]),ne=L(te);t==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;f&&t==1&&(B=_+C,F(H,B,O));let[U,K]=qu(m,y);if(g.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=g.fillTo(m,y,g.min,g.max,U),he=L(te);F(Z,B,he),F(Z,N,he)}if(!g.spanGaps){let Z=[];Z.push(...Ku(s,c,x,h,P,R,r));let te=g.width*Zt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=g.gaps(m,y,x,h,Z),I.clip=zl(Z,u.ori,d,w,b,E)}return K!=0&&(I.band=K==2?[so(m,y,x,h,H,-1),so(m,y,x,h,H,1)]:so(m,y,x,h,H,K)),I})}function xm(n,t,e,r,f,m,y=dr){if(n.length>1){let x=null;for(let h=0,g=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=er(n[h]-n[x]);s<g&&(g=s,y=er(e(n[h],r,f,m)-e(n[x],r,f,m)))}x=h}}return y}function v_(n){n=n||Ea;const t=Yt(n.size,[.6,dr,1]),e=n.align||0,r=n.gap||0;let f=n.radius;f=f==null?[0,0]:typeof f=="number"?[f,0]:f;const m=zt(f),y=1-t[0],x=Yt(t[1],dr),h=Yt(t[2],1),g=Yt(n.disp,Ea),s=Yt(n.each,a=>{}),{fill:c,stroke:u}=g;return(a,o,l,d)=>ps(a,o,(w,b,E,$,_,C,R,L,F,I,H)=>{let P=w.pxRound,O=e,S=r*Zt,A=x*Zt,N=h*Zt,B,U;$.ori==0?[B,U]=m(a,o):[U,B]=m(a,o);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?Ul:Gu,te=$.ori==0?s:(He,ke,ze,Ye,dt,Ct,xt)=>{s(He,ke,ze,dt,Ye,xt,Ct)},he=Yt(a.bands,Nu).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(a,o,w.min,w.max,ne),ce=P(R(ae,_,H,F)),ue,ye,Ae,$e=I,Ie=P(w.width*Zt),Ge=!1,qe=null,ut=null,rt=null,ht=null;c!=null&&(Ie==0||u!=null)&&(Ge=!0,qe=c.values(a,o,l,d),ut=new Map,new Set(qe).forEach(He=>{He!=null&&ut.set(He,new Path2D)}),Ie>0&&(rt=u.values(a,o,l,d),ht=new Map,new Set(rt).forEach(He=>{He!=null&&ht.set(He,new Path2D)})));let{x0:en,size:pn}=g;if(en!=null&&pn!=null){O=1,b=en.values(a,o,l,d),en.unit==2&&(b=b.map(ke=>a.posToVal(L+ke*I,$.key,!0)));let He=pn.values(a,o,l,d);pn.unit==2?ye=He[0]*I:ye=C(He[0],$,I,L)-C(0,$,I,L),$e=xm(b,E,C,$,I,L,$e),Ae=$e-ye+S}else $e=xm(b,E,C,$,I,L,$e),Ae=$e*y+S,ye=$e-Ae;Ae<1&&(Ae=0),Ie>=ye/2&&(Ie=0),Ae<5&&(P=_f);let Kt=Ae>0,pr=$e-Ae-(Kt?Ie:0);ye=P(Ou(pr,N,A)),ue=(O==0?ye/2:O==K?0:ye)-O*K*((O==0?S/2:0)+(Kt?Ie/2:0));const gn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},In=Ge?null:new Path2D;let Rn=null;if(he!=null)Rn=a.data[he.series[1]];else{let{y0:He,y1:ke}=g;He!=null&&ke!=null&&(E=ke.values(a,o,l,d),Rn=He.values(a,o,l,d))}let Yn=B*ye,vt=U*ye;for(let He=K==1?l:d;He>=l&&He<=d;He+=K){let ke=E[He];if(ke==null)continue;if(Rn!=null){let ct=Rn[He]??0;if(ke-ct==0)continue;ce=R(ct,_,H,F)}let ze=$.distr!=2||g!=null?b[He]:He,Ye=C(ze,$,I,L),dt=R(Yt(ke,ae),_,H,F),Ct=P(Ye-ue),xt=P(Rr(dt,ce)),Ot=P(Ri(dt,ce)),It=xt-Ot;if(ke!=null){let ct=ke<0?vt:Yn,yt=ke<0?Yn:vt;Ge?(Ie>0&&rt[He]!=null&&Z(ht.get(rt[He]),Ct,Ot+Zr(Ie/2),ye,Rr(0,It-Ie),ct,yt),qe[He]!=null&&Z(ut.get(qe[He]),Ct,Ot+Zr(Ie/2),ye,Rr(0,It-Ie),ct,yt)):Z(In,Ct,Ot+Zr(Ie/2),ye,Rr(0,It-Ie),ct,yt),te(a,o,He,Ct-Ie/2,Ot,ye+Ie,It)}}return Ie>0?gn.stroke=Ge?ht:In:Ge||(gn._fill=w.width==0?w._fill:w._stroke??w._fill,gn.width=0),gn.fill=Ge?ut:In,gn})}function y_(n,t){const e=Yt(t==null?void 0:t.alignGaps,0);return(r,f,m,y)=>ps(r,f,(x,h,g,s,c,u,a,o,l,d,w)=>{[m,y]=El(g,m,y);let b=x.pxRound,E=B=>b(u(B,s,d,o)),$=B=>b(a(B,c,w,l)),_,C,R;s.ori==0?(_=jl,R=Qs,C=mm):(_=Hl,R=Zs,C=vm);const L=s.dir*(s.ori==0?1:-1);let F=E(h[L==1?m:y]),I=F,H=[],P=[];for(let B=L==1?m:y;B>=m&&B<=y;B+=L)if(g[B]!=null){let U=h[B],K=E(U);H.push(I=K),P.push($(g[B]))}const O={stroke:n(H,P,_,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Xs},S=O.stroke;let[A,N]=qu(r,f);if(x.fill!=null||A!=0){let B=O.fill=new Path2D(S),U=x.fillTo(r,f,x.min,x.max,A),K=$(U);R(B,I,K),R(B,F,K)}if(!x.spanGaps){let B=[];B.push(...Ku(h,g,m,y,L,E,e)),O.gaps=B=x.gaps(r,f,m,y,B),O.clip=zl(B,s.ori,o,l,d,w)}return N!=0&&(O.band=N==2?[so(r,f,m,y,S,-1),so(r,f,m,y,S,1)]:so(r,f,m,y,S,N)),O})}function w_(n){return y_(b_,n)}function b_(n,t,e,r,f,m){const y=n.length;if(y<2)return null;const x=new Path2D;if(e(x,n[0],t[0]),y==2)r(x,n[1],t[1]);else{let h=Array(y),g=Array(y-1),s=Array(y-1),c=Array(y-1);for(let u=0;u<y-1;u++)s[u]=t[u+1]-t[u],c[u]=n[u+1]-n[u],g[u]=s[u]/c[u];h[0]=g[0];for(let u=1;u<y-1;u++)g[u]===0||g[u-1]===0||g[u-1]>0!=g[u]>0?h[u]=0:(h[u]=3*(c[u-1]+c[u])/((2*c[u]+c[u-1])/g[u-1]+(c[u]+2*c[u-1])/g[u]),isFinite(h[u])||(h[u]=0));h[y-1]=g[y-2];for(let u=0;u<y-1;u++)f(x,n[u]+c[u]/3,t[u]+h[u]*c[u]/3,n[u+1]-c[u]/3,t[u+1]-h[u+1]*c[u]/3,n[u+1],t[u+1])}return x}const Yu=new Set;function Cm(){for(let n of Yu)n.syncRect(!0)}Us&&(cs(ek,Vs,Cm),cs(tk,Vs,Cm,!0),cs(Il,Vs,()=>{br.pxRatio=Zt}));const x_=bm(),C_=ym();function km(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((f,m)=>Xu(f,m,t,e))}function k_(n,t){return n.map((e,r)=>r==0?{}:Kn({},t,e))}function Xu(n,t,e,r){return Kn({},t==0?e:r,n)}function _m(n,t,e){return t==null?Ks:[t,e]}const __=_m;function A_(n,t,e){return t==null?Ks:Ol(t,e,Ru,!0)}function Am(n,t,e,r){return t==null?Ks:Ll(t,e,n.scales[r].log,!1)}const S_=Am;function Sm(n,t,e,r){return t==null?Ks:Iu(t,e,n.scales[r].log,!1)}const T_=Sm;function $_(n,t,e,r,f){let m=Rr(Cf(n),Cf(t)),y=t-n,x=Ii(f/r*y,e);do{let h=e[x],g=r*h/y;if(g>=f&&m+(h<5?Eo.get(h):0)<=17)return[h,g]}while(++x<e.length);return[0,0]}function Tm(n){let t,e;return n=n.replace(/(\d+)px/,(r,f)=>(t=tr((e=+f)*Zt))+"px"),[n,t,e]}function M_(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=hn(t[2]*Zt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function br(n,t,e){const r={mode:Yt(n.mode,1)},f=r.mode;function m(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function y(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function x(V,X,ie,oe){return X.ori==0?m(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=m,r.valToPosV=y;let h=!1;r.status=0;const g=r.root=hi(DC);if(n.id!=null&&(g.id=n.id),Xr(g,n.class),n.title){let V=hi(WC,g);V.textContent=n.title}const s=Mi("canvas"),c=r.ctx=s.getContext("2d"),u=hi(BC,g);cs("click",u,V=>{V.target===o&&(nn!=mi||Ht!=eo)&&Ln.click(r,V)},!0);const a=r.under=hi(zC,u);u.appendChild(s);const o=r.over=hi(jC,u);n=Gs(n);const l=+Yt(n.pxAlign,1),d=dm(l);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=f==1?km(n.series||[],tm,lm,!1):k_(n.series||[null],am),E=r.axes=km(n.axes||[],em,im,!0),$=r.scales={},_=r.bands=n.bands||[];_.forEach(V=>{V.fill=zt(V.fill||null),V.dir=Yt(V.dir,-1)});const C=f==2?b[1].facets[0].scale:b[0].scale,R={axes:po,series:oa},L=(n.drawOrder||["axes","series"]).map(V=>R[V]);function F(V){const X=V.distr==3?ie=>oo(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Lu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:be}=V,Me=be-ge;return(oe-ge)/Me}}function I(V){let X=$[V];if(X==null){let ie=(n.scales||Ea)[V]||Ea;if(ie.from!=null){I(ie.from);let oe=Kn({},$[ie.from],ie,{key:V});oe.valToPct=F(oe),$[V]=oe}else{X=$[V]=Kn({},V==C?cm:h_,ie),X.key=V;let oe=X.time,ge=X.range,be=Lo(ge);if((V!=C||f==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?yf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?yf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Fl(ge))){let Me=ge;ge=(Fe,We,Ve)=>We==null?Ks:Ol(We,Ve,Me)}X.range=zt(ge||(oe?__:V==C?X.distr==3?S_:X.distr==4?T_:_m:X.distr==3?Am:X.distr==4?Sm:A_)),X.auto=zt(be?!1:X.auto),X.clamp=zt(X.clamp||u_),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),f==1&&b.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const H=$[C],P=H.distr;let O,S;H.ori==0?(Xr(g,FC),O=m,S=y):(Xr(g,PC),O=y,S=m);const A={};for(let V in $){let X=$[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(tr(V/w))),B=n.fmtDate||Du,U=w==1?Fk(N):Bk(N),K=qf(N,Vf(w==1?Dk:Wk,B)),Z=Gf(N,Kf(jk,B)),te=[],he=r.legend=Kn({},Vk,n.legend),ne=r.cursor=Kn({},Qk,{drag:{y:f==2}},n.cursor),ae=he.show,ce=ne.show,ue=he.markers;he.idxs=te,ue.width=zt(ue.width),ue.dash=zt(ue.dash),ue.stroke=zt(ue.stroke),ue.fill=zt(ue.fill);let ye,Ae,$e,Ie=[],Ge=[],qe,ut=!1,rt={};if(he.live){const V=b[1]?b[1].values:null;ut=V!=null,qe=ut?V(r,1,0):{_:0};for(let X in qe)rt[X]=_u}if(ae)if(ye=Mi("table",GC,g),$e=Mi("tbody",null,ye),he.mount(r,ye),ut){Ae=Mi("thead",null,ye,$e);let V=Mi("tr",null,Ae);Mi("th",null,V);for(var ht in qe)Mi("th",tf,V).textContent=ht}else Xr(ye,XC),he.live&&Xr(ye,YC);const en={show:!0},pn={show:!1};function Kt(V,X){if(X==0&&(ut||!he.live||f==2))return Ks;let ie=[],oe=Mi("tr",QC,$e,$e.childNodes[X]);Xr(oe,V.class),V.show||Xr(oe,ls);let ge=Mi("th",null,oe);if(ue.show){let Fe=hi(ZC,ge);if(X>0){let We=ue.width(r,X);We&&(Fe.style.border=We+"px "+ue.dash(r,X)+" "+ue.stroke(r,X)),Fe.style.background=ue.fill(r,X)}}let be=hi(tf,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ue.show||(be.style.color=V.width>0?ue.stroke(r,X):ue.fill(r,X)),gn("click",ge,Fe=>{if(ne._lock)return;Oi(Fe);let We=b.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ve=b.some((Xe,Ze)=>Ze>0&&Ze!=We&&Xe.show);b.forEach((Xe,Ze)=>{Ze>0&&Or(Ze,Ve?Ze==We?en:pn:en,!0,at.setSeries)})}else Or(We,{show:!V.show},!0,at.setSeries)},!1),Ni&&gn(sf,ge,Fe=>{ne._lock||(Oi(Fe),Or(b.indexOf(V),wi,!0,at.setSeries))},!1));for(var Me in qe){let Fe=Mi("td",JC,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const pr=new Map;function gn(V,X,ie,oe=!0){const ge=pr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(cs(V,X,ge[V]=be),pr.set(X,ge))}function In(V,X,ie){const oe=pr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Mu(ge,X,oe[ge]),delete oe[ge]);V==null&&pr.delete(X)}let Rn=0,Yn=0,vt=0,He=0,ke=0,ze=0,Ye=ke,dt=ze,Ct=vt,xt=He,Ot=0,It=0,ct=0,yt=0;r.bbox={};let xn=!1,Cr=!1,zr=!1,Li=!1,ao=!1,gr=!1;function lo(V,X,ie){(ie||V!=r.width||X!=r.height)&&Oo(V,X),Wi(!1),zr=!0,Cr=!0,Ji()}function Oo(V,X){r.width=Rn=vt=V,r.height=Yn=He=X,ke=ze=0,vs(),na();let ie=r.bbox;Ot=ie.left=hs(ke*Zt,.5),It=ie.top=hs(ze*Zt,.5),ct=ie.width=hs(vt*Zt,.5),yt=ie.height=hs(He*Zt,.5)}const ja=3;function ei(){let V=!1,X=0;for(;!V;){X++;let ie=sa(X),oe=qa(X);V=X==ja||ie&&oe,V||(Oo(r.width,r.height),Cr=!0)}}function Ha({width:V,height:X}){lo(V,X)}r.setSize=Ha;function vs(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:Fe}=ge,We=Me%2,Ve=ge.label!=null?ge.labelSize:0,Xe=Fe+Ve;Xe>0&&(We?(vt-=Xe,Me==3?(ke+=Xe,oe=!0):ie=!0):(He-=Xe,Me==0?(ze+=Xe,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,vt-=Ar[1]+Ar[3],ke+=Ar[3],He-=Ar[2]+Ar[0],ze+=Ar[0]}function na(){let V=ke+vt,X=ze+He,ie=ke,oe=ze;function ge(be,Me){switch(be){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((be,Me)=>{if(be.show&&be._show){let Fe=be.side;be._pos=ge(Fe,be._size),be.label!=null&&(be._lpos=ge(Fe,be.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=zt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,Fe)=>{if(be==0)return Me;let We=Me,Ve=ie(ge,be,Me,Fe)??dr,Xe=Ve>=0&&Ve<dr,Ze=H.ori==0?vt:He,bt=ne.left,Wt=t[0],_t=t[be];if(X.has(_t[Me])){We=null;let Ft=null,pt=null,ot;if(oe==0||oe==-1)for(ot=Me;Ft==null&&ot-- >0;)X.has(_t[ot])||(Ft=ot);if(oe==0||oe==1)for(ot=Me;pt==null&&ot++<_t.length;)X.has(_t[ot])||(pt=ot);if(Ft!=null||pt!=null)if(Xe){let dn=Ft==null?-1/0:O(Wt[Ft],H,Ze,0),_n=pt==null?1/0:O(Wt[pt],H,Ze,0),Zn=bt-dn,Vt=_n-bt;Zn<=Vt?Zn<=Ve&&(We=Ft):Vt<=Ve&&(We=pt)}else We=pt==null?Ft:Ft==null?pt:Me-Ft<=pt-Me?Ft:pt}else Xe&&er(bt-O(Wt[Me],H,Ze,0))>Ve&&(We=null);return We}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let zn=ne.points;zn.show=zt(zn.show),zn.size=zt(zn.size),zn.stroke=zt(zn.stroke),zn.width=zt(zn.width),zn.fill=zt(zn.fill);const kr=r.focus=Kn({},n.focus||{alpha:.3},ne.focus),Ni=kr.prox>=0,Sn=Ni&&zn.one;let _r=[],Yi=[],Di=[];function ys(V,X){let ie=zn.show(r,X);if(ie instanceof HTMLElement)return Xr(ie,KC),Xr(ie,V.class),Vi(ie,-10,-10,vt,He),o.insertBefore(ie,_r[X]),ie}function ra(V,X){if(f==1||X>0){let ie=f==1&&$[V.scale].time,oe=V.value;V.value=ie?Rf(oe)?Gf(N,Kf(oe,B)):oe||Z:oe||a_,V.label=V.label||(ie?Jk:Zk)}if(Sn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||x_||hk,V.fillTo=zt(V.fillTo||d_),V.pxAlign=+Yt(V.pxAlign,l),V.pxRound=dm(V.pxAlign),V.stroke=zt(V.stroke||null),V.fill=zt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=l_(Rr(1,V.width),1),oe=V.points=Kn({},{size:ie,width:Rr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:C_,_stroke:null,_fill:null},V.points);oe.show=zt(oe.show),oe.filter=zt(oe.filter),oe.fill=zt(oe.fill),oe.stroke=zt(oe.stroke),oe.paths=zt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Kt(V,X);Ie.splice(X,0,ie[0]),Ge.splice(X,0,ie[1]),he.values.push(null)}if(ce){te.splice(X,0,null);let ie=null;Sn?X==0&&(ie=ys(V,X)):X>0&&(ie=ys(V,X)),_r.splice(X,0,ie),Yi.splice(X,0,0),Di.splice(X,0,0)}nt("addSeries",X)}function Ua(V,X){X=X??b.length,V=f==1?Xu(V,X,tm,lm):Xu(V,X,{},am),b.splice(X,0,V),ra(b[X],X)}r.addSeries=Ua;function Va(V){if(b.splice(V,1),ae){he.values.splice(V,1),Ge.splice(V,1);let X=Ie.splice(V,1)[0];In(null,X.firstChild),X.remove()}ce&&(te.splice(V,1),_r.splice(V,1)[0].remove(),Yi.splice(V,1),Di.splice(V,1)),nt("delSeries",V)}r.delSeries=Va;const Fi=[!1,!1,!1,!1];function ti(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=$[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=$[V.scale]);let ge=oe.time;V.size=zt(V.size),V.space=zt(V.space),V.rotate=zt(V.rotate),Lo(V.incrs)&&V.incrs.forEach(Me=>{!Eo.has(Me)&&Eo.set(Me,Mf(Me))}),V.incrs=zt(V.incrs||(oe.distr==2?Lk:ge?w==1?Nk:Pk:ds)),V.splits=zt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Hu:oe.distr==4?n_:t_)),V.stroke=zt(V.stroke),V.grid.stroke=zt(V.grid.stroke),V.ticks.stroke=zt(V.ticks.stroke),V.border.stroke=zt(V.border.stroke);let be=V.values;V.values=Lo(be)&&!Lo(be[0])?zt(be):ge?Lo(be)?qf(N,Vf(be,B)):Rf(be)?zk(N,be):be||K:be||e_,V.filter=zt(V.filter||(oe.distr>=3&&oe.log==10?o_:oe.distr==3&&oe.log==2?s_:Af)),V.font=Tm(V.font),V.labelFont=Tm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Fi[X]=!0,V._el=hi(HC,u))}}function jt(V,X,ie,oe){let[ge,be,Me,Fe]=ie,We=X%2,Ve=0;return We==0&&(Fe||be)&&(Ve=X==0&&!ge||X==2&&!Me?tr(em.size/3):0),We==1&&(ge||Me)&&(Ve=X==1&&!be||X==3&&!Fe?tr(im.size/2):0),Ve}const ia=r.padding=(n.padding||[jt,jt,jt,jt]).map(V=>zt(Yt(V,jt))),Ar=r._padding=ia.map((V,X)=>V(r,X,Fi,0));let jn,fn=null,En=null;const pi=f==1?b[0].idxs:null;let Sr=null,gi=!1;function No(V,X){if(t=V??[],r.data=r._data=t,f==2){jn=0;for(let ie=1;ie<b.length;ie++)jn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Sr=t[0],jn=Sr.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(jn);for(let ge=0;ge<jn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),nt("setData"),P==2&&(zr=!0),X!==!1){let ie=H;ie.auto(r,gi)?ws():Xn(C,ie.min,ie.max),Li=Li||ne.left>=0,gr=!0,Ji()}}r.setData=No;function ws(){gi=!0;let V,X;f==1&&(jn>0?(fn=pi[0]=0,En=pi[1]=jn-1,V=t[0][fn],X=t[0][En],P==2?(V=fn,X=En):V==X&&(P==3?[V,X]=Ll(V,V,H.log,!1):P==4?[V,X]=Iu(V,V,H.log,!1):H.time?X=V+tr(86400/w):[V,X]=Ol(V,X,Ru,!0))):(fn=pi[0]=V=null,En=pi[1]=X=null)),Xn(C,V,X)}let Xi,jr,co,Do,Hr,Fo,bs,xs,Po,nr;function Cs(V,X,ie,oe,ge,be){V??(V=rf),ie??(ie=Nu),oe??(oe="butt"),ge??(ge=rf),be??(be="round"),V!=Xi&&(c.strokeStyle=Xi=V),ge!=jr&&(c.fillStyle=jr=ge),X!=co&&(c.lineWidth=co=X),be!=Hr&&(c.lineJoin=Hr=be),oe!=Fo&&(c.lineCap=Fo=oe),ie!=Do&&c.setLineDash(Do=ie)}function uo(V,X,ie,oe){X!=jr&&(c.fillStyle=jr=X),V!=bs&&(c.font=bs=V),ie!=xs&&(c.textAlign=xs=ie),oe!=Po&&(c.textBaseline=Po=oe)}function Wo(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,gi)&&(X==null||X.min==null)){let be=Yt(fn,0),Me=Yt(En,oe.length-1),Fe=ie.min==null?ok(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ri(V.min,ie.min=Fe[0]),V.max=Rr(V.max,ie.max=Fe[1])}}const Bo={min:null,max:null};function Qi(){for(let oe in $){let ge=$[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,gi))&&(A[oe]=Bo)}for(let oe in $){let ge=$[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=Bo)}A[C]!=null&&Wi(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let be=V[oe]=Gs($[oe],gk);if(ge.min!=null)Kn(be,ge);else if(oe!=C||f==2)if(jn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=dr,be.max=-1/0}}if(jn>0){b.forEach((oe,ge)=>{if(f==1){let be=oe.scale,Me=A[be];if(Me==null)return;let Fe=V[be];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,be);Fe.min=We[0],Fe.max=We[1],fn=Ii(Fe.min,t[0]),En=Ii(Fe.max,t[0]),En-fn>1&&(t[0][fn]<Fe.min&&fn++,t[0][En]>Fe.max&&En--),oe.min=Sr[fn],oe.max=Sr[En]}else oe.show&&oe.auto&&Wo(Fe,Me,oe,t[ge],oe.sorted);oe.idxs[0]=fn,oe.idxs[1]=En}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,Fe=be.scale,We=Me.scale,[Ve,Xe]=t[ge],Ze=V[Fe],bt=V[We];Ze!=null&&Wo(Ze,A[Fe],be,Ve,be.sorted),bt!=null&&Wo(bt,A[We],Me,Xe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=A[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==dr?null:ge.min,ge.max==-1/0?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let be=V[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],be=$[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?oo(be.min):Me==4?Lu(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?oo(be.max):Me==4?Lu(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{f==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)zr=!0,nt("setScale",oe);ce&&ne.left>=0&&(Li=gr=!0)}for(let oe in A)A[oe]=null}function ks(V){let X=Ou(fn-1,0,jn-1),ie=Ou(En+1,0,jn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<jn-1;)ie++;return[X,ie]}function oa(){if(jn>0){let V=b.some(X=>X._focus)&&nr!=kr.alpha;V&&(c.globalAlpha=nr=kr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(zo(ie,!1),zo(ie,!0),X._paths==null)){let oe=nr;nr!=X.alpha&&(c.globalAlpha=nr=X.alpha);let ge=f==2?[0,t[ie][0].length-1]:ks(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),nr!=oe&&(c.globalAlpha=nr=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=nr;nr!=X.alpha&&(c.globalAlpha=nr=X.alpha),X._paths!=null&&jo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,fn,En,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,fn,En,Me),jo(ie,!0))}nr!=oe&&(c.globalAlpha=nr=oe),nt("drawSeries",ie)}}),V&&(c.globalAlpha=nr=1)}}function zo(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function jo(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:Ve=ie.width}=ie._paths;Ve=hn(Ve*Zt,3);let Xe=null,Ze=Ve%2/2;X&&We==null&&(We=Ve>0?"#fff":Fe);let bt=ie.pxAlign==1&&Ze>0;if(bt&&c.translate(Ze,Ze),!X){let Wt=Ot-Ve/2,_t=It-Ve/2,Ft=ct+Ve,pt=yt+Ve;Xe=new Path2D,Xe.rect(Wt,_t,Ft,pt)}X?ho(Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,be):_s(V,Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,Xe,be),bt&&c.translate(-Ze,-Ze)}function _s(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe){let Ze=!1;We!=0&&_.forEach((bt,Wt)=>{if(bt.series[0]==V){let _t=b[bt.series[1]],Ft=t[bt.series[1]],pt=(_t._paths||Ea).band;Lo(pt)&&(pt=bt.dir==1?pt[0]:pt[1]);let ot,dn=null;_t.show&&pt&&ak(Ft,fn,En)?(dn=bt.fill(r,Wt)||be,ot=_t._paths.clip):pt=null,ho(X,ie,oe,ge,dn,Me,Fe,We,Ve,Xe,ot,pt),Ze=!0}}),Ze||ho(X,ie,oe,ge,be,Me,Fe,We,Ve,Xe)}const Ho=Xs|Vu;function ho(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe,Ze){Cs(V,X,ie,oe,ge),(We||Ve||Ze)&&(c.save(),We&&c.clip(We),Ve&&c.clip(Ve)),Ze?(Fe&Ho)==Ho?(c.clip(Ze),Xe&&c.clip(Xe),rr(ge,Me),fi(V,be,X)):Fe&Vu?(rr(ge,Me),c.clip(Ze),fi(V,be,X)):Fe&Xs&&(c.save(),c.clip(Ze),Xe&&c.clip(Xe),rr(ge,Me),c.restore(),fi(V,be,X)):(rr(ge,Me),fi(V,be,X)),(We||Ve||Ze)&&c.restore()}function fi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{c.strokeStyle=Xi=ge,c.stroke(oe)}):X!=null&&V&&c.stroke(X))}function rr(V,X){X instanceof Map?X.forEach((ie,oe)=>{c.fillStyle=jr=oe,c.fill(ie)}):X!=null&&V&&c.fill(X)}function Zi(V,X,ie,oe){let ge=E[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Fe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=$_(X,ie,Fe,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,Fe,We,Ve){let Xe=Me%2/2;l==1&&c.translate(Xe,Xe),Cs(Fe,Me,We,Ve,Fe),c.beginPath();let Ze,bt,Wt,_t,Ft=ge+(oe==0||oe==3?-be:be);ie==0?(bt=ge,_t=Ft):(Ze=ge,Wt=Ft);for(let pt=0;pt<V.length;pt++)X[pt]!=null&&(ie==0?Ze=Wt=V[pt]:bt=_t=V[pt],c.moveTo(Ze,bt),c.lineTo(Wt,_t));c.stroke(),l==1&&c.translate(-Xe,-Xe)}function sa(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Wi(!1));return}else ie._show||(X=!1,ie._show=!0,Wi(!1));let be=ie.side,Me=be%2,{min:Fe,max:We}=ge,[Ve,Xe]=Zi(oe,Fe,We,Me==0?vt:He);if(Xe==0)return;let Ze=ge.distr==2,bt=ie._splits=ie.splits(r,oe,Fe,We,Ve,Xe,Ze),Wt=ge.distr==2?bt.map(ot=>Sr[ot]):bt,_t=ge.distr==2?Sr[bt[1]]-Sr[bt[0]]:Ve,Ft=ie._values=ie.values(r,ie.filter(r,Wt,oe,Xe,_t),oe,Xe,_t);ie._rotate=be==2?ie.rotate(r,Ft,oe,Xe):0;let pt=ie._size;ie._size=di(ie.size(r,Ft,oe,V)),pt!=null&&ie._size!=pt&&(X=!1)}),X}function qa(V){let X=!0;return ia.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=Ar[oe]&&(X=!1),Ar[oe]=ge}),X}function po(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ve]=X._found;if(X.label!=null){let un=X.labelGap*Fe,cr=tr((X._lpos+un)*Zt);uo(X.labelFont[0],Me,"center",ie==2?Ma:nf),c.save(),oe==1?(ge=be=0,c.translate(cr,tr(It+yt/2)),c.rotate((ie==3?-Nl:Nl)/2)):(ge=tr(Ot+ct/2),be=cr);let yo=kf(X.label)?X.label(r,V,We,Ve):X.label;c.fillText(yo,ge,be),c.restore()}if(Ve==0)continue;let Xe=$[X.scale],Ze=oe==0?ct:yt,bt=oe==0?Ot:It,Wt=X._splits,_t=Xe.distr==2?Wt.map(un=>Sr[un]):Wt,Ft=Xe.distr==2?Sr[Wt[1]]-Sr[Wt[0]]:We,pt=X.ticks,ot=X.border,dn=pt.show?pt.size:0,_n=tr(dn*Zt),Zn=tr((X.alignTo==2?X._size-dn-X.gap:X.gap)*Zt),Vt=X._rotate*-Nl/180,pe=d(X._pos*Zt),_e=(_n+Zn)*Fe,xe=pe+_e;be=oe==0?xe:0,ge=oe==1?xe:0;let je=X.font[0],lt=X.align==1?Hs:X.align==2?bu:Vt>0?Hs:Vt<0?bu:oe==0?"center":ie==3?bu:Hs,Mt=Vt||oe==1?"middle":ie==2?Ma:nf;uo(je,Me,lt,Mt);let Gt=X.font[1]*X.lineGap,Nt=Wt.map(un=>d(x(un,Xe,Ze,bt))),Nr=X._values;for(let un=0;un<Nr.length;un++){let cr=Nr[un];if(cr!=null){oe==0?ge=Nt[un]:be=Nt[un],cr=""+cr;let yo=cr.indexOf(`
|
1485
|
+
`)==-1?[cr]:cr.split(/\n/gm);for(let Dn=0;Dn<yo.length;Dn++){let Ss=yo[Dn];Vt?(c.save(),c.translate(ge,be+Dn*Gt),c.rotate(Vt),c.fillText(Ss,0,0),c.restore()):c.fillText(Ss,ge,be+Dn*Gt)}}}pt.show&&Pi(Nt,pt.filter(r,_t,V,Ve,Ft),oe,ie,pe,_n,hn(pt.width*Zt,3),pt.stroke(r,V),pt.dash,pt.cap);let bi=X.grid;bi.show&&Pi(Nt,bi.filter(r,_t,V,Ve,Ft),oe,oe==0?2:1,oe==0?It:Ot,oe==0?yt:ct,hn(bi.width*Zt,3),bi.stroke(r,V),bi.dash,bi.cap),ot.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?It:Ot,oe==1?yt:ct,hn(ot.width*Zt,3),ot.stroke(r,V),ot.dash,ot.cap)}nt("drawAxes")}function Wi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(f==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let go=!1,Uo=!1,fo=[];function aa(){Uo=!1;for(let V=0;V<fo.length;V++)nt(...fo[V]);fo.length=0}function Ji(){go||(xk(la),go=!0)}function Pe(V,X=!1){go=!0,Uo=X,V(r),la(),X&&fo.length>0&&queueMicrotask(aa)}r.batch=Pe;function la(){if(xn&&(Qi(),xn=!1),zr&&(ei(),zr=!1),Cr){if(yn(a,Hs,ke),yn(a,Ma,ze),yn(a,Ta,vt),yn(a,$a,He),yn(o,Hs,ke),yn(o,Ma,ze),yn(o,Ta,vt),yn(o,$a,He),yn(u,Ta,Rn),yn(u,$a,Yn),s.width=tr(Rn*Zt),s.height=tr(Yn*Zt),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let be=ge===3||ge===0?ie:0,Me=ge%2==1;yn(V,Me?"left":"top",oe-be),yn(V,Me?"width":"height",ie),yn(V,Me?"top":"left",Me?ze:ke),yn(V,Me?"height":"width",Me?He:vt),Tu(V,ls)}else Xr(V,ls)}),Xi=jr=co=Hr=Fo=bs=xs=Po=Do=null,nr=1,W(!0),ke!=Ye||ze!=dt||vt!=Ct||He!=xt){Wi(!1);let V=vt/Ct,X=He/xt;if(ce&&!Li&&ne.left>=0){ne.left*=V,ne.top*=X,ni&&Vi(ni,tr(ne.left),0,vt,He),Hn&&Vi(Hn,0,tr(ne.top),vt,He);for(let ie=0;ie<_r.length;ie++){let oe=_r[ie];oe!=null&&(Yi[ie]*=V,Di[ie]*=X,Vi(oe,di(Yi[ie]),di(Di[ie]),vt,He))}}if(wt.show&&!ao&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let ie in Y)yn(Lr,ie,wt[ie])}Ye=ke,dt=ze,Ct=vt,xt=He}nt("setSize"),Cr=!1}Rn>0&&Yn>0&&(c.clearRect(0,0,s.width,s.height),nt("drawClear"),L.forEach(V=>V()),nt("draw")),wt.show&&ao&&(cn(wt),ao=!1),ce&&Li&&(k(null,!0,!1),Li=!1),he.show&&he.live&&gr&&(v(),gr=!1),h||(h=!0,r.status=1,nt("ready")),gi=!1,go=!1}r.redraw=(V,X)=>{zr=X||!1,V!==!1?Xn(C,H.min,H.max):Ji()};function Ne(V,X){let ie=$[V];if(ie.from==null){if(jn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(jn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&jn>0&&(X.min=Ii(X.min,t[0]),X.max=Ii(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,xn=!0,Ji()}}r.setScale=Ne;let Tn,mo,ni,Hn,ca,vo,mi,eo,tn,Xt,nn,Ht,vi=!1;const Ln=ne.drag;let Be=Ln.x,mn=Ln.y;ce&&(ne.x&&(Tn=hi(VC,o)),ne.y&&(mo=hi(qC,o)),H.ori==0?(ni=Tn,Hn=mo):(ni=mo,Hn=Tn),nn=ne.left,Ht=ne.top);const wt=r.select=Kn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Lr=wt.show?hi(UC,wt.over?o:a):null;function cn(V,X){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&yn(Lr,ie,V[ie]);X!==!1&&nt("setSelect")}}r.setSelect=cn;function wn(V){if(b[V].show)ae&&Tu(Ie[V],ls);else if(ae&&Xr(Ie[V],ls),ce){let X=Sn?_r[0]:_r[V];X!=null&&Vi(X,-10,-10,vt,He)}}function Xn(V,X,ie){Ne(V,{min:X,max:ie})}function Or(V,X,ie,oe){X.focus!=null&&sr(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,wn(be),f==2?(Xn(ge.facets[0].scale,null,null),Xn(ge.facets[1].scale,null,null)):Xn(ge.scale,null,null),Ji())}),ie!==!1&&nt("setSeries",V,X),oe&&$t("setSeries",r,V,X)}r.setSeries=Or;function yi(V,X){Kn(_[V],X)}function On(V,X){V.fill=zt(V.fill||null),V.dir=Yt(V.dir,-1),X=X??_.length,_.splice(X,0,V)}function Ur(V){V==null?_.length=0:_.splice(V,1)}r.addBand=On,r.setBand=yi,r.delBand=Ur;function Vo(V,X){b[V].alpha=X,ce&&_r[V]!=null&&(_r[V].style.opacity=X),ae&&Ie[V]&&(Ie[V].style.opacity=X)}let Nn,ri,ii;const wi={focus:!0};function sr(V){if(V!=ii){let X=V==null,ie=kr.alpha!=1;b.forEach((oe,ge)=>{if(f==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Vo(ge,be?1:kr.alpha)}}),ii=V,ie&&Ji()}}ae&&Ni&&gn(af,ye,V=>{ne._lock||(Oi(V),ii!=null&&Or(null,wi,!0,at.setSeries))});function ar(V,X,ie){let oe=$[X];ie&&(V=V/Zt-(oe.ori==1?ze:ke));let ge=vt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,Fe=V/ge,We=be+(Me-be)*Fe,Ve=oe.distr;return Ve==3?qs(10,We):Ve==4?ck(We,oe.asinh):Ve==100?oe.bwd(We):We}function fr(V,X){let ie=ar(V,C,X);return Ii(ie,t[0],fn,En)}r.valToIdx=V=>Ii(V,t[0]),r.posToIdx=fr,r.posToVal=ar,r.valToPos=(V,X,ie)=>$[X].ori==0?m(V,$[X],ie?ct:vt,ie?Ot:0):y(V,$[X],ie?yt:He,ie?It:0),r.setCursor=(V,X,ie)=>{nn=V.left,Ht=V.top,k(null,X,ie)};function As(V,X){yn(Lr,Hs,wt.left=V),yn(Lr,Ta,wt.width=X)}function mr(V,X){yn(Lr,Ma,wt.top=V),yn(Lr,$a,wt.height=X)}let Tr=H.ori==0?As:mr,oi=H.ori==1?As:mr;function si(){if(ae&&he.live)for(let V=f==2?1:0;V<b.length;V++){if(V==0&&ut)continue;let X=he.values[V],ie=0;for(let oe in X)Ge[V][ie++].firstChild.nodeValue=X[oe]}}function v(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):pk(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||f==1&&!ut)&&T(ie,te[ie]);si()}gr=!1,X!==!1&&nt("setLegend")}r.setLegend=v;function T(V,X){let ie=b[V],oe=V==0&&P==2?Sr:t[V],ge;ut?ge=ie.values(r,V,X)??rt:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?rt:{_:ge}),he.values[V]=ge}function k(V,X,ie){tn=nn,Xt=Ht,[nn,Ht]=ne.move(r,nn,Ht),ne.left=nn,ne.top=Ht,ce&&(ni&&Vi(ni,tr(nn),0,vt,He),Hn&&Vi(Hn,0,tr(Ht),vt,He));let oe,ge=fn>En;Nn=dr,ri=null;let be=H.ori==0?vt:He,Me=H.ori==1?vt:He;if(nn<0||jn==0||ge){oe=ne.idx=null;for(let Fe=0;Fe<b.length;Fe++){let We=_r[Fe];We!=null&&Vi(We,-10,-10,vt,He)}Ni&&Or(null,wi,!0,V==null&&at.setSeries),he.live&&(te.fill(oe),gr=!0)}else{let Fe,We,Ve;f==1&&(Fe=H.ori==0?nn:Ht,We=ar(Fe,C),oe=ne.idx=Ii(We,t[0],fn,En),Ve=O(t[0][oe],H,be,0));let Xe=-10,Ze=-10,bt=0,Wt=0,_t=!0,Ft="",pt="";for(let ot=f==2?1:0;ot<b.length;ot++){let dn=b[ot],_n=te[ot],Zn=_n==null?null:f==1?t[ot][_n]:t[ot][1][_n],Vt=ne.dataIdx(r,ot,oe,We),pe=Vt==null?null:f==1?t[ot][Vt]:t[ot][1][Vt];if(gr=gr||pe!=Zn||Vt!=_n,te[ot]=Vt,ot>0&&dn.show){let _e=Vt==null?-10:Vt==oe?Ve:O(f==1?t[0][Vt]:t[ot][0][Vt],H,be,0),xe=pe==null?-10:S(pe,f==1?$[dn.scale]:$[dn.facets[1].scale],Me,0);if(Ni&&pe!=null){let je=H.ori==1?nn:Ht,lt=er(kr.dist(r,ot,Vt,xe,je));if(lt<Nn){let Mt=kr.bias;if(Mt!=0){let Gt=ar(je,dn.scale),Nt=pe>=0?1:-1,Nr=Gt>=0?1:-1;Nr==Nt&&(Nr==1?Mt==1?pe>=Gt:pe<=Gt:Mt==1?pe<=Gt:pe>=Gt)&&(Nn=lt,ri=ot)}else Nn=lt,ri=ot}}if(gr||Sn){let je,lt;H.ori==0?(je=_e,lt=xe):(je=xe,lt=_e);let Mt,Gt,Nt,Nr,bi,un,cr=!0,yo=zn.bbox;if(yo!=null){cr=!1;let Dn=yo(r,ot);Nt=Dn.left,Nr=Dn.top,Mt=Dn.width,Gt=Dn.height}else Nt=je,Nr=lt,Mt=Gt=zn.size(r,ot);if(un=zn.fill(r,ot),bi=zn.stroke(r,ot),Sn)ot==ri&&Nn<=kr.prox&&(Xe=Nt,Ze=Nr,bt=Mt,Wt=Gt,_t=cr,Ft=un,pt=bi);else{let Dn=_r[ot];Dn!=null&&(Yi[ot]=Nt,Di[ot]=Nr,gf(Dn,Mt,Gt,cr),df(Dn,un,bi),Vi(Dn,di(Nt),di(Nr),vt,He))}}}}if(Sn){let ot=kr.prox,dn=ii==null?Nn<=ot:Nn>ot||ri!=ii;if(gr||dn){let _n=_r[0];_n!=null&&(Yi[0]=Xe,Di[0]=Ze,gf(_n,bt,Wt,_t),df(_n,Ft,pt),Vi(_n,di(Xe),di(Ze),vt,He))}}}if(wt.show&&vi)if(V!=null){let[Fe,We]=at.scales,[Ve,Xe]=at.match,[Ze,bt]=V.cursor.sync.scales,Wt=V.cursor.drag;if(Be=Wt._x,mn=Wt._y,Be||mn){let{left:_t,top:Ft,width:pt,height:ot}=V.select,dn=V.scales[Ze].ori,_n=V.posToVal,Zn,Vt,pe,_e,xe,je=Fe!=null&&Ve(Fe,Ze),lt=We!=null&&Xe(We,bt);je&&Be?(dn==0?(Zn=_t,Vt=pt):(Zn=Ft,Vt=ot),pe=$[Fe],_e=O(_n(Zn,Ze),pe,be,0),xe=O(_n(Zn+Vt,Ze),pe,be,0),Tr(Ri(_e,xe),er(xe-_e))):Tr(0,be),lt&&mn?(dn==1?(Zn=_t,Vt=pt):(Zn=Ft,Vt=ot),pe=$[We],_e=S(_n(Zn,bt),pe,Me,0),xe=S(_n(Zn+Vt,bt),pe,Me,0),oi(Ri(_e,xe),er(xe-_e))):oi(0,Me)}else Q()}else{let Fe=er(tn-ca),We=er(Xt-vo);if(H.ori==1){let bt=Fe;Fe=We,We=bt}Be=Ln.x&&Fe>=Ln.dist,mn=Ln.y&&We>=Ln.dist;let Ve=Ln.uni;Ve!=null?Be&&mn&&(Be=Fe>=Ve,mn=We>=Ve,!Be&&!mn&&(We>Fe?mn=!0:Be=!0)):Ln.x&&Ln.y&&(Be||mn)&&(Be=mn=!0);let Xe,Ze;Be&&(H.ori==0?(Xe=mi,Ze=nn):(Xe=eo,Ze=Ht),Tr(Ri(Xe,Ze),er(Ze-Xe)),mn||oi(0,Me)),mn&&(H.ori==1?(Xe=mi,Ze=nn):(Xe=eo,Ze=Ht),oi(Ri(Xe,Ze),er(Ze-Xe)),Be||Tr(0,be)),!Be&&!mn&&(Tr(0,0),oi(0,0))}if(Ln._x=Be,Ln._y=mn,V==null){if(ie){if(Cn!=null){let[Fe,We]=at.scales;at.values[0]=Fe!=null?ar(H.ori==0?nn:Ht,Fe):null,at.values[1]=We!=null?ar(H.ori==1?nn:Ht,We):null}$t(Cu,r,nn,Ht,vt,He,oe)}if(Ni){let Fe=ie&&at.setSeries,We=kr.prox;ii==null?Nn<=We&&Or(ri,wi,!0,Fe):Nn>We?Or(null,wi,!0,Fe):ri!=ii&&Or(ri,wi,!0,Fe)}}gr&&(he.idx=oe,v()),X!==!1&&nt("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=o.getBoundingClientRect(),nt("syncRect",D))}function z(V,X,ie,oe,ge,be,Me){ne._lock||vi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,ge,be,Me,Fe,We){if(D==null&&W(!1),Oi(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){nn=-10,Ht=-10;return}let[Ve,Xe]=at.scales,Ze=X.cursor.sync,[bt,Wt]=Ze.values,[_t,Ft]=Ze.scales,[pt,ot]=at.match,dn=X.axes[0].side%2==1,_n=H.ori==0?vt:He,Zn=H.ori==1?vt:He,Vt=dn?be:ge,pe=dn?ge:be,_e=dn?oe:ie,xe=dn?ie:oe;if(_t!=null?ie=pt(Ve,_t)?x(bt,$[Ve],_n,0):-10:ie=_n*(_e/Vt),Ft!=null?oe=ot(Xe,Ft)?x(Wt,$[Xe],Zn,0):-10:oe=Zn*(xe/pe),H.ori==1){let je=ie;ie=oe,oe=je}}We&&(X==null||X.cursor.event.type==Cu)&&((ie<=1||ie>=vt-1)&&(ie=hs(ie,vt)),(oe<=1||oe>=He-1)&&(oe=hs(oe,He))),Fe?(ca=ie,vo=oe,[mi,eo]=ne.move(r,ie,oe)):(nn=ie,Ht=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){cn(Y,!1)}let re,se,ve,Ce;function fe(V,X,ie,oe,ge,be,Me){vi=!0,Be=mn=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(gn(ku,Au,we,!1),$t(of,r,mi,eo,vt,He,null));let{left:Fe,top:We,width:Ve,height:Xe}=wt;re=Fe,se=We,ve=Ve,Ce=Xe}function we(V,X,ie,oe,ge,be,Me){vi=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!1,!0);let{left:Fe,top:We,width:Ve,height:Xe}=wt,Ze=Ve>0||Xe>0,bt=re!=Fe||se!=We||ve!=Ve||Ce!=Xe;if(Ze&&bt&&cn(wt),Ln.setScale&&Ze&&bt){let Wt=Fe,_t=Ve,Ft=We,pt=Xe;if(H.ori==1&&(Wt=We,_t=Xe,Ft=Fe,pt=Ve),Be&&Xn(C,ar(Wt,C),ar(Wt+_t,C)),mn)for(let ot in $){let dn=$[ot];ot!=C&&dn.from==null&&dn.min!=dr&&Xn(ot,ar(Ft+pt,ot),ar(Ft,ot))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(In(ku,Au),$t(ku,r,nn,Ht,vt,He,null))}function Oe(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let Fe=vi;if(vi){let We=!0,Ve=!0,Xe=10,Ze,bt;H.ori==0?(Ze=Be,bt=mn):(Ze=mn,bt=Be),Ze&&bt&&(We=nn<=Xe||nn>=vt-Xe,Ve=Ht<=Xe||Ht>=He-Xe),Ze&&We&&(nn=nn<mi?0:vt),bt&&Ve&&(Ht=Ht<eo?0:He),k(null,!0,!0),vi=!1}nn=-10,Ht=-10,te.fill(null),k(null,!0,!0),Fe&&(vi=Fe)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),ws(),Q(),V!=null&&$t(lf,r,nn,Ht,vt,He,null))}function Ue(){E.forEach(M_),lo(r.width,r.height,!0)}cs(Il,Vs,Ue);const st={};st.mousedown=fe,st.mousemove=z,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=at.match[2];ie=ge(r,X,ie),ie!=-1&&Or(ie,oe,!0,!1)},ce&&(gn(of,o,fe),gn(Cu,o,z),gn(sf,o,V=>{Oi(V),W(!1)}),gn(af,o,Oe),gn(lf,o,Le),Yu.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function nt(V,X,ie){Uo?fo.push([V,X,ie]):V in Qe&&Qe[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)Qe[X]=(Qe[X]||[]).concat(V.hooks[X])});const vn=(V,X,ie)=>ie,at=Kn({key:null,setSeries:!1,filters:{pub:Sf,sub:Sf},scales:[C,b[1]?b[1].scale:null],match:[Tf,Tf,vn],values:[null,null]},ne.sync);at.match.length==2&&at.match.push(vn),ne.sync=at;const Cn=at.key,kt=hm(Cn);function $t(V,X,ie,oe,ge,be,Me){at.filters.pub(V,X,ie,oe,ge,be,Me)&&kt.pub(V,X,ie,oe,ge,be,Me)}kt.sub(r);function Qn(V,X,ie,oe,ge,be,Me){at.filters.sub(V,X,ie,oe,ge,be,Me)&&st[V](null,X,ie,oe,ge,be,Me)}r.pub=Qn;function lr(){kt.unsub(r),Yu.delete(r),pr.clear(),Mu(Il,Vs,Ue),g.remove(),ye==null||ye.remove(),nt("destroy")}r.destroy=lr;function kn(){nt("init",n,t),No(t||n.data,!1),A[C]?Ne(C,A[C]):ws(),ao=wt.show&&(wt.width>0||wt.height>0),Li=gr=!0,lo(n.width,n.height)}return b.forEach(ra),E.forEach(ti),e?e instanceof HTMLElement?(e.appendChild(g),kn()):e(r,kn):kn(),r}br.assign=Kn,br.fmtNum=Eu,br.rangeNum=Ol,br.rangeLog=Ll,br.rangeAsinh=Iu,br.orient=ps,br.pxRatio=Zt,br.join=bk,br.fmtDate=Du,br.tzDate=Rk,br.sync=hm;{br.addGap=p_,br.clipGaps=zl;let n=br.paths={points:ym};n.linear=bm,n.stepped=m_,n.bars=v_,n.spline=w_}var $m,Mm;function I_(){return Mm||(Mm=1,$m=function(n,t,e,r,f){var m,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(f===void 0)f=n.length-1;else if(f=f|0,f<r||f>=n.length)throw new RangeError("invalid upper bound");for(;r<=f;)if(m=r+(f-r>>>1),y=+e(n[m],t,m,n),y<0)r=m+1;else if(y>0)f=m-1;else return m;return~r}),$m}var R_=I_();const Q2=yr("B",hl(R_));var Qu,Im;function E_(){if(Im)return Qu;Im=1;function n(t,e,r){var f=-1,m=t.length;e<0&&(e=-e>m?0:m+e),r=r>m?m:r,r<0&&(r+=m),m=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(m);++f<m;)y[f]=t[f+e];return y}return Qu=n,Qu}var Zu,Rm;function L_(){if(Rm)return Zu;Rm=1;var n=E_();function t(e,r,f){var m=e.length;return f=f===void 0?m:f,!r&&f>=m?e:n(e,r,f)}return Zu=t,Zu}var Ju,Em;function Lm(){if(Em)return Ju;Em=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,m="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+f+m+"]");function h(g){return x.test(g)}return Ju=h,Ju}var eh,Om;function O_(){if(Om)return eh;Om=1;function n(t){return t.split("")}return eh=n,eh}var th,Nm;function N_(){if(Nm)return th;Nm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,m="\\ufe0e\\ufe0f",y="["+n+"]",x="["+f+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+x+"|"+h+")",s="[^"+n+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",a="\\u200d",o=g+"?",l="["+m+"]?",d="(?:"+a+"(?:"+[s,c,u].join("|")+")"+l+o+")*",w=l+o+d,b="(?:"+[s+x+"?",x,c,u,y].join("|")+")",E=RegExp(h+"(?="+h+")|"+b+w,"g");function $(_){return _.match(E)||[]}return th=$,th}var nh,Dm;function D_(){if(Dm)return nh;Dm=1;var n=O_(),t=Lm(),e=N_();function r(f){return t(f)?e(f):n(f)}return nh=r,nh}var rh,Fm;function F_(){if(Fm)return rh;Fm=1;var n=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro;return rh=n,rh}var ih,Pm;function P_(){if(Pm)return ih;Pm=1;var n=F_(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return ih=e,ih}var oh,Wm;function sh(){if(Wm)return oh;Wm=1;var n=P_(),t=n.Symbol;return oh=t,oh}var ah,Bm;function W_(){if(Bm)return ah;Bm=1;function n(t,e){for(var r=-1,f=t==null?0:t.length,m=Array(f);++r<f;)m[r]=e(t[r],r,t);return m}return ah=n,ah}var lh,zm;function B_(){if(zm)return lh;zm=1;var n=Array.isArray;return lh=n,lh}var ch,jm;function z_(){if(jm)return ch;jm=1;var n=sh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,f=n?n.toStringTag:void 0;function m(y){var x=e.call(y,f),h=y[f];try{y[f]=void 0;var g=!0}catch{}var s=r.call(y);return g&&(x?y[f]=h:delete y[f]),s}return ch=m,ch}var uh,Hm;function j_(){if(Hm)return uh;Hm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return uh=e,uh}var hh,Um;function H_(){if(Um)return hh;Um=1;var n=sh(),t=z_(),e=j_(),r="[object Null]",f="[object Undefined]",m=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?f:r:m&&m in Object(x)?t(x):e(x)}return hh=y,hh}var dh,Vm;function U_(){if(Vm)return dh;Vm=1;function n(t){return t!=null&&typeof t=="object"}return dh=n,dh}var ph,qm;function V_(){if(qm)return ph;qm=1;var n=H_(),t=U_(),e="[object Symbol]";function r(f){return typeof f=="symbol"||t(f)&&n(f)==e}return ph=r,ph}var gh,Km;function q_(){if(Km)return gh;Km=1;var n=sh(),t=W_(),e=B_(),r=V_(),f=n?n.prototype:void 0,m=f?f.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return m?m.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return gh=y,gh}var fh,Gm;function Vl(){if(Gm)return fh;Gm=1;var n=q_();function t(e){return e==null?"":n(e)}return fh=t,fh}var mh,Ym;function K_(){if(Ym)return mh;Ym=1;var n=L_(),t=Lm(),e=D_(),r=Vl();function f(m){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),g=x?n(x,1).join(""):y.slice(1);return h[m]()+g}}return mh=f,mh}var vh,Xm;function Qm(){if(Xm)return vh;Xm=1;var n=K_(),t=n("toUpperCase");return vh=t,vh}var G_=Qm();const Y_=hl(G_);var yh,Zm;function X_(){if(Zm)return yh;Zm=1;var n=Vl(),t=Qm();function e(r){return t(n(r).toLowerCase())}return yh=e,yh}var wh,Jm;function Q_(){if(Jm)return wh;Jm=1;function n(t,e,r,f){var m=-1,y=t==null?0:t.length;for(f&&y&&(r=t[++m]);++m<y;)r=e(r,t[m],m,t);return r}return wh=n,wh}var bh,ev;function Z_(){if(ev)return bh;ev=1;function n(t){return function(e){return t==null?void 0:t[e]}}return bh=n,bh}var xh,tv;function J_(){if(tv)return xh;tv=1;var n=Z_(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return xh=e,xh}var Ch,nv;function eA(){if(nv)return Ch;nv=1;var n=J_(),t=Vl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",m="\\u20d0-\\u20ff",y=r+f+m,x="["+y+"]",h=RegExp(x,"g");function g(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return Ch=g,Ch}var kh,rv;function tA(){if(rv)return kh;rv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return kh=t,kh}var _h,iv;function nA(){if(iv)return _h;iv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return _h=t,_h}var Ah,ov;function rA(){if(ov)return Ah;ov=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,m="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",a=x+h+g+s,o="['’]",l="["+a+"]",d="["+f+"]",w="\\d+",b="["+m+"]",E="["+y+"]",$="[^"+n+a+w+m+y+c+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+_+")",R="[^"+n+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+c+"]",H="\\u200d",P="(?:"+E+"|"+$+")",O="(?:"+I+"|"+$+")",S="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[b,L,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+S+"(?="+[l,I,"$"].join("|")+")",O+"+"+A+"(?="+[l,I+P,"$"].join("|")+")",I+"?"+P+"+"+S,I+"+"+A,Z,K,w,he].join("|"),"g");function ae(ce){return ce.match(ne)||[]}return Ah=ae,Ah}var Sh,sv;function iA(){if(sv)return Sh;sv=1;var n=tA(),t=nA(),e=Vl(),r=rA();function f(m,y,x){return m=e(m),y=x?void 0:y,y===void 0?t(m)?r(m):n(m):m.match(y)||[]}return Sh=f,Sh}var Th,av;function oA(){if(av)return Th;av=1;var n=Q_(),t=eA(),e=iA(),r="['’]",f=RegExp(r,"g");function m(y){return function(x){return n(e(t(x).replace(f,"")),y,"")}}return Th=m,Th}var $h,lv;function sA(){if(lv)return $h;lv=1;var n=X_(),t=oA(),e=t(function(r,f,m){return f=f.toLowerCase(),r+(m?n(f):f)});return $h=e,$h}var aA=sA();const lA=hl(aA),cA=Object.assign({"./ArrayWidget.vue":()=>tt(()=>et.import("./ArrayWidget-BbsN1dzF-ee2cfc7dad123cfaccf5.js"),void 0),"./ArrayplotWidget.vue":()=>tt(()=>et.import("./ArrayplotWidget-CCKEyYIx-a00019e86008704efc46.js"),void 0),"./BlockWidget.vue":()=>tt(()=>et.import("./BlockWidget-DlCHbqZX-c390667024b5d4780d6b.js"),void 0),"./ButtonWidget.vue":()=>tt(()=>et.import("./ButtonWidget-CtfJzCBR-9a325bb9d73eea161bde.js"),void 0),"./CanvasWidget.vue":()=>tt(()=>et.import("./CanvasWidget-CqRlXc4r-fecb24efdf6f68a33ad2.js"),void 0),"./CanvasdotWidget.vue":()=>tt(()=>et.import("./CanvasdotWidget--Xr_KsZs-840bf70c26d7888f4d66.js"),void 0),"./CanvasimageWidget.vue":()=>tt(()=>et.import("./CanvasimageWidget-BPlj5QYK-148404626d26f39ae7a4.js"),void 0),"./CanvasimagevalueWidget.vue":()=>tt(()=>et.import("./CanvasimagevalueWidget-DVFGLt8f-228223ab8bc7ab0b61c6.js"),void 0),"./CanvaslabelWidget.vue":()=>tt(()=>et.import("./CanvaslabelWidget-CYNqmyP0-c9c9beb56e22552527cb.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>tt(()=>et.import("./CanvaslabelvalueWidget-B7yIDmsn-725d0c4e2daf6bda08ec.js"),void 0),"./CanvaslineWidget.vue":()=>tt(()=>et.import("./CanvaslineWidget-BICdxX0Q-7c180d081ca1a967d997.js"),void 0),"./CanvaslinevalueWidget.vue":()=>tt(()=>et.import("./CanvaslinevalueWidget-Cq-Ddh0P-bdf272b782303e2bc8bb.js"),void 0),"./CheckbuttonWidget.vue":()=>tt(()=>et.import("./CheckbuttonWidget-B74AWeaW-de22da2f691ae5858bbf.js"),void 0),"./ComboboxWidget.vue":()=>tt(()=>et.import("./ComboboxWidget-CtyKbEWb-7925168021879bcae865.js"),void 0),"./DateWidget.vue":()=>tt(()=>et.import("./DateWidget-BEVSczU8-95d14f0b9ce5fc0b69a3.js"),void 0),"./DynamicWidget.vue":()=>tt(()=>et.import("./DynamicWidget-CfMtj7H8-dda9e71246a61119ef51.js"),void 0),"./FormatvalueWidget.vue":()=>tt(()=>et.import("./FormatvalueWidget-DN12xymS-312eedcf339bb3a361e8.js"),void 0),"./HorizontalWidget.vue":()=>tt(()=>et.import("./HorizontalWidget-Cd_wl1b3-b4a1220511cbad208895.js"),void 0),"./HorizontalboxWidget.vue":()=>tt(()=>et.import("./HorizontalboxWidget-BcMTFBU--ebe35d30ef1038d848e8.js"),void 0),"./HorizontallineWidget.vue":()=>tt(()=>et.import("./HorizontallineWidget-CXFqHclf-fa0e898fc84d1495ab9f.js"),void 0),"./IframeWidget.vue":()=>tt(()=>et.import("./IframeWidget-BPerHCCa-89189a6be7985eb8e47b.js"),void 0),"./ImageviewerWidget.vue":()=>tt(()=>et.import("./ImageviewerWidget-Cw_H_HmZ-79d50f4df25f701d60c0.js"),void 0),"./LabelWidget.vue":()=>tt(()=>et.import("./LabelWidget-xrmcVeq8-870ee165781b2cf65c51.js"),void 0),"./LabelledWidget.vue":()=>tt(()=>et.import("./LabelledWidget-D48QoyMk-8ef3423e6396375a66e4.js"),void 0),"./LabelprogressbarWidget.vue":()=>tt(()=>et.import("./LabelprogressbarWidget-C_950t6g-2936a8a5b4b14474e12e.js"),void 0),"./LabelsparklineWidget.vue":()=>tt(()=>et.import("./LabelsparklineWidget-0KXQyPoU-da36e09f571b80924e16.js"),void 0),"./LabelvalueWidget.vue":()=>tt(()=>et.import("./LabelvalueWidget-CQ06wWDK-1796e7cae5e984c98aaf.js"),void 0),"./LabelvaluedescWidget.vue":()=>tt(()=>et.import("./LabelvaluedescWidget-Bo8zT01X-80efb25b4bedad034d9d.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitsbarWidget-BucTw8Yk-3294f1f5165c95dd609e.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitscolumnWidget-Dflb1hNd-a115105dee00eafa5323.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>tt(()=>et.import("./LabelvaluerangebarWidget-D8cbfXFM-ed365f14f0ddd33fc1ee.js"),void 0),"./LedWidget.vue":()=>tt(()=>et.import("./LedWidget-qH_FthkK-1cfbae497162dcc3aefa.js"),void 0),"./LimitsbarWidget.vue":()=>tt(()=>et.import("./LimitsbarWidget-B9lAB2RD-ba9cf8359583cfe6eeb1.js"),void 0),"./LimitscolorWidget.vue":()=>tt(()=>et.import("./LimitscolorWidget-c6Qa6su7-87921f3fb3e7afc5de79.js"),void 0),"./LimitscolumnWidget.vue":()=>tt(()=>et.import("./LimitscolumnWidget-CcLs_443-604b2033bbe5db32cec6.js"),void 0),"./LinegraphWidget.vue":()=>tt(()=>et.import("./LinegraphWidget-BSVYLFo1-e8a98958fba9fb2e2fb9.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>tt(()=>et.import("./MatrixbycolumnsWidget-DXFpZTre-67f734ae3f31f19eb2a0.js"),void 0),"./ProgressbarWidget.vue":()=>tt(()=>et.import("./ProgressbarWidget-iYGw8-Dc-ebd0bd2f7dd1a5a808fc.js"),void 0),"./RadiobuttonWidget.vue":()=>tt(()=>et.import("./RadiobuttonWidget-ytmoVZ3u-3a28b6b2ee47bb71a55d.js"),void 0),"./RadiogroupWidget.vue":()=>tt(()=>et.import("./RadiogroupWidget-CusMBhKH-2ab564c7e2c5bd9ce708.js"),void 0),"./RangebarWidget.vue":()=>tt(()=>et.import("./RangebarWidget-D_zGTtCa-8bfd7bef4ad63b9af243.js"),void 0),"./RollupWidget.vue":()=>tt(()=>et.import("./RollupWidget-Dolsixyt-64fd8c2e5990b362afb3.js"),void 0),"./ScrollwindowWidget.vue":()=>tt(()=>et.import("./ScrollwindowWidget-DV2nZuNi-622615ed3b3c3be199a7.js"),void 0),"./SignalWidget.vue":()=>tt(()=>et.import("./SignalWidget-d9-6h85k-6fb4be9567110de7f7f2.js"),void 0),"./SpacerWidget.vue":()=>tt(()=>et.import("./SpacerWidget-BH0p2OLi-d2bd2a8e1f0b4014a44f.js"),void 0),"./SparklineWidget.vue":()=>tt(()=>et.import("./SparklineWidget-coxi9r2g-93d3a65c88c064975334.js"),void 0),"./TabbookWidget.vue":()=>tt(()=>et.import("./TabbookWidget-B1XKplGH-e22ec8d6a5c838c7c5fd.js"),void 0),"./TextboxWidget.vue":()=>tt(()=>et.import("./TextboxWidget-C-_M2M4l-e87fb9cd37972bf5d25b.js"),void 0),"./TextfieldWidget.vue":()=>tt(()=>et.import("./TextfieldWidget-C08N4JE8-1068f0ee1d4002e54079.js"),void 0),"./TimeWidget.vue":()=>tt(()=>et.import("./TimeWidget-DtwdEcFg-5a3bc19e8ab2a1804ae7.js"),void 0),"./TitleWidget.vue":()=>tt(()=>et.import("./TitleWidget-CT-aLcNb-f05601921aa733b9911e.js"),void 0),"./ValueWidget.vue":()=>tt(()=>et.import("./ValueWidget-C6RanBj3-1821aa6088bd82d581f4.js"),void 0),"./ValuelimitsbarWidget.vue":()=>tt(()=>et.import("./ValuelimitsbarWidget-B3bvjfxc-4f2349bfcb30c31119c1.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>tt(()=>et.import("./ValuelimitscolumnWidget-QvhI6EcE-b0440ffbb0b94727592e.js"),void 0),"./ValuerangebarWidget.vue":()=>tt(()=>et.import("./ValuerangebarWidget-Dt3K9BnC-5a6ec326052278b4ed3d.js"),void 0),"./VerticalWidget.vue":()=>tt(()=>et.import("./VerticalWidget-BIIViZgI-3d41ce14c58d12499a92.js"),void 0),"./VerticalboxWidget.vue":()=>tt(()=>et.import("./VerticalboxWidget-DY72fLHW-f459428e4aed8df3e9d9.js"),void 0)}),uA=Object.entries(cA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=Y_(lA(t.replace(/\.\w+$/,"")));return{...n,[r]:Qd(e)}},{}),Z2=yr("W",{components:uA});function cv(n,t){return function(){return n.apply(t,arguments)}}const{toString:hA}=Object.prototype,{getPrototypeOf:Mh}=Object,ql=(n=>t=>{const e=hA.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ei=n=>(n=n.toLowerCase(),t=>ql(t)===n),Kl=n=>t=>typeof t===n,{isArray:Js}=Array,Na=Kl("undefined");function dA(n){return n!==null&&!Na(n)&&n.constructor!==null&&!Na(n.constructor)&&Jr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const uv=Ei("ArrayBuffer");function pA(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&uv(n.buffer),t}const gA=Kl("string"),Jr=Kl("function"),hv=Kl("number"),Gl=n=>n!==null&&typeof n=="object",fA=n=>n===!0||n===!1,Yl=n=>{if(ql(n)!=="object")return!1;const t=Mh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},mA=Ei("Date"),vA=Ei("File"),yA=Ei("Blob"),wA=Ei("FileList"),bA=n=>Gl(n)&&Jr(n.pipe),xA=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Jr(n.append)&&((t=ql(n))==="formdata"||t==="object"&&Jr(n.toString)&&n.toString()==="[object FormData]"))},CA=Ei("URLSearchParams"),[kA,_A,AA,SA]=["ReadableStream","Request","Response","Headers"].map(Ei),TA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Da(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,f;if(typeof n!="object"&&(n=[n]),Js(n))for(r=0,f=n.length;r<f;r++)t.call(null,n[r],r,n);else{const m=e?Object.getOwnPropertyNames(n):Object.keys(n),y=m.length;let x;for(r=0;r<y;r++)x=m[r],t.call(null,n[x],x,n)}}function dv(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,f;for(;r-- >0;)if(f=e[r],t===f.toLowerCase())return f;return null}const gs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pv=n=>!Na(n)&&n!==gs;function Ih(){const{caseless:n}=pv(this)&&this||{},t={},e=(r,f)=>{const m=n&&dv(t,f)||f;Yl(t[m])&&Yl(r)?t[m]=Ih(t[m],r):Yl(r)?t[m]=Ih({},r):Js(r)?t[m]=r.slice():t[m]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Da(arguments[r],e);return t}const $A=(n,t,e,{allOwnKeys:r}={})=>(Da(t,(f,m)=>{e&&Jr(f)?n[m]=cv(f,e):n[m]=f},{allOwnKeys:r}),n),MA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),IA=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},RA=(n,t,e,r)=>{let f,m,y;const x={};if(t=t||{},n==null)return t;do{for(f=Object.getOwnPropertyNames(n),m=f.length;m-- >0;)y=f[m],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Mh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},EA=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},LA=n=>{if(!n)return null;if(Js(n))return n;let t=n.length;if(!hv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},OA=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Mh(Uint8Array)),NA=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const f=r.value;t.call(n,f[0],f[1])}},DA=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},FA=Ei("HTMLFormElement"),PA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),gv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),WA=Ei("RegExp"),fv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Da(e,(f,m)=>{let y;(y=t(f,m,n))!==!1&&(r[m]=y||f)}),Object.defineProperties(n,r)},BA=n=>{fv(n,(t,e)=>{if(Jr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Jr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},zA=(n,t)=>{const e={},r=f=>{f.forEach(m=>{e[m]=!0})};return Js(n)?r(n):r(String(n).split(t)),e},jA=()=>{},HA=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function UA(n){return!!(n&&Jr(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const VA=n=>{const t=new Array(10),e=(r,f)=>{if(Gl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[f]=r;const m=Js(r)?[]:{};return Da(r,(y,x)=>{const h=e(y,f+1);!Na(h)&&(m[x]=h)}),t[f]=void 0,m}}return r};return e(n,0)},qA=Ei("AsyncFunction"),KA=n=>n&&(Gl(n)||Jr(n))&&Jr(n.then)&&Jr(n.catch),mv=((n,t)=>n?setImmediate:t?((e,r)=>(gs.addEventListener("message",({source:f,data:m})=>{f===gs&&m===e&&r.length&&r.shift()()},!1),f=>{r.push(f),gs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Jr(gs.postMessage)),GA=typeof queueMicrotask<"u"?queueMicrotask.bind(gs):typeof process<"u"&&process.nextTick||mv,Te={isArray:Js,isArrayBuffer:uv,isBuffer:dA,isFormData:xA,isArrayBufferView:pA,isString:gA,isNumber:hv,isBoolean:fA,isObject:Gl,isPlainObject:Yl,isReadableStream:kA,isRequest:_A,isResponse:AA,isHeaders:SA,isUndefined:Na,isDate:mA,isFile:vA,isBlob:yA,isRegExp:WA,isFunction:Jr,isStream:bA,isURLSearchParams:CA,isTypedArray:OA,isFileList:wA,forEach:Da,merge:Ih,extend:$A,trim:TA,stripBOM:MA,inherits:IA,toFlatObject:RA,kindOf:ql,kindOfTest:Ei,endsWith:EA,toArray:LA,forEachEntry:NA,matchAll:DA,isHTMLForm:FA,hasOwnProperty:gv,hasOwnProp:gv,reduceDescriptors:fv,freezeMethods:BA,toObjectSet:zA,toCamelCase:PA,noop:jA,toFiniteNumber:HA,findKey:dv,global:gs,isContextDefined:pv,isSpecCompliantForm:UA,toJSONObject:VA,isAsyncFn:qA,isThenable:KA,setImmediate:mv,asap:GA};function Tt(n,t,e,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Te.inherits(Tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Te.toJSONObject(this.config),code:this.code,status:this.status}}});const vv=Tt.prototype,yv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{yv[n]={value:n}}),Object.defineProperties(Tt,yv),Object.defineProperty(vv,"isAxiosError",{value:!0}),Tt.from=(n,t,e,r,f,m)=>{const y=Object.create(vv);return Te.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),Tt.call(y,n.message,t,e,r,f),y.cause=n,y.name=n.name,m&&Object.assign(y,m),y};const YA=null;function Rh(n){return Te.isPlainObject(n)||Te.isArray(n)}function wv(n){return Te.endsWith(n,"[]")?n.slice(0,-2):n}function bv(n,t,e){return n?n.concat(t).map(function(r,f){return r=wv(r),!e&&f?"["+r+"]":r}).join(e?".":""):t}function XA(n){return Te.isArray(n)&&!n.some(Rh)}const QA=Te.toFlatObject(Te,{},null,function(n){return/^is[A-Z]/.test(n)});function Xl(n,t,e){if(!Te.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Te.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,o){return!Te.isUndefined(o[a])});const r=e.metaTokens,f=e.visitor||g,m=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Te.isSpecCompliantForm(t);if(!Te.isFunction(f))throw new TypeError("visitor must be a function");function h(a){if(a===null)return"";if(Te.isDate(a))return a.toISOString();if(!x&&Te.isBlob(a))throw new Tt("Blob is not supported. Use a Buffer instead.");return Te.isArrayBuffer(a)||Te.isTypedArray(a)?x&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function g(a,o,l){let d=a;if(a&&!l&&typeof a=="object"){if(Te.endsWith(o,"{}"))o=r?o:o.slice(0,-2),a=JSON.stringify(a);else if(Te.isArray(a)&&XA(a)||(Te.isFileList(a)||Te.endsWith(o,"[]"))&&(d=Te.toArray(a)))return o=wv(o),d.forEach(function(w,b){!(Te.isUndefined(w)||w===null)&&t.append(y===!0?bv([o],b,m):y===null?o:o+"[]",h(w))}),!1}return Rh(a)?!0:(t.append(bv(l,o,m),h(a)),!1)}const s=[],c=Object.assign(QA,{defaultVisitor:g,convertValue:h,isVisitable:Rh});function u(a,o){if(!Te.isUndefined(a)){if(s.indexOf(a)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(a),Te.forEach(a,function(l,d){(!(Te.isUndefined(l)||l===null)&&f.call(t,l,Te.isString(d)?d.trim():d,o,c))===!0&&u(l,o?o.concat(d):[d])}),s.pop()}}if(!Te.isObject(n))throw new TypeError("data must be an object");return u(n),t}function xv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Eh(n,t){this._pairs=[],n&&Xl(n,this,t)}const Cv=Eh.prototype;Cv.append=function(n,t){this._pairs.push([n,t])},Cv.toString=function(n){const t=n?function(e){return n.call(this,e,xv)}:xv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function ZA(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kv(n,t,e){if(!t)return n;const r=e&&e.encode||ZA;Te.isFunction(e)&&(e={serialize:e});const f=e&&e.serialize;let m;if(f?m=f(t,e):m=Te.isURLSearchParams(t)?t.toString():new Eh(t,e).toString(r),m){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}let _v=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Te.forEach(this.handlers,function(e){e!==null&&t(e)})}};const Av={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JA=typeof URLSearchParams<"u"?URLSearchParams:Eh,eS=typeof FormData<"u"?FormData:null,tS=typeof Blob<"u"?Blob:null,nS={isBrowser:!0,classes:{URLSearchParams:JA,FormData:eS,Blob:tS},protocols:["http","https","file","blob","url","data"]},Lh=typeof window<"u"&&typeof document<"u",Oh=typeof navigator=="object"&&navigator||void 0,rS=Lh&&(!Oh||["ReactNative","NativeScript","NS"].indexOf(Oh.product)<0),iS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oS=Lh&&window.location.href||"http://localhost",sS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lh,hasStandardBrowserEnv:rS,hasStandardBrowserWebWorkerEnv:iS,navigator:Oh,origin:oS},Symbol.toStringTag,{value:"Module"})),xr={...sS,...nS};function aS(n,t){return Xl(n,new xr.classes.URLSearchParams,Object.assign({visitor:function(e,r,f,m){return xr.isNode&&Te.isBuffer(e)?(this.append(r,e.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},t))}function lS(n){return Te.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function cS(n){const t={},e=Object.keys(n);let r;const f=e.length;let m;for(r=0;r<f;r++)m=e[r],t[m]=n[m];return t}function Sv(n){function t(e,r,f,m){let y=e[m++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=m>=e.length;return y=!y&&Te.isArray(f)?f.length:y,h?(Te.hasOwnProp(f,y)?f[y]=[f[y],r]:f[y]=r,!x):((!f[y]||!Te.isObject(f[y]))&&(f[y]=[]),t(e,r,f[y],m)&&Te.isArray(f[y])&&(f[y]=cS(f[y])),!x)}if(Te.isFormData(n)&&Te.isFunction(n.entries)){const e={};return Te.forEachEntry(n,(r,f)=>{t(lS(r),f,e,0)}),e}return null}function uS(n,t,e){if(Te.isString(n))try{return(t||JSON.parse)(n),Te.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Fa={transitional:Av,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,f=Te.isObject(n);if(f&&Te.isHTMLForm(n)&&(n=new FormData(n)),Te.isFormData(n))return r?JSON.stringify(Sv(n)):n;if(Te.isArrayBuffer(n)||Te.isBuffer(n)||Te.isStream(n)||Te.isFile(n)||Te.isBlob(n)||Te.isReadableStream(n))return n;if(Te.isArrayBufferView(n))return n.buffer;if(Te.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let m;if(f){if(e.indexOf("application/x-www-form-urlencoded")>-1)return aS(n,this.formSerializer).toString();if((m=Te.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Xl(m?{"files[]":n}:n,y&&new y,this.formSerializer)}}return f||r?(t.setContentType("application/json",!1),uS(n)):n}],transformResponse:[function(n){const t=this.transitional||Fa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Te.isResponse(n)||Te.isReadableStream(n))return n;if(n&&Te.isString(n)&&(e&&!this.responseType||r)){const f=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(m){if(f)throw m.name==="SyntaxError"?Tt.from(m,Tt.ERR_BAD_RESPONSE,this,null,this.response):m}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],n=>{Fa.headers[n]={}});const hS=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dS=n=>{const t={};let e,r,f;return n&&n.split(`
|
1486
|
+
`).forEach(function(m){f=m.indexOf(":"),e=m.substring(0,f).trim().toLowerCase(),r=m.substring(f+1).trim(),!(!e||t[e]&&hS[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Tv=Symbol("internals");function Pa(n){return n&&String(n).trim().toLowerCase()}function Ql(n){return n===!1||n==null?n:Te.isArray(n)?n.map(Ql):String(n)}function pS(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const gS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Nh(n,t,e,r,f){if(Te.isFunction(r))return r.call(this,t,e);if(f&&(t=e),!!Te.isString(t)){if(Te.isString(r))return t.indexOf(r)!==-1;if(Te.isRegExp(r))return r.test(t)}}function fS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function mS(n,t){const e=Te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(f,m,y){return this[r].call(this,t,f,m,y)},configurable:!0})})}let Br=class{constructor(t){t&&this.set(t)}set(t,e,r){const f=this;function m(x,h,g){const s=Pa(h);if(!s)throw new Error("header name must be a non-empty string");const c=Te.findKey(f,s);(!c||f[c]===void 0||g===!0||g===void 0&&f[c]!==!1)&&(f[c||h]=Ql(x))}const y=(x,h)=>Te.forEach(x,(g,s)=>m(g,s,h));if(Te.isPlainObject(t)||t instanceof this.constructor)y(t,e);else if(Te.isString(t)&&(t=t.trim())&&!gS(t))y(dS(t),e);else if(Te.isHeaders(t))for(const[x,h]of t.entries())m(h,x,r);else t!=null&&m(e,t,r);return this}get(t,e){if(t=Pa(t),t){const r=Te.findKey(this,t);if(r){const f=this[r];if(!e)return f;if(e===!0)return pS(f);if(Te.isFunction(e))return e.call(this,f,r);if(Te.isRegExp(e))return e.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pa(t),t){const r=Te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Nh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let f=!1;function m(y){if(y=Pa(y),y){const x=Te.findKey(r,y);x&&(!e||Nh(r,r[x],x,e))&&(delete r[x],f=!0)}}return Te.isArray(t)?t.forEach(m):m(t),f}clear(t){const e=Object.keys(this);let r=e.length,f=!1;for(;r--;){const m=e[r];(!t||Nh(this,this[m],m,t,!0))&&(delete this[m],f=!0)}return f}normalize(t){const e=this,r={};return Te.forEach(this,(f,m)=>{const y=Te.findKey(r,m);if(y){e[y]=Ql(f),delete e[m];return}const x=t?fS(m):String(m).trim();x!==m&&delete e[m],e[x]=Ql(f),r[x]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Te.forEach(this,(r,f)=>{r!=null&&r!==!1&&(e[f]=t&&Te.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
1487
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(f=>r.set(f)),r}static accessor(t){const e=(this[Tv]=this[Tv]={accessors:{}}).accessors,r=this.prototype;function f(m){const y=Pa(m);e[y]||(mS(r,m),e[y]=!0)}return Te.isArray(t)?t.forEach(f):f(t),this}};Br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(Br.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Te.freezeMethods(Br);function Dh(n,t){const e=this||Fa,r=t||e,f=Br.from(r.headers);let m=r.data;return Te.forEach(n,function(y){m=y.call(e,m,f.normalize(),t?t.status:void 0)}),f.normalize(),m}function $v(n){return!!(n&&n.__CANCEL__)}function ea(n,t,e){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,t,e),this.name="CanceledError"}Te.inherits(ea,Tt,{__CANCEL__:!0});function Mv(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new Tt("Request failed with status code "+e.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function vS(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function yS(n,t){n=n||10;const e=new Array(n),r=new Array(n);let f=0,m=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),g=r[m];y||(y=h),e[f]=x,r[f]=h;let s=m,c=0;for(;s!==f;)c+=e[s++],s=s%n;if(f=(f+1)%n,f===m&&(m=(m+1)%n),h-y<t)return;const u=g&&h-g;return u?Math.round(c*1e3/u):void 0}}function wS(n,t){let e=0,r=1e3/t,f,m;const y=(x,h=Date.now())=>{e=h,f=null,m&&(clearTimeout(m),m=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),g=h-e;g>=r?y(x,h):(f=x,m||(m=setTimeout(()=>{m=null,y(f)},r-g)))},()=>f&&y(f)]}const Zl=(n,t,e=3)=>{let r=0;const f=yS(50,250);return wS(m=>{const y=m.loaded,x=m.lengthComputable?m.total:void 0,h=y-r,g=f(h),s=y<=x;r=y;const c={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:g||void 0,estimated:g&&x&&s?(x-y)/g:void 0,event:m,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(c)},e)},Iv=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Rv=n=>(...t)=>Te.asap(()=>n(...t)),bS=xr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,xr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(xr.origin),xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent)):()=>!0,xS=xr.hasStandardBrowserEnv?{write(n,t,e,r,f,m){const y=[n+"="+encodeURIComponent(t)];Te.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Te.isString(r)&&y.push("path="+r),Te.isString(f)&&y.push("domain="+f),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function CS(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function kS(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Ev(n,t,e){let r=!CS(t);return n&&(r||e==!1)?kS(n,t):t}const Lv=n=>n instanceof Br?{...n}:n;function fs(n,t){t=t||{};const e={};function r(g,s,c,u){return Te.isPlainObject(g)&&Te.isPlainObject(s)?Te.merge.call({caseless:u},g,s):Te.isPlainObject(s)?Te.merge({},s):Te.isArray(s)?s.slice():s}function f(g,s,c,u){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g,c,u)}else return r(g,s,c,u)}function m(g,s){if(!Te.isUndefined(s))return r(void 0,s)}function y(g,s){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function x(g,s,c){if(c in t)return r(g,s);if(c in n)return r(void 0,g)}const h={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(g,s,c)=>f(Lv(g),Lv(s),c,!0)};return Te.forEach(Object.keys(Object.assign({},n,t)),function(g){const s=h[g]||f,c=s(n[g],t[g],g);Te.isUndefined(c)&&s!==x||(e[g]=c)}),e}const Ov=n=>{const t=fs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:m,headers:y,auth:x}=t;t.headers=y=Br.from(y),t.url=kv(Ev(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Te.isFormData(e)){if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[g,...s]=h?h.split(";").map(c=>c.trim()).filter(Boolean):[];y.setContentType([g||"multipart/form-data",...s].join("; "))}}if(xr.hasStandardBrowserEnv&&(r&&Te.isFunction(r)&&(r=r(t)),r||r!==!1&&bS(t.url))){const g=f&&m&&xS.read(m);g&&y.set(f,g)}return t},_S=typeof XMLHttpRequest<"u",AS=_S&&function(n){return new Promise(function(t,e){const r=Ov(n);let f=r.data;const m=Br.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,g,s,c,u,a;function o(){u&&u(),a&&a(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const b=Br.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:b,config:n,request:l};Mv(function($){t($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new Tt("Request aborted",Tt.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new Tt("Network Error",Tt.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Av;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new Tt(b,E.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,l)),l=null},f===void 0&&m.setContentType(null),"setRequestHeader"in l&&Te.forEach(m.toJSON(),function(b,E){l.setRequestHeader(E,b)}),Te.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),y&&y!=="json"&&(l.responseType=r.responseType),h&&([c,a]=Zl(h,!0),l.addEventListener("progress",c)),x&&l.upload&&([s,u]=Zl(x),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(g=b=>{l&&(e(!b||b.type?new ea(null,n,l):b),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=vS(r.url);if(w&&xr.protocols.indexOf(w)===-1){e(new Tt("Unsupported protocol "+w+":",Tt.ERR_BAD_REQUEST,n));return}l.send(f||null)})},SS=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,f;const m=function(g){if(!f){f=!0,x();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Tt?s:new ea(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,m(new Tt(`timeout ${t} of ms exceeded`,Tt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(m):g.removeEventListener("abort",m)}),n=null)};n.forEach(g=>g.addEventListener("abort",m));const{signal:h}=r;return h.unsubscribe=()=>Te.asap(x),h}},TS=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,f;for(;r<e;)f=r+t,yield n.slice(r,f),r=f},$S=async function*(n,t){for await(const e of MS(n))yield*TS(e,t)},MS=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Nv=(n,t,e,r)=>{const f=$S(n,t);let m=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){x(),h.close();return}let c=s.byteLength;if(e){let u=m+=c;e(u)}h.enqueue(new Uint8Array(s))}catch(g){throw x(g),g}},cancel(h){return x(h),f.return()}},{highWaterMark:2})},Jl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Dv=Jl&&typeof ReadableStream=="function",IS=Jl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Fv=(n,...t)=>{try{return!!n(...t)}catch{return!1}},RS=Dv&&Fv(()=>{let n=!1;const t=new Request(xr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Pv=64*1024,Fh=Dv&&Fv(()=>Te.isReadableStream(new Response("").body)),ec={stream:Fh&&(n=>n.body)};Jl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ec[t]&&(ec[t]=Te.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new Tt(`Response type '${t}' is not supported`,Tt.ERR_NOT_SUPPORT,r)})})})(new Response);const ES=async n=>{if(n==null)return 0;if(Te.isBlob(n))return n.size;if(Te.isSpecCompliantForm(n))return(await new Request(xr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Te.isArrayBufferView(n)||Te.isArrayBuffer(n))return n.byteLength;if(Te.isURLSearchParams(n)&&(n=n+""),Te.isString(n))return(await IS(n)).byteLength},LS=async(n,t)=>Te.toFiniteNumber(n.getContentLength())??ES(t),OS=Jl&&(async n=>{let{url:t,method:e,data:r,signal:f,cancelToken:m,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:g,headers:s,withCredentials:c="same-origin",fetchOptions:u}=Ov(n);g=g?(g+"").toLowerCase():"text";let a=SS([f,m&&m.toAbortSignal()],y),o;const l=a&&a.unsubscribe&&(()=>{a.unsubscribe()});let d;try{if(h&&RS&&e!=="get"&&e!=="head"&&(d=await LS(s,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Te.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[R,L]=Iv(d,Zl(Rv(h)));r=Nv(_.body,Pv,R,L)}}Te.isString(c)||(c=c?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:a,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?c:void 0});let b=await fetch(o);const E=Fh&&(g==="stream"||g==="response");if(Fh&&(x||E&&l)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=b[F]});const C=Te.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&Iv(C,Zl(Rv(x),!0))||[];b=new Response(Nv(b.body,Pv,R,()=>{L&&L(),l&&l()}),_)}g=g||"text";let $=await ec[Te.findKey(ec,g)||"text"](b,n);return!E&&l&&l(),await new Promise((_,C)=>{Mv(_,C,{data:$,headers:Br.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,n,o),{cause:w.cause||w}):Tt.from(w,w&&w.code,n,o)}}),Ph={http:YA,xhr:AS,fetch:OS};Te.forEach(Ph,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Wv=n=>`- ${n}`,NS=n=>Te.isFunction(n)||n===null||n===!1,Bv={getAdapter:n=>{n=Te.isArray(n)?n:[n];const{length:t}=n;let e,r;const f={};for(let m=0;m<t;m++){e=n[m];let y;if(r=e,!NS(e)&&(r=Ph[(y=String(e)).toLowerCase()],r===void 0))throw new Tt(`Unknown adapter '${y}'`);if(r)break;f[y||"#"+m]=r}if(!r){const m=Object.entries(f).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?m.length>1?`since :
|
1488
|
+
`+m.map(Wv).join(`
|
1489
|
+
`):" "+Wv(m[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:Ph};function Wh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ea(null,n)}function zv(n){return Wh(n),n.headers=Br.from(n.headers),n.data=Dh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bv.getAdapter(n.adapter||Fa.adapter)(n).then(function(t){return Wh(n),t.data=Dh.call(n,n.transformResponse,t),t.headers=Br.from(t.headers),t},function(t){return $v(t)||(Wh(n),t&&t.response&&(t.response.data=Dh.call(n,n.transformResponse,t.response),t.response.headers=Br.from(t.response.headers))),Promise.reject(t)})}const jv="1.8.4",tc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{tc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Hv={};tc.transitional=function(n,t,e){function r(f,m){return"[Axios v"+jv+"] Transitional option '"+f+"'"+m+(e?". "+e:"")}return(f,m,y)=>{if(n===!1)throw new Tt(r(m," has been removed"+(t?" in "+t:"")),Tt.ERR_DEPRECATED);return t&&!Hv[m]&&(Hv[m]=!0,console.warn(r(m," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(f,m,y):!0}},tc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function DS(n,t,e){if(typeof n!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let f=r.length;for(;f-- >0;){const m=r[f],y=t[m];if(y){const x=n[m],h=x===void 0||y(x,m,n);if(h!==!0)throw new Tt("option "+m+" must be "+h,Tt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Tt("Unknown option "+m,Tt.ERR_BAD_OPTION)}}const nc={assertOptions:DS,validators:tc},qi=nc.validators;let ms=class{constructor(t){this.defaults=t,this.interceptors={request:new _v,response:new _v}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?m&&!String(r.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1490
|
+
`+m):r.stack=m}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=fs(this.defaults,e);const{transitional:r,paramsSerializer:f,headers:m}=e;r!==void 0&&nc.assertOptions(r,{silentJSONParsing:qi.transitional(qi.boolean),forcedJSONParsing:qi.transitional(qi.boolean),clarifyTimeoutError:qi.transitional(qi.boolean)},!1),f!=null&&(Te.isFunction(f)?e.paramsSerializer={serialize:f}:nc.assertOptions(f,{encode:qi.function,serialize:qi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),nc.assertOptions(e,{baseUrl:qi.spelling("baseURL"),withXsrfToken:qi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let y=m&&Te.merge(m.common,m[e.method]);m&&Te.forEach(["delete","get","head","post","put","patch","common"],o=>{delete m[o]}),e.headers=Br.concat(y,m);const x=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(e)===!1||(h=h&&o.synchronous,x.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,c=0,u;if(!h){const o=[zv.bind(this),void 0];for(o.unshift.apply(o,x),o.push.apply(o,g),u=o.length,s=Promise.resolve(e);c<u;)s=s.then(o[c++],o[c++]);return s}u=x.length;let a=e;for(c=0;c<u;){const o=x[c++],l=x[c++];try{a=o(a)}catch(d){l.call(this,d);break}}try{s=zv.call(this,a)}catch(o){return Promise.reject(o)}for(c=0,u=g.length;c<u;)s=s.then(g[c++],g[c++]);return s}getUri(t){t=fs(this.defaults,t);const e=Ev(t.baseURL,t.url,t.allowAbsoluteUrls);return kv(e,t.params,t.paramsSerializer)}};Te.forEach(["delete","get","head","options"],function(n){ms.prototype[n]=function(t,e){return this.request(fs(e||{},{method:n,url:t,data:(e||{}).data}))}}),Te.forEach(["post","put","patch"],function(n){function t(e){return function(r,f,m){return this.request(fs(m||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}ms.prototype[n]=t(),ms.prototype[n+"Form"]=t(!0)});let FS=class d0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(f){e=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const y=new Promise(x=>{r.subscribe(x),m=x}).then(f);return y.cancel=function(){r.unsubscribe(m)},y},t(function(f,m,y){r.reason||(r.reason=new ea(f,m,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new d0(function(e){t=e}),cancel:t}}};function PS(n){return function(t){return n.apply(null,t)}}function WS(n){return Te.isObject(n)&&n.isAxiosError===!0}const Bh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Bh).forEach(([n,t])=>{Bh[t]=n});function Uv(n){const t=new ms(n),e=cv(ms.prototype.request,t);return Te.extend(e,ms.prototype,t,{allOwnKeys:!0}),Te.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Uv(fs(n,r))},e}const Gn=yr("E",Uv(Fa));Gn.Axios=ms,Gn.CanceledError=ea,Gn.CancelToken=FS,Gn.isCancel=$v,Gn.VERSION=jv,Gn.toFormData=Xl,Gn.AxiosError=Tt,Gn.Cancel=Gn.CanceledError,Gn.all=function(n){return Promise.all(n)},Gn.spread=PS,Gn.isAxiosError=WS,Gn.mergeConfig=fs,Gn.AxiosHeaders=Br,Gn.formToJSON=n=>Sv(Te.isHTMLForm(n)?new FormData(n):n),Gn.getAdapter=Bv.getAdapter,Gn.HttpStatusCode=Bh,Gn.default=Gn;const{Axios:J2,AxiosError:eN,CanceledError:tN,isCancel:nN,CancelToken:rN,VERSION:iN,all:oN,Cancel:sN,isAxiosError:aN,spread:lN,toFormData:cN,AxiosHeaders:uN,HttpStatusCode:hN,formToJSON:dN,getAdapter:pN,mergeConfig:gN}=Gn;function Vv(){return Object.assign({},Fs())}function BS(n,t,e){const r=bn(n,void 0);return r.setTime(r.getTime()+t*cl),r}function zS(n,t){const e=()=>qn(void 0,NaN),r=VS(n);let f;if(r.date){const h=qS(r.date,2);f=KS(h.restDateString,h.year)}if(!f||isNaN(+f))return e();const m=+f;let y=0,x;if(r.time&&(y=GS(r.time),isNaN(y)))return e();if(r.timezone){if(x=YS(r.timezone),isNaN(x))return e()}else{const h=new Date(m+y),g=bn(0,void 0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}return bn(m+y+x,void 0)}const rc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},jS=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,HS=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,US=/^([+-])(\d{2})(?::?(\d{2}))?$/;function VS(n){const t={},e=n.split(rc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],rc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(rc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const f=rc.timezone.exec(r);f?(t.time=r.replace(f[1],""),t.timezone=f[1]):t.time=r}return t}function qS(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const f=r[1]?parseInt(r[1]):null,m=r[2]?parseInt(r[2]):null;return{year:m===null?f:m*100,restDateString:n.slice((r[1]||r[2]).length)}}function KS(n,t){if(t===null)return new Date(NaN);const e=n.match(jS);if(!e)return new Date(NaN);const r=!!e[4],f=Wa(e[1]),m=Wa(e[2])-1,y=Wa(e[3]),x=Wa(e[4]),h=Wa(e[5])-1;if(r)return eT(t,x,h)?XS(t,x,h):new Date(NaN);{const g=new Date(0);return!ZS(t,m,y)||!JS(t,f)?new Date(NaN):(g.setUTCFullYear(t,m,Math.max(f,y)),g)}}function Wa(n){return n?parseInt(n):1}function GS(n){const t=n.match(HS);if(!t)return NaN;const e=zh(t[1]),r=zh(t[2]),f=zh(t[3]);return tT(e,r,f)?e*qc+r*cl+f*1e3:NaN}function zh(n){return n&&parseFloat(n.replace(",","."))||0}function YS(n){if(n==="Z")return 0;const t=n.match(US);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),f=t[3]&&parseInt(t[3])||0;return nT(r,f)?e*(r*qc+f*cl):NaN}function XS(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const f=r.getUTCDay()||7,m=(t-1)*7+e+1-f;return r.setUTCDate(r.getUTCDate()+m),r}const QS=[31,null,31,30,31,30,31,31,30,31,30,31];function qv(n){return n%400===0||n%4===0&&n%100!==0}function ZS(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(QS[t]||(qv(n)?29:28))}function JS(n,t){return t>=1&&t<=(qv(n)?366:365)}function eT(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function tT(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function nT(n,t){return t>=0&&t<=59}function rT(n,t,e){return BS(n,-t)}function Kv(n,t,e){const r=Vv(),f=sT(n,e.timeZone,e.locale??r.locale);return"formatToParts"in f?iT(f,t):oT(f,t)}function iT(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function oT(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function sT(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function aT(n,t){const e=dT(t);return"formatToParts"in e?cT(e,n):uT(e,n)}const lT={year:0,month:1,day:2,hour:3,minute:4,second:5};function cT(n,t){try{const e=n.formatToParts(t),r=[];for(let f=0;f<e.length;f++){const m=lT[e[f].type];m!==void 0&&(r[m]=parseInt(e[f].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function uT(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const jh={},Gv=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),hT=Gv==="06/25/2014, 00:00:00"||Gv==="06/25/2014 00:00:00";function dT(n){return jh[n]||(jh[n]=hT?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),jh[n]}function Yv(n,t,e,r,f,m,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,f,m,y),x}const Xv=36e5,pT=6e4,Hh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Uh(n,t,e){if(!n)return 0;let r=Hh.timezoneZ.exec(n);if(r)return 0;let f,m;if(r=Hh.timezoneHH.exec(n),r)return f=parseInt(r[1],10),Qv(f)?-(f*Xv):NaN;if(r=Hh.timezoneHHMM.exec(n),r){f=parseInt(r[2],10);const y=parseInt(r[3],10);return Qv(f,y)?(m=Math.abs(f)*Xv+y*pT,r[1]==="+"?-m:m):NaN}if(mT(n)){t=new Date(t||Date.now());const y=e?t:gT(t),x=Vh(y,n);return-(e?x:fT(t,x,n))}return NaN}function gT(n){return Yv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Vh(n,t){const e=aT(n,t),r=Yv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let f=n.getTime();const m=f%1e3;return f-=m>=0?m:1e3+m,r-f}function fT(n,t,e){let r=n.getTime()-t;const f=Vh(new Date(r),e);if(t===f)return t;r-=f-t;const m=Vh(new Date(r),e);return f===m?f:Math.max(f,m)}function Qv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Zv={};function mT(n){if(Zv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Zv[n]=!0,!0}catch{return!1}}const vT=60*1e3,yT={X:function(n,t,e){const r=qh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Jv(r);case"XXXX":case"XX":return ta(r);case"XXXXX":case"XXX":default:return ta(r,":")}},x:function(n,t,e){const r=qh(e.timeZone,n);switch(t){case"x":return Jv(r);case"xxxx":case"xx":return ta(r);case"xxxxx":case"xxx":default:return ta(r,":")}},O:function(n,t,e){const r=qh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+wT(r,":");case"OOOO":default:return"GMT"+ta(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Kv("short",n,e);case"zzzz":default:return Kv("long",n,e)}}};function qh(n,t){const e=n?Uh(n,t,!0)/vT:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ic(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ta(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=ic(Math.floor(r/60),2),m=ic(Math.floor(r%60),2);return e+f+t+m}function Jv(n,t){return n%60===0?(n>0?"-":"+")+ic(Math.abs(n)/60,2):ta(n,t)}function wT(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=Math.floor(r/60),m=r%60;return m===0?e+String(f):e+String(f)+t+ic(m,2)}function ey(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const bT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Kh=36e5,ty=6e4,xT=2,Er={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:bT};function ny(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?xT:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=CT(n),{year:f,restDateString:m}=kT(r.date,e),y=_T(m,f);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,g;if(r.time&&(h=AT(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(g=Uh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(g))return new Date(NaN)}else g=ey(new Date(x+h)),g=ey(new Date(x+h+g));return new Date(x+h+g)}else return new Date(NaN)}function CT(n){const t={};let e=Er.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Er.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const f=Er.timeZone.exec(r);f?(t.time=r.replace(f[1],""),t.timeZone=f[1].trim()):t.time=r}return t}function kT(n,t){if(n){const e=Er.YYY[t],r=Er.YYYYY[t];let f=Er.YYYY.exec(n)||r.exec(n);if(f){const m=f[1];return{year:parseInt(m,10),restDateString:n.slice(m.length)}}if(f=Er.YY.exec(n)||e.exec(n),f){const m=f[1];return{year:parseInt(m,10)*100,restDateString:n.slice(m.length)}}}return{year:null}}function _T(n,t){if(t===null)return null;let e,r,f;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let m=Er.MM.exec(n);if(m)return e=new Date(0),r=parseInt(m[1],10)-1,oy(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(m=Er.DDD.exec(n),m){e=new Date(0);const y=parseInt(m[1],10);return $T(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(m=Er.MMDD.exec(n),m){e=new Date(0),r=parseInt(m[1],10)-1;const y=parseInt(m[2],10);return oy(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(m=Er.Www.exec(n),m)return f=parseInt(m[1],10)-1,sy(f)?ry(t,f):new Date(NaN);if(m=Er.WwwD.exec(n),m){f=parseInt(m[1],10)-1;const y=parseInt(m[2],10)-1;return sy(f,y)?ry(t,f,y):new Date(NaN)}return null}function AT(n){let t,e,r=Er.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Gh(t)?t%24*Kh:NaN;if(r=Er.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Gh(t,e)?t%24*Kh+e*ty:NaN;if(r=Er.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return Gh(t,e,f)?t%24*Kh+e*ty+f*1e3:NaN}return null}function ry(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const f=r.getUTCDay()||7,m=t*7+e+1-f;return r.setUTCDate(r.getUTCDate()+m),r}const ST=[31,28,31,30,31,30,31,31,30,31,30,31],TT=[31,29,31,30,31,30,31,31,30,31,30,31];function iy(n){return n%400===0||n%4===0&&n%100!==0}function oy(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=iy(n);if(r&&e>TT[t]||!r&&e>ST[t])return!1}return!0}function $T(n,t){if(t<1)return!1;const e=iy(n);return!(e&&t>366||!e&&t>365)}function sy(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Gh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const MT=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function IT(n,t,e={}){t=String(t);const r=t.match(MT);if(r){const f=ny(e.originalDate||n,e);t=r.reduce(function(m,y){if(y[0]==="'")return m;const x=m.indexOf(y),h=m[x-1]==="'",g=m.replace(y,"'"+yT[y[0]](f,y,e)+"'");return h?g.substring(0,x-1)+g.substring(x+1):g},t)}return ns(n,t,e)}function RT(n,t,e){n=ny(n,e);const r=Uh(t,n,!0),f=new Date(n.getTime()-r),m=new Date(0);return m.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),m.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),m}function Yh(n,t,e,r){return r={...r,timeZone:t,originalDate:n},IT(RT(n,t,{timeZone:r.timeZone}),e,r)}const Xh="yyyy-MM-dd",ay="HH:mm:ss.SSS",ET="HH:mm:ss",oc=`${Xh} ${ay}`,LT=yr("P",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return ns(!t||t==="local"?rT(n,n.getTimezoneOffset()):n,oc)},formatDateTime(n,t){return!t||t==="local"?ns(n,oc):Yh(n,t,oc)},formatDate:function(n,t){return!t||t==="local"?ns(n,Xh):Yh(n,this.timeZone,Xh)},formatTime:function(n,t,e=ay){return!t||t==="local"?ns(n,e):Yh(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,ET)},formatTimestamp(n,t){return this.formatDateTime(zS(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}});var OT=Object.defineProperty,NT=(n,t,e)=>t in n?OT(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>NT(n,typeof t!="symbol"?t+"":t,e);function Qh(n,t,e){const r=bn(n,e==null?void 0:e.in);return isNaN(t)?qn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function DT(n,t){const e=bn(n,void 0).getDay();return e===0?7:e}function FT(n,t){const e=PT(t)?new t(0):qn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function PT(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const WT=10;class ly{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}}class BT extends ly{constructor(t,e,r,f,m){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=f,m&&(this.subPriority=m)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class zT extends ly{constructor(t,e){super(),Je(this,"priority",WT),Je(this,"subPriority",-1),this.context=t||(r=>qn(e,r))}set(t,e){return e.timestampIsSet?t:qn(t,FT(t,this.context))}}class Jt{run(t,e,r,f){const m=this.parse(t,e,r,f);return m?{setter:new BT(m.value,this.validate,this.set,this.priority,this.subPriority),rest:m.rest}:null}validate(t,e,r){return!0}}class jT extends Jt{constructor(){super(...arguments),Je(this,"priority",140),Je(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const Wn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ki={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Bn(n,t){return n&&{value:t(n.value),rest:n.rest}}function An(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Gi(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,f=e[2]?parseInt(e[2],10):0,m=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(f*qc+m*cl+y*I0),rest:t.slice(e[0].length)}}function cy(n){return An(Wn.anyDigitsSigned,n)}function Mn(n,t){switch(n){case 1:return An(Wn.singleDigit,t);case 2:return An(Wn.twoDigits,t);case 3:return An(Wn.threeDigits,t);case 4:return An(Wn.fourDigits,t);default:return An(new RegExp("^\\d{1,"+n+"}"),t)}}function uy(n,t){switch(n){case 1:return An(Wn.singleDigitSigned,t);case 2:return An(Wn.twoDigitsSigned,t);case 3:return An(Wn.threeDigitsSigned,t);case 4:return An(Wn.fourDigitsSigned,t);default:return An(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Zh(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function hy(n,t){const e=t>0,r=e?t:1-t;let f;if(r<=50)f=n||100;else{const m=r+50,y=Math.trunc(m/100)*100,x=n>=m%100;f=n+y-(x?100:0)}return e?f:1-f}function dy(n){return n%400===0||n%4===0&&n%100!==0}class HT extends Jt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const f=m=>({year:m,isTwoDigitYear:e==="yy"});switch(e){case"y":return Bn(Mn(4,t),f);case"yo":return Bn(r.ordinalNumber(t,{unit:"year"}),f);default:return Bn(Mn(e.length,t),f)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const f=t.getFullYear();if(r.isTwoDigitYear){const y=hy(r.year,f);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const m=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(m,0,1),t.setHours(0,0,0,0),t}}class UT extends Jt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const f=m=>({year:m,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Bn(Mn(4,t),f);case"Yo":return Bn(r.ordinalNumber(t,{unit:"year"}),f);default:return Bn(Mn(e.length,t),f)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,f){const m=Gc(t,f);if(r.isTwoDigitYear){const x=hy(r.year,m);return t.setFullYear(x,0,f.firstWeekContainsDate),t.setHours(0,0,0,0),Mo(t,f)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,f.firstWeekContainsDate),t.setHours(0,0,0,0),Mo(t,f)}}class VT extends Jt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return uy(e==="R"?4:e.length,t)}set(t,e,r){const f=qn(t,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Ps(f)}}class qT extends Jt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return uy(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}let KT=class extends Jt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return Mn(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}};class GT extends Jt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return Mn(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class YT extends Jt{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const f=m=>m-1;switch(e){case"M":return Bn(An(Wn.month,t),f);case"MM":return Bn(Mn(2,t),f);case"Mo":return Bn(r.ordinalNumber(t,{unit:"month"}),f);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class XT extends Jt{constructor(){super(...arguments),Je(this,"priority",110),Je(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const f=m=>m-1;switch(e){case"L":return Bn(An(Wn.month,t),f);case"LL":return Bn(Mn(2,t),f);case"Lo":return Bn(r.ordinalNumber(t,{unit:"month"}),f);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function QT(n,t,e){const r=bn(n,e==null?void 0:e.in),f=_p(r,e)-t;return r.setDate(r.getDate()-f*7),bn(r,e==null?void 0:e.in)}class ZT extends Jt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return An(Wn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,f){return Mo(QT(t,r,f),f)}}function JT(n,t,e){const r=bn(n,void 0),f=kp(r)-t;return r.setDate(r.getDate()-f*7),r}class e$ extends Jt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return An(Wn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Ps(JT(t,r))}}const t$=[31,28,31,30,31,30,31,31,30,31,30,31],n$=[31,29,31,30,31,30,31,31,30,31,30,31];class r$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return An(Wn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear(),f=dy(r),m=t.getMonth();return f?e>=1&&e<=n$[m]:e>=1&&e<=t$[m]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class i$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return An(Wn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear();return dy(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function Jh(n,t,e){var r,f,m,y;const x=Fs(),h=(e==null?void 0:e.weekStartsOn)??((f=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:f.weekStartsOn)??x.weekStartsOn??((y=(m=x.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??0,g=bn(n,e==null?void 0:e.in),s=g.getDay(),c=(t%7+7)%7,u=7-h,a=t<0||t>6?t-(s+u)%7:(c+u)%7-(s+u)%7;return Qh(g,a,e)}class o$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,f){return t=Jh(t,r,f),t.setHours(0,0,0,0),t}}class s$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,f){const m=y=>{const x=Math.floor((y-1)/7)*7;return(y+f.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return Bn(Mn(e.length,t),m);case"eo":return Bn(r.ordinalNumber(t,{unit:"day"}),m);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,f){return t=Jh(t,r,f),t.setHours(0,0,0,0),t}}class a$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,f){const m=y=>{const x=Math.floor((y-1)/7)*7;return(y+f.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return Bn(Mn(e.length,t),m);case"co":return Bn(r.ordinalNumber(t,{unit:"day"}),m);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,f){return t=Jh(t,r,f),t.setHours(0,0,0,0),t}}function l$(n,t,e){const r=bn(n,void 0),f=DT(r),m=t-f;return Qh(r,m,e)}class c$ extends Jt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const f=m=>m===0?7:m;switch(e){case"i":case"ii":return Mn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Bn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),f);case"iiiii":return Bn(r.day(t,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Bn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Bn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),f)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=l$(t,r),t.setHours(0,0,0,0),t}}class u$ extends Jt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Zh(r),0,0,0),t}}class h$ extends Jt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Zh(r),0,0,0),t}}class d$ extends Jt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Zh(r),0,0,0),t}}class p$ extends Jt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return An(Wn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const f=t.getHours()>=12;return f&&r<12?t.setHours(r+12,0,0,0):!f&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class g$ extends Jt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return An(Wn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class f$ extends Jt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return An(Wn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class m$ extends Jt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return An(Wn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const f=r<=24?r%24:r;return t.setHours(f,0,0,0),t}}class v$ extends Jt{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return An(Wn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class y$ extends Jt{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return An(Wn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class w$ extends Jt{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=f=>Math.trunc(f*Math.pow(10,-e.length+3));return Bn(Mn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class b$ extends Jt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Gi(Ki.basicOptionalMinutes,t);case"XX":return Gi(Ki.basic,t);case"XXXX":return Gi(Ki.basicOptionalSeconds,t);case"XXXXX":return Gi(Ki.extendedOptionalSeconds,t);case"XXX":default:return Gi(Ki.extended,t)}}set(t,e,r){return e.timestampIsSet?t:qn(t,t.getTime()-ul(t)-r)}}class x$ extends Jt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Gi(Ki.basicOptionalMinutes,t);case"xx":return Gi(Ki.basic,t);case"xxxx":return Gi(Ki.basicOptionalSeconds,t);case"xxxxx":return Gi(Ki.extendedOptionalSeconds,t);case"xxx":default:return Gi(Ki.extended,t)}}set(t,e,r){return e.timestampIsSet?t:qn(t,t.getTime()-ul(t)-r)}}class C$ extends Jt{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return cy(t)}set(t,e,r){return[qn(t,r*1e3),{timestampIsSet:!0}]}}class k$ extends Jt{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return cy(t)}set(t,e,r){return[qn(t,r),{timestampIsSet:!0}]}}const _$={G:new jT,y:new HT,Y:new UT,R:new VT,u:new qT,Q:new KT,q:new GT,M:new YT,L:new XT,w:new ZT,I:new e$,d:new r$,D:new i$,E:new o$,e:new s$,c:new a$,i:new c$,a:new u$,b:new h$,B:new d$,h:new p$,H:new g$,K:new f$,k:new m$,m:new v$,s:new y$,S:new w$,X:new b$,x:new x$,t:new C$,T:new k$},A$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T$=/^'([^]*?)'?$/,$$=/''/g,M$=/\S/,I$=/[a-zA-Z]/;function R$(n,t,e,r){var f,m,y,x;const h=()=>qn(e,NaN),g=Vv(),s=g.locale??Cp,c=g.firstWeekContainsDate??((m=(f=g.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,u=g.weekStartsOn??((x=(y=g.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():bn(e,void 0);const a={firstWeekContainsDate:c,weekStartsOn:u,locale:s},o=[new zT(void 0,e)],l=t.match(S$).map($=>{const _=$[0];if(_ in Yc){const C=Yc[_];return C($,s.formatLong)}return $}).join("").match(A$),d=[];for(let $ of l){Rp($)&&Xc($,t,n),Ip($)&&Xc($,t,n);const _=$[0],C=_$[_];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const F=d.find(I=>R.includes(I.token)||I.token===_);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);d.push({token:_,fullToken:$});const L=C.run(n,$,s.match,a);if(!L)return h();o.push(L.setter),n=L.rest}else{if(_.match(I$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if($==="''"?$="'":_==="'"&&($=E$($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&M$.test(n))return h();const w=o.map($=>$.priority).sort(($,_)=>_-$).filter(($,_,C)=>C.indexOf($)===_).map($=>o.filter(_=>_.priority===$).sort((_,C)=>C.subPriority-_.subPriority)).map($=>$[0]);let b=bn(e,void 0);if(isNaN(+b))return h();const E={};for(const $ of w){if(!$.validate(b,a))return h();const _=$.set(b,E,a);Array.isArray(_)?(b=_[0],Object.assign(E,_[1])):b=_}return b}function E$(n){return n.match(T$)[1].replace($$,"'")}const L$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",O$={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return L$},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=z$.indexOf(sc[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,f=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*f}px;`,`background-size: ${e}px ${r}px;`,`height: ${f}px;`,`width: ${f}px;`,`padding-top: ${n-1}px;`].join("")}}};function N$(n,t,e,r,f,m){return or(),Hi("div",{style:Ds(m.iconStyle)},null,4)}const D$=es(O$,[["render",N$]]),F$={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function P$(n,t,e,r,f,m){const y=Qt("rux-icon");return or(),io(y,{size:e.size,icon:e.icon,style:Ds(m.colorStyle)},null,8,["size","icon","style"])}const W$=es(F$,[["render",P$],["__scopeId","data-v-9af48e85"]]),sc={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},Ba={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},B$=function(n){const t="#000000",e="#ffffff",r=Ba[sc[n]];if(r){const f=+`0x${r.slice(1,3)}`,m=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((f*299+m*587+y*114)/1e3>128)return t}return e},z$=Object.keys(Ba),j$={astro:{component:n=>Ns(W$,{...n})},"astro-status":{component:n=>Ns(D$,{...n,status:n.icon})}},H$={extras:{component:n=>Ns(M0,{...n})}},U$={props:{historyCount:{type:Number,default:200},timeZone:{type:String,default:"local"}},mixins:[LT],data(){return{AstroStatusColors:Ba,data:[],shownData:[],logLevels:["DEBUG","INFO","WARN","ERROR","FATAL"],logLevel:"INFO",search:"",headers:[{title:"Time",value:"timestamp",nowrap:!0},{title:"Level",value:"level"},{title:"Source",value:"microservice_name"},{title:"Message",value:"message"}],cable:new zg,subscription:null,paused:!1}},computed:{buttonLabel:function(){return this.paused?"Resume":"Pause"},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},watch:{logLevel:function(n,t){this.createSubscription()}},created(){this.createSubscription()},unmounted(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{pause:function(){this.paused=!this.paused},createSubscription(){this.subscription&&(this.subscription.unsubscribe(),this.data=[],this.shownData=this.data),this.cable.createSubscription("MessagesChannel",window.openc3Scope,{received:n=>{this.cable.recordPing(),n.length>this.historyCount&&n.splice(0,n.length-this.historyCount),n=n.filter(t=>{switch(this.logLevel){case"DEBUG":return!0;case"INFO":if(t.level!=="DEBUG")return!0;break;case"WARN":if(t.level!=="DEBUG"&&t.level!=="INFO")return!0;break;case"ERROR":if(t.level!=="DEBUG"&&t.level!=="INFO"&&t.level!=="WARN")return!0;break;case"FATAL":if(t.level!=="DEBUG"&&t.level!=="INFO"&&t.level!=="WARN"&&t.level!=="ERROR")return!0;break}return!1}),n.map(t=>{if(t.timestamp=this.formatTimestamp(t["@timestamp"],this.timeZone),t.message.raw&&t.message.json_class==="String"){let e="0x";for(let r=0;r<t.message.raw.length;r++){let f=t.message.raw[r].toString(16).toUpperCase();f.length<2&&(f="0"+f),e+=f}t.message=e}else t.message=t.message.replaceAll("\\n",`
|
1491
|
+
`)}),this.data=n.reverse().concat(this.data),this.data.length>this.historyCount&&(this.data.length=this.historyCount),this.paused||(this.shownData=this.data)}},{history_count:this.historyCount,types:["log","notification","alert"]}).then(n=>{this.subscription=n})},getColor(n){return Ba[sc[n]]},getStatus(n){return sc[n]},downloadLog(){const n=this.shownData.map(r=>`${r.timestamp} | ${r.level} | ${r.microservice_name} | ${r.message}`).join(`
|
1492
|
+
`),t=new Blob([n],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",ns(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_message_log.txt"),e.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(n=>{this.data=[],this.shownData=[]}).catch(function(n){})}}},V$={class:"d-flex align-baseline"},q$=["title","datetime"],K$={style:{"white-space":"pre-wrap"}};function G$(n,t,e,r,f,m){const y=Qt("v-btn"),x=Qt("v-tooltip"),h=Qt("v-spacer"),g=Qt("v-select"),s=Qt("v-text-field"),c=Qt("v-card-title"),u=Qt("rux-status"),a=Qt("v-data-table"),o=Qt("v-card");return or(),io(o,null,{default:sn(()=>[Et(c,{class:"d-flex align-center justify-content-space-between"},{default:sn(()=>[hr("div",V$,[Et(x,{location:"top"},{activator:sn(({props:l})=>[hr("div",al(ll(l)),[Et(y,{icon:"mdi-download",variant:"text",size:"small",class:"mr-2","data-test":"download-log",onClick:m.downloadLog},null,8,["onClick"])],16)]),default:sn(()=>[t[2]||(t[2]=hr("span",null," Download Log ",-1))]),_:1}),t[3]||(t[3]=hr("span",null," Log Messages ",-1)),Et(x,{location:"top"},{activator:sn(({props:l})=>[hr("div",al(ll(l)),[Et(y,{icon:m.buttonIcon,variant:"text","data-test":"pause",onClick:m.pause},null,8,["icon","onClick"])],16)]),default:sn(()=>[hr("span",null,Ir(m.buttonLabel),1)]),_:1})]),Et(h),Et(g,{label:"Filter by log level","hide-details":"",variant:"outlined",density:"compact",items:f.logLevels,modelValue:f.logLevel,"onUpdate:modelValue":t[0]||(t[0]=l=>f.logLevel=l),class:"mr-2",style:{"max-width":"150px"},"data-test":"log-messages-level"},null,8,["items","modelValue"]),Et(h),Et(s,{modelValue:f.search,"onUpdate:modelValue":t[1]||(t[1]=l=>f.search=l),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},class:"search","data-test":"search-log-messages"},null,8,["modelValue"]),Et(x,{location:"top"},{activator:sn(({props:l})=>[hr("div",al(ll(l)),[Et(y,{icon:"mdi-delete",variant:"text",class:"ml-2","data-test":"clear-log",onClick:m.clearLog},null,8,["onClick"])],16)]),default:sn(()=>[t[4]||(t[4]=hr("span",null," Clear Log ",-1))]),_:1})]),_:1}),Et(a,{headers:f.headers,items:f.shownData,search:f.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",sticky:"",hover:"","data-test":"log-messages"},{"item.timestamp":sn(({item:l})=>[hr("time",{title:l.timestamp,datetime:l.timestamp},Ir(l.timestamp),9,q$)]),"item.level":sn(({item:l})=>[hr("span",{style:Ds("display: inline-flex; color:"+m.getColor(l.level))},[Et(u,{class:"mr-1",status:m.getStatus(l.level)},null,8,["status"]),Si(" "+Ir(l.level),1)],4)]),"item.message":sn(({item:l})=>[hr("div",K$,Ir(l.message),1)]),_:1},8,["headers","items","search"])]),_:1})}const fN=yr("w",es(U$,[["render",G$],["__scopeId","data-v-d5f1f607"]])),py="single-spa:app-change",Y$={data(){return{show:!1}},created(){window.addEventListener(py,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=hp().length===0},150)},unmounted(){window.removeEventListener(py,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},X$={class:"mx-1"};function Q$(n,t,e,r,f,m){const y=Qt("v-card-title"),x=Qt("v-card-text"),h=Qt("v-card");return f.show?(or(),io(h,{key:0},{default:sn(()=>[Et(y,null,{default:sn(()=>t[0]||(t[0]=[Si(" 404 Not Found ")])),_:1}),Et(x,{class:"d-flex align-center mt-3"},{default:sn(()=>[t[1]||(t[1]=Si(" The requested URL ")),hr("code",X$,Ir(n.$route.fullPath),1),t[2]||(t[2]=Si(" was not routable. ")),t[3]||(t[3]=hr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):$o("",!0)}const gy=[{path:"",component:()=>tt(()=>et.import("./CmdTlmServer-3100bab0f78a7952a5f1.js"),void 0),children:[{component:()=>tt(()=>et.import("./InterfacesTab-2d486c0457a95cc3e028.js"),void 0),path:""},{component:()=>tt(()=>et.import("./InterfacesTab-2d486c0457a95cc3e028.js"),void 0),name:"InterfacesTab",path:"interfaces"},{component:()=>tt(()=>et.import("./TargetsTab-e4763d63ea20379aa310.js"),void 0),name:"TargetsTab",path:"targets"},{component:()=>tt(()=>et.import("./CmdPacketsTab-8938018b2c20935a31ff.js"),void 0),name:"CmdPacketsTab",path:"cmd-packets"},{component:()=>tt(()=>et.import("./TlmPacketsTab-e5b98e3e4c15475a7a17.js"),void 0),name:"TlmPacketsTab",path:"tlm-packets"},{component:()=>tt(()=>et.import("./RoutersTab-12cdceede3476c777ebf.js"),void 0),name:"RoutersTab",path:"routers"},{component:()=>tt(()=>et.import("./StatusTab-84eda227fff2c85ad6b1.js"),void 0),name:"StatusTab",props:{refreshInterval:5e3},path:"status"}]},{path:"/:pathMatch(.*)*",name:"NotFound",component:es(Y$,[["render",Q$]])}];gy.forEach(fp);const Z$=cp({history:up(),routes:gy}),J$={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},eM={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},tM=["innerHTML"],nM={key:2},rM={key:3,class:"validate mt-4"};function iM(n,t,e,r,f,m){const y=Qt("v-spacer"),x=Qt("v-toolbar"),h=Qt("v-icon"),g=Qt("v-text-field"),s=Qt("v-card-text"),c=Qt("v-btn"),u=Qt("v-card-actions"),a=Qt("v-card"),o=Qt("v-dialog"),l=Qt("v-app");return or(),io(l,null,{default:sn(()=>[Et(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:sn(()=>[Et(a,null,{default:sn(()=>[Et(x,{height:"24"},{default:sn(()=>[Et(y),hr("span",null,Ir(n.params.title),1),Et(y)]),_:1}),Et(s,{class:"mt-4 pa-3"},{default:sn(()=>[n.params.validateText?(or(),io(h,{key:0,class:"mr-2"},{default:sn(()=>t[2]||(t[2]=[Si(" mdi-alert ")])),_:1})):$o("",!0),n.params.html?(or(),Hi("span",{key:1,innerHTML:n.params.text},null,8,tM)):(or(),Hi("span",nM,Ir(n.params.text),1)),n.params.validateText?(or(),Hi("div",rM,[Si(" Enter "+Ir(n.params.validateText)+" to confirm! ",1),Et(g,{variant:"solo",density:"compact","single-line":"",modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):$o("",!0)]),_:1}),Et(u,{class:"px-2"},{default:sn(()=>[Et(y),n.params.cancelText?(or(),io(c,{key:0,variant:"outlined","data-test":m.dataTestCancel,onClick:m.cancel},{default:sn(()=>[Si(Ir(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):$o("",!0),Et(c,{variant:"flat",color:n.params.okClass,"data-test":m.dataTestOk,onClick:m.ok},{default:sn(()=>[Si(Ir(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const oM=es(eM,[["render",iM],["__scopeId","data-v-f10fb7f4"]]);class sM{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(oM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:f,validateText:m,cancelText:y,html:x}){return this.mount(),new Promise((h,g)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:f,validateText:m,cancelText:y,html:x},h,g)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:f,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:f="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:f,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:f="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:m,validateText:r,cancelText:f,html:!1})}}const aM={install(n,t){const e=new sM;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},lM={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
|
1493
|
+
--toast-bg-color:${Ba[this.toastNotification.level]};
|
1494
|
+
--toast-fg-color:${B$(this.toastNotification.level)};
|
1495
|
+
`},contentStyle:function(){return`
|
1496
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1497
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1498
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1499
|
+
`}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},cM={key:0,class:"text-subtitle-1 mr-1 notification-text"},uM={key:1,class:"text-body-2 notification-text"},hM={key:2,class:"text-body-2 notification-text"};function dM(n,t,e,r,f,m){const y=Qt("v-icon"),x=Qt("v-spacer"),h=Qt("v-btn"),g=Qt("v-sheet"),s=Qt("v-slide-y-transition");return or(),io(s,null,{default:sn(()=>[op(Et(g,{style:Ds(m.toastStyle),class:"toast-notification",onClick:m.expand},{default:sn(()=>[Et(y,{class:"mr-1 notification-text"},{default:sn(()=>[Si(Ir(m.toastNotificationIcon),1)]),_:1}),hr("div",{class:"toast-content",style:Ds(m.contentStyle)},[n.toastNotification.title?(or(),Hi("span",cM,Ir(n.toastNotification.title)+": ",1)):$o("",!0),n.toastNotification.body?(or(),Hi("span",uM,Ir(n.toastNotification.body),1)):$o("",!0),n.toastNotification.message?(or(),Hi("span",hM,Ir(n.toastNotification.message),1)):$o("",!0)],4),Et(x),Et(h,{variant:"text",onClick:sp(m.hide,["stop"]),class:"notification-text"},{default:sn(()=>t[0]||(t[0]=[Si(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ap,n.showToast]])]),_:1})}const pM=es(lM,[["render",dM],["__scopeId","data-v-b0459ba8"]]);class gM{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=Uc(pM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:f,level:m,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:g=!0}){this.mount(),h&&console.log(f?`${m.toUpperCase()} - ${f}`:`${m.toUpperCase()} - ${e}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:f,level:m}),this[t]({title:e,body:r,message:f,level:m,duration:y,type:x})}toast({title:t,body:e,message:r,level:f,duration:m,type:y}){this.$root.toast({title:t,body:e,message:r,level:f,type:y},m)}critical({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:f,duration:m,logToConsole:y,saveToHistory:x})}}const fM={install(n,t){const e=new gM(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},fy=100,my=dp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory:(n,t)=>{n.notifyHistory.length>=fy&&(n.notifyHistory.length=fy-1),n.notifyHistory.unshift(t)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,t)=>{Object.assign(n.namedWidgets,t)},clearNamedWidget:(n,t)=>{delete n.namedWidgets[t]}},modules:{}});function vy(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function mM(n,t){const e={};for(const r of t)Object.hasOwn(n,r)&&(e[r]=n[r]);return e}function yy(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const f in n)r[f]=n[f];for(const f in t){const m=n[f],y=t[f];if(vy(m)&&vy(y)){r[f]=yy(m,y,e);continue}if(e&&Array.isArray(m)&&Array.isArray(y)){r[f]=e(m,y);continue}r[f]=y}return r}function za(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(za.cache.has(n))return za.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return za.cache.set(n,t),t}za.cache=new Map;function vM(n){Jd(`Vuetify: ${n}`)}function wy(n,t){return e=>Object.keys(n).reduce((r,f)=>{const m=typeof n[f]=="object"&&n[f]!=null&&!Array.isArray(n[f])?n[f]:{type:n[f]};return e&&f in e?r[f]={...m,default:e[f]}:r[f]=m,t&&!r[f].source&&(r[f].source=t),r},{})}function by(n,t){const e=rp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function yM(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:by("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const ed=Symbol.for("vuetify:defaults");function xy(){const n=ep(ed);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function wM(n,t){var e,r;return typeof((e=n.props)==null?void 0:e[t])<"u"||typeof((r=n.props)==null?void 0:r[za(t)])<"u"}function bM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xy();const r=by("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const f=Hc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),m=new Proxy(n,{get(h,g){var s,c,u,a,o,l,d;const w=Reflect.get(h,g);return g==="class"||g==="style"?[(s=f.value)==null?void 0:s[g],w].filter(b=>b!=null):typeof g=="string"&&!wM(r.vnode,g)?((c=f.value)==null?void 0:c[g])!==void 0?(u=f.value)==null?void 0:u[g]:((o=(a=e.value)==null?void 0:a.global)==null?void 0:o[g])!==void 0?(d=(l=e.value)==null?void 0:l.global)==null?void 0:d[g]:w:w}}),y=tp();np(()=>{if(f.value){const h=Object.entries(f.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=yM(ed,r);ip(ed,Hc(()=>y.value?yy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:m,provideSubDefaults:x}}function ac(n){if(n._setup=n._setup??n.setup,!n.name)return vM("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=wy(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return mM(e,t)},n.props._as=String,n.setup=function(e,r){const f=xy();if(!f.value)return n._setup(e,r);const{props:m,provideSubDefaults:y}=bM(e,e._as??n.name,f),x=n._setup(m,r);return y(),x}}return n}function xM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?ac:Zd)(t)}const CM=[String,Function,Object,Array],lc=wy({icon:{type:CM},tag:{type:String,required:!0}},"icon");xM()({name:"VComponentIcon",props:lc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return Et(n.tag,null,{default:()=>{var f;return[n.icon?Et(r,null,null):(f=e.default)==null?void 0:f.call(e)]}})}}}),ac({name:"VSvgIcon",inheritAttrs:!1,props:lc(),setup(n,t){let{attrs:e}=t;return()=>Et(n.tag,lp(e,{style:null}),{default:()=>[Et("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?Et("path",{d:r[0],"fill-opacity":r[1]},null):Et("path",{d:r},null)):Et("path",{d:n.icon},null)])]})}}),ac({name:"VLigatureIcon",props:lc(),setup(n){return()=>Et(n.tag,null,{default:()=>[n.icon]})}});const kM=ac({name:"VClassIcon",props:lc(),setup(n){return()=>Et(n.tag,{class:n.icon},null)}}),_M={component:n=>Ns(kM,{...n,class:"mdi"})},td=pp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:J$}},icons:{defaultSet:"mdi",sets:{mdi:_M,...j$,...H$}}}),nd=f0({createApp:Uc,appOptions:{render(){return Ns(k0,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(Z$),n.use(my),n.use(td),n.use(aM),n.use(fM,{store:my})}}),vN=yr("e",nd.bootstrap),yN=yr("f",nd.mount),wN=yr("u",nd.unmount)}}});
|