openc3-cosmos-tool-dataextractor 6.9.1 → 6.9.2
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/dataextractor/ArrayWidget-C59wpWWk-5d6de568f002ea772832.js +2 -0
- data/tools/dataextractor/{ArrayplotWidget-CoRsUxHG-37dbda6c15b76d6820c8.js → ArrayplotWidget-tKqIV461-ba72286a428f0f68656b.js} +1 -1
- data/tools/dataextractor/{BarColumn-DHP-zQ4R-f6e8ee13a7f71df5ae84.js → BarColumn-CUO9ur6W-c439f74417c3c87091ba.js} +1 -1
- data/tools/dataextractor/{BlockWidget-BmHSFvOq-ddb186a1ac74766f8ca5.js → BlockWidget-BdlMR_1A-d484d91e5283308f215b.js} +2 -2
- data/tools/dataextractor/{ButtonWidget-C3ZWRjZZ-ae49fc6ea17ef9ca6f29.js → ButtonWidget-C2JVmh3p-49daa0253608de160e27.js} +2 -2
- data/tools/dataextractor/{CanvasWidget-CL-XzPF4-ffe28839d31d36cc4f14.js → CanvasWidget-BRbdw1fu-3625418ae440746302bf.js} +1 -1
- data/tools/dataextractor/{CanvasdotWidget-D8Y9DgVE-394088609ad7f6fe42d5.js → CanvasdotWidget-C8T_w03p-d2dac704c7379f25847d.js} +1 -1
- data/tools/dataextractor/{CanvasimageWidget-DHSGK_tD-5f73b3636ad464ff4799.js → CanvasimageWidget-C1w2vSsG-e887ee93bef8fcdd358c.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-Btt_fQfC-53d460f48bd42428f6c8.js → CanvasimagevalueWidget-BMv2SmEq-81450ac0ffaf42c8e1ec.js} +1 -1
- data/tools/dataextractor/{CanvaslabelWidget-BF_8RTjv-26c35b742563f001affb.js → CanvaslabelWidget-LEBZQ3DR-c0222a17e9d20a9869ab.js} +1 -1
- data/tools/dataextractor/{CanvaslabelvalueWidget-scbwaujI-3b051b3c58c0b2de1113.js → CanvaslabelvalueWidget-Q6UdEanF-7b08256544f077dcc079.js} +1 -1
- data/tools/dataextractor/{CanvaslineWidget-gRvm_-TT-c84aa59955a67f0eed66.js → CanvaslineWidget-BhvBCDoS-8916aed5a39175b96fd5.js} +1 -1
- data/tools/dataextractor/{CanvaslinevalueWidget-CljziRek-f4622e98b0aa822879a9.js → CanvaslinevalueWidget-EaASC9TU-94aa31bcbe6389f7767a.js} +1 -1
- data/tools/dataextractor/CheckbuttonWidget-C3bjQwrp-1b462ea14525223f22ce.js +1 -0
- data/tools/dataextractor/{ComboboxWidget-BLXNYFiY-715117b1f8883a04d531.js → ComboboxWidget-CmruSbJy-9fc0f473ca413085ce2b.js} +1 -1
- data/tools/dataextractor/DataExtractor-30e5cbdd510e7c3709d2.js +11 -0
- data/tools/dataextractor/{DateWidget-BTqLCtLS-7ab2669c7fd6c2770fb4.js → DateWidget-CcUxRlJ2-e03e17bd4513c9d9ad3b.js} +1 -1
- data/tools/dataextractor/{DetailsDialog-BNCS3QAe-b364efdedec868d757da.js → DetailsDialog-DxYZre4A-3b924a367056cd187570.js} +1 -1
- data/tools/dataextractor/{DynamicWidget-CfMtj7H8-8ae995962754d209c635.js → DynamicWidget-DHL7pbgW-d0c7568af71cd4f8584b.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-CLYx8qbg-d173dcc293dedc05a70e.js → FormatvalueWidget-Lk5K0wTL-64b964a951ec67019446.js} +1 -1
- data/tools/dataextractor/Graph-CjEE2WxX-ddf4d52321cec122cd8d.js +1 -0
- data/tools/dataextractor/{GraphWidget-Cb6Ozf54-17d1a7364b46f038b162.js → GraphWidget-BaO2FpKo-5c6a896976b383203748.js} +1 -1
- data/tools/dataextractor/{HorizontalWidget-AY2M01qP-56a9197e80d051905261.js → HorizontalWidget-D3Q5IUQg-4fb92ace64f29e5d46c7.js} +1 -1
- data/tools/dataextractor/{HorizontalboxWidget-2MEKvq_C-8cd5f70a90f502128f29.js → HorizontalboxWidget-D7bUUqfG-accea9c10a0ff8a7e5e2.js} +1 -1
- data/tools/dataextractor/HorizontallineWidget-DZcIetQh-61329664a4e219cc5a14.js +1 -0
- data/tools/dataextractor/{IframeWidget-UKKUl7k5-ef21b9d337b8e0e178d3.js → IframeWidget-Df7vTYZj-a05adca77b96d0544878.js} +1 -1
- data/tools/dataextractor/{ImageLoader-C-CIL4YD-2ff61b06d7e788a5d6e9.js → ImageLoader-DpKY46fX-9156ca4f5a3091e580f8.js} +1 -1
- data/tools/dataextractor/{ImageviewerWidget-DhuQH5Io-583b05beafe12b0c85fb.js → ImageviewerWidget-wHbhv08x-21b7be4e444b366e6a43.js} +1 -1
- data/tools/dataextractor/{LabelWidget-SO9zqcNN-57d4540bbe563fc95705.js → LabelWidget-BehwzOCR-bfd1094145ad2e941cba.js} +1 -1
- data/tools/dataextractor/LabelledWidget-DJKR8ikj-2288f4ddfdf435551821.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-D4Qzq894-587e9884e8b7f2879481.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-CwCOklZG-3015375c059d67c36c3b.js +1 -0
- data/tools/dataextractor/{LabelvalueWidget-B6BbNFnk-f1758e90e99be032daee.js → LabelvalueWidget-DW8Q7BTX-8c5527de3b3987d6be11.js} +1 -1
- data/tools/dataextractor/{LabelvaluedescWidget-CxfL-H9C-b56d844bc5a930adc477.js → LabelvaluedescWidget-DgNX7tK2-4b72ab8e1e5281266028.js} +1 -1
- data/tools/dataextractor/{LabelvaluelimitsbarWidget-BT5k9mHv-7fabd88c5636e03e2c9e.js → LabelvaluelimitsbarWidget-DAEBW0hU-b5d73d394034826076a3.js} +1 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-Dok-of6n-cb473c41d4dc7750b3a8.js +1 -0
- data/tools/dataextractor/{LabelvaluerangebarWidget-DexAc2UB-b0247295dbfc3735e01b.js → LabelvaluerangebarWidget-CQ0xCUFU-b5e1bf103748278c3cd4.js} +1 -1
- data/tools/dataextractor/{Layout-Dd6dRf3R-4c078484e8b78c21a662.js → Layout-CrCMUbtG-49165d0cda6c5388405c.js} +1 -1
- data/tools/dataextractor/{LedWidget-D1RwHb_V-97029e87504e88e78156.js → LedWidget-DzQNEDF7-c4549366ef070d44d1ff.js} +1 -1
- data/tools/dataextractor/{LimitsbarWidget-ClOmoV50-9b7e4abf13dfefe9ca6c.js → LimitsbarWidget-zkoAz9SQ-bdc703454411704f3be5.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-CBUoEYKp-3e82c6209b1b78d1f079.js → LimitscolorWidget-dez316Rk-945c0f00ee487c38e62b.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-hsHkmY-_-58b4ca918fee9286aaf5.js → LimitscolumnWidget-D-IPNDVg-e29e279cc8b816adce1b.js} +1 -1
- data/tools/dataextractor/{LinegraphWidget-CXrKtxOo-7de28dd980e3bb98bbd2.js → LinegraphWidget-CicnZgjt-803eef751bad0442139b.js} +1 -1
- data/tools/dataextractor/{MatrixbycolumnsWidget-CsogVU9c-8476c3c4a567e2ad4c2e.js → MatrixbycolumnsWidget-D3qN6GTr-ed7fdf901dfff9591f88.js} +1 -1
- data/tools/dataextractor/{ProgressbarWidget-CO6CEkxP-ad725af3ed0fdf4b6a9c.js → ProgressbarWidget-CLilcPBe-82a0ae263ae1375dc1e3.js} +1 -1
- data/tools/dataextractor/{RadiobuttonWidget-DrxUclws-3e5d30fb91aa0626f168.js → RadiobuttonWidget-Dsy01RJ--465784e9f79249ed0069.js} +1 -1
- data/tools/dataextractor/RadiogroupWidget-BNcVGNj1-cdf2ada37cdcc7a79215.js +1 -0
- data/tools/dataextractor/{RangebarWidget-5uQTfLMP-73132f41da15f1f42736.js → RangebarWidget-DhcoIdNf-a56903dc8d0ba1af9d4f.js} +1 -1
- data/tools/dataextractor/{RollupWidget-B0DCULnu-766ae12bf31f71f4c544.js → RollupWidget-BypuPvE7-7ba1388ef86970c54881.js} +1 -1
- data/tools/dataextractor/{ScrollwindowWidget-BOkZQgtf-53b3cc16c633bdd8cc2c.js → ScrollwindowWidget-DNQgHoNO-a04506ab18dd80c381c9.js} +1 -1
- data/tools/dataextractor/{SignalWidget-Cis0Xkea-6266ca1be6c849cff053.js → SignalWidget-BHwyScCG-9ecca9c9af90afef4709.js} +1 -1
- data/tools/dataextractor/{SpacerWidget-CLcqC2Qk-362cd28a38026c0a897b.js → SpacerWidget-CFxXXTm7-54a8981fbbb4471b3e22.js} +1 -1
- data/tools/dataextractor/{SparklineWidget-CTp83eZ--b75536cd26d9ce7f9d9c.js → SparklineWidget-C0lRpRrp-e7e4a8662887d78a9273.js} +1 -1
- data/tools/dataextractor/{TabbookWidget-uucd-zsX-b06178bae096db75f42d.js → TabbookWidget-CeeBOYOt-217021007f409319eb23.js} +1 -1
- data/tools/dataextractor/TargetPacketItemChooser-Brm7gfWf-c998e49d06551d34a3fc.js +1 -0
- data/tools/dataextractor/TextboxWidget-DoA2b3YU-c339e8d511d0927c73ed.js +1 -0
- data/tools/dataextractor/{TextfieldWidget--HTv9ddk-1f1dc802ed6ac8441482.js → TextfieldWidget-Dj4DV74o-17adc3864df6436a849a.js} +1 -1
- data/tools/dataextractor/{TimeWidget-CPNVZaUM-6dd0589448f799d07662.js → TimeWidget-DAQDQ0UM-7942c9489f0faa671c0b.js} +1 -1
- data/tools/dataextractor/TitleWidget-Ct0JlY9s-a92d140755d608d9d0fb.js +1 -0
- data/tools/dataextractor/{VWidget-DQGJRgAk-843e0899f25b4e7442c0.js → VWidget-A802LGvR-cfed4e302cf193c36926.js} +1 -1
- data/tools/dataextractor/{ValueWidget-Bk1RFjks-2dfb4a44fa1864d26299.js → ValueWidget-QaBYsiZz-76f64999ca7dad3de153.js} +1 -1
- data/tools/dataextractor/ValuelimitsbarWidget-CFToRM7w-96cd8b9c9028feb61344.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-BG7naMYx-6efe71cd444f3033cfae.js +1 -0
- data/tools/dataextractor/{ValuerangebarWidget-CcQw_XK9-f7ffbf71f1173555c4ee.js → ValuerangebarWidget-CChK2Lmm-de950ebfe0403e604bec.js} +1 -1
- data/tools/dataextractor/{VerticalWidget-CNtFQv3R-c7ca69c05f35444fea69.js → VerticalWidget-C8iN5DJK-79b0d446e5438d64309c.js} +1 -1
- data/tools/dataextractor/VerticalboxWidget-CXwUSWrP-32cc45316e2b9b5a8f8c.js +1 -0
- data/tools/dataextractor/{Widget-LsyjS7ZS-f7a1f9f75074520339b4.js → Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js} +1 -1
- data/tools/dataextractor/main-fcad85ae5c8885cd567f.js +1503 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +69 -69
- data/tools/dataextractor/ArrayWidget-DLfNWDzN-80160b04dad1acd96a9e.js +0 -2
- data/tools/dataextractor/CheckbuttonWidget-BOabI_jE-71993ccf1f3099817511.js +0 -1
- data/tools/dataextractor/DataExtractor-f69b291baedea29c72fe.js +0 -11
- data/tools/dataextractor/Graph-BliBYJxD-998f6520584cdabd6c7a.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-DgpOPA7q-9850eb82557684d4f3a5.js +0 -1
- data/tools/dataextractor/LabelledWidget-DWoM5AJ5-53d8728ade8967927368.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-D3vnkvQZ-c8cef7ab20fe48bf2159.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-DO0T-Jot-b8b137a13bcddf76e6a2.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DUbmxh4p-b64fc6e8d1333b14758c.js +0 -1
- data/tools/dataextractor/RadiogroupWidget-DN9C38cg-a7277022eb519b13723a.js +0 -1
- data/tools/dataextractor/TargetPacketItemChooser-CXpSx-eA-19a372c72b0389da3c94.js +0 -1
- data/tools/dataextractor/TextboxWidget-C2n38ti5-ff5f435e10306acc392d.js +0 -1
- data/tools/dataextractor/TitleWidget-Cp0cb6V8-cb7191705471e7242d17.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-C0HIBYh2-f0e61fb77d3e2e5c92c8.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-BTT90uyX-7fc5915193e316568f9f.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-Yxmz1SnU-c833f4ec79e2191db286.js +0 -1
- data/tools/dataextractor/main-a2da2a2583c99d96e5d3.js +0 -1503
|
@@ -0,0 +1,1503 @@
|
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(gr,it){"use strict";var xt,lo,En,Rt,ht,ri,mr,Ap,Sp,Xs,Ra,Sl,Ao,Rr,ii,$l,Qs,_l,Tl,$p,_p,Tp,hu,Mp,Ip,Ep,Rp,Lp,du,Op,Np,Dp,pu,Fp,Pp;return{setters:[Tt=>{xt=Tt.resolveComponent,lo=Tt.createBlock,En=Tt.openBlock,Rt=Tt.withCtx,ht=Tt.createVNode,ri=Tt.createElementBlock,mr=Tt.createElementVNode,Ap=Tt.useCssVars,Sp=Tt.defineAsyncComponent,Xs=Tt.h,Ra=Tt.normalizeStyle,Sl=Tt.Fragment,Ao=Tt.createCommentVNode,Rr=Tt.createTextVNode,ii=Tt.toDisplayString,$l=Tt.withKeys,Qs=Tt.withModifiers,_l=Tt.withDirectives,Tl=Tt.vShow,$p=Tt.defineComponent,_p=Tt.warn,Tp=Tt.inject,hu=Tt.computed,Mp=Tt.shallowRef,Ip=Tt.watchEffect,Ep=Tt.normalizeClass,Rp=Tt.getCurrentInstance,Lp=Tt.provide,du=Tt.createApp,Op=Tt.mergeProps},Tt=>{Np=Tt.createRouter,Dp=Tt.createWebHistory},Tt=>{pu=Tt.getMountedApps},Tt=>{Fp=Tt.createStore},Tt=>{Pp=Tt.createVuetify}],execute:function(){gr({$:qp,c:wM,f:Or,l:Sn,y:er,z:gd});var Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wp(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 gs(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(e),!0).forEach(function(r){sw(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Wp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function sw(n,t,e){return(t=function(r){var f=function(g,m){if(ms(g)!=="object"||g===null)return g;var w=g[Symbol.toPrimitive];if(w!==void 0){var h=w.call(g,m);if(ms(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}(r,"string");return ms(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 ms(n){return ms=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},ms(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),g=f.length,m=-1,w="",h=f.charCodeAt(0);++m<g;)(r=f.charCodeAt(m))!=0?w+=r>=1&&r<=31||r==127||m==0&&r>=48&&r<=57||m==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":m==0&&g==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(m):f.charAt(m):w+="�";return w};n.CSS||(n.CSS={}),n.CSS.escape=t})(Tt);var aw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function lw(n){if(ms(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=gs(gs({},aw),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(ms(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:cw.bind(null,t,e),mount:uw.bind(null,t,e),unmount:dw.bind(null,t,e),update:hw.bind(null,t,e)}}function cw(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function uw(n,t,e){var r={};return Promise.resolve().then(function(){return function(f,g){return typeof f.appOptions=="function"?f.appOptions(g):Promise.resolve(gs({},f.appOptions))}(n,e).then(function(f){var g;if(e.domElement&&!f.el&&(f.el=e.domElement),f.el)if(typeof f.el=="string"){if(!(g=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(g=f.el).id||(g.id="single-spa-application:".concat(e.name)),f.el="#".concat(CSS.escape(g.id));else{var m="single-spa-application:".concat(e.name);f.el="#".concat(CSS.escape(m)),(g=document.getElementById(m))||((g=document.createElement("div")).id=m,document.body.appendChild(g))}if(!n.replaceMode&&(f.el=f.el+" .single-spa-container",!g.querySelector(".single-spa-container"))){var w=document.createElement("div");w.className="single-spa-container",g.appendChild(w)}r.domEl=g,f.render||f.template||!n.rootComponent||(f.render=function(d){return d(n.rootComponent)}),f.data||(f.data={});var h=f.data;if(f.data=function(){return gs(gs({},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 hw(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],f=gs(gs({},n.appOptions.data||{}),e),g=r.root||r.vueInstance;for(var m in f)g[m]=f[m]})}function dw(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 pw=gr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,f]of t)e[r]=f;return e}),fw={};function gw(n,t){const e=xt("router-view"),r=xt("v-app");return En(),lo(r,{id:"innerapp"},{default:Rt(()=>[ht(e)]),_:1})}const mw=pw(fw,[["render",gw]]),KN="modulepreload",GN=function(n){return"/"+n},YN={},ot=function(t,e,r){let f=Promise.resolve();function g(m){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=m,window.dispatchEvent(w),!w.defaultPrevented)throw m}return f.then(m=>{for(const w of m||[])w.status==="rejected"&&g(w.reason);return t().catch(g)})},Bp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/dataextractor/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(Bp)},qo=gr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,f]of t)e[r]=f;return e}),vw="/icons/customIcons.svg",fu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return vw+"#"+this.icon}}},zp=()=>{Ap(n=>({v259824e2:n.color}))},Hp=fu.setup;fu.setup=Hp?(n,t)=>(zp(),Hp(n,t)):zp;const yw={class:"cosmos-custom-icon"},bw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},ww=["href"];function xw(n,t,e,r,f,g){return En(),ri("span",yw,[(En(),ri("svg",bw,[mr("use",{href:g.iconSrc},null,8,ww)]))])}const Cw=qo(fu,[["render",xw],["__scopeId","data-v-4b6f1199"]]),Ml=6e4,gu=36e5,kw=1e3,jp=Symbol.for("constructDateFrom");function er(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&jp in n?n[jp](t):n instanceof Date?new n.constructor(t):new Date(t)}function Sn(n,t){return er(t||n,n)}let Aw={};function Zs(){return Aw}function Ko(n,t){var e,r,f,g;const m=Zs(),w=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??m.weekStartsOn??((g=(f=m.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??0,h=Sn(n,t==null?void 0:t.in),d=h.getDay(),a=(d<w?7:0)+d-w;return h.setDate(h.getDate()-a),h.setHours(0,0,0,0),h}function Js(n,t){return Ko(n,{...t,weekStartsOn:1})}function Up(n,t){const e=Sn(n,void 0),r=e.getFullYear(),f=er(e,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const g=Js(f),m=er(e,0);m.setFullYear(r,0,4),m.setHours(0,0,0,0);const w=Js(m);return e.getTime()>=g.getTime()?r+1:e.getTime()>=w.getTime()?r:r-1}function Il(n){const t=Sn(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 Sw(n,...t){const e=er.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function Vp(n,t){const e=Sn(n,void 0);return e.setHours(0,0,0,0),e}function $w(n,t,e){const[r,f]=Sw(void 0,n,t),g=Vp(r),m=Vp(f),w=+g-Il(g),h=+m-Il(m);return Math.round((w-h)/864e5)}function _w(n,t){const e=Up(n),r=er(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Js(r)}function Tw(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function qp(n){return!(!Tw(n)&&typeof n!="number"||isNaN(+Sn(n)))}function Mw(n,t){const e=Sn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Iw={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"}},Ew=(n,t,e)=>{let r;const f=Iw[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 mu(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Rw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ow={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nw={date:mu({formats:Rw,defaultWidth:"full"}),time:mu({formats:Lw,defaultWidth:"full"}),dateTime:mu({formats:Ow,defaultWidth:"full"})},Dw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fw=(n,t,e,r)=>Dw[n];function La(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let f;if(r==="formatting"&&n.formattingValues){const m=n.defaultFormattingWidth||n.defaultWidth,w=e!=null&&e.width?String(e.width):m;f=n.formattingValues[w]||n.formattingValues[m]}else{const m=n.defaultWidth,w=e!=null&&e.width?String(e.width):n.defaultWidth;f=n.values[w]||n.values[m]}const g=n.argumentCallback?n.argumentCallback(t):t;return f[g]}}const Pw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ww={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Bw={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"]},zw={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"]},Hw={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"}},jw={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"}},Uw=(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"},Vw={ordinalNumber:Uw,era:La({values:Pw,defaultWidth:"wide"}),quarter:La({values:Ww,defaultWidth:"wide",argumentCallback:n=>n-1}),month:La({values:Bw,defaultWidth:"wide"}),day:La({values:zw,defaultWidth:"wide"}),dayPeriod:La({values:Hw,defaultWidth:"wide",formattingValues:jw,defaultFormattingWidth:"wide"})};function Oa(n){return(t,e={})=>{const r=e.width,f=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],g=t.match(f);if(!g)return null;const m=g[0],w=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(w)?Kw(w,l=>l.test(m)):qw(w,l=>l.test(m));let d;d=n.valueCallback?n.valueCallback(h):h,d=e.valueCallback?e.valueCallback(d):d;const a=t.slice(m.length);return{value:d,rest:a}}}function qw(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Kw(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function Gw(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const f=r[0],g=t.match(n.parsePattern);if(!g)return null;let m=n.valueCallback?n.valueCallback(g[0]):g[0];m=e.valueCallback?e.valueCallback(m):m;const w=t.slice(f.length);return{value:m,rest:w}}}const Yw=/^(\d+)(th|st|nd|rd)?/i,Xw=/\d+/i,Qw={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},Zw={any:[/^b/i,/^(a|c)/i]},Jw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ex={any:[/1/i,/2/i,/3/i,/4/i]},tx={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},nx={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]},rx={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},ix={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]},ox={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},sx={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}},ax={ordinalNumber:Gw({matchPattern:Yw,parsePattern:Xw,valueCallback:n=>parseInt(n,10)}),era:Oa({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),quarter:Oa({matchPatterns:Jw,defaultMatchWidth:"wide",parsePatterns:ex,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Oa({matchPatterns:tx,defaultMatchWidth:"wide",parsePatterns:nx,defaultParseWidth:"any"}),day:Oa({matchPatterns:rx,defaultMatchWidth:"wide",parsePatterns:ix,defaultParseWidth:"any"}),dayPeriod:Oa({matchPatterns:ox,defaultMatchWidth:"any",parsePatterns:sx,defaultParseWidth:"any"})},Kp={code:"en-US",formatDistance:Ew,formatLong:Nw,formatRelative:Fw,localize:Vw,match:ax,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lx(n,t){const e=Sn(n,void 0);return $w(e,Mw(e))+1}function Gp(n,t){const e=Sn(n,void 0),r=+Js(e)-+_w(e);return Math.round(r/6048e5)+1}function vu(n,t){var e,r,f,g;const m=Sn(n,t==null?void 0:t.in),w=m.getFullYear(),h=Zs(),d=(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??((g=(f=h.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,a=er((t==null?void 0:t.in)||n,0);a.setFullYear(w+1,0,d),a.setHours(0,0,0,0);const l=Ko(a,t),u=er((t==null?void 0:t.in)||n,0);u.setFullYear(w,0,d),u.setHours(0,0,0,0);const c=Ko(u,t);return+m>=+l?w+1:+m>=+c?w:w-1}function cx(n,t){var e,r,f,g;const m=Zs(),w=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??m.firstWeekContainsDate??((g=(f=m.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,h=vu(n,t),d=er((t==null?void 0:t.in)||n,0);return d.setFullYear(h,0,w),d.setHours(0,0,0,0),Ko(d,t)}function Yp(n,t){const e=Sn(n,t==null?void 0:t.in),r=+Ko(e,t)-+cx(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 Go={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)}},ea={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xp={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 Go.y(n,t)},Y:function(n,t,e,r){const f=vu(n,r),g=f>0?f:1-f;if(t==="YY"){const m=g%100;return an(m,2)}return t==="Yo"?e.ordinalNumber(g,{unit:"year"}):an(g,t.length)},R:function(n,t){const e=Up(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 Go.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=Yp(n,r);return t==="wo"?e.ordinalNumber(f,{unit:"week"}):an(f,t.length)},I:function(n,t,e){const r=Gp(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"}):Go.d(n,t)},D:function(n,t,e){const r=lx(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(),g=(f-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(g);case"ee":return an(g,2);case"eo":return e.ordinalNumber(g,{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(),g=(f-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(g);case"cc":return an(g,t.length);case"co":return e.ordinalNumber(g,{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=ea.noon:r===0?f=ea.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=ea.evening:r>=12?f=ea.afternoon:r>=4?f=ea.morning:f=ea.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 Go.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Go.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"}):Go.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Go.s(n,t)},S:function(n,t){return Go.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Zp(r);case"XXXX":case"XX":return vs(r);case"XXXXX":case"XXX":default:return vs(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Zp(r);case"xxxx":case"xx":return vs(r);case"xxxxx":case"xxx":default:return vs(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qp(r,":");case"OOOO":default:return"GMT"+vs(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qp(r,":");case"zzzz":default:return"GMT"+vs(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 Qp(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=Math.trunc(r/60),g=r%60;return g===0?e+String(f):e+String(f)+t+an(g,2)}function Zp(n,t){return n%60===0?(n>0?"-":"+")+an(Math.abs(n)/60,2):vs(n,t)}function vs(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=an(Math.trunc(r/60),2),g=an(r%60,2);return e+f+t+g}const Jp=(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"})}},ef=(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"})}},ux=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],f=e[2];if(!f)return Jp(n,t);let g;switch(r){case"P":g=t.dateTime({width:"short"});break;case"PP":g=t.dateTime({width:"medium"});break;case"PPP":g=t.dateTime({width:"long"});break;case"PPPP":default:g=t.dateTime({width:"full"});break}return g.replace("{{date}}",Jp(r,t)).replace("{{time}}",ef(f,t))},yu={p:ef,P:ux},hx=/^D+$/,dx=/^Y+$/,px=["D","DD","YY","YYYY"];function tf(n){return hx.test(n)}function nf(n){return dx.test(n)}function bu(n,t,e){const r=fx(n,t,e);if(console.warn(r),px.includes(n))throw new RangeError(r)}function fx(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 gx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vx=/^'([^]*?)'?$/,yx=/''/g,bx=/[a-zA-Z]/;function ys(n,t,e){var r,f,g,m,w,h,d,a;const l=Zs(),u=(e==null?void 0:e.locale)??l.locale??Kp,c=(e==null?void 0:e.firstWeekContainsDate)??((f=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??l.firstWeekContainsDate??((m=(g=l.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((h=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:h.weekStartsOn)??l.weekStartsOn??((a=(d=l.locale)==null?void 0:d.options)==null?void 0:a.weekStartsOn)??0,s=Sn(n,e==null?void 0:e.in);if(!qp(s))throw new RangeError("Invalid time value");let p=t.match(mx).map(x=>{const R=x[0];if(R==="p"||R==="P"){const $=yu[R];return $(x,u.formatLong)}return x}).join("").match(gx).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const R=x[0];if(R==="'")return{isToken:!1,value:wx(x)};if(Xp[R])return{isToken:!0,value:x};if(R.match(bx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");return{isToken:!1,value:x}});u.localize.preprocessor&&(p=u.localize.preprocessor(s,p));const b={firstWeekContainsDate:c,weekStartsOn:i,locale:u};return p.map(x=>{if(!x.isToken)return x.value;const R=x.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&nf(R)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&tf(R))&&bu(R,t,String(n));const $=Xp[R[0]];return $(s,R,u.localize,b)}).join("")}function wx(n){const t=n.match(vx);return t?t[1].replace(yx,"'"):n}var Yo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function El(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rf={exports:{}},of;function xx(){return of||(of=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(a,l,u){if(typeof a!="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=l),f.modules[a]||(f.payloads[a]=u,f.modules[a]=null)};f.modules={},f.payloads={};var g=function(a,l,u){if(typeof l=="string"){var c=h(a,l);if(c!=null)return u&&u(),c}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var i=[],s=0,p=l.length;s<p;++s){var b=h(a,l[s]);if(b==null&&m.original)return;i.push(b)}return u&&u.apply(null,i)||!0}},m=function(a,l){var u=g("",a,l);return u==null&&m.original?m.original.apply(this,arguments):u},w=function(a,l){if(l.indexOf("!")!==-1){var u=l.split("!");return w(a,u[0])+"!"+w(a,u[1])}if(l.charAt(0)=="."){var c=a.split("/").slice(0,-1).join("/");for(l=c+"/"+l;l.indexOf(".")!==-1&&i!=l;){var i=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},h=function(a,l){l=w(a,l);var u=f.modules[l];if(!u){if(u=f.payloads[l],typeof u=="function"){var c={},i={id:l,uri:"",exports:c,packaged:!0},s=function(b,x){return g(l,b,x)},p=u(s,c,i);c=p||i.exports,f.modules[l]=c,delete f.payloads[l]}u=f.modules[l]=c||u}return u};function d(a){var l=r;r[a]||(r[a]={}),l=r[a],(!l.define||!l.define.packaged)&&(f.original=l.define,l.define=f,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(m.original=l.require,l.require=m,l.require.packaged=!0)}d(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,f){function g(m,w,h){Object.defineProperty(m,w,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||g(String.prototype,"startsWith",function(m,w){return w=w||0,this.lastIndexOf(m,w)===w}),String.prototype.endsWith||g(String.prototype,"endsWith",function(m,w){var h=this;(w===void 0||w>h.length)&&(w=h.length),w-=m.length;var d=h.indexOf(m,w);return d!==-1&&d===w}),String.prototype.repeat||g(String.prototype,"repeat",function(m){for(var w="",h=this;m>0;)m&1&&(w+=h),(m>>=1)&&(h+=h);return w}),String.prototype.includes||g(String.prototype,"includes",function(m,w){return this.indexOf(m,w)!=-1}),Object.assign||(Object.assign=function(m){if(m==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(m),h=1;h<arguments.length;h++){var d=arguments[h];d!=null&&Object.keys(d).forEach(function(a){w[a]=d[a]})}return w}),Object.values||(Object.values=function(m){return Object.keys(m).map(function(w){return m[w]})}),Array.prototype.find||g(Array.prototype,"find",function(m){for(var w=this.length,h=arguments[1],d=0;d<w;d++){var a=this[d];if(m.call(h,a,d,this))return a}}),Array.prototype.findIndex||g(Array.prototype,"findIndex",function(m){for(var w=this.length,h=arguments[1],d=0;d<w;d++){var a=this[d];if(m.call(h,a,d,this))return d}}),Array.prototype.includes||g(Array.prototype,"includes",function(m,w){return this.indexOf(m,w)!=-1}),Array.prototype.fill||g(Array.prototype,"fill",function(m){for(var w=this,h=w.length>>>0,d=arguments[1],a=d>>0,l=a<0?Math.max(h+a,0):Math.min(a,h),u=arguments[2],c=u===void 0?h:u>>0,i=c<0?Math.max(h+c,0):Math.min(c,h);l<i;)w[l]=m,l++;return w}),Array.of||g(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 g(m){if(typeof m!="object"||!m)return m;var w;if(Array.isArray(m)){w=[];for(var h=0;h<m.length;h++)w[h]=g(m[h]);return w}if(Object.prototype.toString.call(m)!=="[object Object]")return m;w={};for(var h in m)w[h]=g(m[h]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,f){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,h){for(var d="";h>0;)h&1&&(d+=w),(h>>=1)&&(w+=w);return d};var g=/^\s\s*/,m=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(g,"")},r.stringTrimRight=function(w){return w.replace(m,"")},r.copyObject=function(w){var h={};for(var d in w)h[d]=w[d];return h},r.copyArray=function(w){for(var h=[],d=0,a=w.length;d<a;d++)w[d]&&typeof w[d]=="object"?h[d]=this.copyObject(w[d]):h[d]=w[d];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var h={},d=0;d<w.length;d++)h[w[d]]=1;return h},r.createMap=function(w){var h=Object.create(null);for(var d in w)h[d]=w[d];return h},r.arrayRemove=function(w,h){for(var d=0;d<=w.length;d++)h===w[d]&&w.splice(d,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(w,h){var d=[];return w.replace(h,function(a){d.push({offset:arguments[arguments.length-2],length:a.length})}),d},r.deferredCall=function(w){var h=null,d=function(){h=null,w()},a=function(l){return a.cancel(),h=setTimeout(d,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),w(),a},a.cancel=function(){return clearTimeout(h),h=null,a},a.isPending=function(){return h},a},r.delayedCall=function(w,h){var d=null,a=function(){d=null,w()},l=function(u){d==null&&(d=setTimeout(a,u||h))};return l.delay=function(u){d&&clearTimeout(d),d=setTimeout(a,u||h)},l.schedule=l,l.call=function(){this.cancel(),w()},l.cancel=function(){d&&clearTimeout(d),d=null},l.isPending=function(){return d},l},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,h,d){return d&&w.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 g=typeof navigator=="object"?navigator:{},m=(/mac|win|linux/i.exec(g.platform)||["other"])[0].toLowerCase(),w=g.userAgent||"",h=g.appName||"";r.isWin=m=="win",r.isMac=m=="mac",r.isLinux=m=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!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 g=e("./useragent"),m="http://www.w3.org/1999/xhtml";r.buildDom=function u(c,i,s){if(typeof c=="string"&&c){var p=document.createTextNode(c);return i&&i.appendChild(p),p}if(!Array.isArray(c))return c&&c.appendChild&&i&&i.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var b=[],x=0;x<c.length;x++){var R=u(c[x],i,s);R&&b.push(R)}return b}var $=document.createElement(c[0]),k=c[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<c.length;x++)u(c[x],$,s);return C==2&&Object.keys(k).forEach(function(L){var D=k[L];L==="class"?$.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||L=="value"||L[0]=="$"?$[L]=D:L==="ref"?s&&(s[D]=$):L==="style"?typeof D=="string"&&($.style.cssText=D):D!=null&&$.setAttribute(L,D)}),i&&i.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,c){return document.createElementNS?document.createElementNS(c||m,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,c){var i=c?c.ownerDocument:document;return i.createTextNode(u)},r.createFragment=function(u){var c=u?u.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(u,c){var i=(u.className+"").split(/\s+/g);return i.indexOf(c)!==-1},r.addCssClass=function(u,c){r.hasCssClass(u,c)||(u.className+=" "+c)},r.removeCssClass=function(u,c){for(var i=u.className.split(/\s+/g);;){var s=i.indexOf(c);if(s==-1)break;i.splice(s,1)}u.className=i.join(" ")},r.toggleCssClass=function(u,c){for(var i=u.className.split(/\s+/g),s=!0;;){var p=i.indexOf(c);if(p==-1)break;s=!1,i.splice(p,1)}return s&&i.push(c),u.className=i.join(" "),s},r.setCssClass=function(u,c,i){i?r.addCssClass(u,c):r.removeCssClass(u,c)},r.hasCssString=function(u,c){var i=0,s;if(c=c||document,s=c.querySelectorAll("style")){for(;i<s.length;)if(s[i++].id===u)return!0}},r.removeElementById=function(u,c){c=c||document,c.getElementById(u)&&c.getElementById(u).remove()};var w,h=[];r.useStrictCSP=function(u){w=u,u==!1?d():h||(h=[])};function d(){var u=h;h=null,u&&u.forEach(function(c){a(c[0],c[1])})}function a(u,c,i){if(!(typeof document>"u")){if(h){if(i)d();else if(i===!1)return h.push([u,c])}if(!w){var s=i;!i||!i.getRootNode?s=document:(s=i.getRootNode(),(!s||s==i)&&(s=document));var p=s.ownerDocument||s;if(c&&r.hasCssString(c,s))return null;c&&(u+=`
|
|
2
|
+
/*# sourceURL=ace/css/`+c+" */");var b=r.createElement("style");b.appendChild(p.createTextNode(u)),c&&(b.id=c),s==p&&(s=r.getDocumentHead(p)),s.insertBefore(b,s.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(u,c){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(c))},r.$fixPositionBug=function(u){var c=u.getBoundingClientRect();if(u.style.left){var i=parseFloat(u.style.left),s=+c.left;Math.abs(i-s)>1&&(u.style.left=2*i-s+"px")}if(u.style.right){var i=parseFloat(u.style.right),s=window.innerWidth-c.right;Math.abs(i-s)>1&&(u.style.right=2*i-s+"px")}if(u.style.top){var i=parseFloat(u.style.top),s=+c.top;Math.abs(i-s)>1&&(u.style.top=2*i-s+"px")}if(u.style.bottom){var i=parseFloat(u.style.bottom),s=window.innerHeight-c.bottom;Math.abs(i-s)>1&&(u.style.bottom=2*i-s+"px")}},r.scrollbarWidth=function(u){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var i=r.createElement("ace_outer"),s=i.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",i.appendChild(c);var p=u&&u.documentElement||document&&document.documentElement;if(!p)return 0;p.appendChild(i);var b=c.offsetWidth;s.overflow="scroll";var x=c.offsetWidth;return b===x&&(x=i.clientWidth),p.removeChild(i),b-x},r.computedStyle=function(u,c){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,c,i){u[c]!==i&&(u[c]=i)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=g.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,g.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,c,i){u.style.transform="translate("+Math.round(c)+"px, "+Math.round(i)+"px)"}:r.translate=function(u,c,i){u.style.top=Math.round(i)+"px",u.style.left=Math.round(c)+"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 g=e("./dom");r.get=function(m,w){var h=new XMLHttpRequest;h.open("GET",m,!0),h.onreadystatechange=function(){h.readyState===4&&w(h.responseText)},h.send(null)},r.loadScript=function(m,w){var h=g.getDocumentHead(),d=document.createElement("script");d.src=m,h.appendChild(d),d.onload=d.onreadystatechange=function(a,l){(l||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,l||w())}},r.qualifyURL=function(m){var w=document.createElement("a");return w.href=m,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,f){r.inherits=function(g,m){g.super_=m,g.prototype=Object.create(m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(g,m){for(var w in m)g[w]=m[w];return g},r.implement=function(g,m){r.mixin(g,m)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,f){var g={},m=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(h,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[h]||[],l=this._defaultHandlers[h];if(!(!a.length&&!l)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=h),d.stopPropagation||(d.stopPropagation=m),d.preventDefault||(d.preventDefault=w),a=a.slice();for(var u=0;u<a.length&&(a[u](d,this),!d.propagationStopped);u++);if(l&&!d.defaultPrevented)return l(d,this)}},g._signal=function(h,d){var a=(this._eventRegistry||{})[h];if(a){a=a.slice();for(var l=0;l<a.length;l++)a[l](d,this)}},g.once=function(h,d){var a=this;if(this.on(h,function l(){a.off(h,l),d.apply(null,arguments)}),!d)return new Promise(function(l){d=l})},g.setDefaultHandler=function(h,d){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[h]){var l=a[h],u=a._disabled_[h];u||(a._disabled_[h]=u=[]),u.push(l);var c=u.indexOf(d);c!=-1&&u.splice(c,1)}a[h]=d},g.removeDefaultHandler=function(h,d){var a=this._defaultHandlers;if(a){var l=a._disabled_[h];if(a[h]==d)l&&this.setDefaultHandler(h,l.pop());else if(l){var u=l.indexOf(d);u!=-1&&l.splice(u,1)}}},g.on=g.addEventListener=function(h,d,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[h];return l||(l=this._eventRegistry[h]=[]),l.indexOf(d)==-1&&l[a?"unshift":"push"](d),d},g.off=g.removeListener=g.removeEventListener=function(h,d){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];if(a){var l=a.indexOf(d);l!==-1&&a.splice(l,1)}},g.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=g}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,f){r.reportError=function(g,m){var w=new Error(g);w.data=m,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,f){var g={"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=g}),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 g=e("./oop"),m=e("./event_emitter").EventEmitter,w=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,d={setOptions:function(i){Object.keys(i).forEach(function(s){this.setOption(s,i[s])},this)},getOptions:function(i){var s={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var p=this.$options;i=Object.keys(p).filter(function(b){return!p[b].hidden})}return i.forEach(function(b){s[b]=this.getOption(b)},this),s},setOption:function(i,s){if(this["$"+i]!==s){var p=this.$options[i];if(!p)return a('misspelled option "'+i+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(i,s);p.handlesSet||(this["$"+i]=s),p&&p.set&&p.set.call(this,s)}},getOption:function(i){var s=this.$options[i];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(i):s&&s.get?s.get.call(this):this["$"+i]:a('misspelled option "'+i+'"')}};function a(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,u,c=function(){function i(){this.$defaultOptions={},l=h,u="dollarSigns"}return i.prototype.defineOptions=function(s,p,b){return s.$options||(this.$defaultOptions[p]=s.$options={}),Object.keys(b).forEach(function(x){var R=b[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),s.$options[R.name]=R,"initialValue"in R&&(s["$"+R.name]=R.initialValue)}),g.implement(s,d),this},i.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(p){var b=s.$options[p];"value"in b&&s.setOption(p,b.value)})},i.prototype.setDefaultValue=function(s,p,b){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][p])break;if(!this.$defaultOptions[s][p])return!1}var x=this.$defaultOptions[s]||(this.$defaultOptions[s]={});x[p]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,p,b):x[p].value=b)},i.prototype.setDefaultValues=function(s,p){Object.keys(p).forEach(function(b){this.setDefaultValue(s,b,p[b])},this)},i.prototype.setMessages=function(s,p){l=s,p&&p.placeholders&&(u=p.placeholders)},i.prototype.nls=function(s,p,b){l[s]||(a("No message found for the key '"+s+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+p+"'."),l[p]||a("No message found for the default string '"+p+"' in the provided messages. Falling back to the default English message."));var x=l[s]||l[p]||p;return b&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,$){return $=="$"?"$":b[$]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,$){return b[$]}))),x},i}();c.prototype.warn=a,c.prototype.reportError=w,g.implement(c.prototype,m),r.AppConfig=c}),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 g=e("../lib/dom");g.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 g=e("./lib/lang"),m=e("./lib/net"),w=e("./lib/dom"),h=e("./lib/app_config").AppConfig;f.exports=r=new h;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!d.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return d[c]},r.set=function(c,i){if(d.hasOwnProperty(c))d[c]=i;else if(this.setDefaultValue("",c,i)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&w.useStrictCSP(i)},r.all=function(){return g.copyObject(d)},r.$modes={},r.moduleUrl=function(c,i){if(d.$moduleUrls[c])return d.$moduleUrls[c];var s=c.split("/");i=i||s[s.length-2]||"";var p=i=="snippets"?"/":"-",b=s[s.length-1];if(i=="worker"&&p=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");b=b.replace(x,"")}(!b||b==i)&&s.length>1&&(b=s[s.length-2]);var R=d[i+"Path"];return R==null?R=d.basePath:p=="/"&&(i=p=""),R&&R.slice(-1)!="/"&&(R+="/"),R+i+p+b+this.get("suffix")},r.setModuleUrl=function(c,i){return d.$moduleUrls[c]=i};var a=function(c,i){if(c==="ace/theme/textmate"||c==="./theme/textmate")return i(null,e("./theme/textmate"));if(l)return l(c,i);console.error("loader is not configured")},l;r.setLoader=function(c){l=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,i){var s;if(Array.isArray(c))var p=c[0],b=c[1];else if(typeof c=="string")var b=c;var x=function(R){if(R&&!r.$loading[b])return i&&i(R);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(i),!(r.$loading[b].length>1)){var $=function(){a(b,function(k,C){C&&(r.$loaded[b]=C),r._emit("load.module",{name:b,module:C});var L=r.$loading[b];r.$loading[b]=null,L.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return $();m.loadScript(r.moduleUrl(b,p),$),u()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(R){R.default?x(R.default):x(R)});else{try{s=this.$require(b)}catch{}x(s||r.$loaded[b])}},r.$require=function(c){if(typeof f.require=="function"){var i="require";return f[i](c)}},r.setModuleLoader=function(c,i){r.dynamicModules[c]=i};var u=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$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.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,f){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(d,a){e([d],function(l){a(null,l)})});var m=function(){return this||typeof window<"u"&&window}();f.exports=function(d){g.init=w,g.$require=e,d.require=e},w(!0);function w(d){if(!(!m||!m.document)){g.set("packaged",d||e.packaged||f.packaged||m.define&&(void 0).packaged);var a={},l="",u=document.currentScript||document._currentScript,c=u&&u.ownerDocument||document;u&&u.src&&(l=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=c.getElementsByTagName("script"),s=0;s<i.length;s++){var p=i[s],b=p.src||p.getAttribute("src");if(b){for(var x=p.attributes,R=0,$=x.length;R<$;R++){var k=x[R];k.name.indexOf("data-ace-")===0&&(a[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var L in a)typeof a[L]<"u"&&g.set(L,a[L])}}function h(d){return d.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,f){var g=function(){function m(w,h,d,a){this.start={row:w,column:h},this.end={row:d,column:a}}return m.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},m.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},m.prototype.contains=function(w,h){return this.compare(w,h)==0},m.prototype.compareRange=function(w){var h,d=w.end,a=w.start;return h=this.compare(d.row,d.column),h==1?(h=this.compare(a.row,a.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(a.row,a.column),h==-1?-1:h==1?42:0)},m.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},m.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},m.prototype.intersects=function(w){var h=this.compareRange(w);return h==-1||h==0||h==1},m.prototype.isEnd=function(w,h){return this.end.row==w&&this.end.column==h},m.prototype.isStart=function(w,h){return this.start.row==w&&this.start.column==h},m.prototype.setStart=function(w,h){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=h)},m.prototype.setEnd=function(w,h){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=h)},m.prototype.inside=function(w,h){return this.compare(w,h)==0?!(this.isEnd(w,h)||this.isStart(w,h)):!1},m.prototype.insideStart=function(w,h){return this.compare(w,h)==0?!this.isEnd(w,h):!1},m.prototype.insideEnd=function(w,h){return this.compare(w,h)==0?!this.isStart(w,h):!1},m.prototype.compare=function(w,h){return!this.isMultiLine()&&w===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?h>=this.start.column?0:-1:this.end.row===w?h<=this.end.column?0:1:0},m.prototype.compareStart=function(w,h){return this.start.row==w&&this.start.column==h?-1:this.compare(w,h)},m.prototype.compareEnd=function(w,h){return this.end.row==w&&this.end.column==h?1:this.compare(w,h)},m.prototype.compareInside=function(w,h){return this.end.row==w&&this.end.column==h?1:this.start.row==w&&this.start.column==h?-1:this.compare(w,h)},m.prototype.clipRows=function(w,h){if(this.end.row>h)var d={row:h+1,column:0};else if(this.end.row<w)var d={row:w,column:0};if(this.start.row>h)var a={row:h+1,column:0};else if(this.start.row<w)var a={row:w,column:0};return m.fromPoints(a||this.start,d||this.end)},m.prototype.extend=function(w,h){var d=this.compare(w,h);if(d==0)return this;if(d==-1)var a={row:w,column:h};else var l={row:w,column:h};return m.fromPoints(a||this.start,l||this.end)},m.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},m.prototype.isMultiLine=function(){return this.start.row!==this.end.row},m.prototype.clone=function(){return m.fromPoints(this.start,this.end)},m.prototype.collapseRows=function(){return this.end.column==0?new m(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new m(this.start.row,0,this.end.row,0)},m.prototype.toScreenRange=function(w){var h=w.documentToScreenPosition(this.start),d=w.documentToScreenPosition(this.end);return new m(h.row,h.column,d.row,d.column)},m.prototype.moveBy=function(w,h){this.start.row+=w,this.start.column+=h,this.end.row+=w,this.end.column+=h},m}();g.fromPoints=function(m,w){return new g(m.row,m.column,w.row,w.column)},g.comparePoints=function(m,w){return m.row-w.row||m.column-w.column},r.Range=g}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,f){for(var g=e("./oop"),m={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={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++)w["Digit"+h]=48+h,w["Numpad"+h]=96+h,m.PRINTABLE_KEYS[48+h]=""+h,m.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var d=String.fromCharCode(h+32);w["Key"+d.toUpperCase()]=h,m.PRINTABLE_KEYS[h]=d}for(var h=1;h<13;h++)w["F"+h]=111+h,m.FUNCTION_KEYS[111+h]="F"+h;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var l in a)w[l]=w[l+"Left"]=w[l+"Right"]=a[l];r.$codeToKeyCode=w,m.PRINTABLE_KEYS[173]="-";for(var u in m.FUNCTION_KEYS){var c=m.FUNCTION_KEYS[u].toLowerCase();m[c]=parseInt(u,10)}for(var u in m.PRINTABLE_KEYS){var c=m.PRINTABLE_KEYS[u].toLowerCase();m[c]=parseInt(u,10)}g.mixin(m,m.MODIFIER_KEYS),g.mixin(m,m.PRINTABLE_KEYS),g.mixin(m,m.FUNCTION_KEYS),m.enter=m.return,m.escape=m.esc,m.del=m.delete,function(){for(var i=["cmd","ctrl","alt","shift"],s=Math.pow(2,i.length);s--;)m.KEY_MODS[s]=i.filter(function(p){return s&m.KEY_MODS[p]}).join("-")+"-"}(),m.KEY_MODS[0]="",m.KEY_MODS[-1]="input-",g.mixin(r,m),r.default=r,r.keyCodeToString=function(i){var s=m[i];return typeof s!="string"&&(s=String.fromCharCode(i)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,f){var g=e("./keys"),m=e("./useragent"),w=null,h=0,d;function a(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function l(){return d==null&&a(),d}function u(R,$,k){this.elem=R,this.type=$,this.callback=k}u.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(R,$,k,C){R.addEventListener($,k,l()),C&&C.$toDestroy.push(new u(R,$,k))},i=r.removeListener=function(R,$,k){R.removeEventListener($,k,l())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||m.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,$,k){var C=R&&R.ownerDocument||document;function L(D){$&&$(D),k&&k(D),i(C,"mousemove",$),i(C,"mouseup",L),i(C,"dragstart",L)}return c(C,"mousemove",$),c(C,"mouseup",L),c(C,"dragstart",L),L},r.addMouseWheelListener=function(R,$,k){c(R,"wheel",function(C){var L=.15,D=C.deltaX||0,E=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*L,C.wheelY=E*L;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=D*I,C.wheelY=E*I;break;case C.DOM_DELTA_PAGE:var z=150;C.wheelX=D*z,C.wheelY=E*z;break}$(C)},k)},r.addMultiMouseDownListener=function(R,$,k,C,L){var D=0,E,I,z,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(_){if(r.getButton(_)!==0?D=0:_.detail>1?(D++,D>4&&(D=1)):D=1,m.isIE){var A=Math.abs(_.clientX-E)>5||Math.abs(_.clientY-I)>5;(!z||A)&&(D=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},$[D-1]||600),D==1&&(E=_.clientX,I=_.clientY)}if(_._clicks=D,k[C]("mousedown",_),D>4)D=0;else if(D>1)return k[C](P[D],_)}Array.isArray(R)||(R=[R]),R.forEach(function(_){c(_,"mousedown",O,L)})};function s(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return g.KEY_MODS[s(R)]};function p(R,$,k){var C=s($);if(!k&&$.code&&(k=g.$codeToKeyCode[$.code]||k),!m.isMac&&w){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(k===18||k===17){var L=$.location;if(k===17&&L===1)w[k]==1&&(h=$.timeStamp);else if(k===18&&C===3&&L===2){var D=$.timeStamp-h;D<50&&(w.altGr=!0)}}}if(k in g.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&$.location===3&&(R($,C,-k),$.defaultPrevented))){if(m.isChromeOS&&C&8){if(R($,C,k),$.defaultPrevented)return;C&=-9}return!C&&!(k in g.FUNCTION_KEYS)&&!(k in g.PRINTABLE_KEYS)?!1:R($,C,k)}}r.addCommandKeyListener=function(R,$,k){var C=null;c(R,"keydown",function(L){w[L.keyCode]=(w[L.keyCode]||0)+1;var D=p($,L,L.keyCode);return C=L.defaultPrevented,D},k),c(R,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},k),c(R,"keyup",function(L){w[L.keyCode]=null},k),w||(b(),c(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!m.isOldIE){var x=1;r.nextTick=function(R,$){$=$||window;var k="zero-timeout-message-"+x++,C=function(L){L.data==k&&(r.stopPropagation(L),i($,"message",C),R())};c($,"message",C),$.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,$){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):R()},$)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||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(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,f){var g;f.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,f){var g=e("../lib/event"),m=e("../config").nls,w=e("../lib/useragent"),h=e("../lib/dom"),d=e("../lib/lang"),a=e("../clipboard"),l=w.isChrome<18,u=w.isIE,c=w.isChrome>63,i=400,s=e("../lib/keys"),p=s.KEY_MODS,b=w.isIOS,x=b?/\s/:/\n/,R=w.isMobile,$=function(){function k(C,L){var D=this;this.host=L,this.text=h.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),g.addListener(this.text,"blur",function(E){D.ignoreFocusEvents||(L.onBlur(E),D.$isFocused=!1)},L),g.addListener(this.text,"focus",function(E){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}L.onFocus(E),w.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},L),this.$focusScroll=!1,L.on("beforeEndOperation",function(){var E=L.curOp,I=E&&E.command&&E.command.name;if(I!="insertstring"){var z=I&&(E.docChanged||E.selectionChanged);D.inComposition&&z&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),L.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=b?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&L.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,g.addCommandKeyListener(this.text,function(E,I,z){if(!D.inComposition)return L.onCommandKey(E,I,z)},L),g.addListener(this.text,"select",this.onSelect.bind(this),L),g.addListener(this.text,"input",this.onInput.bind(this),L),g.addListener(this.text,"cut",this.onCut.bind(this),L),g.addListener(this.text,"copy",this.onCopy.bind(this),L),g.addListener(this.text,"paste",this.onPaste.bind(this),L),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&g.addListener(C,"keydown",function(E){if(!(w.isMac&&!E.metaKey||!E.ctrlKey))switch(E.keyCode){case 67:D.onCopy(E);break;case 86:D.onPaste(E);break;case 88:D.onCut(E);break}},L),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),g.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),L),g.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),L),g.addListener(this.text,"keyup",this.onKeyup.bind(this),L),g.addListener(this.text,"keydown",this.syncComposition.bind(this),L),g.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),L),this.closeTimeout,g.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),L),g.addListener(this.text,"mousedown",function(E){E.preventDefault(),D.onContextMenuClose()},L),g.addListener(L.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),L),g.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),L),b&&this.addIosSelectionHandler(C,L,this.text)}return k.prototype.addIosSelectionHandler=function(C,L,D){var E=this,I=null,z=!1;D.addEventListener("keydown",function(O){I&&clearTimeout(I),z=!0},!0),D.addEventListener("keyup",function(O){I=setTimeout(function(){z=!1},100)},!0);var P=function(O){if(document.activeElement===D&&!(z||E.inComposition||L.$mouseHandler.isMousePressed)&&!E.copied){var _=D.selectionStart,A=D.selectionEnd,N=null,B=0;if(_==0?N=s.up:_==1?N=s.home:A>E.lastSelectionEnd&&E.lastValue[A]==`
|
|
167
|
+
`?N=s.end:_<E.lastSelectionStart&&E.lastValue[_-1]==" "?(N=s.left,B=p.option):_<E.lastSelectionStart||_==E.lastSelectionStart&&E.lastSelectionEnd!=E.lastSelectionStart&&_==A?N=s.left:A>E.lastSelectionEnd&&E.lastValue.slice(0,A).split(`
|
|
168
|
+
`).length>2?N=s.down:A>E.lastSelectionEnd&&E.lastValue[A-1]==" "?(N=s.right,B=p.option):(A>E.lastSelectionEnd||A==E.lastSelectionEnd&&E.lastSelectionEnd!=E.lastSelectionStart&&_==A)&&(N=s.right),_!==A&&(B|=p.shift),N){var U=L.onCommandKey({},B,N);if(!U&&L.commands){N=s.keyCodeToString(N);var K=L.commands.findKeyCommand(B,N);K&&L.execCommand(K)}E.lastSelectionStart=_,E.lastSelectionEnd=A,E.resetSelection("")}}};document.addEventListener("selectionchange",P),L.on("destroy",function(){document.removeEventListener("selectionchange",P)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var L=this.host.getSelectionRange();L.end.row=L.start.row,L.end.column=L.start.column,this.inComposition.markerRange=L,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var L=this.handleClipboardData(C);a.pasteCancelled()||(typeof L=="string"?(L&&this.host.onPaste(L,C),w.isIE&&setTimeout(this.resetSelection),g.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,L){var D=this,E=this.host.getCopyText();if(!E)return g.preventDefault(C);this.handleClipboardData(C,E)?(b&&(this.resetSelection(E),this.copied=E,setTimeout(function(){D.copied=!1},10)),L?this.host.onCut():this.host.onCopy(),g.preventDefault(C)):(this.copied=!0,this.text.value=E,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),L?D.host.onCut():D.host.onCopy()}))},k.prototype.handleClipboardData=function(C,L,D){var E=C.clipboardData||window.clipboardData;if(!(!E||l)){var I=u||D?"Text":"text/plain";try{return L?E.setData(I,L)!==!1:E.getData(I)}catch(z){if(!D)return this.handleClipboardData(z,L,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var L=this.text.value,D=this.sendText(L,!0);(L.length>i+100||x.test(D)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,L){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var D=this.text.selectionStart,E=this.text.selectionEnd,I=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,P=C,O=C.length-D,_=C.length-E,A=0;I>0&&this.lastValue[A]==C[A];)A++,I--;for(P=P.slice(A),A=1;z>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,z--;O-=A-1,_-=A-1;var N=P.length-A+1;if(N<0&&(I=-N,N=0),P=P.slice(0,N),!L&&!P&&!O&&!I&&!z&&!_)return"";this.sendingText=!0;var B=!1;return w.isAndroid&&P==". "&&(P=" ",B=!0),P&&!I&&!z&&!O&&!_||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:I,extendRight:z,restoreStart:O,restoreEnd:_}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=E,this.lastRestoreEnd=_,B?`
|
|
169
|
+
`:P},k.prototype.onSelect=function(C){var L=this;if(!this.inComposition){var D=function(E){return E.selectionStart===0&&E.selectionEnd>=L.lastValue.length&&E.value===L.lastValue&&L.lastValue&&E.selectionEnd!==L.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var L=`
|
|
170
|
+
ab`+C+`cde fg
|
|
171
|
+
`;L!=this.text.value&&(this.text.value=this.lastValue=L);var D=4,E=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=E)&&this.text.setSelectionRange(D,E),this.lastSelectionStart=D,this.lastSelectionEnd=E}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var L=0,D=0,E="",I=function(K,Z){for(var J=Z,he=1;he<=K-C.rowStart&&he<2*C.numberOfExtraLines+1;he++)J+=C.host.session.getLine(K-he).length+1;return J};if(this.host.session){var z=this.host.selection,P=z.getRange(),O=z.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var _=[],A=this.rowStart;A<=this.rowEnd;A++)_.push(this.host.session.getLine(A));if(E=_.join(`
|
|
172
|
+
`),L=I(P.start.row,P.start.column),D=I(P.end.row,P.end.column),P.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);L=P.start.row<this.rowStart-1?0:L,D+=N.length+1,E=N+`
|
|
173
|
+
`+E}else if(P.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);D=P.end.row>this.rowEnd+1?B.length:P.end.column,D+=E.length+1,E=E+`
|
|
174
|
+
`+B}else R&&O>0&&(E=`
|
|
175
|
+
`+E,D+=1,L+=1);E.length>i&&(L<i&&D<i?E=E.slice(0,i):(E=`
|
|
176
|
+
`,L==D?L=D=0:(L=0,D=1)));var U=E+`
|
|
177
|
+
|
|
178
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,D),this.lastSelectionStart=L,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var L=this.host.session.selection.cursor.row;C+=m("text-input.aria-label","Cursor at row $0",[L+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",m("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||c||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var L=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var E=[];if(D)for(var I=this.text.parentElement;I&&I.nodeType==1;)E.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),D&&E.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=L)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,L){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var E=this.host.container.getBoundingClientRect(),I=h.computedStyle(this.host.container),z=E.top+(parseInt(I.borderTopWidth)||0),P=E.left+(parseInt(I.borderLeftWidth)||0),O=E.bottom-z-this.text.clientHeight-2,_=function(A){h.translate(D.text,A.clientX-P-2,Math.min(A.clientY-z-2,O))};_(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&g.capture(this.host.container,_,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k}();r.TextInput=$,r.$setUserAgentForTests=function(k,C){R=k,b=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,f){var g=e("../lib/useragent"),m=0,w=550,h=function(){function l(u){u.$clickSelection=null;var c=u.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(s){u[s]=this[s]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return l.prototype.onMouseDown=function(u){var c=u.inSelection(),i=u.getDocumentPosition();this.mousedownEvent=u;var s=this.editor,p=u.getButton();if(p!==0){var b=s.getSelectionRange(),x=b.isEmpty();(x||p==1)&&s.selection.moveToPosition(i),p==2&&(s.textInput.onContextMenu(u.domEvent),g.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(i,u.domEvent._clicks>1),u.preventDefault()},l.prototype.startSelect=function(u,c){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(u):c||i.selection.moveToPosition(u),c||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var u,c=this.editor,i=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i);if(s==-1)u=this.$clickSelection.end;else if(s==1)u=this.$clickSelection.start;else{var p=a(this.$clickSelection,i,c.session);i=p.cursor,u=p.anchor}c.selection.setSelectionAnchor(u.row,u.column)}c.selection.selectToPosition(i),c.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(u){var c,i=this.editor,s=i.renderer.screenToTextCoordinates(this.x,this.y),p=i.selection[u](s.row,s.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(p.start),x=this.$clickSelection.comparePoint(p.end);if(b==-1&&x<=0)c=this.$clickSelection.end,(p.end.row!=s.row||p.end.column!=s.column)&&(s=p.start);else if(x==1&&b>=0)c=this.$clickSelection.start,(p.start.row!=s.row||p.start.column!=s.column)&&(s=p.end);else if(b==-1&&x==1)s=p.end,c=p.start;else{var R=a(this.$clickSelection,s,i.session);s=R.cursor,c=R.anchor}i.selection.setSelectionAnchor(c.row,c.column)}i.selection.selectToPosition(s),i.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var u=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(u>m||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(u){var c=u.getDocumentPosition(),i=this.editor,s=i.session,p=s.getBracketRange(c);p?(p.isEmpty()&&(p.start.column--,p.end.column++),this.setState("select")):(p=i.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=p,this.select()},l.prototype.onTripleClick=function(u){var c=u.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var s=i.getSelectionRange();s.isMultiLine()&&s.contains(c.row,c.column)?(this.$clickSelection=i.selection.getLineRange(s.start.row),this.$clickSelection.end=i.selection.getLineRange(s.end.row).end):this.$clickSelection=i.selection.getLineRange(c.row),this.select()},l.prototype.onQuadClick=function(u){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,s=u.domEvent.timeStamp,p=s-i.t,b=p?u.wheelX/p:i.vx,x=p?u.wheelY/p:i.vy;p<w&&(b=(b+i.vx)/2,x=(x+i.vy)/2);var R=Math.abs(b/x),$=!1;if(R>=1&&c.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),R<=1&&c.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)i.allowed=s;else if(s-i.allowed<w){var k=Math.abs(b)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);k?($=!0,i.allowed=s):i.allowed=0}if(i.t=s,i.vx=b,i.vy=x,$)return c.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},l}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function d(l,u,c,i){return Math.sqrt(Math.pow(c-l,2)+Math.pow(i-u,2))}function a(l,u,c){if(l.start.row==l.end.row)var i=2*u.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var i=3*u.column-2*c.getLine(l.start.row).length;else var i=2*u.row-l.start.row-l.end.row;return i<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,f){var g=e("../lib/event"),m=e("../lib/useragent"),w=function(){function h(d,a){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=a,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){g.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 d=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(d,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-l},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,a=d.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},h.prototype.getButton=function(){return g.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return m.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,f){r.preventParentScroll=function(g){g.stopPropagation();var m=g.currentTarget,w=m.scrollHeight>m.clientHeight;w||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,f){var g=this&&this.__extends||function(){var s=function(p,b){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(x[$]=R[$])},s(p,b)};return function(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");s(p,b);function x(){this.constructor=p}p.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}}(),m=this&&this.__values||function(s){var p=typeof Symbol=="function"&&Symbol.iterator,b=p&&s[p],x=0;if(b)return b.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&x>=s.length&&(s=void 0),{value:s&&s[x++],done:!s}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/dom");e("./lib/event");var h=e("./range").Range,d=e("./lib/scroll").preventParentScroll,a="ace_tooltip",l=function(){function s(p){this.isOpen=!1,this.$element=null,this.$parentNode=p}return s.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(p){this.getElement().textContent=p},s.prototype.setHtml=function(p){this.getElement().innerHTML=p},s.prototype.setPosition=function(p,b){this.getElement().style.left=p+"px",this.getElement().style.top=b+"px"},s.prototype.setClassName=function(p){w.addCssClass(this.getElement(),p)},s.prototype.setTheme=function(p){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),p.isDark&&w.addCssClass(this.getElement(),"ace_dark"),p.cssClass&&w.addCssClass(this.getElement(),p.cssClass),this.theme={isDark:p.isDark,cssClass:p.cssClass}},s.prototype.show=function(p,b,x){p!=null&&this.setText(p),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s}(),u=function(){function s(){this.popups=[]}return s.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups()},s.prototype.removePopup=function(p){var b=this.popups.indexOf(p);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},s.prototype.updatePopups=function(){var p,b,x,R;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var k=m(this.popups),C=k.next();!C.done;C=k.next()){var L=C.value,D=!0;try{for(var E=(x=void 0,m($)),I=E.next();!I.done;I=E.next()){var z=I.value;if(this.doPopupsOverlap(z,L)){D=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(R=E.return)&&R.call(E)}finally{if(x)throw x.error}}D?$.push(L):L.hide()}}catch(P){p={error:P}}finally{try{C&&!C.done&&(b=k.return)&&b.call(k)}finally{if(p)throw p.error}}},s.prototype.doPopupsOverlap=function(p,b){var x=p.getElement().getBoundingClientRect(),R=b.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},s}(),c=new u;r.popupManager=c,r.Tooltip=l;var i=function(s){g(p,s);function p(b){b===void 0&&(b=document.body);var x=s.call(this,b)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var R=x.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",x.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(x)),R.addEventListener("wheel",d),x}return p.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},p.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},p.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},p.prototype.isOutsideOfText=function(b){var x=b.editor,R=b.getDocumentPosition(),$=x.session.getLine(R.row);if(R.column==$.length){var k=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},p.prototype.setDataProvider=function(b){this.$gatherData=b},p.prototype.showForRange=function(b,x,R,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=b.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=h.fromPoints(x.start,x.end);var C=k.textToScreenCoordinates(x.start.row,x.start.column),L=k.scroller.getBoundingClientRect();C.pageX<L.left&&(C.pageX=L.left);var D=this.getElement();D.innerHTML="",D.appendChild(R),D.style.maxHeight="",D.style.display="block",this.$setPosition(b,C,!0,x),w.$fixPositionBug(D)}},p.prototype.$setPosition=function(b,x,R,$){var k=10;R&&this.addMarker($,b.session);var C=b.renderer,L=this.getElement(),D=L.offsetHeight,E=L.offsetWidth,I=x.pageY,z=x.pageX,P=window.innerHeight-I-C.lineHeight,O=this.$shouldPlaceAbove(D,I,P-k);L.style.maxHeight=(O?I:P)-k+"px",L.style.top=O?"":I+C.lineHeight+"px",L.style.bottom=O?window.innerHeight-I+"px":"",L.style.left=Math.min(z,window.innerWidth-E-k)+"px"},p.prototype.$shouldPlaceAbove=function(b,x,R){return!(x-b<0&&x<R)},p.prototype.addMarker=function(b,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(b,"ace_highlight-marker","text")},p.prototype.hide=function(b){b&&this.$fromKeyboard&&b.type=="keydown"&&b.code=="Escape"||!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},p.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},p}(l);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,f){var g=this&&this.__extends||function(){var i=function(s,p){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(b[R]=x[R])},i(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");i(s,p);function b(){this.constructor=s}s.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}}(),m=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,p=s&&i[s],b=0;if(p)return p.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&b>=i.length&&(i=void 0),{value:i&&i[b++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("../lib/dom"),h=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,a=e("../config").nls,l=e("../range").Range;function u(i){var s=i.editor,p=s.renderer.$gutterLayer;i.$tooltip=new c(s),i.$tooltip.addToEditor(s),i.$tooltip.setDataProvider(function(b,x){var R=b.getDocumentPosition().row;i.$tooltip.showTooltip(R)}),i.editor.setDefaultHandler("guttermousedown",function(b){if(!(!s.isFocused()||b.getButton()!=0)){var x=p.getRegion(b);if(x!="foldWidgets"){var R=b.getDocumentPosition().row,$=s.session.selection;if(b.getShiftKey())$.selectTo(R,0);else{if(b.domEvent.detail==2)return s.selectAll(),b.preventDefault();i.$clickSelection=s.selection.getLineRange(R)}return i.setState("selectByLines"),i.captureMouse(b),b.preventDefault()}}})}r.GutterHandler=u;var c=function(i){g(s,i);function s(p){var b=i.call(this,p.container)||this;b.id="gt"+ ++s.$uid,b.editor=p,b.visibleTooltipRow;var x=b.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",b.id),x.style.pointerEvents="auto",b.idleTime=50,b.onDomMouseMove=b.onDomMouseMove.bind(b),b.onDomMouseOut=b.onDomMouseOut.bind(b),b.setClassName("ace_gutter-tooltip"),b}return s.prototype.onDomMouseMove=function(p){var b=new h(p,this.editor);this.onMouseMove(b,this.editor)},s.prototype.onDomMouseOut=function(p){var b=new h(p,this.editor);this.onMouseOut(b)},s.prototype.addToEditor=function(p){var b=p.renderer.$gutter;b.addEventListener("mousemove",this.onDomMouseMove),b.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,p)},s.prototype.removeFromEditor=function(p){var b=p.renderer.$gutter;b.removeEventListener("mousemove",this.onDomMouseMove),b.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,p)},s.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(p){var b,x=this.editor.renderer.$gutterLayer,R=x.$annotations[p],$;R?$={displayText:Array.from(R.displayText),type:Array.from(R.type)}:$={displayText:[],type:[]};var k=x.session.getFoldLine(p);if(k&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},D,E=p+1;E<=k.end.row;E++)if(x.$annotations[E])for(var I=0;I<x.$annotations[E].text.length;I++){var z=x.$annotations[E].type[I];C[z].push(x.$annotations[E].text[I]),(!D||L[z]<L[D])&&(D=z)}if(["error","security","warning"].includes(D)){var P="".concat(s.annotationsToSummaryString(C)," in folded code.");$.displayText.push(P),$.type.push(D+"_fold")}}if($.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},_=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<$.displayText.length;E++){var A=w.createElement("span"),N=w.createElement("span");(b=N.classList).add.apply(b,["ace_".concat($.type[E]),_]),N.setAttribute("aria-label","".concat(s.annotationLabels[$.type[E].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(w.createTextNode(" ")),A.appendChild(N),A.appendChild(w.createTextNode($.displayText[E])),A.appendChild(w.createElement("br")),O[$.type[E].replace("_fold","")].push(A)}var B=w.createElement("span");O.error.forEach(function(Z){return B.appendChild(Z)}),O.security.forEach(function(Z){return B.appendChild(Z)}),O.warning.forEach(function(Z){return B.appendChild(Z)}),O.info.forEach(function(Z){return B.appendChild(Z)}),O.hint.forEach(function(Z){return B.appendChild(Z)}),B.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(p);U&&U.setAttribute("aria-describedby",this.id);var K=l.fromPoints({row:p,column:0},{row:p,column:0});this.showForRange(this.editor,K,B),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},s.prototype.$setPosition=function(p,b,x,R){var $=this.$findCellByRow(R.start.row);if($){var k=$&&$.element,C=k&&k.querySelector(".ace_gutter_annotation");if(C){var L=C.getBoundingClientRect();if(L){var D={pageX:L.right,pageY:L.top};return i.prototype.$setPosition.call(this,p,D,!1,R)}}}},s.prototype.$shouldPlaceAbove=function(p,b,x){return x<p},s.prototype.$findLinkedAnnotationNode=function(p){var b=this.$findCellByRow(p);if(b){var x=b.element;if(x.childNodes.length>2)return x.childNodes[2]}},s.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===p})},s.prototype.hide=function(p){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var b=this.$findLinkedAnnotationNode(this.visibleTooltipRow);b&&b.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),i.prototype.hide.call(this,p)}},s.annotationsToSummaryString=function(p){var b,x,R=[],$=["error","security","warning","info","hint"];try{for(var k=m($),C=k.next();!C.done;C=k.next()){var L=C.value;if(p[L].length){var D=p[L].length===1?s.annotationLabels[L].singular:s.annotationLabels[L].plural;R.push("".concat(p[L].length," ").concat(D))}}}catch(E){b={error:E}}finally{try{C&&!C.done&&(x=k.return)&&x.call(k)}finally{if(b)throw b.error}}return R.join(", ")},s.prototype.isOutsideOfText=function(p){var b=p.editor,x=b.renderer.$gutter.getBoundingClientRect();return!(p.clientX>=x.left&&p.clientX<=x.right&&p.clientY>=x.top&&p.clientY<=x.bottom)},s}(d);c.$uid=0,r.GutterTooltip=c}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,f){var g=e("../lib/dom"),m=e("../lib/event"),w=e("../lib/useragent"),h=200,d=200,a=5;function l(c){var i=c.editor,s=g.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ";var p=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];p.forEach(function(ne){c[ne]=this[ne]},this),i.on("mousedown",this.onMouseDown.bind(c));var b=i.container,x,R,$,k,C,L,D=0,E,I,z,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!b.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ne)},0),ne.preventDefault()}C=i.getSelectionRange();var se=ne.dataTransfer;se.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(s),se.setDragImage&&se.setDragImage(s,0,0),setTimeout(function(){i.container.removeChild(s)}),se.clearData(),se.setData("Text",i.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(b.draggable=!1,I=!1,this.setState(null),!i.getReadOnly()){var le=ne.dataTransfer.dropEffect;!E&&le=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return R=ne.clientX,$=ne.clientY,x||B(),D++,ne.dataTransfer.dropEffect=E=he(ne),m.preventDefault(ne)},this.onDragOver=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return R=ne.clientX,$=ne.clientY,x||(B(),D++),K!==null&&(K=null),ne.dataTransfer.dropEffect=E=he(ne),m.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&x)return U(),E=null,m.preventDefault(ne)},this.onDrop=function(ne){if(L){var le=ne.dataTransfer;if(I)switch(E){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=i.moveText(C,L);break;case"copy":C=i.moveText(C,L,!0);break}else{var se=le.getData("Text");C={start:L,end:i.session.insert(L,se)},i.focus(),E=null}return U(),m.preventDefault(ne)}},m.addListener(b,"dragstart",this.onDragStart.bind(c),i),m.addListener(b,"dragend",this.onDragEnd.bind(c),i),m.addListener(b,"dragenter",this.onDragEnter.bind(c),i),m.addListener(b,"dragover",this.onDragOver.bind(c),i),m.addListener(b,"dragleave",this.onDragLeave.bind(c),i),m.addListener(b,"drop",this.onDrop.bind(c),i);function _(ne,le){var se=Date.now(),de=!le||ne.row!=le.row,me=!le||ne.column!=le.column;if(!P||de||me)i.moveCursorToPosition(ne),P=se,O={x:R,y:$};else{var $e=u(O.x,O.y,R,$);$e>a?P=null:se-P>=d&&(i.renderer.scrollCursorIntoView(),P=null)}}function A(ne,le){var se=Date.now(),de=i.renderer.layerConfig.lineHeight,me=i.renderer.layerConfig.characterWidth,$e=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:R-$e.left,right:$e.right-R},y:{top:$-$e.top,bottom:$e.bottom-$}},Me=Math.min(Te.x.left,Te.x.right),Xe=Math.min(Te.y.top,Te.y.bottom),Ke={row:ne.row,column:ne.column};Me/me<=2&&(Ke.column+=Te.x.left<Te.x.right?-3:2),Xe/de<=1&&(Ke.row+=Te.y.top<Te.y.bottom?-1:1);var at=ne.row!=Ke.row,et=ne.column!=Ke.column,lt=!le||ne.row!=le.row;at||et&&!lt?z?se-z>=h&&i.renderer.scrollCursorIntoView(Ke):z=se:z=null}function N(){var ne=L;L=i.renderer.screenToTextCoordinates(R,$),_(L,ne),A(L,ne)}function B(){C=i.selection.toOrientedRange(),x=i.session.addMarker(C,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),N(),k=setInterval(N,20),D=0,m.addListener(document,"mousemove",Z)}function U(){clearInterval(k),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!I&&i.$resetCursorStyle(),C=null,L=null,D=0,z=null,P=null,m.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function J(ne){var le=ne.types;return!le||Array.prototype.some.call(le,function(se){return se=="text/plain"||se=="Text"})}function he(ne){var le=["copy","copymove","all","uninitialized"],se=["move","copymove","linkmove","all","uninitialized"],de=w.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return de&&le.indexOf(me)>=0?$e="copy":se.indexOf(me)>=0?$e="move":le.indexOf(me)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,i=c.container;i.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var s=w.isWin?"default":"move";c.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(c){var i=this.editor.container;if(w.isIE&&this.state=="dragReady"){var s=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&i.dragDrop()}if(this.state==="dragWait"){var s=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var i=this.editor,s=c.inSelection(),p=c.getButton(),b=c.domEvent.detail||1;if(b===1&&p===0&&s){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var R=i.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(l.prototype);function u(c,i,s,p){return Math.sqrt(Math.pow(s-c,2)+Math.pow(p-i,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,f){var g=e("./mouse_event").MouseEvent,m=e("../lib/event"),w=e("../lib/dom");r.addTouchListeners=function(h,d){var a="scroll",l,u,c,i,s,p,b=0,x,R=0,$=0,k=0,C,L;function D(){var _=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=d.getCopyText(),Z=d.session.getUndoManager().hasUndo();L.replaceChild(w.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"],_&&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"]),L.firstChild)},B=function(K){return d.commands.canExecute(K,d)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?_.readText().then(function(J){d.execCommand(Z,J)}):Z&&((Z=="cut"||Z=="copy")&&(_?_.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Z)),L.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&d.focus()};L=w.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){a="menu",K.stopPropagation(),K.preventDefault(),d.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function E(){if(!d.getOption("enableMobileMenu")){L&&I();return}L||D();var _=d.selection.cursor,A=d.renderer.textToScreenCoordinates(_.row,_.column),N=d.renderer.textToScreenCoordinates(0,0).pageX,B=d.renderer.scrollLeft,U=d.container.getBoundingClientRect();L.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=N+B-U.left+"px"),L.style.display="",L.firstChild.style.display="none",d.on("input",I)}function I(_){L&&(L.style.display="none"),d.off("input",I)}function z(){s=null,clearTimeout(s);var _=d.selection.getRange(),A=_.contains(x.row,x.column);(_.isEmpty()||!A)&&(d.selection.moveToPosition(x),d.selection.selectWord()),a="wait",E()}function P(){s=null,clearTimeout(s),d.selection.moveToPosition(x);var _=R>=2?d.selection.getLineRange(x.row):d.session.getBracketRange(x);_&&!_.isEmpty()?d.selection.setRange(_):d.selection.selectWord(),a="wait"}m.addListener(h,"contextmenu",function(_){if(C){var A=d.textInput.getElement();A.focus()}},d),m.addListener(h,"touchstart",function(_){var A=_.touches;if(s||A.length>1){clearTimeout(s),s=null,c=-1,a="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var N=d.renderer.layerConfig.lineHeight,B=d.renderer.layerConfig.lineHeight,U=_.timeStamp;i=U;var K=A[0],Z=K.clientX,J=K.clientY;Math.abs(l-Z)+Math.abs(u-J)>N&&(c=-1),l=_.clientX=Z,u=_.clientY=J,$=k=0;var he=new g(_,d);if(x=he.getDocumentPosition(),U-c<500&&A.length==1&&!b)R++,_.preventDefault(),_.button=0,P();else{R=0;var ne=d.selection.cursor,le=d.selection.isEmpty()?ne:d.selection.anchor,se=d.renderer.$cursorLayer.getPixelPosition(ne,!0),de=d.renderer.$cursorLayer.getPixelPosition(le,!0),me=d.renderer.scroller.getBoundingClientRect(),$e=d.renderer.layerConfig.offset,Te=d.renderer.scrollLeft,Me=function(at,et){return at=at/B,et=et/N-.75,at*at+et*et};if(_.clientX<me.left){a="zoom";return}var Xe=Me(_.clientX-me.left-se.left+Te,_.clientY-me.top-se.top+$e),Ke=Me(_.clientX-me.left-de.left+Te,_.clientY-me.top-de.top+$e);Xe<3.5&&Ke<3.5&&(a=Xe>Ke?"cursor":"anchor"),Ke<3.5?a="anchor":Xe<3.5?a="cursor":a="scroll",s=setTimeout(z,450)}c=U},d),m.addListener(h,"touchend",function(_){C=d.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),a=="zoom"?(a="",b=0):s?(d.selection.moveToPosition(x),b=0,E()):a=="scroll"?(O(),I()):E(),clearTimeout(s),s=null},d),m.addListener(h,"touchmove",function(_){s&&(clearTimeout(s),s=null);var A=_.touches;if(!(A.length>1||a=="zoom")){var N=A[0],B=l-N.clientX,U=u-N.clientY;if(a=="wait")if(B*B+U*U>4)a="cursor";else return _.preventDefault();l=N.clientX,u=N.clientY,_.clientX=N.clientX,_.clientY=N.clientY;var K=_.timeStamp,Z=K-i;if(i=K,a=="scroll"){var J=new g(_,d);J.speed=1,J.wheelX=B,J.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&($=B/Z,k=U/Z),d._emit("mousewheel",J),J.propagationStopped||($=k=0)}else{var he=new g(_,d),ne=he.getDocumentPosition();a=="cursor"?d.selection.moveCursorToPosition(ne):a=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},d);function O(){b+=60,p=setInterval(function(){b--<=0&&(clearInterval(p),p=null),Math.abs($)<.01&&($=0),Math.abs(k)<.01&&(k=0),b<20&&($=.9*$),b<20&&(k=.9*k);var _=d.session.getScrollTop();d.renderer.scrollBy(10*$,10*k),_==d.session.getScrollTop()&&(b=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 g=e("../lib/event"),m=e("../lib/useragent"),w=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,u=e("../config"),c=function(){function i(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var p=this;this.editor=s,new w(this),new h(this),new a(this);var b=function($){var k=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());k&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus()})},x=s.renderer.getMouseEventTarget();g.addListener(x,"click",this.onMouseEvent.bind(this,"click"),s),g.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),g.addMultiMouseDownListener([x,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),g.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),l(s.container,s);var R=s.renderer.$gutter;g.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),g.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),s),g.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),g.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),g.addListener(x,"mousedown",b,s),g.addListener(R,"mousedown",b,s),m.isIE&&s.renderer.scrollBarV&&(g.addListener(s.renderer.scrollBarV.element,"mousedown",b,s),g.addListener(s.renderer.scrollBarH.element,"mousedown",b,s)),s.on("mousemove",function($){if(!(p.state||p.$dragDelay||!p.$dragEnabled)){var k=s.renderer.screenToTextCoordinates($.x,$.y),C=s.session.selection.getRange(),L=s.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},s)}return i.prototype.onMouseEvent=function(s,p){this.editor.session&&this.editor._emit(s,new d(p,this.editor))},i.prototype.onMouseMove=function(s,p){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(s,new d(p,this.editor))},i.prototype.onMouseWheel=function(s,p){var b=new d(p,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=p.wheelX,b.wheelY=p.wheelY,this.editor._emit(s,b)},i.prototype.setState=function(s){this.state=s},i.prototype.captureMouse=function(s,p){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var b=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,$=!0,k=function(I){if(I){if(m.isWebKit&&!I.which&&R.releaseMouse)return R.releaseMouse();R.x=I.clientX,R.y=I.clientY,p&&p(I),R.mouseEvent=new d(I,R.editor),R.$mouseMoved=!0}},C=function(I){b.off("beforeEndOperation",E),$=!1,b.session&&L(),R[R.state+"End"]&&R[R.state+"End"](I),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,I&&R.onMouseEvent("mouseup",I),b.endOperation()},L=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},D=function(){$&&(L(),g.nextFrame(D))};if(m.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){C(s)});var E=function(I){R.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};b.on("beforeEndOperation",E),b.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=k,R.releaseMouse=g.capture(this.editor.container,k,C),D()},i.prototype.cancelContextMenu=function(){var s=(function(p){p&&p.domEvent&&p.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),p&&p.domEvent&&g.stopEvent(p.domEvent))}).bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i}();c.prototype.releaseMouse=null,u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:m.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,f){var g=e("../lib/dom"),m=function(){function w(h){h.on("click",function(d){var a=d.getDocumentPosition(),l=h.session,u=l.getFoldAt(a.row,a.column,1);u&&(d.getAccelKey()?l.removeFold(u):l.expandFold(u),d.stop());var c=d.domEvent&&d.domEvent.target;c&&g.hasCssClass(c,"ace_inline_button")&&g.hasCssClass(c,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(d){var a=h.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[l]&&h.session.onFoldWidgetClick(l,d),h.isFocused()||h.focus(),d.stop()}}),h.on("gutterdblclick",function(d){var a=h.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,u=h.session,c=u.getParentFoldRangeData(l,!0),i=c.range||c.firstRange;if(i){l=i.start.row;var s=u.getFoldAt(l,u.getLine(l).length,1);s?u.removeFold(s):(u.addFold("...",i),h.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}d.stop()}})}return w}();r.FoldHandler=m}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,f){var g=e("../lib/keys"),m=e("../lib/event"),w=function(){function h(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return h.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},h.prototype.setKeyboardHandler=function(d){var a=this.$handlers;if(a[a.length-1]!=d){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(d,1)}},h.prototype.addKeyboardHandler=function(d,a){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var l=this.$handlers.indexOf(d);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(d):this.$handlers.splice(a,0,d),l==-1&&d.attach&&d.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(d){var a=this.$handlers.indexOf(d);return a==-1?!1:(this.$handlers.splice(a,1),d.detach&&d.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var d=this.$data,a=d.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,d)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(d,a,l,u){for(var c,i=!1,s=this.$editor.commands,p=this.$handlers.length;p--&&(c=this.$handlers[p].handleKeyboard(this.$data,d,a,l,u),!(!(!c||!c.command)&&(c.command=="null"?i=!0:i=s.exec(c.command,this.$editor,c.args,u),i&&u&&d!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&m.stopEvent(u),i))););return!i&&d==-1&&(c={command:"insertstring"},i=s.exec("insertstring",this.$editor,a)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),i},h.prototype.onCommandKey=function(d,a,l){var u=g.keyCodeToString(l);return this.$callKeyboardHandlers(a,u,l,d)},h.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},h}();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,f){var g=0,m=0,w=!1,h=!1,d=!1,a=[[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]],l=[[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,c=1,i=0,s=1,p=2,b=3,x=4,R=5,$=6,k=7,C=8,L=9,D=10,E=11,I=12,z=13,P=14,O=15,_=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,R,$,C,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,$,C,x,x,E,E,E,x,x,x,x,x,D,L,D,L,L,p,p,p,p,p,p,p,p,p,p,L,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,N,N,N,N,N,N,R,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,L,x,E,E,E,E,x,x,x,x,i,x,x,N,x,x,E,E,p,p,x,i,x,x,x,p,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,i,s,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,R,z,P,O,_,A,L,E,E,E,E,E,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function K(ne,le,se,de){var me=g?l:a,$e=null,Te=null,Me=null,Xe=0,Ke=null,at=null,et=-1,lt=null,Yt=null,xn=[];if(!de)for(lt=0,de=[];lt<se;lt++)de[lt]=he(ne[lt]);for(m=g,w=!1,h=!1,d=!1,Yt=0;Yt<se;Yt++){if($e=Xe,xn[Yt]=Te=J(ne,de,xn,Yt),Xe=me[$e][Te],Ke=Xe&240,Xe&=15,le[Yt]=Me=me[Xe][5],Ke>0)if(Ke==16){for(lt=et;lt<Yt;lt++)le[lt]=1;et=-1}else et=-1;if(at=me[Xe][6],at)et==-1&&(et=Yt);else if(et>-1){for(lt=et;lt<Yt;lt++)le[lt]=Me;et=-1}de[Yt]==R&&(le[Yt]=0),m|=Me}if(d){for(lt=0;lt<se;lt++)if(de[lt]==$){le[lt]=g;for(var Wt=lt-1;Wt>=0&&de[Wt]==C;Wt--)le[Wt]=g}}}function Z(ne,le,se){if(!(m<ne)){if(ne==1&&g==c&&!h){se.reverse();return}for(var de=se.length,me=0,$e,Te,Me,Xe;me<de;){if(le[me]>=ne){for($e=me+1;$e<de&&le[$e]>=ne;)$e++;for(Te=me,Me=$e-1;Te<Me;Te++,Me--)Xe=se[Te],se[Te]=se[Me],se[Me]=Xe;me=$e}me++}}}function J(ne,le,se,de){var me=le[de],$e,Te,Me,Xe;switch(me){case i:case s:w=!1;case x:case b:return me;case p:return w?b:p;case k:return w=!0,s;case C:return x;case L:return de<1||de+1>=le.length||($e=se[de-1])!=p&&$e!=b||(Te=le[de+1])!=p&&Te!=b?x:(w&&(Te=b),Te==$e?Te:x);case D:return $e=de>0?se[de-1]:R,$e==p&&de+1<le.length&&le[de+1]==p?p:x;case E:if(de>0&&se[de-1]==p)return p;if(w)return x;for(Xe=de+1,Me=le.length;Xe<Me&&le[Xe]==E;)Xe++;return Xe<Me&&le[Xe]==p?p:x;case I:for(Me=le.length,Xe=de+1;Xe<Me&&le[Xe]==I;)Xe++;if(Xe<Me){var Ke=ne[de],at=Ke>=1425&&Ke<=2303||Ke==64286;if($e=le[Xe],at&&($e==s||$e==k))return s}return de<1||($e=le[de-1])==R?x:se[de-1];case R:return w=!1,h=!0,g;case $:return d=!0,x;case z:case P:case _:case A:case O:w=!1;case N:return x}}function he(ne){var le=ne.charCodeAt(0),se=le>>8;return se==0?le>191?i:B[le]:se==5?/[\u0591-\u05f4]/.test(ne)?s:i:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?b:le==1642?E:/[\u06f0-\u06f9]/.test(ne)?p:k:se==32&&le<=8287?U[le&255]:se==254&&le>=65136?k:x}r.L=i,r.R=s,r.EN=p,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,le,se){if(ne.length<2)return{};var de=ne.split(""),me=new Array(de.length),$e=new Array(de.length),Te=[];g=se?c:u,K(de,Te,de.length,le);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Z(2,Te,me),Z(1,Te,me);for(var Me=0;Me<me.length-1;Me++)le[Me]===b?Te[Me]=r.AN:Te[Me]===s&&(le[Me]>k&&le[Me]<z||le[Me]===x||le[Me]===N)?Te[Me]=r.ON_R:Me>0&&de[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(de[Me])&&(Te[Me-1]=Te[Me]=r.R_H,Me++);de[de.length-1]===r.DOT&&(Te[de.length-1]=r.B),de[0]===""&&(Te[0]=r.RLE);for(var Me=0;Me<me.length;Me++)$e[Me]=Te[me[Me]];return{logicalFromVisual:me,bidiLevels:$e}},r.hasBidiCharacters=function(ne,le){for(var se=!1,de=0;de<ne.length;de++)le[de]=he(ne.charAt(de)),!se&&(le[de]==s||le[de]==k||le[de]==b)&&(se=!0);return se},r.getVisualFromLogicalIdx=function(ne,le){for(var se=0;se<le.logicalFromVisual.length;se++)if(le.logicalFromVisual[se]==ne)return se;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,f){var g=e("./lib/bidiutil"),m=e("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function d(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=g,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=w.test(a.getValue())}return d.prototype.isBidiRow=function(a,l,u){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(l,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&w.test(a.lines.join(`
|
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var a=0,l=this.session.$screenRowCache;if(l.length){var u=this.session.$getRowCacheIndex(l,this.currentRow);u>=0&&(a=this.session.$docRowCache[u])}return a},d.prototype.getSplitIndex=function(){var a=0,l=this.session.$screenRowCache;if(l.length)for(var u,c=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-a>0&&(u=this.session.$getRowCacheIndex(l,this.currentRow-a-1),u===c);)c=u,a++;else a=this.currentRow;return a},d.prototype.updateRowLine=function(a,l){a===void 0&&(a=this.getDocumentRow());var u=a===this.session.getLength()-1,c=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[a];i&&(l===void 0&&(l=this.getSplitIndex()),l>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=l<i.length?this.line.substring(i[l-1],i[l]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[l]),l==i.length&&(this.line+=this.showInvisibles?c:g.DOT))}else this.line+=this.showInvisibles?c:g.DOT;var s=this.session,p=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,R){return x===" "||s.isFullWidth(x.charCodeAt(0))?(b=x===" "?s.getScreenTabSize(R+p):2,p+=b-1,m.stringRepeat(g.DOT,b)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==g.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var a=[];g.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=g.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var l=this.characterWidth=a.$characterSize.width,u=a.$measureCharWidth("ה");this.charWidths[g.L]=this.charWidths[g.EN]=this.charWidths[g.ON_R]=l,this.charWidths[g.R]=this.charWidths[g.AN]=u,this.charWidths[g.R_H]=u*.45,this.charWidths[g.B]=this.charWidths[g.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},d.prototype.setEolChar=function(a){this.EOL=a},d.prototype.setContentWidth=function(a){this.contentWidth=a},d.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(a,l){for(var u=a.getCursorPosition(),c=a.selection.getSelectionAnchor().row;c<=u.row;c++)!l&&a.session.getLine(c).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(c,0,1):l&&a.session.getLine(c).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:c},a.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(a){a-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,u=a>l?this.session.getOverwrite()?a:a-1:l,c=g.getVisualFromLogicalIdx(u,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&a<=l&&i[c]%2!==0&&c++;for(var p=0;p<c;p++)s+=this.charWidths[i[p]];return!this.session.getOverwrite()&&a>l&&i[c]%2===0&&(s+=this.charWidths[i[c]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},d.prototype.getSelections=function(a,l){var u=this.bidiMap,c=u.bidiLevels,i,s=[],p=0,b=Math.min(a,l)-this.wrapIndent,x=Math.max(a,l)-this.wrapIndent,R=!1,$=!1,k=0;this.wrapIndent&&(p+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<c.length;L++)C=u.logicalFromVisual[L],i=c[L],R=C>=b&&C<x,R&&!$?k=p:!R&&$&&s.push({left:k,width:p-k}),p+=this.charWidths[i],$=R;if(R&&L===c.length&&s.push({left:k,width:p-k}),this.isRtlDir)for(var D=0;D<s.length;D++)s[D].left+=this.rtlLineOffset;return s},d.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var l=0,u=Math.max(u,0),c=0,i=0,s=this.bidiMap.bidiLevels,p=this.charWidths[s[i]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>c+p/2;){if(c+=p,i===s.length-1){p=0;break}p=this.charWidths[s[++i]]}return i>0&&s[i-1]%2!==0&&s[i]%2===0?(u<c&&i--,l=this.bidiMap.logicalFromVisual[i]):i>0&&s[i-1]%2===0&&s[i]%2!==0?l=1+(u>c?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===s.length-1&&p===0&&s[i-1]%2===0||!this.isRtlDir&&i===0&&s[i]%2!==0?l=1+this.bidiMap.logicalFromVisual[i]:(i>0&&s[i-1]%2!==0&&p!==0&&i--,l=this.bidiMap.logicalFromVisual[i]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},d}();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 g=e("./lib/oop"),m=e("./lib/lang"),w=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=function(){function a(l){this.session=l,this.doc=l.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(c){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(l,u){this.$isEmpty=!1,this.anchor.setPosition(l,u)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var l=this.anchor,u=this.lead;return l.row>u.row||l.row==u.row&&l.column>u.column},a.prototype.getRange=function(){var l=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,l):h.fromPoints(l,u)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(l,u){var c=u?l.end:l.start,i=u?l.start:l.end;this.$setSelection(c.row,c.column,i.row,i.column)},a.prototype.$setSelection=function(l,u,c,i){if(!this.$silent){var s=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,u),this.cursor.setPosition(c,i),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||p)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(l){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),l.call(this)},a.prototype.selectTo=function(l,u){this.$moveSelection(function(){this.moveCursorTo(l,u)})},a.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},a.prototype.moveTo=function(l,u){this.clearSelection(),this.moveCursorTo(l,u)},a.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(l,u){if(typeof u>"u"){var c=l||this.lead;l=c.row,u=c.column}return this.session.getWordRange(l,u)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var l=this.getCursor(),u=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(u)},a.prototype.getLineRange=function(l,u){var c=typeof l=="number"?l:this.lead.row,i,s=this.session.getFoldLine(c);return s?(c=s.start.row,i=s.end.row):i=c,u===!0?new h(c,0,i,this.session.getLine(i).length):new h(c,0,i+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(l,u,c){var i=l.column,s=l.column+u;return c<0&&(i=l.column-u,s=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(i,s).split(" ").length-1==u},a.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.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 c=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var l=this.lead.row,u=this.lead.column,c=this.session.documentToScreenRow(l,u),i=this.session.screenToDocumentPosition(c,0),s=this.session.getDisplayLine(l,null,i.row,i.column),p=s.match(/^\s*/);p[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(i.column+=p[0].length),this.moveCursorToPosition(i)},a.prototype.moveCursorLineEnd=function(){var l=this.lead,u=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==u.column){var c=this.session.getLine(u.row);if(u.column==c.length){var i=c.search(/\s+$/);i>0&&(u.column=i)}}this.moveCursorTo(u.row,u.column)},a.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,u=this.doc.getLine(l).length;this.moveCursorTo(l,u)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,u=this.lead.column,c=this.doc.getLine(l),i=c.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(l,u,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(i)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=c.substring(u)),u>=c.length){this.moveCursorTo(l,c.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},a.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(l,u,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var i=this.session.getFoldStringAt(l,u,-1);i==null&&(i=this.doc.getLine(l).substring(0,u));var s=m.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(u-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},a.prototype.$shortWordEndIndex=function(l){var u=0,c,i=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(l))u=this.session.tokenRe.lastIndex;else{for(;(c=l[u])&&i.test(c);)u++;if(u<1){for(s.lastIndex=0;(c=l[u])&&!s.test(c);)if(s.lastIndex=0,u++,i.test(c))if(u>2){u--;break}else{for(;(c=l[u])&&i.test(c);)u++;if(u>2)break}}}return s.lastIndex=0,u},a.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,u=this.lead.column,c=this.doc.getLine(l),i=c.substring(u),s=this.session.getFoldAt(l,u,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(u==c.length){var p=this.doc.getLength();do l++,i=this.doc.getLine(l);while(l<p&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),u=0}var b=this.$shortWordEndIndex(i);this.moveCursorTo(l,u+b)},a.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(l,u,-1))return this.moveCursorTo(c.start.row,c.start.column);var i=this.session.getLine(l).substring(0,u);if(u===0){do l--,i=this.doc.getLine(l);while(l>0&&/^\s*$/.test(i));u=i.length,/\s+$/.test(i)||(i="")}var s=m.stringReverse(i),p=this.$shortWordEndIndex(s);return this.moveCursorTo(l,u-p)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(l,u){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(u===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];l<0?l-=s.rowsAbove||0:l>0&&(l+=s.rowCount-(s.rowsAbove||0))}var p=this.session.screenToDocumentPosition(c.row+l,c.column,i);l!==0&&u===0&&p.row===this.lead.row&&(p.column,this.lead.column),this.moveCursorTo(p.row,p.column+u,u===0)},a.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},a.prototype.moveCursorTo=function(l,u,c){var i=this.session.getFoldAt(l,u,1);i&&(l=i.start.row,u=i.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(s.charAt(u))&&s.charAt(u-1)&&(this.lead.row==l&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(l,u),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(l,u,c){var i=this.session.screenToDocumentPosition(l,u);this.moveCursorTo(i.row,i.column,c)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(l){var u=this.getRange();return l?(l.start.column=u.start.column,l.start.row=u.start.row,l.end.column=u.end.column,l.end.row=u.end.row):l=u,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},a.prototype.getRangeOfMovements=function(l){var u=this.getCursor();try{l(this);var c=this.getCursor();return h.fromPoints(u,c)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},a.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(u){var c=u.clone();return c.isBackwards=u.cursor==u.start,c});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},a.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var u=l.length;u--;){var c=h.fromPoints(l[u].start,l[u].end);l[u].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},a.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(l[u]))return!1;return!0},a}();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,g.implement(d.prototype,w),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,f){var g=e("./lib/report_error").reportError,m=2e3,w=function(){function h(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],u=[],c=0,i=this.matchMappings[a]={defaultToken:"text"},s="g",p=[],b=0;b<l.length;b++){var x=l[b];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),x.unicode&&s.indexOf("u")===-1&&(s+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,$=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?R=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+c+1)}):($=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&p.push(x)),i[c]=b,c+=$,u.push(R),x.onMatch||(x.onMatch=null)}}u.length||(i[0]=0,u.push("$")),p.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,s)},this),this.regExps[a]=new RegExp("("+u.join(")|(")+")|($)",s)}}return h.prototype.$setMaxTokenCount=function(d){m=d|0},h.prototype.$applyToken=function(d){var a=this.splitRegex.exec(d).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:d}];for(var u=[],c=0,i=l.length;c<i;c++)a[c]&&(u[u.length]={type:l[c],value:a[c]});return u},h.prototype.$arrayTokens=function(d){if(!d)return[];var a=this.splitRegex.exec(d);if(!a)return"text";for(var l=[],u=this.tokenArray,c=0,i=u.length;c<i;c++)a[c+1]&&(l[l.length]={type:u[c],value:a[c+1]});return l},h.prototype.removeCapturingGroups=function(d){var a=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,u){return u?"(?:":l});return a},h.prototype.createSplitterRegexp=function(d,a){if(d.indexOf("(?=")!=-1){var l=0,u=!1,c={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,s,p,b,x,R){return u?u=x!="]":x?u=!0:b?(l==c.stack&&(c.end=R+1,c.stack=-1),l--):p&&(l++,p.length!=1&&(c.stack=l,c.start=R)),i}),c.end!=null&&/^\)*$/.test(d.substr(c.end))&&(d=d.substring(0,c.start)+d.substr(c.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(a||"").replace("g",""))},h.prototype.getLineTokens=function(d,a){if(a&&typeof a!="string"){var l=a.slice(0);a=l[0],a==="#tmp"&&(l.shift(),a=l.shift())}else var l=[];var u=a||"start",c=this.states[u];c||(u="start",c=this.states[u]);var i=this.matchMappings[u],s=this.regExps[u];s.lastIndex=0;for(var p,b=[],x=0,R=0,$={type:null,value:""};p=s.exec(d);){var k=i.defaultToken,C=null,L=p[0],D=s.lastIndex;if(D-L.length>x){var E=d.substring(x,D-L.length);$.type==k?$.value+=E:($.type&&b.push($),$={type:k,value:E})}for(var I=0;I<p.length-2;I++)if(p[I+1]!==void 0){C=c[i[I]],C.onMatch?k=C.onMatch(L,u,l,d):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,l),c=this.states[u],c||(this.reportError("state doesn't exist",u),u="start",c=this.states[u]),i=this.matchMappings[u],x=D,s=this.regExps[u],s.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(L){if(typeof k=="string")(!C||C.merge!==!1)&&$.type===k?$.value+=L:($.type&&b.push($),$={type:k,value:L});else if(k){$.type&&b.push($),$={type:null,value:""};for(var I=0;I<k.length;I++)b.push(k[I])}}if(x==d.length)break;if(x=D,R++>m){for(R>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:d});x<d.length;)$.type&&b.push($),$={value:d.substring(x,x+=500),type:"overflow"};u="start",l=[];break}}return $.type&&b.push($),l.length>1&&l[0]!==u&&l.unshift("#tmp",u),{tokens:b,state:l.length?l:u}},h}();w.prototype.reportError=g,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,f){var g=e("../lib/deep_copy").deepCopy,m;m=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,a){if(!a){for(var l in d)this.$rules[l]=d[l];return}for(var l in d){for(var u=d[l],c=0;c<u.length;c++){var i=u[c];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(a)!==0&&(i.next=a+i.next),i.nextState&&i.nextState.indexOf(a)!==0&&(i.nextState=a+i.nextState))}this.$rules[a+l]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(d,a,l,u,c){var i=typeof d=="function"?new d().getRules():d;if(u)for(var s=0;s<u.length;s++)u[s]=a+u[s];else{u=[];for(var p in i)u.push(a+p)}if(this.addRules(i,a),l)for(var b=Array.prototype[c?"push":"unshift"],s=0;s<u.length;s++)b.apply(this.$rules[u[s]],g(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var w=function(d,a){return(d!="start"||a.length)&&a.unshift(this.nextState,d),this.nextState},h=function(d,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var d=0,a=this.$rules;function l(u){var c=a[u];c.processed=!0;for(var i=0;i<c.length;i++){var s=c[i],p=null;Array.isArray(s)&&(p=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var b=s.next||s.push;if(b&&Array.isArray(b)){var x=s.stateName;x||(x=s.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=d++)),a[x]=b,s.next=x,l(x)}else b=="pop"&&(s.next=h);if(s.push&&(s.nextState=s.next||s.push,s.next=w,delete s.push),s.rules)for(var R in s.rules)a[R]?a[R].push&&a[R].push.apply(a[R],s.rules[R]):a[R]=s.rules[R];var $=typeof s=="string"?s:s.include;if($&&($==="$self"&&($="start"),Array.isArray($)?p=$.map(function(C){return a[C]}):p=a[$]),p){var k=[i,1].concat(p);s.noEscape&&(k=k.filter(function(C){return!C.next})),c.splice.apply(c,k),i--}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(d,a,l,u){var c=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(i){for(var s=d[i],p=s.split(u||"|"),b=p.length;b--;){var x=p[b];this.$keywordList.push(x),l&&(x=x.toLowerCase()),c[x]=i}},this),d=null,l?function(i){return c[i.toLowerCase()]||a}:function(i){return c[i]||a}},this.getKeywords=function(){return this.$keywords}}).call(m.prototype),r.TextHighlightRules=m}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,f){var g;g=function(){this.$behaviours={}},(function(){this.add=function(m,w,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[m]:this.$behaviours[m]={}}this.$behaviours[m][w]=h},this.addBehaviours=function(m){for(var w in m)for(var h in m[w])this.add(w,h,m[w][h])},this.remove=function(m){this.$behaviours&&this.$behaviours[m]&&delete this.$behaviours[m]},this.inherit=function(m,w){if(typeof m=="function")var h=new m().getBehaviours(w);else var h=m.getBehaviours(w);this.addBehaviours(h)},this.getBehaviours=function(m){if(m){for(var w={},h=0;h<m.length;h++)this.$behaviours[m[h]]&&(w[m[h]]=this.$behaviours[m[h]]);return w}else return this.$behaviours}}).call(g.prototype),r.Behaviour=g}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,f){var g=e("./range").Range,m=function(){function w(h,d,a){this.$session=h,this.$row=d,this.$rowTokens=h.getTokens(d);var l=h.getTokenAt(d,a);this.$tokenIndex=l?l.index:-1}return w.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]},w.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]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,d=this.$tokenIndex,a=h[d].start;if(a!==void 0)return a;for(a=0;d>0;)d-=1,a+=h[d].value.length;return a},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new g(this.$row,d,this.$row,d+h.value.length)},w}();r.TokenIterator=m}),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 g=e("../../lib/oop"),m=e("../behaviour").Behaviour,w=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,u={},c={'"':'"',"'":"'"},i=function(b){var x=-1;if(b.multiSelect&&(x=b.selection.index,u.rangeCount!=b.multiSelect.rangeCount&&(u={rangeCount:b.multiSelect.rangeCount})),u[x])return l=u[x];l=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(b,x,R,$){var k=b.end.row-b.start.row;return{text:R+x+$,selection:[0,b.start.column+1,k,b.end.column+(k?0:1)]}},p;p=function(b){b=b||{},this.add("braces","insertion",function(x,R,$,k,C){var L=$.getCursorPosition(),D=k.doc.getLine(L.row);if(C=="{"){i($);var E=$.getSelectionRange(),I=k.doc.getTextRange(E),z=k.getTokenAt(L.row,L.column);if(I!==""&&I!=="{"&&$.getWrapBehavioursEnabled())return s(E,I,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[L.column-z.start-1]!=="$"?void 0:(p.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]})}else if(p.isSaneInsertion($,k))return/[\]\}\)]/.test(D[L.column])||$.inMultiSelectMode||b.braces?(p.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert($,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i($);var O=D.substring(L.column,L.column+1);if(O=="}"){var _=k.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(_!==null&&p.isAutoInsertedClosing(L,D,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
|
180
|
+
`||C==`\r
|
|
181
|
+
`){i($);var A="";p.isMaybeInsertedClosing(L,D)&&(A=h.stringRepeat("}",l.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var O=D.substring(L.column,L.column+1);if(O==="}"){var N=k.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var B=this.$getIndent(k.getLine(N.row))}else if(A)var B=this.$getIndent(D);else{p.clearMaybeInsertedClosing();return}var U=B+k.getTabString();return{text:`
|
|
182
|
+
`+U+`
|
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){i($);var D=k.doc.getLine(C.start.row),E=D.substring(C.end.column,C.end.column+1);if(E=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,$,k,C){if(C=="("){i($);var L=$.getSelectionRange(),D=k.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return s(L,D,"(",")");if(p.isSaneInsertion($,k))return p.recordAutoInsert($,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){i($);var E=$.getCursorPosition(),I=k.doc.getLine(E.row),z=I.substring(E.column,E.column+1);if(z==")"){var P=k.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(P!==null&&p.isAutoInsertedClosing(E,I,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){i($);var D=k.doc.getLine(C.start.row),E=D.substring(C.start.column+1,C.start.column+2);if(E==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,$,k,C){if(C=="["){i($);var L=$.getSelectionRange(),D=k.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return s(L,D,"[","]");if(p.isSaneInsertion($,k))return p.recordAutoInsert($,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i($);var E=$.getCursorPosition(),I=k.doc.getLine(E.row),z=I.substring(E.column,E.column+1);if(z=="]"){var P=k.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(P!==null&&p.isAutoInsertedClosing(E,I,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){i($);var D=k.doc.getLine(C.start.row),E=D.substring(C.start.column+1,C.start.column+2);if(E=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,$,k,C){var L=k.$mode.$quotes||c;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i($);var D=C,E=$.getSelectionRange(),I=k.doc.getTextRange(E);if(I!==""&&(I.length!=1||!L[I])&&$.getWrapBehavioursEnabled())return s(E,I,D,D);if(!I){var z=$.getCursorPosition(),P=k.doc.getLine(z.row),O=P.substring(z.column-1,z.column),_=P.substring(z.column,z.column+1),A=k.getTokenAt(z.row,z.column),N=k.getTokenAt(z.row,z.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(_==D)K=B!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var J=Z.test(O);Z.lastIndex=0;var he=Z.test(_),ne=k.$mode.$pairQuotesAfter,le=ne&&ne[D]&&ne[D].test(O);if(!le&&J||he||_&&!/[\s;,.})\]\\]/.test(_))return null;var se=P[z.column-2];if(O==D&&(se==D||Z.test(se)))return null;K=!0}return{text:K?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,$,k,C){var L=k.$mode.$quotes||c,D=k.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(D)){i($);var E=k.doc.getLine(C.start.row),I=E.substring(C.start.column+1,C.start.column+2);if(I==D)return C.end.column++,C}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,$,k,C){if(x==="doc-start"&&(C===`
|
|
184
|
+
`||C===`\r
|
|
185
|
+
`)&&$.selection.isEmpty()){var L=$.getCursorPosition();if(L.column===0)return;for(var D=k.doc.getLine(L.row),E=k.doc.getLine(L.row+1),I=k.getTokens(L.row),z=0,P=0;P<I.length;P++){z+=I[P].value.length;var O=I[P];if(z>=L.column){if(z===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var _=I[P+1];if(!_||!/\.doc/.test(_.type))return}}var A=L.column-(z-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(D);if(/\s*\*/.test(E))return/^\s*\*/.test(D)?{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(D.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},p.isSaneInsertion=function(b,x){var R=b.getCursorPosition(),$=new w(x,R.row,R.column);if(!this.$matchTokenType($.getCurrentToken()||"text",d)){if(/[)}\]]/.test(b.session.getLine(R.row)[R.column]))return!0;var k=new w(x,R.row,R.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",d))return!1}return $.stepForward(),$.getCurrentTokenRow()!==R.row||this.$matchTokenType($.getCurrentToken()||"text",a)},p.$matchTokenType=function(b,x){return x.indexOf(b.type||b)>-1},p.recordAutoInsert=function(b,x,R){var $=b.getCursorPosition(),k=x.doc.getLine($.row);this.isAutoInsertedClosing($,k,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=$.row,l.autoInsertedLineEnd=R+k.substr($.column),l.autoInsertedBrackets++},p.recordMaybeInsert=function(b,x,R){var $=b.getCursorPosition(),k=x.doc.getLine($.row);this.isMaybeInsertedClosing($,k)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=$.row,l.maybeInsertedLineStart=k.substr(0,$.column)+R,l.maybeInsertedLineEnd=k.substr($.column),l.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(b,x,R){return l.autoInsertedBrackets>0&&b.row===l.autoInsertedRow&&R===l.autoInsertedLineEnd[0]&&x.substr(b.column)===l.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(b,x){return l.maybeInsertedBrackets>0&&b.row===l.maybeInsertedRow&&x.substr(b.column)===l.maybeInsertedLineEnd&&x.substr(0,b.column)==l.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},g.inherits(p,m),r.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,r,f){for(var g=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],m=0,w=[],h=0;h<g.length;h+=2)w.push(m+=g[h]),g[h+1]&&w.push(45,m+=g[h+1]);r.wordChars=String.fromCharCode.apply(null,w)}),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 g=e("../config"),m=e("../tokenizer").Tokenizer,w=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,c;c=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new m(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,s,p,b){var x=s.doc,R=!0,$=!0,k=1/0,C=s.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(a.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var D=a.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),L=s.getUseSoftTabs();var I=function(K,Z){var J=K.match(D);if(J){var he=J[1].length,ne=J[0].length;!_(K,he,ne)&&J[0][ne-1]==" "&&ne--,x.removeInLine(Z,he,ne)}},z=E+" ",P=function(K,Z){(!R||/\S/.test(K))&&(_(K,k,k)?x.insertInLine({row:Z,column:k},z):x.insertInLine({row:Z,column:k},E))},O=function(K,Z){return D.test(K)},_=function(K,Z,J){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(J++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,A=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+a.escapeRegExp(E)+")"),N=new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"),P=function(le,se){O(le,se)||(!R||/\S/.test(le))&&(x.insertInLine({row:se,column:le.length},A),x.insertInLine({row:se,column:k},E))},I=function(le,se){var de;(de=le.match(N))&&x.removeInLine(se,le.length-de[0].length,le.length),(de=le.match(D))&&x.removeInLine(se,de[1].length,de[0].length)},O=function(le,se){if(D.test(le))return!0;for(var de=s.getTokens(se),me=0;me<de.length;me++)if(de[me].type==="comment")return!0}}function B(K){for(var Z=p;Z<=b;Z++)K(x.getLine(Z),Z)}var U=1/0;B(function(K,Z){var J=K.search(/\S/);J!==-1?(J<k&&(k=J),$&&!O(K,Z)&&($=!1)):U>K.length&&(U=K.length)}),k==1/0&&(k=U,R=!1,$=!1),L&&k%C!=0&&(k=Math.floor(k/C)*C),B($?I:P)},this.toggleBlockComment=function(i,s,p,b){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new l(s,b.row,b.column),$=R.getCurrentToken();s.selection;var k=s.selection.toOrientedRange(),C,L;if($&&/comment/.test($.type)){for(var D,E;$&&/comment/.test($.type);){var I=$.value.indexOf(x.start);if(I!=-1){var z=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+I;D=new u(z,P,z,P+x.start.length);break}$=R.stepBackward()}for(var R=new l(s,b.row,b.column),$=R.getCurrentToken();$&&/comment/.test($.type);){var I=$.value.indexOf(x.end);if(I!=-1){var z=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+I;E=new u(z,P,z,P+x.end.length);break}$=R.stepForward()}E&&s.remove(E),D&&(s.remove(D),C=D.start.row,L=-x.start.length)}else L=x.start.length,C=p.start.row,s.insert(p.end,x.end),s.insert(p.start,x.start);k.start.row==C&&(k.start.column+=L),k.end.row==C&&(k.end.column+=L),s.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(i,s,p){return this.$getIndent(s)},this.checkOutdent=function(i,s,p){return!1},this.autoOutdent=function(i,s,p){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var s in i)if(i[s]){var p=i[s],b=p.prototype.$id,x=g.$modes[b];x||(g.$modes[b]=x=new p),g.$modes[s]||(g.$modes[s]=x),this.$embeds.push(s),this.$modes[s]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(L){(function(D){var E=R[L],I=D[E];D[R[L]]=function(){return this.$delegator(E,arguments,I)}})(k)},k=this,s=0;s<R.length;s++)$(s)},this.$delegator=function(i,s,p){var b=s[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var x=b[2][b[2].length-1],R=this.$modes[x];if(R)return R[i].apply(R,[b[1]].concat([].slice.call(s,1)))}b=b[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var k=b.split(this.$embeds[$]);if(!k[0]&&k[1]){s[0]=k[1];var R=this.$modes[this.$embeds[$]];return R[i].apply(R,s)}}var C=p.apply(this,s);return p?C:void 0},this.transformAction=function(i,s,p,b,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var $ in R)if(R[$][s]){var k=R[$][s].apply(this,arguments);if(k)return k}}},this.getKeywords=function(i){if(!this.completionKeywords){var s=this.$tokenizer.rules,p=[];for(var b in s)for(var x=s[b],R=0,$=x.length;R<$;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&p.push(x[R].regex);else if(typeof x[R].token=="object"){for(var k=0,C=x[R].token.length;k<C;k++)if(/keyword|support|storage/.test(x[R].token[k])){var b=x[R].regex.match(/\(.+?\)/g)[k];p.push(b.substr(1,b.length-2))}}this.completionKeywords=p}return i?p.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,s,p,b){var x=this.$keywordList||this.$createKeywordList();return x.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,f){var g=e("./lib/dom"),m=function(){function w(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 w.prototype.getRowLength=function(h){var d;return this.lineWidgets?d=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[h]?1+d:this.$wrapData[h].length+1+d},w.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(h+=d.rowCount)}),h},w.prototype.$onChangeEditor=function(h){this.attach(h.editor)},w.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)))},w.prototype.detach=function(h){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},w.prototype.updateOnFold=function(h,d){var a=d.lineWidgets;if(!(!a||!h.action)){for(var l=h.data,u=l.start.row,c=l.end.row,i=h.action=="add",s=u+1;s<c;s++)a[s]&&(a[s].hidden=i);a[c]&&(i?a[u]?a[c].hidden=i:a[u]=a[c]:(a[u]==a[c]&&(a[u]=void 0),a[c].hidden=i))}},w.prototype.updateOnChange=function(h){var d=this.session.lineWidgets;if(d){var a=h.start.row,l=h.end.row-a;if(l!==0)if(h.action=="remove"){var u=d.splice(a+1,l);!d[a]&&u[u.length-1]&&(d[a]=u.pop()),u.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var c=new Array(l);d[a]&&d[a].column!=null&&h.start.column>d[a].column&&a++,c.unshift(a,0),d.splice.apply(d,c),this.$updateRows()}}},w.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var d=!0;h.forEach(function(a,l){if(a)for(d=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),d&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[h.row];return d&&(h.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},w.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var d=this.editor.renderer;h.html&&!h.el&&(h.el=g.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=g.createElement("div"),h.el.textContent=h.text),h.el&&(g.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&g.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",d.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/d.layerConfig.lineHeight);var a=this.session.getFoldAt(h.row,0);if(h.$fold=a,a){var l=this.session.lineWidgets;h.row==a.end.row&&!l[a.start.row]?l[a.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(h),h},w.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 d=this.session.lineWidgets[h.row];if(d==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;d;){if(d.$oldWidget==h){d.$oldWidget=h.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(h){for(var d=this.session.lineWidgets,a=d&&d[h],l=[];a;)l.push(a),a=a.$oldWidget;return l},w.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(h,d){var a=this.session._changedWidgets,l=d.layerConfig;if(!(!a||!a.length)){for(var u=1/0,c=0;c<a.length;c++){var i=a[c];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,d.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/l.characterWidth));var s=i.h/l.lineHeight;i.coverLine&&(s-=this.session.getRowLineCount(i.row),s<0&&(s=0)),i.rowCount!=s&&(i.rowCount=s,i.row<u&&(u=i.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(h,d){var a=d.layerConfig,l=this.session.lineWidgets;if(l){for(var u=Math.min(this.firstRow,a.firstRow),c=Math.max(this.lastRow,a.lastRow,l.length);u>0&&!l[u];)u--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,d.$cursorLayer.config=a;for(var i=u;i<=c;i++){var s=l[i];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,d.container.appendChild(s.el));var p=d.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;s.coverLine||(p+=a.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=p-a.offset+"px";var b=s.coverGutter?0:d.gutterWidth;s.fixedWidth||(b-=d.scrollLeft),s.el.style.left=b+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=a.width+2*a.padding+"px"),s.fixedWidth?s.el.style.right=d.scrollBar.getWidth()+"px":s.el.style.right=""}}}},w}();r.LineWidgets=m}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,f){r.applyDelta=function(g,m,w){var h=m.start.row,d=m.start.column,a=g[h]||"";switch(m.action){case"insert":var l=m.lines;if(l.length===1)g[h]=a.substring(0,d)+m.lines[0]+a.substring(d);else{var u=[h,1].concat(m.lines);g.splice.apply(g,u),g[h]=a.substring(0,d)+g[h],g[h+m.lines.length-1]+=a.substring(d)}break;case"remove":var c=m.end.column,i=m.end.row;h===i?g[h]=a.substring(0,d)+a.substring(c):g.splice(h,i-h+1,a.substring(0,d)+g[i].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var g=e("./lib/oop"),m=e("./lib/event_emitter").EventEmitter,w=function(){function a(l,u,c){this.$onChange=this.onChange.bind(this),this.attach(l),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,c)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var u=d(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},a.prototype.setPosition=function(l,u,c){var i;if(c?i={row:l,column:u}:i=this.$clipPositionToDocument(l,u),!(this.row==i.row&&this.column==i.column)){var s={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:s,value:i})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(l,u){var c={};return l>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):l<0?(c.row=0,c.column=0):(c.row=l,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,u))),u<0&&(c.column=0),c},a}();w.prototype.$insertRight=!1,g.implement(w.prototype,m);function h(a,l,u){var c=u?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&c}function d(a,l,u){var c=a.action=="insert",i=(c?1:-1)*(a.end.row-a.start.row),s=(c?1:-1)*(a.end.column-a.start.column),p=a.start,b=c?p:a.end;return h(l,p,u)?{row:l.row,column:l.column}:h(b,l,!u)?{row:l.row+i,column:l.column+(l.row==b.row?s:0)}:{row:p.row,column:p.column}}r.Anchor=w}),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 g=e("./lib/oop"),m=e("./apply_delta").applyDelta,w=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=e("./anchor").Anchor,a=function(){function l(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 l.prototype.setValue=function(u){var c=this.getLength()-1;this.remove(new h(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},u||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(u,c){return new d(this,u,c)},l.prototype.$detectNewLine=function(u){var c=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
|
186
|
+
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
187
|
+
`;case"unix":return`
|
|
188
|
+
`;default:return this.$autoNewLine||`
|
|
189
|
+
`}},l.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(u){return u==`\r
|
|
190
|
+
`||u=="\r"||u==`
|
|
191
|
+
`},l.prototype.getLine=function(u){return this.$lines[u]||""},l.prototype.getLines=function(u,c){return this.$lines.slice(u,c+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(u){var c;if(u.start.row===u.end.row)c=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{c=this.getLines(u.start.row,u.end.row),c[0]=(c[0]||"").substring(u.start.column);var i=c.length-1;u.end.row-u.start.row==i&&(c[i]=c[i].substring(0,u.end.column))}return c},l.prototype.insertLines=function(u,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,c)},l.prototype.removeLines=function(u,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,c)},l.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},l.prototype.insert=function(u,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(u,this.$split(c))},l.prototype.insertInLine=function(u,c){var i=this.clippedPos(u.row,u.column),s=this.pos(u.row,u.column+c.length);return this.applyDelta({start:i,end:s,action:"insert",lines:[c]},!0),this.clonePos(s)},l.prototype.clippedPos=function(u,c){var i=this.getLength();u===void 0?u=i:u<0?u=0:u>=i&&(u=i-1,c=void 0);var s=this.getLine(u);return c==null&&(c=s.length),c=Math.min(Math.max(c,0),s.length),{row:u,column:c}},l.prototype.clonePos=function(u){return{row:u.row,column:u.column}},l.prototype.pos=function(u,c){return{row:u,column:c}},l.prototype.$clipPosition=function(u){var c=this.getLength();return u.row>=c?(u.row=Math.max(0,c-1),u.column=this.getLine(c-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},l.prototype.insertFullLines=function(u,c){u=Math.min(Math.max(u,0),this.getLength());var i=0;u<this.getLength()?(c=c.concat([""]),i=0):(c=[""].concat(c),u--,i=this.$lines[u].length),this.insertMergedLines({row:u,column:i},c)},l.prototype.insertMergedLines=function(u,c){var i=this.clippedPos(u.row,u.column),s={row:i.row+c.length-1,column:(c.length==1?i.column:0)+c[c.length-1].length};return this.applyDelta({start:i,end:s,action:"insert",lines:c}),this.clonePos(s)},l.prototype.remove=function(u){var c=this.clippedPos(u.start.row,u.start.column),i=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:c,end:i,action:"remove",lines:this.getLinesForRange({start:c,end:i})}),this.clonePos(c)},l.prototype.removeInLine=function(u,c,i){var s=this.clippedPos(u,c),p=this.clippedPos(u,i);return this.applyDelta({start:s,end:p,action:"remove",lines:this.getLinesForRange({start:s,end:p})},!0),this.clonePos(s)},l.prototype.removeFullLines=function(u,c){u=Math.min(Math.max(0,u),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var i=c==this.getLength()-1&&u>0,s=c<this.getLength()-1,p=i?u-1:u,b=i?this.getLine(p).length:0,x=s?c+1:c,R=s?0:this.getLine(x).length,$=new h(p,b,x,R),k=this.$lines.slice(u,c+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),k},l.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:["",""]})},l.prototype.replace=function(u,c){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),c.length===0&&u.isEmpty())return u.start;if(c==this.getTextRange(u))return u.end;this.remove(u);var i;return c?i=this.insert(u.start,c):i=u.start,i},l.prototype.applyDeltas=function(u){for(var c=0;c<u.length;c++)this.applyDelta(u[c])},l.prototype.revertDeltas=function(u){for(var c=u.length-1;c>=0;c--)this.revertDelta(u[c])},l.prototype.applyDelta=function(u,c){var i=u.action=="insert";(i?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(i&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(m(this.$lines,u,c),this._signal("change",u)))},l.prototype.$safeApplyDelta=function(u){var c=this.$lines.length;(u.action=="remove"&&u.start.row<c&&u.end.row<c||u.action=="insert"&&u.start.row<=c)&&this.applyDelta(u)},l.prototype.$splitAndapplyLargeDelta=function(u,c){for(var i=u.lines,s=i.length-c+1,p=u.start.row,b=u.start.column,x=0,R=0;x<s;x=R){R+=c-1;var $=i.slice(x,R);$.push(""),this.applyDelta({start:this.pos(p+x,b),end:this.pos(p+R,b=0),action:u.action,lines:$},!0)}u.lines=i.slice(x),u.start.row=p+x,u.start.column=b,this.applyDelta(u,!0)},l.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()})},l.prototype.indexToPosition=function(u,c){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,p=c||0,b=i.length;p<b;p++)if(u-=i[p].length+s,u<0)return{row:p,column:u+i[p].length+s};return{row:b-1,column:u+i[b-1].length+s}},l.prototype.positionToIndex=function(u,c){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,p=0,b=Math.min(u.row,i.length),x=c||0;x<b;++x)p+=i[x].length+s;return p+u.column},l.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},l}();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",g.implement(a.prototype,w),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var g=e("./lib/oop"),m=e("./lib/event_emitter").EventEmitter,w=function(){function h(d,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var l=this;this.$worker=function(){if(l.running){for(var u=new Date,c=l.currentLine,i=-1,s=l.doc,p=c;l.lines[c];)c++;var b=s.getLength(),x=0;for(l.running=!1;c<b;){l.$tokenizeRow(c),i=c;do c++;while(l.lines[c]);if(x++,x%5===0&&new Date-u>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=c,i==-1&&(i=c),p<=i&&l.fireUpdateEvent(p,i)}}}return h.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(d,a){var l={first:d,last:a};this._signal("update",{data:l})},h.prototype.start=function(d){this.currentLine=Math.min(d||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(d){var a=d.start.row,l=d.end.row-a;if(l===0)this.lines[a]=null;else if(d.action=="remove")this.lines.splice(a,l+1,null),this.states.splice(a,l+1,null);else{var u=Array(l+1);u.unshift(a,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},h.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},h.prototype.$tokenizeRow=function(d){var a=this.doc.getLine(d),l=this.states[d-1],u=this.tokenizer.getLineTokens(a,l,d);return this.states[d]+""!=u.state+""?(this.states[d]=u.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=u.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();g.implement(w.prototype,m),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,f){var g=e("./lib/lang"),m=e("./range").Range,w=function(){function h(d,a,l){l===void 0&&(l="text"),this.setRegexp(d),this.clazz=a,this.type=l,this.docLen=0}return h.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},h.prototype.update=function(d,a,l,u){if(this.regExp){for(var c=u.firstRow,i=u.lastRow,s={},p=l.$editor&&l.$editor.$search,b=p&&p.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=c;x<=i;x++){var R=this.cache[x];if(R==null||l.getValue().length!=this.docLen){if(b){R=[];var $=p.$multiLineForward(l,this.regExp,x,i);if($){var k=$.endRow<=i?$.endRow-1:i;k>x&&(x=k),R.push(new m($.startRow,$.startCol,$.endRow,$.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=g.getMatchOffsets(l.getLine(x),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(E){return new m(x,E.offset,x,E.offset+E.length)});this.cache[x]=R.length?R:""}if(R.length!==0)for(var C=R.length;C--;){var L=R[C].toScreenRange(l),D=L.toString();s[D]||(s[D]=!0,a.drawSingleLineMarker(d,L,this.clazz,u))}}this.docLen=l.getValue().length}},h}();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,f){var g=function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,L,D){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-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)}},k.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,E=D.length;E--;){var I=D[E][0];if(I.id<=C)break;I.id<L&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,L){for(var D=this.selections,E=D.length;E--;){var I=D[E];if(I.rev<C)return L&&(I=D[E+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,E=null,I=0,z=D.length;z--;){var P=D[z][0];if(P.id<L&&!E&&(E=z+1),P.id<=C){I=z+1;break}}return D.slice(I,E)},k.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.undo=function(C,L){this.lastDeltas=null;var D=this.$undoStack;if(m(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=D.pop(),I=null;return E&&(I=C.undoChanges(E,L),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(z){z[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),I=null;return E&&(I=C.redoChanges(E,L),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],D=L&&L[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},k.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=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
|
|
192
|
+
---
|
|
193
|
+
`+l(this.$redoStack)},k}();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function m(k,C){for(var L=C;L--;){var D=k[L];if(D&&!D[0].ignore){for(;L<C-1;){var E=i(k[L],k[L+1]);k[L]=E[0],k[L+1]=E[1],L++}return!0}}}var w=e("./range").Range,h=w.comparePoints;w.comparePoints;function d(k){return{row:k.row,column:k.column}}function a(k){return{start:d(k.start),end:d(k.end),action:k.action,lines:k.lines.slice()}}function l(k){if(k=k||this,Array.isArray(k))return k.map(l).join(`
|
|
194
|
+
`);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
|
|
195
|
+
`):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function c(k,C){var L=k.action=="insert",D=C.action=="insert";if(L&&D)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.start,k.start)<=0)p(k,C,1);else return null;else if(L&&!D)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.end,k.start)<=0)p(k,C,-1);else return null;else if(!L&&D)if(h(C.start,k.start)>=0)p(C,k,1);else if(h(C.start,k.start)<=0)p(k,C,1);else return null;else if(!L&&!D)if(h(C.start,k.start)>=0)p(C,k,1);else if(h(C.end,k.start)<=0)p(k,C,-1);else return null;return[C,k]}function i(k,C){for(var L=k.length;L--;)for(var D=0;D<C.length;D++)if(!c(k[L],C[D])){for(;L<k.length;){for(;D--;)c(C[D],k[L]);D=C.length,L++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function s(k,C){var L=k.action=="insert",D=C.action=="insert";if(L&&D)h(k.start,C.start)<0?p(C,k,1):p(k,C,1);else if(L&&!D)h(k.start,C.end)>=0?p(k,C,-1):(h(k.start,C.start)<=0||p(k,w.fromPoints(C.start,k.start),-1),p(C,k,1));else if(!L&&D)h(C.start,k.end)>=0?p(C,k,-1):(h(C.start,k.start)<=0||p(C,w.fromPoints(k.start,C.start),-1),p(k,C,1));else if(!L&&!D)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.end,k.start)<=0)p(k,C,-1);else{var E,I;return h(k.start,C.start)<0&&(E=k,k=x(k,C.start)),h(k.end,C.end)>0&&(I=x(k,C.end)),b(C.end,k.start,k.end,-1),I&&!E&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,E,I].filter(Boolean)}return[C,k]}function p(k,C,L){b(k.start,C.start,C.end,L),b(k.end,C.start,C.end,L)}function b(k,C,L,D){k.row==(D==1?C:L).row&&(k.column+=D*(L.column-C.column)),k.row+=D*(L.row-C.row)}function x(k,C){var L=k.lines,D=k.end;k.end=d(C);var E=k.end.row-k.start.row,I=L.splice(E,L.length),z=E?C.column:C.column-k.start.column;L.push(I[0].substring(0,z)),I[0]=I[0].substr(z);var P={start:d(C),end:D,lines:I,action:k.action};return P}function R(k,C){C=a(C);for(var L=k.length;L--;){for(var D=k[L],E=0;E<D.length;E++){var I=D[E],z=s(I,C);C=z[0],z.length!=2&&(z[2]?(D.splice(E+1,1,z[1],z[2]),E++):z[1]||(D.splice(E,1),E--))}D.length||k.splice(L,1)}return k}function $(k,C){for(var L=0;L<C.length;L++)for(var D=C[L],E=0;E<D.length;E++)R(k,D[E])}r.UndoManager=g}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,f){var g=e("../range").Range,m=function(){function w(h,d){this.foldData=h,Array.isArray(d)?this.folds=d:d=this.folds=[d];var a=d[d.length-1];this.range=new g(d[0].start.row,d[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return w.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(d){d.start.row+=h,d.end.row+=h})},w.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(d,a){return-d.range.compareEnd(a.start.row,a.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},w.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},w.prototype.walk=function(h,d,a){var l=0,u=this.folds,c,i,s,p=!0;d==null&&(d=this.end.row,a=this.end.column);for(var b=0;b<u.length;b++){if(c=u[b],i=c.range.compareStart(d,a),i==-1){h(null,d,a,l,p);return}if(s=h(null,c.start.row,c.start.column,l,p),s=!s&&h(c.placeholder,c.start.row,c.start.column,l),s||i===0)return;p=!c.sameRow,l=c.end.column}h(null,d,a,l,p)},w.prototype.getNextFoldTo=function(h,d){for(var a,l,u=0;u<this.folds.length;u++){if(a=this.folds[u],l=a.range.compareEnd(h,d),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},w.prototype.addRemoveChars=function(h,d,a){var l=this.getNextFoldTo(h,d),u,c;if(l){if(u=l.fold,l.kind=="inside"&&u.start.column!=d&&u.start.row!=h)window.console&&window.console.log(h,d,u);else if(u.start.row==h){c=this.folds;var i=c.indexOf(u);for(i===0&&(this.start.column+=a),i;i<c.length;i++){if(u=c[i],u.start.column+=a,!u.sameRow)return;u.end.column+=a}this.end.column+=a}}},w.prototype.split=function(h,d){var a=this.getNextFoldTo(h,d);if(!a||a.kind=="inside")return null;var l=a.fold,u=this.folds,c=this.foldData,i=u.indexOf(l),s=u[i-1];this.end.row=s.end.row,this.end.column=s.end.column,u=u.splice(i,u.length-i);var p=new w(c,u);return c.splice(c.indexOf(this)+1,0,p),p},w.prototype.merge=function(h){for(var d=h.folds,a=0;a<d.length;a++)this.addFold(d[a]);var l=this.foldData;l.splice(l.indexOf(h),1)},w.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(d){h.push(" "+d.toString())}),h.push("]"),h.join(`
|
|
196
|
+
`)},w.prototype.idxToPosition=function(h){for(var d=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(h-=l.start.column-d,h<0)return{row:l.start.row,column:l.start.column+h};if(h-=l.placeholder.length,h<0)return l.start;d=l.end.column}return{row:this.end.row,column:this.end.column+h}},w}();r.FoldLine=m}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,f){var g=e("./range").Range,m=g.comparePoints,w=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(d,a,l){for(var u=this.ranges,c=l||0;c<u.length;c++){var i=u[c],s=m(d,i.end);if(!(s>0)){var p=m(d,i.start);return s===0?a&&p!==0?-c-2:c:p>0||p===0&&!a?c:-c-1}}return-c-1},h.prototype.add=function(d){var a=!d.isEmpty(),l=this.pointIndex(d.start,a);l<0&&(l=-l-1);var u=this.pointIndex(d.end,a,l);return u<0?u=-u-1:u++,this.ranges.splice(l,u-l,d)},h.prototype.addList=function(d){for(var a=[],l=d.length;l--;)a.push.apply(a,this.add(d[l]));return a},h.prototype.substractPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges.splice(a,1)},h.prototype.merge=function(){var d=[],a=this.ranges;a=a.sort(function(s,p){return m(s.start,p.start)});for(var l=a[0],u,c=1;c<a.length;c++){u=l,l=a[c];var i=m(u.end,l.start);i<0||i==0&&!u.isEmpty()&&!l.isEmpty()||(m(u.end,l.end)<0&&(u.end.row=l.end.row,u.end.column=l.end.column),a.splice(c,1),d.push(l),l=u,c--)}return this.ranges=a,d},h.prototype.contains=function(d,a){return this.pointIndex({row:d,column:a})>=0},h.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},h.prototype.rangeAtPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges[a]},h.prototype.clipRows=function(d,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<d)return[];var u=this.pointIndex({row:d,column:0});u<0&&(u=-u-1);var c=this.pointIndex({row:a,column:0},u);c<0&&(c=-c-1);for(var i=[],s=u;s<c;s++)i.push(l[s]);return i},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(d){this.session&&this.detach(),this.session=d,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(d){for(var a=d.start,l=d.end,u=a.row,c=l.row,i=this.ranges,s=0,p=i.length;s<p;s++){var b=i[s];if(b.end.row>=u)break}if(d.action=="insert")for(var x=c-u,R=-a.column+l.column;s<p;s++){var b=i[s];if(b.start.row>u)break;if(b.start.row==u&&b.start.column>=a.column&&(b.start.column==a.column&&this.$bias<=0||(b.start.column+=R,b.start.row+=x)),b.end.row==u&&b.end.column>=a.column){if(b.end.column==a.column&&this.$bias<0)continue;b.end.column==a.column&&R>0&&s<p-1&&b.end.column>b.start.column&&b.end.column==i[s+1].start.column&&(b.end.column-=R),b.end.column+=R,b.end.row+=x}}else for(var x=u-c,R=a.column-l.column;s<p;s++){var b=i[s];if(b.start.row>c)break;b.end.row<c&&(u<b.end.row||u==b.end.row&&a.column<b.end.column)?(b.end.row=u,b.end.column=a.column):b.end.row==c?b.end.column<=l.column?(x||b.end.column>a.column)&&(b.end.column=a.column,b.end.row=a.row):(b.end.column+=R,b.end.row+=x):b.end.row>c&&(b.end.row+=x),b.start.row<c&&(u<b.start.row||u==b.start.row&&a.column<b.start.column)?(b.start.row=u,b.start.column=a.column):b.start.row==c?b.start.column<=l.column?(x||b.start.column>a.column)&&(b.start.column=a.column,b.start.row=a.row):(b.start.column+=R,b.start.row+=x):b.start.row>c&&(b.start.row+=x)}if(x!=0&&s<p)for(;s<p;s++){var b=i[s];b.start.row+=x,b.end.row+=x}},h}();w.prototype.comparePoints=m,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,f){var g=this&&this.__extends||function(){var u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(s[b]=p[b])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function s(){this.constructor=c}c.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),m=e("../range_list").RangeList,w=function(u){g(c,u);function c(i,s){var p=u.call(this)||this;return p.foldLine=null,p.placeholder=s,p.range=i,p.start=i.start,p.end=i.end,p.sameRow=i.start.row==i.end.row,p.subFolds=p.ranges=[],p}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(s){s.setFoldLine(i)})},c.prototype.clone=function(){var i=this.range.clone(),s=new c(i,this.placeholder);return this.subFolds.forEach(function(p){s.subFolds.push(p.clone())}),s.collapseChildren=this.collapseChildren,s},c.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){d(i,this.start);for(var s=i.start.row,p=i.start.column,b=0,x=-1;b<this.subFolds.length&&(x=this.subFolds[b].range.compare(s,p),x==1);b++);var R=this.subFolds[b],$=0;if(x==0){if(R.range.containsRange(i))return R.addSubFold(i);$=1}for(var s=i.range.end.row,p=i.range.end.column,k=b,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(s,p),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(b,k-b,i),L=x==0?C.length-1:C.length,D=$;D<L;D++)i.addSubFold(C[D]);return i.setFoldLine(this.foldLine),i}},c.prototype.restoreRange=function(i){return l(i,this.start)},c}(m);function h(u,c){u.row-=c.row,u.row==0&&(u.column-=c.column)}function d(u,c){h(u.start,c),h(u.end,c)}function a(u,c){u.row==0&&(u.column+=c.column),u.row+=c.row}function l(u,c){a(u.start,c),a(u.end,c)}r.Fold=w}),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 g=e("../range").Range,m=e("./fold_line").FoldLine,w=e("./fold").Fold,h=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,u,c){var i=this.getFoldLine(l);if(!i)return null;for(var s=i.folds,p=0;p<s.length;p++){var b=s[p].range;if(b.contains(l,u)){if(c==1&&b.isEnd(l,u)&&!b.isEmpty()||c==-1&&b.isStart(l,u)&&!b.isEmpty())continue;return s[p]}}},this.getFoldsInRange=function(l){var u=l.start,c=l.end,i=this.$foldData,s=[];u.column+=1,c.column-=1;for(var p=0;p<i.length;p++){var b=i[p].range.compareRange(l);if(b!=2){if(b==-2)break;for(var x=i[p].folds,R=0;R<x.length;R++){var $=x[R];if(b=$.range.compareRange(l),b==-2)break;if(b!=2){if(b==42)break;s.push($)}}}}return u.column-=1,c.column+=1,s},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var u=[];l.forEach(function(i){u=u.concat(this.getFoldsInRange(i))},this)}else var u=this.getFoldsInRange(l);return u},this.getAllFolds=function(){for(var l=[],u=this.$foldData,c=0;c<u.length;c++)for(var i=0;i<u[c].folds.length;i++)l.push(u[c].folds[i]);return l},this.getFoldStringAt=function(l,u,c,i){if(i=i||this.getFoldLine(l),!i)return null;for(var s={end:{column:0}},p,b,x=0;x<i.folds.length;x++){b=i.folds[x];var R=b.range.compareEnd(l,u);if(R==-1){p=this.getLine(b.start.row).substring(s.end.column,b.start.column);break}else if(R===0)return null;s=b}return p||(p=this.getLine(b.start.row).substring(s.end.column)),c==-1?p.substring(0,u-s.end.column):c==1?p.substring(u-s.end.column):p},this.getFoldLine=function(l,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var s=c[i];if(s.start.row<=l&&s.end.row>=l)return s;if(s.end.row>l)return null}return null},this.getNextFoldLine=function(l,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var s=c[i];if(s.end.row>=l)return s}return null},this.getFoldedRowCount=function(l,u){for(var c=this.$foldData,i=u-l+1,s=0;s<c.length;s++){var p=c[s],b=p.end.row,x=p.start.row;if(b>=u){x<u&&(x>=l?i-=u-x:i=0);break}else b>=l&&(x>=l?i-=b-x:i-=b-l+1)}return i},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(u,c){return u.start.row-c.start.row}),l},this.addFold=function(l,u){var c=this.$foldData,i=!1,s;l instanceof w?s=l:(s=new w(u,l),s.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(s.range);var p=s.start.row,b=s.start.column,x=s.end.row,R=s.end.column,$=this.getFoldAt(p,b,1),k=this.getFoldAt(x,R,-1);if($&&k==$)return $.addSubFold(s);$&&!$.range.isStart(p,b)&&this.removeFold($),k&&!k.range.isEnd(x,R)&&this.removeFold(k);var C=this.getFoldsInRange(s.range);C.length>0&&(this.removeFolds(C),s.collapseChildren||C.forEach(function(I){s.addSubFold(I)}));for(var L=0;L<c.length;L++){var D=c[L];if(x==D.start.row){D.addFold(s),i=!0;break}else if(p==D.end.row){if(D.addFold(s),i=!0,!s.sameRow){var E=c[L+1];if(E&&E.start.row==x){D.merge(E);break}}break}else if(x<=D.start.row)break}return i||(D=this.$addFoldLine(new m(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(l){l.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(l){var u=l.foldLine,c=u.start.row,i=u.end.row,s=this.$foldData,p=u.folds;if(p.length==1)s.splice(s.indexOf(u),1);else if(u.range.isEnd(l.end.row,l.end.column))p.pop(),u.end.row=p[p.length-1].end.row,u.end.column=p[p.length-1].end.column;else if(u.range.isStart(l.start.row,l.start.column))p.shift(),u.start.row=p[0].start.row,u.start.column=p[0].start.column;else if(l.sameRow)p.splice(p.indexOf(l),1);else{var b=u.split(l.start.row,l.start.column);p=b.folds,p.shift(),b.start.row=p[0].start.row,b.start.column=p[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,i):this.$updateRowLengthCache(c,i)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var u=[],c=0;c<l.length;c++)u.push(l[c]);u.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(u){l.restoreRange(u),this.addFold(u)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(l,u){var c,i;if(l==null)c=new g(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof l=="number")c=new g(l,0,l,this.getLine(l).length);else if("row"in l)c=g.fromPoints(l,l);else{if(Array.isArray(l))return i=[],l.forEach(function(p){i=i.concat(this.unfold(p))},this),i;c=l}i=this.getFoldsInRangeList(c);for(var s=i;i.length==1&&g.comparePoints(i[0].start,c.start)<0&&g.comparePoints(i[0].end,c.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(c);if(u!=!1?this.removeFolds(i):this.expandFolds(i),s.length)return s},this.isRowFolded=function(l,u){return!!this.getFoldLine(l,u)},this.getRowFoldEnd=function(l,u){var c=this.getFoldLine(l,u);return c?c.end.row:l},this.getRowFoldStart=function(l,u){var c=this.getFoldLine(l,u);return c?c.start.row:l},this.getFoldDisplayLine=function(l,u,c,i,s){i==null&&(i=l.start.row),s==null&&(s=0),u==null&&(u=l.end.row),c==null&&(c=this.getLine(u).length);var p=this.doc,b="";return l.walk(function(x,R,$,k){if(!(R<i)){if(R==i){if($<s)return;k=Math.max(s,k)}x!=null?b+=x:b+=p.getLine(R).substring(k,$)}},u,c),b},this.getDisplayLine=function(l,u,c,i){var s=this.getFoldLine(l);if(s)return this.getFoldDisplayLine(s,l,u,c,i);var p;return p=this.doc.getLine(l),p.substring(i||0,u||p.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(u){var c=u.folds.map(function(i){return i.clone()});return new m(l,c)}),l},this.toggleFold=function(l){var u=this.selection,c=u.getRange(),i,s;if(c.isEmpty()){var p=c.start;if(i=this.getFoldAt(p.row,p.column),i){this.expandFold(i);return}else if(l){var b=this.getFoldLine(p.row);b&&this.expandFolds(b.folds);return}else(s=this.findMatchingBracket(p))?c.comparePoint(s)==1?c.end=s:(c.start=s,c.start.column++,c.end.column--):(s=this.findMatchingBracket({row:p.row,column:p.column+1}))?(c.comparePoint(s)==1?c.end=s:c.start=s,c.start.column++):c=this.getCommentFoldRange(p.row,p.column)||c}else{var x=this.getFoldsInRange(c);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(c.start.row,c.start.column)),i&&i.range.toString()==c.toString()){this.expandFold(i);return}var R="...";if(!c.isMultiLine()){if(R=this.getTextRange(c),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,c)},this.getCommentFoldRange=function(l,u,c){var i=new h(this,l,u),s=i.getCurrentToken(),p=s&&s.type;if(s&&/^comment|string/.test(p)){p=p.match(/comment|string/)[0],p=="comment"&&(p+="|doc-start|\\.doc");var b=new RegExp(p),x=new g;if(c!=1){do s=i.stepBackward();while(s&&b.test(s.type));s=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+s.value.length,i=new h(this,l,u);var R=this.getState(i.$row);if(c!=-1){var $=-1;do if(s=i.stepForward(),$==-1){var k=this.getState(i.$row);R.toString()!==k.toString()&&($=i.$row)}else if(i.$row>$)break;while(s&&b.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return x.end.row=i.getCurrentTokenRow(),x.end.column=i.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(l,u,c,i){c==null&&(c=1e5);var s=this.foldWidgets;if(s){u=u||this.getLength(),l=l||0;for(var p=l;p<u;p++)if(s[p]==null&&(s[p]=this.getFoldWidget(p)),s[p]=="start"&&!(i&&!i(p))){var b=this.getFoldWidgetRange(p);b&&b.isMultiLine()&&b.end.row<=u&&b.start.row>=l&&(p=b.end.row,b.collapseChildren=c,this.addFold("...",b))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(u){for(var c=l.getTokens(u),i=0;i<c.length;i++){var s=c[i];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,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(l,u){var c=this.foldWidgets;if(!c||u&&c[l])return{};for(var i=l-1,s;i>=0;){var p=c[i];if(p==null&&(p=c[i]=this.getFoldWidget(i)),p=="start"){var b=this.getFoldWidgetRange(i);if(s||(s=b),b&&b.end.row>=l)break}i--}return{range:i!==-1&&b,firstRange:s}},this.onFoldWidgetClick=function(l,u){u instanceof d&&(u=u.domEvent);var c={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},i=this.$toggleFoldWidget(l,c);if(!i){var s=u.target||u.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,u){if(this.getFoldWidget){var c=this.getFoldWidget(l),i=this.getLine(l),s=c==="end"?-1:1,p=this.getFoldAt(l,s===-1?0:i.length,s);if(p)return u.children||u.all?this.removeFold(p):this.expandFold(p),p;var b=this.getFoldWidgetRange(l,!0);if(b&&!b.isMultiLine()&&(p=this.getFoldAt(b.start.row,b.start.column,1),p&&b.isEqual(p.range)))return this.removeFold(p),p;if(u.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var R=x.range.start.row+1,$=x.range.end.row;this.foldAll(R,$,u.all?1e4:0)}else u.children?($=b?b.end.row:this.getLength(),this.foldAll(l+1,$,u.all?1e4:0)):b&&(u.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(l){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var c=this.$toggleFoldWidget(u,{});if(!c){var i=this.getParentFoldRangeData(u,!0);if(c=i.range||i.firstRange,c){u=c.start.row;var s=this.getFoldAt(u,this.getLine(u).length,1);s?this.removeFold(s):this.addFold("...",c)}}},this.updateFoldWidgets=function(l){var u=l.start.row,c=l.end.row-u;if(c===0)this.foldWidgets[u]=null;else if(l.action=="remove")this.foldWidgets.splice(u,c+1,null);else{var i=Array(c+1);i.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(l){var u=l.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,f){var g=e("../token_iterator").TokenIterator,m=e("../range").Range;function w(){this.findMatchingBracket=function(h,d){if(h.column==0)return null;var a=d||this.getLine(h.row).charAt(h.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h):null},this.getBracketRange=function(h){var d=this.getLine(h.row),a=!0,l,u=d.charAt(h.column-1),c=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(c||(u=d.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(/([\(\[\{])|([\)\]\}])/),a=!1),!c)return null;if(c[1]){var i=this.$findClosingBracket(c[1],h);if(!i)return null;l=m.fromPoints(h,i),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var i=this.$findOpeningBracket(c[2],h);if(!i)return null;l=m.fromPoints(i,h),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(h,d){var a=this.getLine(h.row),l=/([\(\[\{])|([\)\]\}])/,u=!d&&a.charAt(h.column-1),c=u&&u.match(l);if(c||(u=(d===void 0||d)&&a.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(l)),!c)return null;var i=new m(h.row,h.column-1,h.row,h.column),s=c[1]?this.$findClosingBracket(c[1],h):this.$findOpeningBracket(c[2],h);if(!s)return[i];var p=new m(s.row,s.column,s.row,s.column+1);return[i,p]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,d,a){var l=this.$brackets[h],u=1,c=new g(this,d.row,d.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){a||(a=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=d.column-c.getCurrentTokenColumn()-2,p=i.value;;){for(;s>=0;){var b=p.charAt(s);if(b==l){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:s+c.getCurrentTokenColumn()}}else b==h&&(u+=1);s-=1}do i=c.stepBackward();while(i&&!a.test(i.type));if(i==null)break;p=i.value,s=p.length-1}return null}},this.$findClosingBracket=function(h,d,a){var l=this.$brackets[h],u=1,c=new g(this,d.row,d.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){a||(a=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=d.column-c.getCurrentTokenColumn();;){for(var p=i.value,b=p.length;s<b;){var x=p.charAt(s);if(x==l){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:s+c.getCurrentTokenColumn()}}else x==h&&(u+=1);s+=1}do i=c.stepForward();while(i&&!a.test(i.type));if(i==null)break;s=0}return null}},this.getMatchingTags=function(h){var d=new g(this,h.row,h.column),a=this.$findTagName(d);if(a){var l=d.stepBackward();return l.value==="<"?this.$findClosingTag(d,a):this.$findOpeningTag(d,a)}},this.$findTagName=function(h){var d=h.getCurrentToken(),a=!1,l=!1;if(d&&d.type.indexOf("tag-name")===-1)do l?d=h.stepBackward():d=h.stepForward(),d&&(d.value==="/>"?l=!0:d.type.indexOf("tag-name")!==-1&&(a=!0));while(d&&!a);return d},this.$findClosingTag=function(h,d){var a,l=d.value,u=d.value,c=0,i=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=h.stepForward();var s=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length),p=!1;do{if(a=d,a.type.indexOf("tag-close")!==-1&&!p){var b=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=!0}if(d=h.stepForward(),d){if(d.value===">"&&!p){var b=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=!0}if(d.type.indexOf("tag-name")!==-1){if(l=d.value,u===l){if(a.value==="<")c++;else if(a.value==="</"&&(c--,c<0)){h.stepBackward();var x=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);d=h.stepForward();var R=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=h.stepForward()),d&&d.value===">")var $=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===l&&d.value==="/>"&&(c--,c<0))var x=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),R=x,$=R,b=new m(s.end.row,s.end.column,s.end.row,s.end.column+1)}}while(d&&c>=0);if(i&&b&&x&&$&&s&&R)return{openTag:new m(i.start.row,i.start.column,b.end.row,b.end.column),closeTag:new m(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:s,closeTagName:R}},this.$findOpeningTag=function(h,d){var a=h.getCurrentToken(),l=d.value,u=0,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),s=i+2,p=new m(c,i,c,s);h.stepForward();var b=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=h.stepForward()),!(!d||d.value!==">")){var x=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(d=a,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),s=i+d.value.length,a=h.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(l===d.value)if(a.value==="<"){if(u++,u>0){var R=new m(c,i,c,s),$=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do d=h.stepForward();while(d&&d.value!==">");var k=new m(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else a.value==="</"&&u--}else if(d.value==="/>"){for(var C=0,L=a;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===l){u--;break}else if(L.value==="<")break;L=h.stepBackward(),C++}for(var D=0;D<C;D++)h.stepForward()}}while(a&&u<=0);if($&&k&&p&&x&&R&&b)return{openTag:new m($.start.row,$.start.column,k.end.row,k.end.column),closeTag:new m(p.start.row,p.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:b}}}}r.BracketMatch=w}),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 g=e("./lib/oop"),m=e("./lib/lang"),w=e("./bidihandler").BidiHandler,h=e("./config"),d=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,c=e("./line_widgets").LineWidgets,i=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,b=e("./undomanager").UndoManager,x=function(){function P(O,_){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.$gutterCustomWidgets={},this.bgTokenizer=new s(new l().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 i(O)),this.setDocument(O),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),h.resetOptions(this),this.setMode(_),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=m.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 _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(_),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 c(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 _=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;_>A&&(this.$docRowCache.splice(A,_),this.$screenRowCache.splice(A,_))},P.prototype.$getRowCacheIndex=function(O,_){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(_>U)A=B+1;else if(_<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 _=O.data;this.$resetRowCache(_.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var _=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},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 _=new b;_.$undoStack=O.history.undo,_.$redoStack=O.history.redo,_.mark=O.history.mark,_.$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(_),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,_){var A=this.bgTokenizer.getTokens(O),N,B=0;if(_==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>=_));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 _=this;O.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.mergeUndoDeltas=!1},this.$informUndoManager=m.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()?m.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,_){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+_,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,_)},P.prototype.removeGutterDecoration=function(O,_){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var _=0;_<O.length;_++)this.$breakpoints[O[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[O]=_:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,_,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:_,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,_){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!_,_?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var _=this.$frontMarkers[O]||this.$backMarkers[O];if(_){var A=_.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var _=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,_,A,N){typeof _!="number"&&(A=_,_=O),A||(A="ace_step");var B=new u(O,0,_,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 _=O.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
|
|
198
|
+
`},P.prototype.getWordRange=function(O,_){var A=this.getLine(O),N=!1;if(_>0&&(N=!!A.charAt(_-1).match(this.tokenRe)),N||(N=!!A.charAt(_).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(_-1,_+1)))var B=/\s/;else var B=this.nonTokenRe;var U=_;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=_;K<A.length&&A.charAt(K).match(B);)K++;return new u(O,U,O,K)},P.prototype.getAWordRange=function(O,_){for(var A=this.getWordRange(O,_),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 _=O.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,_){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 l),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),_&&_();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return _&&_();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)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,_){if(_||(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,_||(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(_){_&&_.screenWidth>O&&(O=_.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 _=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=_.length,J=0;J<Z;J++){if(J>K){if(J=U.end.row+1,J>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[J]==null&&(A[J]=this.$getStringScreenWidth(_[J])[0]),A[J]>N&&(N=A[J])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,_){return this.doc.getLines(O,_)},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,_){return this.doc.insert(O,_)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,_){return this.doc.removeFullLines(O,_)},P.prototype.undoChanges=function(O,_){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)}!_&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,_){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)}!_&&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,_){function A(Z){return _?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,_){return this.doc.replace(O,_)},P.prototype.moveText=function(O,_,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=u.fromPoints(_,_);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 J=O.start,he=U.start,K=he.row-J.row,Z=he.column-J.column;this.addFolds(B.map(function(se){return se=se.clone(),se.start.row==J.row&&(se.start.column+=Z),se.end.row==J.row&&(se.end.column+=Z),se.start.row+=K,se.end.row+=K,se}))}return U},P.prototype.indentRows=function(O,_,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=_;N++)this.doc.insertInLine({row:N,column:0},A)},P.prototype.outdentRows=function(O){for(var _=O.collapseRows(),A=new u(0,0,0,0),N=this.getTabSize(),B=_.start.row;B<=_.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,_,A){if(O=this.getRowFoldStart(O),_=this.getRowFoldEnd(_),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(_+A);if(N>this.doc.getLength()-1)return 0;var B=N-_}else{O=this.$clipRowToDocument(O),_=this.$clipRowToDocument(_);var B=_-O+1}var U=new u(O,0,_,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(J){return J=J.clone(),J.start.row+=B,J.end.row+=B,J}),Z=A==0?this.doc.getLines(O,_):this.doc.removeFullLines(O,_);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,_){return this.$moveLines(O,_,-1)},P.prototype.moveLinesDown=function(O,_){return this.$moveLines(O,_,1)},P.prototype.duplicateLines=function(O,_){return this.$moveLines(O,_,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,_){return _<0?0:Math.min(this.doc.getLine(O).length,_)},P.prototype.$clipPositionToDocument=function(O,_){if(_=Math.max(0,_),O<0)O=0,_=0;else{var A=this.doc.getLength();O>=A?(O=A-1,_=this.doc.getLine(A-1).length):_=Math.min(this.doc.getLine(O).length,_)}return{row:O,column:_}},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 _=this.doc.getLength()-1;return O.end.row>_?(O.end.row=_,O.end.column=this.doc.getLine(_).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 _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,_){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:O,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,_){var A=this.$wrapLimitRange;A.max<0&&(A={min:_,max:_});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,_,A){return _&&(O=Math.max(_,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 _=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,J=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;J=this.getFoldsInRange(O),this.removeFolds(J);var ne=this.getFoldLine(B.row),le=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var se=this.getFoldLine(U);se&&se!==ne&&(se.merge(ne),ne=se),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var de=Array(Z);de.unshift(U,0);var me=_?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,de);var he=this.$foldData,ne=this.getFoldLine(U),le=0;if(ne){var $e=ne.range.compareInside(N.row,N.column);$e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-N.column))):$e==-1&&(ne.addRemoveChars(U,0,B.column-N.column),ne.shiftRow(Z)),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(J=this.getFoldsInRange(O),this.removeFolds(J),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),J},P.prototype.$updateRowLengthCache=function(O,_){this.$rowLengthCache[O]=null,this.$rowLengthCache[_]=null},P.prototype.$updateWrapData=function(O,_){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,J=O;for(_=Math.min(_,A.length-1);J<=_;)Z=this.getFoldLine(J,Z),Z?(K=[],Z.walk((function(he,ne,le,se){var de;if(he!=null){de=this.$getDisplayTokens(he,K.length),de[0]=k;for(var me=1;me<de.length;me++)de[me]=C}else de=this.$getDisplayTokens(A[ne].substring(se,le),K.length);K=K.concat(de)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),J=Z.end.row+1):(K=this.$getDisplayTokens(A[J]),B[J]=this.$computeWrapSplits(K,U,N),J++)},P.prototype.$computeWrapSplits=function(O,_,A){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,J=this.$indentedSoftWrap,he=_<=Math.max(2*A,8)||J===!1?0:Math.floor(_/2);function ne(){var $e=0;if(he===0)return $e;if(J)for(var Te=0;Te<O.length;Te++){var Me=O[Te];if(Me==D)$e+=1;else if(Me==E)$e+=A;else{if(Me==I)continue;break}}return Z&&J!==!1&&($e+=A),Math.min($e,he)}function le($e){for(var Te=$e-U,Me=U;Me<$e;Me++){var Xe=O[Me];(Xe===12||Xe===2)&&(Te-=1)}N.length||(se=ne(),N.indent=se),K+=Te,N.push(K),U=$e}for(var se=0;B-U>_-se;){var de=U+_-se;if(O[de-1]>=D&&O[de]>=D){le(de);continue}if(O[de]==k||O[de]==C){for(de;de!=U-1&&O[de]!=k;de--);if(de>U){le(de);continue}for(de=U+_,de;de<O.length&&O[de]==C;de++);if(de==O.length)break;le(de);continue}for(var me=Math.max(de-(_-(_>>2)),U-1);de>me&&O[de]<k;)de--;if(Z){for(;de>me&&O[de]<k;)de--;for(;de>me&&O[de]==L;)de--}else for(;de>me&&O[de]<D;)de--;if(de>me){le(++de);continue}de=U+_,O[de]==$&&de--,le(de-se)}return N},P.prototype.$getDisplayTokens=function(O,_){var A=[],N;_=_||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+_),A.push(E);for(var K=1;K<N;K++)A.push(I)}else U==32?A.push(D):U>39&&U<48||U>57&&U<64?A.push(L):U>=4352&&z(U)?A.push(R,$):A.push(R)}return A},P.prototype.$getStringScreenWidth=function(O,_,A){if(_==0)return[0,0];_==null&&(_=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&&z(N)?A+=2:A+=1,!(A>_));B++);return[A,B]},P.prototype.getRowLength=function(O){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?_:this.$wrapData[O].length+_},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 _=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[_.row];return A.length&&A[0]<_.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},P.prototype.getDocumentLastRowColumn=function(O,_){var A=this.documentToScreenRow(O,_);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,_){var A=this.documentToScreenRow(O,_);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,_){return this.screenToDocumentPosition(O,_).row},P.prototype.screenToDocumentColumn=function(O,_){return this.screenToDocumentPosition(O,_).column},P.prototype.screenToDocumentPosition=function(O,_,A){if(O<0)return{row:0,column:0};var N,le=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,J=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&J>=0)var ne=Z[J],le=this.$docRowCache[J],se=O>Z[he-1];else var se=!he;for(var de=this.getLength()-1,me=this.getNextFoldLine(le),$e=me?me.start.row:1/0;ne<=O&&(K=this.getRowLength(le),!(ne+K>O||le>=de));)ne+=K,le++,le>$e&&(le=me.end.row+1,me=this.getNextFoldLine(le,me),$e=me?me.start.row:1/0),se&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne));if(me&&me.start.row<=le)N=this.getFoldDisplayLine(me),le=me.start.row;else{if(ne+K<=O||le>de)return{row:de,column:this.getLine(de).length};N=this.getLine(le),me=null}var Te=0,Me=Math.floor(O-ne);if(this.$useWrapMode){var Xe=this.$wrapData[le];Xe&&(U=Xe[Me],Me>0&&Xe.length&&(Te=Xe.indent,B=Xe[Me-1]||Xe[Xe.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Me,le,Me)&&(_=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,_-Te)[1],this.$useWrapMode&&B>=U&&(B=U-1),me?me.idxToPosition(B):{row:le,column:B}},P.prototype.documentToScreenPosition=function(O,_){if(typeof _>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,_);O=A.row,_=A.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,_,1),B&&(O=B.start.row,_=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),J=K.length;if(J&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],le=O>K[J-1];else var le=!J;for(var se=this.getNextFoldLine(he),de=se?se.start.row:1/0;he<O;){if(he>=de){if(U=se.end.row+1,U>O)break;se=this.getNextFoldLine(U,se),de=se?se.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var me="";se&&he>=de?(me=this.getFoldDisplayLine(se,O,_),N=se.start.row):(me=this.getLine(O).substring(0,_),N=O);var $e=0;if(this.$useWrapMode){var Te=this.$wrapData[N];if(Te){for(var Me=0;me.length>=Te[Me];)ne++,Me++;me=me.substring(Te[Me-1]||0,me.length),$e=Me>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:$e+this.$getStringScreenWidth(me)[0]}},P.prototype.documentToScreenColumn=function(O,_){return this.documentToScreenPosition(O,_).column},P.prototype.documentToScreenRow=function(O,_){return this.documentToScreenPosition(O,_).row},P.prototype.getScreenLength=function(){var O=0,_=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,_=this.$foldData[B++],U=_?_.start.row:1/0;N<A;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=_.end.row+1,_=this.$foldData[B++],U=_?_.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)_=Z[B],O-=_.end.row-_.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<_.length&&(B=_.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 _=this.getLine(O.row);return _[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}();x.$uid=0,x.prototype.$modes=h.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=z,g.implement(x.prototype,d);var R=1,$=2,k=3,C=4,L=9,D=10,E=11,I=12;function z(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(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),h.defineOptions(x.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=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,f){var g=e("./lib/lang"),m=e("./lib/oop"),w=e("./range").Range,h=function(){function u(){this.$options={}}return u.prototype.set=function(c){return m.mixin(this.$options,c),this},u.prototype.getOptions=function(){return g.copyObject(this.$options)},u.prototype.setOptions=function(c){this.$options=c},u.prototype.find=function(c){var i=this.$options,s=this.$matchIterator(c,i);if(!s)return!1;var p=null;return s.forEach(function(b,x,R,$){return p=new w(b,x,R,$),x==$&&i.start&&i.start.start&&i.skipCurrent!=!1&&p.isEqual(i.start)?(p=null,!1):!0}),p},u.prototype.findAll=function(c){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var s=i.range,p=s?c.getLines(s.start.row,s.end.row):c.doc.getAllLines(),b=[],x=i.re;if(i.$isMultiLine){var R=x.length,$=p.length-R,k;e:for(var C=x.offset||0;C<=$;C++){for(var L=0;L<R;L++)if(p[C+L].search(x[L])==-1)continue e;var D=p[C],E=p[C+R-1],I=D.length-D.match(x[0])[0].length,z=E.match(x[R-1])[0].length;k&&k.end.row===C&&k.end.column>I||(b.push(k=new w(C,I,C+R-1,z)),R>2&&(C=C+R-2))}}else for(var P,O=0;O<p.length;O++)if(this.$isMultilineSearch(i)){var _=p.length-1;if(P=this.$multiLineForward(c,x,O,_),P){var A=P.endRow<=_?P.endRow-1:_;A>O&&(O=A),b.push(new w(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=g.getMatchOffsets(p[O],x);for(var L=0;L<P.length;L++){var N=P[L];b.push(new w(O,N.offset,O,N.offset+N.length))}}if(s){for(var B=s.start.column,U=s.end.column,O=0,L=b.length-1;O<L&&b[O].start.column<B&&b[O].start.row==0;)O++;for(var K=s.end.row-s.start.row;O<L&&b[L].end.column>U&&b[L].end.row==K;)L--;for(b=b.slice(O,L+1),O=0,L=b.length;O<L;O++)b[O].start.row+=s.start.row,b[O].end.row+=s.start.row}return b},u.prototype.parseReplaceString=function(c){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},s="",p=0,b=c.length;p<b;p++){var x=c.charCodeAt(p);if(x===i.Backslash){if(p++,p>=b){s+="\\";break}var R=c.charCodeAt(p);switch(R){case i.Backslash:s+="\\";break;case i.n:s+=`
|
|
199
|
+
`;break;case i.t:s+=" ";break}continue}if(x===i.DollarSign){if(p++,p>=b){s+="$";break}var $=c.charCodeAt(p);if($===i.DollarSign){s+="$$";continue}if($===i.Digit0||$===i.Ampersand){s+="$&";continue}if(i.Digit1<=$&&$<=i.Digit9){s+="$"+c[p];continue}}s+=c[p]}return s||c},u.prototype.replace=function(c,i){var s=this.$options,p=this.$assembleRegExp(s);if(s.$isMultiLine)return i;if(p){var b=this.$isMultilineSearch(s);b&&(c=c.replace(/\r\n|\r|\n/g,`
|
|
200
|
+
`));var x=p.exec(c);if(!x||!b&&x[0].length!=c.length)return null;if(i=s.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=c.replace(p,i),s.preserveCase){i=i.split("");for(var R=Math.min(c.length,c.length);R--;){var $=c[R];$&&$.toLowerCase()!=$?i[R]=i[R].toUpperCase():i[R]=i[R].toLowerCase()}i=i.join("")}return i}},u.prototype.$assembleRegExp=function(c,i){if(c.needle instanceof RegExp)return c.re=c.needle;var s=c.needle;if(!c.needle)return c.re=!1;c.regExp||(s=g.escapeRegExp(s));var p=c.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),c.$supportsUnicodeFlag=!0,p+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(s=d(s,c)),c.$isMultiLine=!i&&/[\n\r]/.test(s),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(s,p);try{var b=new RegExp(s,p)}catch{b=!1}return c.re=b},u.prototype.$assembleMultilineRegExp=function(c,i){for(var s=c.replace(/\r\n|\r|\n/g,`$
|
|
201
|
+
^`).split(`
|
|
202
|
+
`),p=[],b=0;b<s.length;b++)try{p.push(new RegExp(s[b],i))}catch{return!1}return p},u.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},u.prototype.$multiLineForward=function(c,i,s,p){for(var b,x=l(c,s),R=s;R<=p;){for(var $=0;$<x&&!(R>p);$++){var k=c.getLine(R++);b=b==null?k:b+`
|
|
203
|
+
`+k}var C=i.exec(b);if(i.lastIndex=0,C){var L=b.slice(0,C.index).split(`
|
|
204
|
+
`),D=C[0].split(`
|
|
205
|
+
`),E=s+L.length-1,I=L[L.length-1].length,z=E+D.length-1,P=D.length==1?I+D[0].length:D[D.length-1].length;return{startRow:E,startCol:I,endRow:z,endCol:P}}}return null},u.prototype.$multiLineBackward=function(c,i,s,p,b){for(var x,R=l(c,p),$=c.getLine(p).length-s,k=p;k>=b;){for(var C=0;C<R&&k>=b;C++){var L=c.getLine(k--);x=x==null?L:L+`
|
|
206
|
+
`+x}var D=a(x,i,$);if(D){var E=x.slice(0,D.index).split(`
|
|
207
|
+
`),I=D[0].split(`
|
|
208
|
+
`),z=k+E.length,P=E[E.length-1].length,O=z+I.length-1,_=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:z,startCol:P,endRow:O,endCol:_}}}return null},u.prototype.$matchIterator=function(c,i){var s=this.$assembleRegExp(i);if(!s)return!1;var p=this.$isMultilineSearch(i),b=this.$multiLineForward,x=this.$multiLineBackward,R=i.backwards==!0,$=i.skipCurrent!=!1,k=s.unicode,C=i.range,L=i.start;L||(L=C?C[R?"end":"start"]:c.selection.getRange()),L.start&&(L=L[$!=R?"end":"start"]);var D=C?C.start.row:0,E=C?C.end.row:c.getLength()-1;if(R)var I=function(O){var _=L.row;if(!P(_,L.column,O)){for(_--;_>=D;_--)if(P(_,Number.MAX_VALUE,O))return;if(i.wrap!=!1){for(_=E,D=L.row;_>=D;_--)if(P(_,Number.MAX_VALUE,O))return}}};else var I=function(O){var _=L.row;if(!P(_,L.column,O)){for(_=_+1;_<=E;_++)if(P(_,0,O))return;if(i.wrap!=!1){for(_=D,E=L.row;_<=E;_++)if(P(_,0,O))return}}};if(i.$isMultiLine)var z=s.length,P=function(O,_,A){var N=R?O-z+1:O;if(!(N<0||N+z>c.getLength())){var B=c.getLine(N),U=B.search(s[0]);if(!(!R&&U<_||U===-1)){for(var K=1;K<z;K++)if(B=c.getLine(N+K),B.search(s[K])==-1)return;var Z=B.match(s[z-1])[0].length;if(!(R&&Z>_)&&A(N,U,N+z-1,Z))return!0}}};else if(R)var P=function(O,_,A){if(p){var N=x(c,s,_,O,D);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=c.getLine(O),U=[],K,Z=0;for(s.lastIndex=0;K=s.exec(B);){var J=K[0].length;if(Z=K.index,!J){if(Z>=B.length)break;s.lastIndex=Z+=g.skipEmptyMatch(B,Z,k)}if(K.index+J>_)break;U.push(K.index,J)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],J=U[he];if(A(O,ne,O,ne+J))return!0}}};else var P=function(O,_,A){if(s.lastIndex=_,p){var N=b(c,s,O,E);if(N){var B=N.endRow<=E?N.endRow-1:E;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=c.getLine(O),K,Z;Z=s.exec(U);){var J=Z[0].length;if(K=Z.index,A(O,K,O,K+J))return!0;if(!J&&(s.lastIndex=K+=g.skipEmptyMatch(U,K,k),K>=U.length))return!1}};return{forEach:I}},u}();function d(u,c){var i=g.supportsLookbehind();function s(R,$){$===void 0&&($=!0);var k=i&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(R)||c.regExp?i&&c.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(u),b=p[0],x=p[p.length-1];return s(b)+u+s(x,!1)}function a(u,c,i){for(var s=null,p=0;p<=u.length;){c.lastIndex=p;var b=c.exec(u);if(!b)break;var x=b.index+b[0].length;if(x>u.length-i)break;(!s||x>s.index+s[0].length)&&(s=b),p=b.index+1}return s}function l(u,c){var i=5e3,s={row:c,column:0},p=u.doc.positionToIndex(s),b=p+i,x=u.doc.indexToPosition(b),R=x.row;return R+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,f){var g=this&&this.__extends||function(){var u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(s[b]=p[b])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function s(){this.constructor=c}c.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),m=e("../lib/keys"),w=e("../lib/useragent"),h=m.KEY_MODS,d=function(){function u(c,i){this.$init(c,i,!1)}return u.prototype.$init=function(c,i,s){this.platform=i||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=s},u.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},u.prototype.removeCommand=function(c,i){var s=c&&(typeof c=="string"?c:c.name);c=this.commands[s],i||delete this.commands[s];var p=this.commandKeyBinding;for(var b in p){var x=p[b];if(x==c)delete p[b];else if(Array.isArray(x)){var R=x.indexOf(c);R!=-1&&(x.splice(R,1),x.length==1&&(p[b]=x[0]))}}},u.prototype.bindKey=function(c,i,s){if(typeof c=="object"&&c&&(s==null&&(s=c.position),c=c[this.platform]),!!c){if(typeof i=="function")return this.addCommand({exec:i,bindKey:c,name:i.name||c});c.split("|").forEach(function(p){var b="";if(p.indexOf(" ")!=-1){var x=p.split(/\s+/);p=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),L=h[C.hashId]+C.key;b+=(b?" ":"")+L,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var R=this.parseKeys(p),$=h[R.hashId]+R.key;this._addCommandToBinding(b+$,i,s)},this)}},u.prototype._addCommandToBinding=function(c,i,s){var p=this.commandKeyBinding,b;if(!i)delete p[c];else if(!p[c]||this.$singleCommand)p[c]=i;else{Array.isArray(p[c])?(b=p[c].indexOf(i))!=-1&&p[c].splice(b,1):p[c]=[p[c]],typeof s!="number"&&(s=a(i));var x=p[c];for(b=0;b<x.length;b++){var R=x[b],$=a(R);if($>s)break}x.splice(b,0,i)}},u.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(i){var s=c[i];if(s){if(typeof s=="string")return this.bindKey(s,i);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=i),this.addCommand(s))}},this)},u.prototype.removeCommands=function(c){Object.keys(c).forEach(function(i){this.removeCommand(c[i])},this)},u.prototype.bindKeys=function(c){Object.keys(c).forEach(function(i){this.bindKey(i,c[i])},this)},u.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},u.prototype.parseKeys=function(c){var i=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),s=i.pop(),p=m[s];if(m.FUNCTION_KEYS[p])s=m.FUNCTION_KEYS[p].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:s.toUpperCase(),hashId:-1}}else return{key:s,hashId:-1};for(var b=0,x=i.length;x--;){var R=m.KEY_MODS[i[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+c),!1;b|=R}return{key:s,hashId:b}},u.prototype.findKeyCommand=function(c,i){var s=h[c]+i;return this.commandKeyBinding[s]},u.prototype.handleKeyboard=function(c,i,s,p){if(!(p<0)){var b=h[i]+s,x=this.commandKeyBinding[b];return c.$keyChain&&(c.$keyChain+=" "+b,x=this.commandKeyBinding[c.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||b,{command:"null"}):(c.$keyChain&&((!i||i==4)&&s.length==1?c.$keyChain=c.$keyChain.slice(0,-b.length-1):(i==-1||p>0)&&(c.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(c,i){return i.$keyChain||""},u}();function a(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var l=function(u){g(c,u);function c(i,s){var p=u.call(this,i,s)||this;return p.$singleCommand=!0,p}return c}(d);l.call=function(u,c,i){d.prototype.$init.call(u,c,i,!0)},d.call=function(u,c,i){d.prototype.$init.call(u,c,i,!1)},r.HashHandler=l,r.MultiHashHandler=d}),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 g=this&&this.__extends||function(){var a=function(l,u){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(c[s]=i[s])},a(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");a(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),m=e("../lib/oop"),w=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,d=function(a){g(l,a);function l(u,c){var i=a.call(this,c,u)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),i}return l.prototype.exec=function(u,c,i){if(Array.isArray(u)){for(var s=u.length;s--;)if(this.exec(u[s],c,i))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var p={editor:c,command:u,args:i};return this.canExecute(u,c)?(p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1):(this._signal("commandUnavailable",p),!1)},l.prototype.canExecute=function(u,c){return typeof u=="string"&&(u=this.commands[u]),!(!u||c&&c.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(c))},l.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(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,u):this.exec(c[0],u,c[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(u){return u.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},l}(w);m.implement(d.prototype,h),r.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,f){var g=e("../lib/lang"),m=e("../config"),w=e("../range").Range;function h(a,l){return{win:a,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(a){m.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(a){m.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(a){m.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(a,l){typeof l=="number"&&!isNaN(l)&&a.gotoLine(l),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.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(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(a){m.loadModule("ace/ext/searchbox",function(l){l.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.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(a){a.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(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(a,l){a.navigateUp(l.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(a){a.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(a){a.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(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(a,l){a.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(a){a.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(a){a.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(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(a,l){a.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(a){a.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(a){a.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(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(a,l){a.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.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(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var l=a.$copyWithEmptySelection&&a.selection.isEmpty(),u=l?a.selection.getLineRange():a.selection.getRange();a._emit("cut",u),u.isEmpty()||a.session.remove(u),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,l){a.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(a){m.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(a){var l=a.selection.getRange();l.start.column=0,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(a){var l=a.selection.getRange();l.end.column=Number.MAX_VALUE,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,l){a.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,l){a.insert(g.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var l=a.selection.getRange();l.start.column=l.end.column=0,l.end.row++,a.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(a){for(var l=a.selection.isBackwards(),u=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),c=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),i=a.session.doc.getLine(u.row).length,s=a.session.doc.getTextRange(a.selection.getRange()),p=s.replace(/\n\s*/," ").length,b=a.session.doc.getLine(u.row),x=u.row+1;x<=c.row+1;x++){var R=g.stringTrimLeft(g.stringTrimRight(a.session.doc.getLine(x)));R.length!==0&&(R=" "+R),b+=R}c.row+1<a.session.doc.getLength()-1&&(b+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new w(u.row,0,c.row+2,0),b),p>0?(a.selection.moveCursorTo(u.row,u.column),a.selection.selectTo(u.row,u.column+p)):(i=a.session.doc.getLine(u.row).length>i?i+1:i,a.selection.moveCursorTo(u.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(a){var l=a.session.doc.getLength()-1,u=a.session.doc.getLine(l).length,c=a.selection.rangeList.ranges,i=[];c.length<1&&(c=[a.selection.getRange()]);for(var s=0;s<c.length;s++)s==c.length-1&&(c[s].end.row===l&&c[s].end.column===u||i.push(new w(c[s].end.row,c[s].end.column,l,u))),s===0?c[s].start.row===0&&c[s].start.column===0||i.push(new w(0,0,c[s].start.row,c[s].start.column)):i.push(new w(c[s-1].end.row,c[s-1].end.column,c[s].start.row,c[s].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var s=0;s<i.length;s++)a.selection.addRange(i[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
|
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var l=a.getCursorPosition();a.selection.moveTo(l.row-1,Number.MAX_VALUE),a.insert(`
|
|
210
|
+
`),l.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)r.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,f){var g=e("../lib/keys"),m=function(){function h(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===g.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=g.enter)return;d.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(l),c=this.$findNearestAnnotation(l);if(!(u===null&&c===null)){var i=this.$findClosestNumber(u,c,l);if(i===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=c,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new w(d,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===g.tab){d.preventDefault();return}if(d.keyCode===g.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===g.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===g.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===g.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===g.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===g.enter||d.keyCode===g.space){switch(d.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[a];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(d,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},h.prototype.$isFoldWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getFoldWidget(d).style.display!=="none";return a&&l},h.prototype.$isCustomWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=!!this.$getCustomWidget(d);return a&&l},h.prototype.$isAnnotationVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getAnnotation(d).style.display!=="none";return a&&l},h.prototype.$getFoldWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[1]},h.prototype.$getCustomWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[3]},h.prototype.$getAnnotation=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[2]},h.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isCustomWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+a))return d+a;if(d-a>=0&&this.$isFoldWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+a))return d+a}return null},h.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isAnnotationVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+a))return d+a}return null},h.prototype.$focusFoldWidget=function(d){if(d!=null){var a=this.$getFoldWidget(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},h.prototype.$focusCustomWidget=function(d){if(d!=null){var a=this.$getCustomWidget(d);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},h.prototype.$focusAnnotation=function(d){if(d!=null){var a=this.$getAnnotation(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},h.prototype.$blurFoldWidget=function(d){var a=this.$getFoldWidget(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},h.prototype.$blurCustomWidget=function(d){var a=this.$getCustomWidget(d);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},h.prototype.$blurAnnotation=function(d){var a=this.$getAnnotation(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$findClosestNumber=function(d,a,l){return d===null?a:a===null||Math.abs(l-d)<=Math.abs(l-a)?d:a},h.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(d){var a=this.lines.get(d);return a?a.row:null},h.prototype.$rowToRowIndex=function(d){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==d)return a}return null},h}();r.GutterKeyboardHandler=m;var w=function(){function h(d,a){this.gutterKeyboardHandler=a,this.domEvent=d}return h.prototype.getKey=function(){return g.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h}();r.GutterKeyboardEvent=w}),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 g=this&&this.__values||function(_){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&_[A],B=0;if(N)return N.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&B>=_.length&&(_=void 0),{value:_&&_[B++],done:!_}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},m=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/lang"),d=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,i=e("./edit_session").EditSession,s=e("./search").Search,p=e("./range").Range,b=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,$=e("./config"),k=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,L=e("./config").nls,D=e("./clipboard"),E=e("./lib/keys"),I=e("./lib/event"),z=e("./tooltip").HoverTooltip,P=function(){function _(A,N,B){this.id="editor"+ ++_.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(d.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new a(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new u(this)),this.keyBinding=new c(this),this.$search=new s().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 i("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},_.prototype.startOperation=function(A){this.session.startOperation(A)},_.prototype.endOperation=function(A){this.session.endOperation(A)},_.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},_.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}},_.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())}},_.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()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.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()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(A){this.renderer.onResize(A)},_.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(A,N){this.renderer.setStyle(A,N)},_.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(A){this.setOption("fontSize",A)},_.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(se){N.removeMarker(se)}),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 J=new k(N,B.row,B.column),he=J.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 le="ace_bracket";Array.isArray(Z)?Z.length==1&&(le="ace_error_bracket"):Z=[Z],Z.length==2&&(p.comparePoints(Z[0].end,Z[1].start)==0?Z=[p.fromPoints(Z[0].start,Z[1].end)]:p.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[p.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(se){return N.addMarker(se,le,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},_.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.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()},_.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.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 p(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"))},_.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")},_.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 J=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(J.test(he))return J}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.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 J={text:A};return this._signal("copy",J),D.lineMode=B?J.text:!1,J.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},_.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===D.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(le){U.insert({row:le.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,J=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||J)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])}}},_.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},_.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 J=p.fromPoints(K,K);J.end.column+=A.length,this.session.remove(J)}}else{var J=this.getSelectionRange();K=this.session.remove(J),this.clearSelection()}if(A==`
|
|
212
|
+
`||A==`\r
|
|
213
|
+
`){var se=B.getLine(K.row);if(K.column>se.search(/\S|$/)){var he=se.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,le=B.getState(K.row),se=B.getLine(K.row),de=U.checkOutdent(le,se,A);if(B.insert(K,A),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new p(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new p(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var me=U.getNextLineIndent(le,se.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},me)}de&&U.autoOutdent(le,B,K.row)}},_.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new p(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",J=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,le=B[he].end.row,se=ne;se<=le;se++){se>0&&(U=A.getState(se-1),K=A.getLine(se-1),Z=N.getNextLineIndent(U,K,J));var de=A.getLine(se),me=N.$getIndent(de);if(Z!==me){if(me.length>0){var $e=new p(se,0,se,me.length);A.remove($e)}Z.length>0&&A.insert({row:se,column:0},Z)}N.autoOutdent(U,A,se)}},_.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()},_.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)}},_.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},_.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.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 J=B.getLine(N.end.row);/^\s+$/.test(J)&&(N.end.column=J.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.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()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
|
215
|
+
`),this.moveCursorToPosition(A)},_.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.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 p(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new p(A.row,N-2,A.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},_.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)},_.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)},_.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,J=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=J-he%J,le=h.stringRepeat(" ",ne);else{for(var ne=he%J;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),le=" "}return this.insert(le)},_.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},_.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},_.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(J,he){return J.toLowerCase()<he.toLowerCase()?-1:J.toLowerCase()>he.toLowerCase()?1:0});for(var K=new p(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])}},_.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)},_.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)},_.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},_.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new p(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 J=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-J,ne=parseFloat(Z.value);ne*=Math.pow(10,he),J!==Z.end&&B<J?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var le=ne.toFixed(he),se=new p(N,Z.start,N,Z.end);this.session.replace(se,le),this.moveCursorTo(N,Math.max(Z.start+1,B+le.length-Z.value.length))}}else this.toggleWord()},_.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 J=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Ke,at){he=J+Ke.length,Z>=J&&Z<=he&&(B=Ke,ne.selection.clearSelection(),ne.moveCursorTo(A,J+U),ne.selection.selectTo(A,he+U)),J=he});for(var le=this.$toggleWordPairs,se,de=0;de<le.length;de++)for(var me=le[de],$e=0;$e<=1;$e++){var Te=+!$e,Me=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(me[$e])+")\\s?$","i"));if(Me){var Xe=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Me[1])+")($|\\s)","g"));Xe&&(se=B.replace(new RegExp(h.escapeRegExp(me[$e]),"i"),function(Ke){var at=me[Te];return Ke.toUpperCase()==Ke?at=at.toUpperCase():Ke.charAt(0).toUpperCase()==Ke.charAt(0)&&(at=at.substr(0,0)+me[Te].charAt(0).toUpperCase()+at.substr(1)),at}),this.insert(se),se="")}}},_.prototype.findLinkAt=function(A,N){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),J=N;J<0&&(J=0);var he=0,ne=0,le;try{for(var se=g(Z),de=se.next();!de.done;de=se.next()){var me=de.value;if(ne=he+me.length,J>=he&&J<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){le=me.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch($e){B={error:$e}}finally{try{de&&!de.done&&(U=se.return)&&U.call(se)}finally{if(B)throw B.error}}return le},_.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},_.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},_.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,J=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=J,A.setSelectionRange(B,U)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.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 J=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,le=J.length,se=0;se<le;se++){var de=se;J[se].moveBy(he,0),B=this.$getSelectedRows(J[se]);for(var me=B.first,$e=B.last;++se<le;){ne&&J[se].moveBy(ne,0);var Te=this.$getSelectedRows(J[se]);if(N&&Te.first!=$e||!N&&Te.first>$e+1)break;$e=Te.last}for(se--,he=this.session.$moveLines(me,$e,N?0:A),N&&A==-1&&(de=se+1);de<=se;)J[de].moveBy(he,0),de++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},_.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},_.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.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)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},_.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},_.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)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},_.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},_.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new k(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var J=K||U.stepForward();if(J){var he,ne=!1,le={},se=B.column-J.start,de,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(J.value.match(/[{}()\[\]]/g)){for(;se<J.value.length&&!ne;se++)if(me[J.value[se]])switch(de=me[J.value[se]]+"."+J.type.replace("rparen","lparen"),isNaN(le[de])&&(le[de]=0),J.value[se]){case"(":case"[":case"{":le[de]++;break;case")":case"]":case"}":le[de]--,le[de]===-1&&(he="bracket",ne=!0);break}}else J.type.indexOf("tag-name")!==-1&&(isNaN(le[J.value])&&(le[J.value]=0),K.value==="<"&&Z>1?le[J.value]++:K.value==="</"&&le[J.value]--,le[J.value]===-1&&(he="tag",ne=!0));ne||(K=J,Z++,J=U.stepForward(),se=0)}while(J&&!ne);if(he){var $e,Te;if(he==="bracket")$e=this.session.getBracketRange(B),$e||($e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1),Te=$e.start,(N||Te.row===B.row&&Math.abs(Te.column-B.column)<2)&&($e=this.session.getBracketRange(Te)));else if(he==="tag"){if(!J||J.type.indexOf("tag-name")===-1)return;if($e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),$e.compare(B.row,B.column)===0){var Me=this.session.getMatchingTags(B);Me&&(Me.openTag.contains(B.row,B.column)?($e=Me.closeTag,Te=$e.start):($e=Me.openTag,Me.closeTag.start.row===B.row&&Me.closeTag.start.column===B.column?Te=$e.end:Te=$e.start))}Te=Te||$e.start}Te=$e&&$e.cursor||Te,Te&&(A?$e&&N?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},_.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)},_.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},_.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)},_.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)},_.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()},_.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()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.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},_.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},_.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},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&m.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)},_.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},_.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},_.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)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.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}),J=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,le=ne.$cursorLayer.$pixelPos,se=ne.layerConfig,de=le.top-se.offset;le.top>=0&&de+N.top<0?U=!0:le.top<se.height&&le.top+N.top+se.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=de+"px",K.style.left=le.left+"px",K.style.height=se.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",J))}}},_.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",w.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},_.prototype.prompt=function(A,N,B){var U=this;$.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,N,B)})},_}();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"],["&&","||"],["==","!="]],m.implement(P.prototype,b),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){var A=this;if(this.textInput.setReadOnly(_),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),U=B.key.length==1),!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new z);var K=w.createElement("div");K.textContent=L("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();_?(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(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){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(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?O.attach(this):O.detach(this)}},placeholder:{set:function(_){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),w.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),w.addCssClass(this.container,"ace_hasPlaceholder");var N=w.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(_){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===E.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("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(_){this.$textInputAriaLabel=_},initialValue:""},enableMobileMenu:{set:function(_){this.$enableMobileMenu=_},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",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(_,A){return(Math.abs(_.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(_,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(_,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,f){var g=e("../lib/dom"),m=function(){function w(h,d){this.element=h,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(h){g.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(h,d){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(h,d,a){var l=d.firstRowScreen*d.lineHeight,u=Math.floor(l/this.canvasHeight),c=a.documentToScreenRow(h,0)*d.lineHeight;return c-u*this.canvasHeight},w.prototype.computeLineHeight=function(h,d,a){return d.lineHeight*a.getRowLineCount(h)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(h){return this.cells[h]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var d=g.createFragment(this.element),a=0;a<h.length;a++)d.appendChild(h[a].element);this.element.appendChild(d)}else this.cells.push(h),this.element.appendChild(h.element)},w.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var d=g.createFragment(this.element),a=0;a<h.length;a++)d.appendChild(h[a].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},w.prototype.createCell=function(h,d,a,l){var u=this.cellCache.pop();if(!u){var c=g.createElement("div");l&&l(c),this.element.appendChild(c),u={element:c,text:"",row:h}}return u.row=h,u},w}();r.Lines=m}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,f){var g=e("../lib/dom"),m=e("../lib/oop"),w=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,a=e("../config").nls,l=function(){function c(i){this.$showCursorMarker=null,this.element=g.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,s)},c.prototype.removeGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,s)},c.prototype.setAnnotations=function(i){this.$annotations=[];for(var s=0;s<i.length;s++){var p=i[s],b=p.row,x=this.$annotations[b];x||(x=this.$annotations[b]={text:[],type:[],displayText:[]});var R=p.text,$=p.text,k=p.type;R=R?w.escapeHTML(R):p.html||"",$=$||p.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(k),x.displayText.push($));var C=p.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},c.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var s=i.start.row,p=i.end.row-s;if(p!==0)if(i.action=="remove")this.$annotations.splice(s,p+1,null);else{var b=new Array(p+1);b.unshift(s,1),this.$annotations.splice.apply(this.$annotations,b)}}},c.prototype.update=function(i){this.config=i;var s=this.session,p=i.firstRow,b=Math.min(i.lastRow+i.gutterOffset,s.getLength()-1);this.oldLastRow=b,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=s.getNextFoldLine(p),R=x?x.start.row:1/0,$=null,k=-1,C=p;;){if(C>R&&(C=x.end.row+1,x=s.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>b){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}$=this.$lines.get(++k),$?$.row=C:($=this.$lines.createCell(C,i,this.session,u),this.$lines.push($)),this.$renderCell($,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},c.prototype.$updateGutterWidth=function(i){var s=this.session,p=s.gutterRenderer||this.$renderer,b=s.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(x=s.getLength()+b-1);var R=p?p.getWidth(s,x,i):x.toString().length*i.characterWidth,$=this.$padding||this.$computePadding();R+=$.left+$.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},c.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var s=this.$lines.cells;this.$cursorCell=null;for(var p=0;p<s.length;p++){var b=s[p];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(p>0&&x&&x.start.row==s[p-1].row)b=s[p-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},c.prototype.$updateCursorMarker=function(){if(this.session){var i=this.session;this.$highlightElement||(this.$highlightElement=g.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var s=i.selection.cursor,p=this.config,b=this.$lines,x=p.firstRowScreen*p.lineHeight,R=Math.floor(x/b.canvasHeight),$=i.documentToScreenRow(s)*p.lineHeight,k=$-R*b.canvasHeight;g.setStyle(this.$highlightElement.style,"height",p.lineHeight+"px"),g.setStyle(this.$highlightElement.style,"top",k+"px")}},c.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var p=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=p,!s||b<i.firstRow)return this.update(i);if(p<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(b>p)for(var x=this.session.getFoldedRowCount(p+1,b);x>0;x--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,s.firstRow-1)),p>b&&this.$lines.push(this.$renderLines(i,b+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},c.prototype.$renderLines=function(i,s,p){for(var b=[],x=s,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>p);){var k=this.$lines.createCell(x,i,this.session,u);this.$renderCell(k,i,R,x),b.push(k),x++}return b},c.prototype.$renderCell=function(i,s,p,b){var x=i.element,R=this.session,$=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],D=C.firstChild,E=R.$firstLineNumber,I=R.$breakpoints,z=R.$decorations,P=R.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&R.foldWidgets,_=p?p.start.row:Number.MAX_VALUE,A=s.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(R,b):b+E).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||p&&b<this.$cursorRow&&b>=_&&this.$cursorRow<=p.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),I[b]&&(N+=I[b]),z[b]&&(N+=z[b]),this.$annotations[b]&&b!==_&&(N+=this.$annotations[b].className),O){var K=O[b];K==null&&(K=O[b]=R.getFoldWidget(b))}if(K){var Z="ace_fold-widget ace_"+K,J=K=="start"&&b==_&&b<p.end.row;if(J){Z+=" ace_closed";for(var he="",ne=!1,le=b+1;le<=p.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}N+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),g.setStyle(k.style,"height",A),g.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var se=R.getFoldWidgetRange(b);se?k.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[se.start.row+1,se.end.row+1])):p?k.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):k.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),J?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else k&&(g.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var de=this.session.$gutterCustomWidgets[b];if(de?this.$addCustomWidget(b,de,i):L&&this.$removeCustomWidget(b,i),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=B,D.className+=he,g.setStyle(D.style,"height",A),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",A);var me;switch(he){case" ace_error_fold":me=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":me=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":me=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[b]){C.className="ace_gutter_annotation",D.className=B,this.$useSvgGutterIcons?D.className+=this.$annotations[b].className:x.classList.add(this.$annotations[b].className.replace(" ","")),g.setStyle(D.style,"height",A),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",A);var me;switch(this.$annotations[b].className){case" ace_error":me=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":me=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":me=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":me=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":me=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else g.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=N&&(x.className=N),g.setStyle(i.element.style,"height",this.$lines.computeLineHeight(b,s,R)+"px"),g.setStyle(i.element.style,"top",this.$lines.computeLineTop(b,s,R)+"px"),i.text=U,C.style.display==="none"&&k.style.display==="none"&&!de?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},c.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i,!i&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},c.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(i){i?g.addCssClass(this.element,"ace_folding-enabled"):g.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(i,s){var p=s||this.$getGutterCell(i);if(p&&p.element){var b=p.element.childNodes[1];b&&g.setStyle(b.style,"display","none")}},c.prototype.$showFoldWidget=function(i,s){var p=s||this.$getGutterCell(i);if(p&&p.element){var b=p.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[p.row]&&g.setStyle(b.style,"display","inline-block")}},c.prototype.$getGutterCell=function(i){var s=this.$lines.cells,p=0,b=s.length-1;if(!(i<s[0].row||i>s[b].row)){for(;p<=b;){var x=Math.floor((p+b)/2),R=s[x];if(R.row>i)b=x-1;else if(R.row<i)p=x+1;else return R}return R}},c.prototype.$addCustomWidget=function(i,s,p){var b=s.className,x=s.label,R=s.title,$=s.callbacks;this.session.$gutterCustomWidgets[i]={className:b,label:x,title:R,callbacks:$},this.$hideFoldWidget(i,p);var k=p||this.$getGutterCell(i);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=g.createElement("span"),C.className="ace_custom-widget ".concat(b),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),g.setStyle(C.style,"display","inline-block"),g.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(L){$.onClick(L,i),L.stopPropagation()}),k.element.appendChild(C)}},c.prototype.$removeCustomWidget=function(i,s){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,s);var p=s||this.$getGutterCell(i);if(p&&p.element){var b=p.element.querySelector(".ace_custom-widget");b&&p.element.removeChild(b)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=g.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},c.prototype.getRegion=function(i){var s=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(i.x<s.left+p.left)return"markers";if(this.$showFoldWidgets&&i.x>p.right-s.right)return"foldWidgets"},c}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,m.implement(l.prototype,h);function u(c){var i=document.createTextNode("");c.appendChild(i);var s=g.createElement("span");c.appendChild(s);var p=g.createElement("span");c.appendChild(p);var b=g.createElement("span");return p.appendChild(b),c}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,f){var g=e("../range").Range,m=e("../lib/dom"),w=function(){function d(a){this.element=m.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setMarkers=function(a){this.markers=a},d.prototype.elt=function(a,l){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=l,u.className=a},d.prototype.update=function(a){if(a){this.config=a,this.i=0;var l;for(var u in this.markers){var c=this.markers[u];if(!c.range){c.update(l,this,this.session,a);continue}var i=c.range.clipRows(a.firstRow,a.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),c.renderer){var s=this.$getTop(i.start.row,a),p=this.$padding+i.start.column*a.characterWidth;c.renderer(l,i,p,s,a)}else c.type=="fullLine"?this.drawFullLineMarker(l,i,c.clazz,a):c.type=="screenLine"?this.drawScreenLineMarker(l,i,c.clazz,a):i.isMultiLine()?c.type=="text"?this.drawTextMarker(l,i,c.clazz,a):this.drawMultiLineMarker(l,i,c.clazz,a):this.drawSingleLineMarker(l,i,c.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},d.prototype.drawTextMarker=function(a,l,u,c,i){for(var s=this.session,p=l.start.row,b=l.end.row,x=p,R=0,$=0,k=s.getScreenLastRowColumn(x),C=new g(x,l.start.column,x,$);x<=b;x++)C.start.row=C.end.row=x,C.start.column=x==p?l.start.column:s.getRowWrapIndent(x),C.end.column=k,R=$,$=k,k=x+1<b?s.getScreenLastRowColumn(x+1):x==b?0:l.end.column,this.drawSingleLineMarker(a,C,u+(x==p?" ace_start":"")+" ace_br"+h(x==p||x==p+1&&l.start.column,R<$,$>k,x==b),c,x==b?0:1,i)},d.prototype.drawMultiLineMarker=function(a,l,u,c,i){var s=this.$padding,p=c.lineHeight,b=this.$getTop(l.start.row,c),x=s+l.start.column*c.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var R=l.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(a,R,u+" ace_br1 ace_start",c,null,i)}else this.elt(u+" ace_br1 ace_start","height:"+p+"px;right:"+s+"px;top:"+b+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var R=l.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(a,R,u+" ace_br12",c,null,i)}else{b=this.$getTop(l.end.row,c);var $=l.end.column*c.characterWidth;this.elt(u+" ace_br12","height:"+p+"px;width:"+$+"px;top:"+b+"px;left:"+s+"px;"+(i||""))}if(p=(l.end.row-l.start.row-1)*c.lineHeight,!(p<=0)){b=this.$getTop(l.start.row+1,c);var k=(l.start.column?1:0)|(l.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+p+"px;right:"+s+"px;top:"+b+"px;left:"+s+"px;"+(i||""))}},d.prototype.drawSingleLineMarker=function(a,l,u,c,i,s){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,u,c,i,s);var p=c.lineHeight,b=(l.end.column+(i||0)-l.start.column)*c.characterWidth,x=this.$getTop(l.start.row,c),R=this.$padding+l.start.column*c.characterWidth;this.elt(u,"height:"+p+"px;width:"+b+"px;top:"+x+"px;left:"+R+"px;"+(s||""))},d.prototype.drawBidiSingleLineMarker=function(a,l,u,c,i,s){var p=c.lineHeight,b=this.$getTop(l.start.row,c),x=this.$padding,R=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);R.forEach(function($){this.elt(u,"height:"+p+"px;width:"+($.width+(i||0))+"px;top:"+b+"px;left:"+(x+$.left)+"px;"+(s||""))},this)},d.prototype.drawFullLineMarker=function(a,l,u,c,i){var s=this.$getTop(l.start.row,c),p=c.lineHeight;l.start.row!=l.end.row&&(p+=this.$getTop(l.end.row,c)-s),this.elt(u,"height:"+p+"px;top:"+s+"px;left:0;right:0;"+(i||""))},d.prototype.drawScreenLineMarker=function(a,l,u,c,i){var s=this.$getTop(l.start.row,c),p=c.lineHeight;this.elt(u,"height:"+p+"px;top:"+s+"px;left:0;right:0;"+(i||""))},d}();w.prototype.$padding=0;function h(d,a,l,u){return(d?1:0)|(a?2:0)|(l?4:0)|(u?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,f){var g=new Set(["text","rparen","lparen"]);r.isTextToken=function(m){return g.has(m)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,f){var g=e("../lib/oop"),m=e("../lib/dom"),w=e("../lib/lang"),h=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,l=e("./text_util").isTextToken,u=function(){function c(i){this.dom=m,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return c.prototype.$updateEolChar=function(){var i=this.session.doc,s=i.getNewLineCharacter()==`
|
|
216
|
+
`&&i.getNewLineMode()!="windows",p=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=p)return this.EOL_CHAR=p,!0},c.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(s){this._signal("changeCharacterSize",s)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},c.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},c.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var s=this.$tabStrings=[0],p=1;p<i+1;p++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=w.stringRepeat(this.TAB_CHAR,p),s.push(b)}else s.push(this.dom.createTextNode(w.stringRepeat(" ",p),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):$,b=this.dom.createElement("span");b.className=x+R,b.textContent=$,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+k,b.textContent=C,this.$tabStrings[" "]=b}},c.prototype.updateLines=function(i,s,p){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var b=Math.max(s,i.firstRow),x=Math.min(p,i.lastRow),R=this.element.childNodes,$=0,k=i.firstRow;k<b;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(b)){b=C.start.row;break}else k=C.end.row;$++}for(var L=!1,k=b,C=this.session.getNextFoldLine(k),D=C?C.start.row:1/0;k>D&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),D=C?C.start.row:1/0),!(k>x);){var E=R[$++];if(E){this.dom.removeChildren(E),this.$renderLine(E,k,k==D?C:!1),L&&(E.style.top=this.$lines.computeLineTop(k,i,this.session)+"px");var I=i.lineHeight*this.session.getRowLength(k)+"px";E.style.height!=I&&(L=!0,E.style.height=I)}k++}if(L)for(;$<this.$lines.cells.length;){var z=this.$lines.cells[$++];z.element.style.top=this.$lines.computeLineTop(z.row,i,this.session)+"px"}},c.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var p=i.lastRow,b=s?s.lastRow:-1;if(!s||b<i.firstRow)return this.update(i);if(p<s.firstRow)return this.update(i);if(!s||s.lastRow<i.firstRow)return this.update(i);if(i.lastRow<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(s.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,s.lastRow);x>0;x--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,s.firstRow-1)),i.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(i,s.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(i,s,p){for(var b=[],x=s,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>p);){var k=this.$lines.createCell(x,i,this.session),C=k.element;this.dom.removeChildren(C),m.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),m.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,this.session)+"px"),this.$renderLine(C,x,x==$?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",b.push(k),x++}return b},c.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var s=i.firstRow,p=i.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(i,s,p))},c.prototype.$renderToken=function(i,s,p,b){for(var x=this,R=/(\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),k,C=0;k=R.exec(b);){var L=k[1],D=k[2],E=k[3],I=k[4],z=k[5];if(!(!x.showSpaces&&D)){var P=C!=k.index?b.slice(C,k.index):"";if(C=k.index+k[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),L){var O=x.session.getScreenTabSize(s+k.index),_=x.$tabStrings[O].cloneNode(!0);_.charCount=1,$.appendChild(_),s+=O-1}else if(D)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=w.stringRepeat(x.SPACE_CHAR,D.length),$.appendChild(A)}else $.appendChild(this.dom.createTextNode(D,this.element));else if(E){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=w.stringRepeat(x.SPACE_CHAR,E.length),$.appendChild(A)}else if(I){s+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",A.textContent=x.showSpaces?x.SPACE_CHAR:I,$.appendChild(A)}else if(z){s+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=z,$.appendChild(A)}}}if($.appendChild(this.dom.createTextNode(C?b.slice(C):b,this.element)),l(p.type))i.appendChild($);else{var N="ace_"+p.type.replace(/\./g," ace_"),A=this.dom.createElement("span");p.type=="fold"&&(A.style.width=p.value.length*this.config.characterWidth+"px",A.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),A.className=N,A.appendChild($),i.appendChild(A)}return s+b.length},c.prototype.renderIndentGuide=function(i,s,p){var b=s.search(this.$indentGuideRe);if(b<=0||b>=p)return s;if(s[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,R=0;R<x;R++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(b)}else if(s[0]==" "){for(var R=0;R<b;R++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(b)}return this.$highlightIndentGuide(),s},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var s=this.session.selection.getCursor(),p=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,b=Math.floor(p/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:s.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,$=0;$<R.length;$++)if(s.row!==R[$].start.row){this.$highlightIndentGuideMarker.end=R[$].start.row+1,s.row>R[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[s.row]!==""&&s.column===i[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=s.row+1;$<i.length;$++){var k=i[$],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=$,C<=p))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),s=0;s<i.length;s++)i[s].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(i,s){var p=this.session.doc.getLine(i.row);if(p!==""){var b=i.element;if(i.element.classList&&i.element.classList.contains("ace_line_group"))if(i.element.childNodes.length>0)b=i.element.childNodes[0];else return;var x=b.childNodes;if(x){var R=x[s-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p<i.length;p++){var b=i[p];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}else for(var p=i.length-1;p>=0;p--){var b=i[p];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}}},c.prototype.$createLineElement=function(i){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},c.prototype.$renderWrappedLine=function(i,s,p){var b=0,x=0,R=p[0],$=0,k=this.$createLineElement();i.appendChild(k);for(var C=0;C<s.length;C++){var L=s[C],D=L.value;if(C==0&&this.displayIndentGuides){if(b=D.length,D=this.renderIndentGuide(k,D,R),!D)continue;b-=D.length}if(b+D.length<R)$=this.$renderToken(k,$,L,D),b+=D.length;else{for(;b+D.length>=R;){$=this.$renderToken(k,$,L,D.substring(0,R-b)),D=D.substring(R-b),b=R,k=this.$createLineElement(),i.appendChild(k);var E=this.dom.createTextNode(w.stringRepeat(" ",p.indent),this.element);E.charCount=0,k.appendChild(E),x++,$=0,R=p[x]||Number.MAX_VALUE}D.length!=0&&(b+=D.length,$=this.$renderToken(k,$,L,D))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,$,null,"",!0)},c.prototype.$renderSimpleLine=function(i,s){for(var p=0,b=0;b<s.length;b++){var x=s[b],R=x.value;if(!(b==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(i,R),!R))){if(p+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,p,x,R);p=this.$renderToken(i,p,x,R)}}},c.prototype.$renderOverflowMessage=function(i,s,p,b,x){p&&this.$renderToken(i,s,p,b.slice(0,this.MAX_LINE_LENGTH-s));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",i.appendChild(R)},c.prototype.$renderLine=function(i,s,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(s)),p)var b=this.$getFoldLineTokens(s,p);else var b=this.session.getTokens(s);var x=i;if(b.length){var R=this.session.getRowSplitData(s);if(R&&R.length){this.$renderWrappedLine(i,b,R);var x=i.lastChild}else{var x=i;this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x));if(this.showEOL&&x){p&&(s=p.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},c.prototype.$getFoldLineTokens=function(i,s){var p=this.session,b=[];function x($,k,C){for(var L=0,D=0;D+$[L].value.length<k;)if(D+=$[L].value.length,L++,L==$.length)return;if(D!=k){var E=$[L].value.substring(k-D);E.length>C-k&&(E=E.substring(0,C-k)),b.push({type:$[L].type,value:E}),D=k+E.length,L+=1}for(;D<C&&L<$.length;){var E=$[L].value;E.length+D>C?b.push({type:$[L].type,value:E.substring(0,C-D)}):b.push($[L]),D+=E.length,L+=1}}var R=p.getTokens(i);return s.walk(function($,k,C,L,D){$!=null?b.push({type:"fold",value:$}):(D&&(R=p.getTokens(k)),R.length&&x(R,L,C))},s.end.row,this.session.getLine(s.end.row).length),b},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();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,g.implement(u.prototype,d),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,f){var g=e("../lib/dom"),m=function(){function w(h){this.element=g.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(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(h){for(var d=this.cursors,a=d.length;a--;)g.setStyle(d[a].style,"opacity",h?"":"0")},w.prototype.$startCssAnimation=function(){for(var h=this.cursors,d=h.length;d--;)h[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(h){this.$padding=h},w.prototype.setSession=function(h){this.session=h},w.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},w.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},w.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,g.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var h=g.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},w.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},w.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.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&&g.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),d()},this.blinkInterval),d()}},w.prototype.getPixelPosition=function(h,d){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(h),l=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,h.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),u=(a.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:u}},w.prototype.isCursorInView=function(h,d){return h.top>=0&&h.top<d.maxHeight},w.prototype.update=function(h){this.config=h;var d=this.session.$selectionMarkers,a=0,l=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var a=0,u=d.length;a<u;a++){var c=this.getPixelPosition(d[a].cursor,!0);if(!((c.top>h.height+h.offset||c.top<0)&&a>1)){var i=this.cursors[l++]||this.addCursor(),s=i.style;this.drawCursor?this.drawCursor(i,c,h,d[a],this.session):this.isCursorInView(c,h)?(g.setStyle(s,"display","block"),g.translate(i,c.left,c.top),g.setStyle(s,"width",Math.round(h.characterWidth)+"px"),g.setStyle(s,"height",h.lineHeight+"px")):g.setStyle(s,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=c,this.restartTimer()},w.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w}();m.prototype.$padding=0,m.prototype.drawCursor=null,r.Cursor=m}),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 g=this&&this.__extends||function(){var i=function(s,p){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(b[R]=x[R])},i(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");i(s,p);function b(){this.constructor=s}s.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}}(),m=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,a=32768,l=function(){function i(s,p){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),s.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 i.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},i}();m.implement(l.prototype,d);var u=function(i){g(s,i);function s(p,b){var x=i.call(this,p,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,b.$scrollbarWidth=x.width=w.scrollbarWidth(p.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(p){this.element.style.height=p+"px"},s.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>a?(this.coeff=a/p,p=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},s.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},s}(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var c=function(i){g(s,i);function s(p,b){var x=i.call(this,p,"-h")||this;return x.scrollLeft=0,x.height=b.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(p){this.element.style.width=p+"px"},s.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},s.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},s.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},s}(l);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=c,r.VScrollBar=u,r.HScrollBar=c}),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 g=this&&this.__extends||function(){var c=function(i,s){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,b){p.__proto__=b}||function(p,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(p[x]=b[x])},c(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");c(i,s);function p(){this.constructor=i}i.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),m=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter;w.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 a=function(){function c(i,s){this.element=w.createElement("div"),this.element.className="ace_sb"+s,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},c}();m.implement(a.prototype,d);var l=function(c){g(i,c);function i(s,p){var b=c.call(this,s,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=s,b.width=b.VScrollWidth,b.renderer=p,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return i.prototype.onMouseDown=function(s,p){if(s==="mousedown"&&!(h.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var b=this,x=p.clientY,R=function(I){x=I.clientY},$=function(){clearInterval(D)},k=p.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var I=b.scrollTopFromThumbTop(C+x-k);I!==b.scrollTop&&b._emit("scroll",{data:I})}};h.capture(this.inner,R,$);var D=setInterval(L,20);return h.preventDefault(p)}var E=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),h.preventDefault(p)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(s){var p=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(s,p){this.pageHeight===s&&!p||(this.pageHeight=s,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},i.prototype.setScrollTop=function(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i}(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var u=function(c){g(i,c);function i(s,p){var b=c.call(this,s,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=p,b}return i.prototype.onMouseDown=function(s,p){if(s==="mousedown"&&!(h.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var b=this,x=p.clientX,R=function(I){x=I.clientX},$=function(){clearInterval(D)},k=p.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var I=b.scrollLeftFromThumbLeft(C+x-k);I!==b.scrollLeft&&b._emit("scroll",{data:I})}};h.capture(this.inner,R,$);var D=setInterval(L,20);return h.preventDefault(p)}var E=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),h.preventDefault(p)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(s){var p=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},i.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(s,p){this.pageWidth===s&&!p||(this.pageWidth=s,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},i.prototype.setScrollLeft=function(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i}(a);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=u,r.VScrollBar=l,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,f){var g=e("./lib/event"),m=function(){function w(h,d){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var a=this;this._flush=function(l){a.pending=!1;var u=a.changes;if(u&&(g.blockIdle(100),a.changes=0,a.onRender(u)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return w.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(h){var d=this.changes;return this.changes=0,d},w}();r.RenderLoop=m}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,f){var g=e("../lib/oop"),m=e("../lib/dom"),w=e("../lib/lang"),h=e("../lib/event"),d=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=512,u=typeof ResizeObserver=="function",c=200,i=function(){function s(p){this.el=m.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=m.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=m.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return s.prototype.$setMeasureNodeStyles=function(p,b){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",d.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=b?"hidden":"visible"},s.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===p.width&&b.height===p.height,this._emit("changeCharacterSize",{data:p})}},s.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function(b){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=h.onIdle(function b(){p.checkForSizeChanges(),h.onIdle(b,500)},500)},s.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(p){var b={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/l};return b.width===0||b.height===0?null:b},s.prototype.$measureCharWidth=function(p){this.$main.textContent=w.stringRepeat(p,l);var b=this.$main.getBoundingClientRect();return b.width/l},s.prototype.getCharacterWidth=function(p){var b=this.charSizes[p];return b===void 0&&(b=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),b},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(Number(window.getComputedStyle(p).zoom)||1)*this.$getZoom(p.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var p=function(b,x){return["div",{style:"position: absolute;top:"+b+"px;left:"+x+"px;"}]};this.els=m.buildDom([p(0,0),p(c,0),p(0,c),p(c,c)],this.el)},s.prototype.transformCoordinates=function(p,b){if(p){var x=this.$getZoom(this.el);p=C(1/x,p)}function R(Z,J,he){var ne=Z[1]*J[0]-Z[0]*J[1];return[(-J[1]*he[0]+J[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function $(Z,J){return[Z[0]-J[0],Z[1]-J[1]]}function k(Z,J){return[Z[0]+J[0],Z[1]+J[1]]}function C(Z,J){return[Z*J[0],Z*J[1]]}this.els||this.$initTransformMeasureNodes();function L(Z){var J=Z.getBoundingClientRect();return[J.left,J.top]}var D=L(this.els[0]),E=L(this.els[1]),I=L(this.els[2]),z=L(this.els[3]),P=R($(z,E),$(z,I),$(k(E,I),k(z,D))),O=C(1+P[0],$(E,D)),_=C(1+P[1],$(I,D));if(b){var A=b,N=P[0]*A[0]/c+P[1]*A[1]/c+1,B=k(C(A[0],O),C(A[1],_));return k(C(1/N/c,B),D)}var U=$(p,D),K=R($(O,C(P[0],U)),$(_,C(P[1],U)),U);return C(c,K)},s}();i.prototype.$characterSize={width:0,height:0},g.implement(i.prototype,a),r.FontMetrics=i}),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, .ace_custom-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
|
+
pointer-events: auto;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.ace_custom-widget {
|
|
772
|
+
background: none;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
776
|
+
display: inline-block;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.ace_fold-widget.ace_end {
|
|
780
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ace_fold-widget.ace_closed {
|
|
784
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.ace_fold-widget:hover {
|
|
788
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
789
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
790
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.ace_fold-widget:active {
|
|
794
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
795
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
796
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Dark version for fold widgets
|
|
800
|
+
*/
|
|
801
|
+
.ace_dark .ace_fold-widget {
|
|
802
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
803
|
+
}
|
|
804
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
806
|
+
}
|
|
807
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
809
|
+
}
|
|
810
|
+
.ace_dark .ace_fold-widget:hover {
|
|
811
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
812
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
813
|
+
}
|
|
814
|
+
.ace_dark .ace_fold-widget:active {
|
|
815
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.ace_inline_button {
|
|
819
|
+
border: 1px solid lightgray;
|
|
820
|
+
display: inline-block;
|
|
821
|
+
margin: -1px 8px;
|
|
822
|
+
padding: 0 5px;
|
|
823
|
+
pointer-events: auto;
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
}
|
|
826
|
+
.ace_inline_button:hover {
|
|
827
|
+
border-color: gray;
|
|
828
|
+
background: rgba(200,200,200,0.2);
|
|
829
|
+
display: inline-block;
|
|
830
|
+
pointer-events: auto;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.ace_fold-widget.ace_invalid {
|
|
834
|
+
background-color: #FFB4B4;
|
|
835
|
+
border-color: #DE5555;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
839
|
+
transition: opacity 0.4s ease 0.05s;
|
|
840
|
+
opacity: 0;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
844
|
+
transition: opacity 0.05s ease 0.05s;
|
|
845
|
+
opacity:1;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.ace_underline {
|
|
849
|
+
text-decoration: underline;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.ace_bold {
|
|
853
|
+
font-weight: bold;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.ace_nobold .ace_bold {
|
|
857
|
+
font-weight: normal;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.ace_italic {
|
|
861
|
+
font-style: italic;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
.ace_error-marker {
|
|
866
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
867
|
+
position: absolute;
|
|
868
|
+
z-index: 9;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.ace_highlight-marker {
|
|
872
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
873
|
+
position: absolute;
|
|
874
|
+
z-index: 8;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.ace_mobile-menu {
|
|
878
|
+
position: absolute;
|
|
879
|
+
line-height: 1.5;
|
|
880
|
+
border-radius: 4px;
|
|
881
|
+
-ms-user-select: none;
|
|
882
|
+
-moz-user-select: none;
|
|
883
|
+
-webkit-user-select: none;
|
|
884
|
+
user-select: none;
|
|
885
|
+
background: white;
|
|
886
|
+
box-shadow: 1px 3px 2px grey;
|
|
887
|
+
border: 1px solid #dcdcdc;
|
|
888
|
+
color: black;
|
|
889
|
+
}
|
|
890
|
+
.ace_dark > .ace_mobile-menu {
|
|
891
|
+
background: #333;
|
|
892
|
+
color: #ccc;
|
|
893
|
+
box-shadow: 1px 3px 2px grey;
|
|
894
|
+
border: 1px solid #444;
|
|
895
|
+
|
|
896
|
+
}
|
|
897
|
+
.ace_mobile-button {
|
|
898
|
+
padding: 2px;
|
|
899
|
+
cursor: pointer;
|
|
900
|
+
overflow: hidden;
|
|
901
|
+
}
|
|
902
|
+
.ace_mobile-button:hover {
|
|
903
|
+
background-color: #eee;
|
|
904
|
+
opacity:1;
|
|
905
|
+
}
|
|
906
|
+
.ace_mobile-button:active {
|
|
907
|
+
background-color: #ddd;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.ace_placeholder {
|
|
911
|
+
position: relative;
|
|
912
|
+
font-family: arial;
|
|
913
|
+
transform: scale(0.9);
|
|
914
|
+
transform-origin: left;
|
|
915
|
+
white-space: pre;
|
|
916
|
+
opacity: 0.7;
|
|
917
|
+
margin: 0 10px;
|
|
918
|
+
z-index: 1;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.ace_ghost_text {
|
|
922
|
+
opacity: 0.5;
|
|
923
|
+
font-style: italic;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.ace_ghost_text_container > div {
|
|
927
|
+
white-space: pre;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ghost_text_line_wrapped::after {
|
|
931
|
+
content: "↩";
|
|
932
|
+
position: absolute;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
936
|
+
margin: 0px 4px
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.ace_screenreader-only {
|
|
940
|
+
position:absolute;
|
|
941
|
+
left:-10000px;
|
|
942
|
+
top:auto;
|
|
943
|
+
width:1px;
|
|
944
|
+
height:1px;
|
|
945
|
+
overflow:hidden;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.ace_hidden_token {
|
|
949
|
+
display: none;
|
|
950
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,f){var g=e("../lib/dom"),m=e("../lib/oop"),w=e("../lib/event_emitter").EventEmitter,h=function(){function d(a,l){this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(a)}return d.prototype.$createCanvas=function(){this.canvas=g.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var u=this.canvas.getContext("2d");function c(O,_){return O.priority<_.priority?-1:O.priority>_.priority?1:0}var i=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),i){var s={info:1,warning:2,error:3};i.forEach(function(O){O.priority=s[O.type]||null}),i=i.sort(c);for(var p=0;p<i.length;p++){var b=i[p].row,x=this.getVerticalOffsetForRow(b),R=x+this.lineHeight,$=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*R),C=Math.round(($+k)/2),L=k-C;L<this.halfMinDecorationHeight&&(L=this.halfMinDecorationHeight),C-L<0&&(C=L),C+L>this.canvasHeight&&(C=this.canvasHeight-L);var D=C-L,E=C+L,I=E-D;u.fillStyle=l[i[p].type]||null,u.fillRect(0,D,Math.round(this.oneZoneWidth-1),I)}}var z=this.renderer.session.selection.getCursor();if(z){var P=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,P,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(a){a=a|0;var l=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return l},d.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d}();m.implement(h.prototype,w),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 g=e("./lib/oop"),m=e("./lib/dom"),w=e("./lib/lang"),h=e("./config"),d=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,i=e("./scrollbar").VScrollBar,s=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,b=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),k=e("./layer/decorators").Decorator,C=e("./lib/useragent"),L=e("./layer/text_util").isTextToken;m.importCssString($,"ace_editor.css",!1);var D=function(){function E(I,z){var P=this;this.container=I||m.createElement("div"),m.addCssClass(this.container,"ace_editor"),m.HI_DPI&&m.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=m.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=m.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=m.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var O=this.$textLayer=new l(this.content);this.canvas=O.element,this.$markerFront=new a(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollTop(_.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollLeft(_.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new b(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 E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),m.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.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))},E.prototype.updateLines=function(I,z,P){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:I,lastRow:z},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)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(I,z,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var _=this.container;O||(O=_.clientHeight||_.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",O=_.clientHeight||_.scrollHeight),P||(P=_.clientWidth||_.scrollWidth);var A=this.$updateCachedSize(I,z,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)}},E.prototype.$updateCachedSize=function(I,z,P,O){O-=this.$extraHeight||0;var _=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,_|=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",_=_|this.CHANGE_SCROLL),P&&(I||A.width!=P)){_|=this.CHANGE_SIZE,A.width=P,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,m.setStyle(this.scrollBarH.element.style,"left",z+"px"),m.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),A.scrollerWidth=Math.max(0,P-z-this.scrollBarV.getWidth()-this.margin.h),m.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";m.setStyle(this.scrollBarH.element.style,"right",B),m.setStyle(this.scroller.style,"right",B),m.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(_|=this.CHANGE_FULL)}return A.$dirty=!P||!O,_&&this._signal("resize",N),_},E.prototype.onGutterResize=function(I){var z=this.$showGutter?I:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,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()},E.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},E.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},E.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=m.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=m.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){m.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){z&&z.markerRange&&(P=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var O=this.layerConfig,_=P.top,A=P.left;_-=O.offset;var N=z&&z.useTextareaForIME||C.isMobile?this.lineHeight:1;if(_<0||_>O.height-N){m.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!z)_+=this.lineHeight;else if(z.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else _+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,m.setStyle(I,"height",N+"px"),m.setStyle(I,"width",B+"px"),m.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(_,U))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,z=I.lastRow,P=this.session.documentToScreenRow(z,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?z-1:z},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.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()},E.prototype.setScrollMargin=function(I,z,P,O){var _=this.scrollMargin;_.top=I|0,_.bottom=z|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},E.prototype.setMargin=function(I,z,P,O){var _=this.margin;_.top=I|0,_.bottom=z|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},E.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-z&&(I=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(I,z){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!z){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(),m.translate(this.content,-this.scrollLeft,-P.offset);var _=P.width+2*this.$padding+"px",A=P.minHeight+"px";m.setStyle(this.content.style,"width",_),m.setStyle(this.content.style,"height",A)}if(I&this.CHANGE_H_SCROLL&&(m.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)},E.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,P=Math.min(z,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,_=!O&&I>z;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var I=this.session,z=this.$size,P=z.height<=2*this.lineHeight,O=this.session.getScreenLength(),_=O*this.lineHeight,A=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||z.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=z.height<=2*this.lineHeight);var K=z.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=Z;var J=this.scrollMargin;this.session.setScrollTop(Math.max(-J.top,Math.min(this.scrollTop,_-z.scrollerHeight+J.bottom))),this.session.setScrollLeft(Math.max(-J.left,Math.min(this.scrollLeft,A+2*this.$padding-z.scrollerWidth+J.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-_+Z<0||this.scrollTop>J.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,se=Math.ceil(K/this.lineHeight)-1,de=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),me=de+se,$e,Te,Me=this.lineHeight;de=I.screenToDocumentRow(de,0);var Xe=I.getFoldLine(de);Xe&&(de=Xe.start.row),$e=I.documentToScreenRow(de,0),Te=I.getRowLength(de)*Me,me=Math.min(I.screenToDocumentRow(me,0),I.getLength()-1),K=z.scrollerHeight+I.getRowLength(me)*Me+Te,le=this.scrollTop-$e*Me,le<0&&$e>0&&($e=Math.max(0,$e+Math.floor(le/Me)),le=this.scrollTop-$e*Me);var Ke=0;return(this.layerConfig.width!=A||B)&&(Ke=this.CHANGE_H_SCROLL),(B||ne)&&(Ke|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:de,firstRowScreen:$e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:K,maxHeight:_,offset:le,gutterOffset:Me?Math.max(0,Math.ceil((le+z.height-z.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Ke},E.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(z<P.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,z),!0}}},E.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))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(I,z){this.$gutterLayer.addGutterDecoration(I,z)},E.prototype.removeGutterDecoration=function(I,z){this.$gutterLayer.removeGutterDecoration(I,z)},E.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(I,z,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(z,P)},E.prototype.scrollCursorIntoView=function(I,z,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),_=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?(z&&U+N>A+this.lineHeight&&(A-=z*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(z&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=z*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;_-Z<K?(_-=Z,_<this.$padding+Z&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=Z,K+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&_-K<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},E.prototype.alignCursor=function(I,z){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),O=this.$size.scrollerHeight-this.lineHeight,_=P.top-O*(z||0);return this.session.setScrollTop(_),_},E.prototype.$calcSteps=function(I,z){var P=0,O=this.STEPS,_=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(P=0;P<O;++P)_.push(A(P/this.STEPS,I,z-I));return _},E.prototype.scrollToLine=function(I,z,P,O){var _=this.$cursorLayer.getPixelPosition({row:I,column:0}),A=_.top;z&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(N,O)},E.prototype.animateScrolling=function(I,z){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(I=_[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,z&&z()}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)},E.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},E.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(I,z){this.session.setScrollTop(z),this.session.setScrollLeft(I)},E.prototype.scrollBy=function(I,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},E.prototype.isScrollableBy=function(I,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>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},E.prototype.pixelToScreenCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,z]);I=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,A=_/this.characterWidth,N=Math.floor((z+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:_}},E.prototype.screenToTextCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,z]);I=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,A=_/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=Math.floor((z+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),_)},E.prototype.textToScreenCoordinates=function(I,z){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,z),_=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+_-this.scrollLeft,pageY:P.top+A-this.scrollTop}},E.prototype.visualizeFocus=function(){m.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){m.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(m.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")},E.prototype.setCompositionText=function(I){var z=this.session.selection.cursor;this.addToken(I,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),m.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(I,z){var P=this.session.selection.cursor,O=z||{row:P.row,column:P.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(I,O);this.addToken(_[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var A=m.createElement("div");if(_.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;_.slice(1).forEach(function(ne){var le=m.createElement("div"),se=m.createElement("span");se.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),se.appendChild(m.createTextNode(ne.text)),le.appendChild(se),A.appendChild(le),B=le}),N.forEach(function(ne){var le=m.createElement("span");L(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(m.createTextNode(ne.value)),B.appendChild(le)}),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,J=_.length*this.lineHeight,he=J<Z-U.top;if(he)return;J<Z?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollToRow(O.row)}},E.prototype.$calculateWrappedTextChunks=function(I,z){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var _=I.split(/\r?\n/),A=[],N=0;N<_.length;N++){var B=this.session.$getDisplayTokens(_[N],z.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(_[N].length);for(var Z=0;Z<U.length;Z++){var J=_[N].slice(K,U[Z]);A.push({text:J,wrapped:!0}),K=U[Z]}}else A.push({text:_[N],wrapped:!1})}return A},E.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}},E.prototype.addToken=function(I,z,P,O){var _=this.session;_.bgTokenizer.lines[P]=null;var A={type:z,value:I},N=_.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),J=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:J},A,{type:K.type,value:he});break}}this.updateLines(P,P)},E.prototype.hideTokensAfterPosition=function(I,z){for(var P=this.session.getTokens(I),O=0,_=!1,A=[],N=0;N<P.length;N++){var B=P[N];if(O+=B.value.length,B.type!=="ghost_text"){if(_){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===z&&(_=!0)}}return this.updateLines(I,I),A},E.prototype.removeExtraToken=function(I,z){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},E.prototype.setTheme=function(I,z){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],_)}else _(I);function _(A){if(P.$themeId!=I)return z&&z();if(!A||!A.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");A.$id&&(P.$themeId=A.$id),m.importCssString(A.cssText,A.cssClass,P.container),P.theme&&m.removeCssClass(P.container,P.theme.cssClass);var N="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;if(P.$padding&&N!=P.$padding&&P.setPadding(N),P.$gutterLayer){var B=A.$showGutterCursorMarker;B&&!P.$gutterLayer.$showCursorMarker?P.$gutterLayer.$showCursorMarker="theme":!B&&P.$gutterLayer.$showCursorMarker=="theme"&&(P.$gutterLayer.$showCursorMarker=null)}P.$theme=A.cssClass,P.theme=A,m.addCssClass(P.container,A.cssClass),m.setCssClass(P.container,"ace_dark",A.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:A}),z&&z(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(I,z){m.setCssClass(this.container,I,z!==!1)},E.prototype.unsetStyle=function(I){m.removeCssClass(this.container,I)},E.prototype.setCursorStyle=function(I){m.setStyle(this.scroller.style,"cursor",I)},E.prototype.setMouseCursor=function(I){m.setStyle(this.scroller.style,"cursor",I)},E.prototype.attachToShadowRoot=function(){m.importCssString($,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(I){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=w.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var P=z[0].contentRect.width,O=z[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)}},E}();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,g.implement(D.prototype,R),h.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&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(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){m.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=D}),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 g=e("../lib/oop"),m=e("../lib/net"),w=e("../lib/event_emitter").EventEmitter,h=e("../config");function d(c){var i="importScripts('"+m.qualifyURL(c)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new s;return p.append(i),p.getBlob("application/javascript")}}function a(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var i=d(c),s=window.URL||window.webkitURL,p=s.createObjectURL(i);return new Worker(p)}return new Worker(c)}var l=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){g.implement(this,w),this.$createWorkerFromOldConfig=function(c,i,s,p,b){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)p=p||h.moduleUrl(i,"worker");else{var x=this.$normalizePath;p=p||x(e.toUrl("ace/worker/worker.js",null,"_"));var R={};c.forEach(function($){R[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(p),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:R,module:i,classname:s}),this.$worker},this.onMessage=function(c){var i=c.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var s=this.callbacks[i.id];s&&(s(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return m.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,i){this.$worker.postMessage({command:c,args:i})},this.call=function(c,i,s){if(s){var p=this.callbackId++;this.callbacks[p]=s,i.push(p)}this.send(c,i)},this.emit=function(c,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:i.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(l.prototype);var u=function(c,i,s){var p=null,b=!1,x=Object.create(w),R=[],$=new l({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),p&&(b?setTimeout(k):k())}});$.setEmitSync=function(C){b=C};var k=function(){var C=R.shift();C.command?p[C.command].apply(p,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},h.loadModule(["worker",i],function(C){for(p=new C[s](x);R.length;)k()}),$};r.UIWorkerClient=u,r.WorkerClient=l,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,f){var g=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,w=e("./lib/oop"),h=function(){function d(a,l,u,c,i,s){var p=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=u;var b=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var a=this,l=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=u.addMarker(new g(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var s=l.createAnchor(i.row,i.column);s.$insertRight=!0,s.detach(),a.others.push(s)}),u.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,l=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=a.addMarker(new g(u.row,u.column,u.row,u.column+l.length),l.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},d.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var l=a;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var u=a.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,c=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,i=l.start.column-this.pos.column;if(this.updateAnchors(a),c&&(this.length+=u),c&&!this.session.$fromUndo){if(a.action==="insert")for(var s=this.others.length-1;s>=0;s--){var p=this.others[s],b={row:p.row,column:p.column+i};this.doc.insertMergedLines(b,a.lines)}else if(a.action==="remove")for(var s=this.others.length-1;s>=0;s--){var p=this.others[s],b={row:p.row,column:p.column+i};this.doc.remove(new g(b.row,b.column,b.row,b.column-u))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,u=function(i,s){l.removeMarker(i.markerId),i.markerId=l.addMarker(new g(i.row,i.column,i.row,i.column+a.length),s,null,!1)};u(this.pos,this.mainClass);for(var c=this.others.length;c--;)u(this.others[c],this.othersClass)}},d.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},d.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},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),l=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,u=0;u<l;u++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d}();w.implement(h.prototype,m),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,f){var g=e("../lib/event"),m=e("../lib/useragent");function w(d,a){return d.row==a.row&&d.column==a.column}function h(d){var a=d.domEvent,l=a.altKey,u=a.shiftKey,c=a.ctrlKey,i=d.getAccelKey(),s=d.getButton();if(c&&m.isMac&&(s=a.button),d.editor.inMultiSelectMode&&s==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!c&&!l&&!i){s===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(s===0){var p=d.editor,b=p.selection,x=p.inMultiSelectMode,R=d.getDocumentPosition(),$=b.getCursor(),k=d.inSelection()||b.isEmpty()&&w(R,$),C=d.x,L=d.y,D=function(J){C=J.clientX,L=J.clientY},E=p.session,I=p.renderer.pixelToScreenCoordinates(C,L),z=I,P;if(p.$mouseHandler.$enableJumpToDef)c&&l||i&&l?P=u?"block":"add":l&&p.$blockSelectEnabled&&(P="block");else if(i&&!l){if(P="add",!x&&u)return}else l&&p.$blockSelectEnabled&&(P="block");if(P&&m.isMac&&a.ctrlKey&&p.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&k)return;if(!x){var O=b.toOrientedRange();p.addSelectionMarker(O)}var _=b.rangeList.rangeAtPoint(R);p.inVirtualSelectionMode=!0,u&&(_=null,O=b.ranges[0]||O,p.removeSelectionMarker(O)),p.once("mouseup",function(){var J=b.toOrientedRange();_&&J.isEmpty()&&w(_.cursor,J.cursor)?b.substractPoint(J.cursor):(u?b.substractPoint(O.cursor):O&&(p.removeSelectionMarker(O),b.addRange(O)),b.addRange(J)),p.inVirtualSelectionMode=!1})}else if(P=="block"){d.stop(),p.inVirtualSelectionMode=!0;var A,N=[],B=function(){var J=p.renderer.pixelToScreenCoordinates(C,L),he=E.screenToDocumentPosition(J.row,J.column,J.offsetX);w(z,J)&&w(he,b.lead)||(z=J,p.selection.moveToPosition(he),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(N),N=b.rectangularRangeBlock(z,I),p.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=p.$mouseHandler.$clickSelection.clone()),N.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};x&&!i?b.toSingleRange():!x&&i&&(A=b.toOrientedRange(),p.addSelectionMarker(A)),u?I=E.documentToScreenPosition(b.lead):b.moveToPosition(R),z={row:-1,column:-1};var U=function(J){B(),clearInterval(Z),p.removeSelectionMarkers(N),N.length||(N=[b.toOrientedRange()]),A&&(p.removeSelectionMarker(A),b.toSingleRange(A));for(var he=0;he<N.length;he++)b.addRange(N[he]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null},K=B;g.capture(p.container,D,U);var Z=setInterval(function(){K()},20);return d.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(m){m.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(m){m.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(m){m.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(m){m.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(m){m.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(m){m.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(m){m.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(m){m.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(m){m.multiSelect.rangeCount>1?m.multiSelect.joinSelections():m.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(m){m.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(m){m.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(m){m.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(m){m.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(m){return m&&m.inMultiSelectMode}}];var g=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new g(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 g=e("./range_list").RangeList,m=e("./range").Range,w=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),a=e("./lib/lang"),l=e("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=e("./search").Search,c=new u;function i($,k,C){return c.$options.wrap=!0,c.$options.needle=k,c.$options.backwards=C==-1,c.find($)}var s=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,k){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(),k||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var L=this.rangeList.add($);return this.$onAddRange($),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),$&&this.fromOrientedRange($)},this.substractPoint=function($){var k=this.rangeList.substractPoint($);if(k)return this.$onRemoveRange(k),k[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 k=this.rangeList.ranges.pop();$.push(k),this.rangeCount=0}for(var C=$.length;C--;){var L=this.ranges.indexOf($[C]);this.ranges.splice(L,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)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<$.length;C++){var L=$[C],D=L.start.row,E=L.end.row;if(D===E)k.push(L.clone());else{for(k.push(new m(D,L.start.column,D,this.session.getLine(D).length));++D<E;)k.push(this.getLineRange(D,!0));k.push(new m(E,0,E,L.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var $=this.rangeList.ranges,k=$[$.length-1],C=m.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,k=$[$.length-1],C=m.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var L=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(L,D);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,k,C){var L=[],D=$.column<k.column;if(D)var E=$.column,I=k.column,z=$.offsetX,P=k.offsetX;else var E=k.column,I=$.column,z=k.offsetX,P=$.offsetX;var O=$.row<k.row;if(O)var _=$.row,A=k.row;else var _=k.row,A=$.row;E<0&&(E=0),_<0&&(_=0),_==A&&(C=!0);for(var N,B=_;B<=A;B++){var U=m.fromPoints(this.session.screenToDocumentPosition(B,E,z),this.session.screenToDocumentPosition(B,I,P));if(U.isEmpty()){if(N&&b(U.end,N))break;N=U.end}U.cursor=D?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var K=L.length-1;L[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;L[Z].isEmpty();)Z++;for(var J=K;J>=Z;J--)L[J].isEmpty()&&L.splice(J,1)}return L}}).call(w.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var k=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",k),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var k=this.session.$selectionMarkers.indexOf($);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var k=this.session.$selectionMarkers,C=$.length;C--;){var L=$[C];if(L.marker){this.session.removeMarker(L.marker);var D=k.indexOf(L);D!=-1&&k.splice(D,1)}}this.session.selectionMarkerCount=k.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(l.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(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var k=$.command,C=$.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?L=C.forEachSelection(k,$.args):k.multiSelectAction=="forEachLine"?L=C.forEachSelection(k,$.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=k.exec(C,$.args||{})):L=k.multiSelectAction(C,$.args||{});else{var L=k.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function($,k,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,D=C==!0||C&&C.$byLines,E=this.session,I=this.selection,z=I.rangeList,P=(L?I:z).ranges,O;if(!P.length)return $.exec?$.exec(this,k||{}):$(this,k||{});var _=I._eventRegistry;I._eventRegistry={};var A=new w(E);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(D)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;A.fromOrientedRange(P[N]),A.index=N,this.selection=E.selection=A;var B=$.exec?$.exec(this,k||{}):$(this,k||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[N])}A.detach(),this.selection=E.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=_,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 k=this.multiSelect.rangeList.ranges,C=[],L=0;L<k.length;L++)C.push(this.session.getTextRange(k[L]));var D=this.session.getDocument().getNewLineCharacter();$=C.join(D),$.length==(C.length-1)*D.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var L=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=k.row||this.session.$clipPositionToDocument(L.row,L.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,k,C){if(k=k||{},k.needle=$||k.needle,k.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(L)}this.$search.set(k);var D=this.$search.findAll(this.session);if(!D.length)return 0;var E=this.multiSelect;C||E.toSingleRange(D[0]);for(var I=D.length;I--;)E.addRange(D[I],!0);return L&&E.rangeList.rangeAtPoint(L.start)&&E.addRange(L,!0),D.length},this.selectMoreLines=function($,k){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(D.row+$,D.column);if(C.isEmpty())var z=E;else var I=this.session.documentToScreenPosition(L?C.end:C.start),z=this.session.screenToDocumentPosition(I.row+$,I.column);if(L){var P=m.fromPoints(E,z);P.cursor=P.start}else{var P=m.fromPoints(z,E);P.cursor=P.end}if(P.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var k=this.session,C=k.multiSelect,L=C.ranges,D=L.length;D--;){var E=L[D];if(E.isEmpty()){var I=k.getWordRange(E.start.row,E.start.column);E.start.row=I.start.row,E.start.column=I.start.column,E.end.row=I.end.row,E.end.column=I.end.column}}C.mergeOverlappingRanges();for(var z=[],D=L.length;D--;){var E=L[D];z.unshift(k.getTextRange(E))}$<0?z.unshift(z.pop()):z.push(z.shift());for(var D=L.length;D--;){var E=L[D],P=E.clone();k.replace(E,z[D]),E.start.row=P.start.row,E.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,k,C){var L=this.session,D=L.multiSelect,E=D.toOrientedRange();if(!(E.isEmpty()&&(E=L.getWordRange(E.start.row,E.start.column),E.cursor=$==-1?E.start:E.end,this.multiSelect.addRange(E),C))){var I=L.getTextRange(E),z=i(L,I,$);z&&(z.cursor=$==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var $=this.session,k=$.multiSelect,C=k.ranges,L=-1,D=C.filter(function(K){if(K.cursor.row==L)return!0;L=K.cursor.row});if(!C.length||D.length==C.length-1){var E=this.selection.getRange(),I=E.start.row,z=E.end.row,P=I==z;if(P){var O=this.session.getLength(),_;do _=this.session.getLine(z);while(/[=:]/.test(_)&&++z<O);do _=this.session.getLine(I);while(/[=:]/.test(_)&&--I>0);I<0&&(I=0),z>=O&&(z=O-1)}var A=this.session.removeFullLines(I,z);A=this.$reAlignText(A,P),this.session.insert({row:I,column:0},A.join(`
|
|
951
|
+
`)+`
|
|
952
|
+
`),P||(E.start.column=0,E.end.column=A[A.length-1].length),this.selection.setRange(E)}else{D.forEach(function(K){k.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,J=$.getLine(Z.row),he=J.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 J=K.cursor,he=N-J.column,ne=U[Z]-B;he>ne?$.insert(J,a.stringRepeat(" ",he-ne)):$.remove(new m(J.row,J.column,J.row,J.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=J.row,K.cursor=K.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,k){var C=!0,L=!0,D,E,I;return $.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,E=N[2].length,I=N[3].length,N):(D+E+I!=N[1].length+N[2].length+N[3].length&&(L=!1),D!=N[1].length&&(C=!1),D>N[1].length&&(D=N[1].length),E<N[2].length&&(E=N[2].length),I>N[3].length&&(I=N[3].length),N):[A]}).map(k?P:C?L?O:P:_);function z(A){return a.stringRepeat(" ",A)}function P(A){return A[2]?z(D)+A[2]+z(E-A[2].length+I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?z(D+E-A[2].length)+A[2]+z(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function _(A){return A[2]?z(D)+A[2]+z(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(p.prototype);function b($,k){return $.row==k.row&&$.column==k.column}r.onSessionChange=function($){var k=$.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.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)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$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(l.defaultCommands),R($))}function R($){if(!$.textInput)return;var k=$.textInput.getElement(),C=!1;d.addListener(k,"keydown",function(D){var E=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);$.$blockSelectEnabled&&E?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},$),d.addListener(k,"keyup",L,$),d.addListener(k,"blur",L,$);function L(D){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function($){x(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 g=e("../../range").Range,m=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,h,d){var a=w.getLine(d);return this.foldingStartMarker.test(a)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(w,h,d){return null},this.indentationBlock=function(w,h,d){var a=/\S/,l=w.getLine(h),u=l.search(a);if(u!=-1){for(var c=d||l.length,i=w.getLength(),s=h,p=h;++h<i;){var b=w.getLine(h).search(a);if(b!=-1){if(b<=u){var x=w.getTokenAt(h,0);if(!x||x.type!=="string")break}p=h}}if(p>s){var R=w.getLine(p).length;return new g(s,c,p,R)}}},this.openingBracketBlock=function(w,h,d,a,l){var u={row:d,column:a+1},c=w.$findClosingBracket(h,u,l);if(c){var i=w.foldWidgets[c.row];return i==null&&(i=w.getFoldWidget(c.row)),i=="start"&&c.row>u.row&&(c.row--,c.column=w.getLine(c.row).length),g.fromPoints(u,c)}},this.closingBracketBlock=function(w,h,d,a,l){var u={row:d,column:a},c=w.$findOpeningBracket(h,u);if(c)return c.column++,u.column--,g.fromPoints(c,u)}}).call(m.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,f){var g=e("../lib/dom"),m=e("../range").Range,w=e("../config").nls;function h(a,l,u){for(var c=0,i=a.length-1;c<=i;){var s=c+i>>1,p=u(l,a[s]);if(p>0)c=s+1;else if(p<0)i=s-1;else return s}return-(c+1)}function d(a,l,u){var c=a.getAnnotations().sort(m.comparePoints);if(c.length){var i=h(c,{row:l,column:-1},m.comparePoints);i<0&&(i=-i-1),i>=c.length?i=u>0?0:c.length-1:i===0&&u<0&&(i=c.length-1);var s=c[i];if(!(!s||!u)){if(s.row===l){do s=c[i+=u];while(s&&s.row===l);if(!s)return c.slice()}var p=[];l=s.row;do p[u<0?"unshift":"push"](s),s=c[i+=u];while(s&&s.row==l);return p.length&&p}}}r.showErrorMarker=function(a,l){var u=a.session,c=a.getCursorPosition(),i=c.row,s=u.widgetManager.getWidgetsAtRow(i).filter(function(D){return D.type=="errorMarker"})[0];s?s.destroy():i-=l;var p=d(u,i,l),b;if(p){var x=p[0];c.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,c.row=x.row,b=a.renderer.$gutterLayer.$annotations[c.row]}else{if(s)return;b={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(c.row),a.selection.moveToPosition(c);var R={row:c.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div"),type:"errorMarker"},$=R.el.appendChild(g.createElement("div")),k=R.el.appendChild(g.createElement("div"));k.className="error_widget_arrow "+b.className;var C=a.renderer.$cursorLayer.getPixelPosition(c).left;k.style.left=C+a.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",$.className="error_widget "+b.className,b.displayText.forEach(function(D,E){$.appendChild(g.createTextNode(D)),E<b.displayText.length-1&&$.appendChild(g.createElement("br"))}),$.appendChild(g.createElement("div"));var L=function(D,E,I){if(E===0&&(I==="esc"||I==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(L),u.widgetManager.removeLineWidget(R),a.off("changeSelection",R.destroy),a.off("changeSession",R.destroy),a.off("mouseup",R.destroy),a.off("change",R.destroy))},a.keyBinding.addKeyboardHandler(L),a.on("changeSelection",R.destroy),a.on("changeSession",R.destroy),a.on("mouseup",R.destroy),a.on("change",R.destroy),a.session.widgetManager.addLineWidget(R),R.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},g.importCssString(`
|
|
953
|
+
.error_widget_wrapper {
|
|
954
|
+
background: inherit;
|
|
955
|
+
color: inherit;
|
|
956
|
+
border:none
|
|
957
|
+
}
|
|
958
|
+
.error_widget {
|
|
959
|
+
border-top: solid 2px;
|
|
960
|
+
border-bottom: solid 2px;
|
|
961
|
+
margin: 5px 0;
|
|
962
|
+
padding: 10px 40px;
|
|
963
|
+
white-space: pre-wrap;
|
|
964
|
+
}
|
|
965
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
966
|
+
border-color: #ff5a5a
|
|
967
|
+
}
|
|
968
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
969
|
+
border-color: #F1D817
|
|
970
|
+
}
|
|
971
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
972
|
+
border-color: #5a5a5a
|
|
973
|
+
}
|
|
974
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
975
|
+
border-color: #5aaa5a
|
|
976
|
+
}
|
|
977
|
+
.error_widget_arrow {
|
|
978
|
+
position: absolute;
|
|
979
|
+
border: solid 5px;
|
|
980
|
+
border-top-color: transparent!important;
|
|
981
|
+
border-right-color: transparent!important;
|
|
982
|
+
border-left-color: transparent!important;
|
|
983
|
+
top: -5px;
|
|
984
|
+
}
|
|
985
|
+
`,"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 g=e("./lib/dom"),m=e("./range").Range,w=e("./editor").Editor,h=e("./edit_session").EditSession,d=e("./undomanager").UndoManager,a=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,c){if(typeof u=="string"){var i=u;if(u=document.getElementById(i),!u)throw new Error("ace.edit can't find div #"+i)}if(u&&u.env&&u.env.editor instanceof w)return u.env.editor;var s="";if(u&&/input|textarea/i.test(u.tagName)){var p=u;s=p.value,u=g.createElement("pre"),p.parentNode.replaceChild(u,p)}else u&&(s=u.textContent,u.innerHTML="");var b=r.createEditSession(s),x=new w(new a(u),b,c),R={document:b,editor:x,onResize:x.resize.bind(x,null)};return p&&(R.textarea=p),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(u,c){var i=new h(u,c);return i.setUndoManager(new d),i},r.Range=m,r.Editor=w,r.EditSession=h,r.UndoManager=d,r.VirtualRenderer=a;var l=r.config.version;r.version=l}),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)})}()}(rf)),rf.exports}xx();var sf={exports:{}},af;function Cx(){return af||(af=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 g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=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"},d=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=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/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},s=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},p=function(){var b="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",x="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",R="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",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":$,"support.function":b,"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})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(D,E,I){I.length&&(I=[]);var z=D[D.length-1];return I.unshift(z,E),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,E,I){I.length&&(I=[]);var z=D[D.length-1];return I.unshift(z,E),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,E,I){I.length&&(I=[]);var z=D[D.length-1];return I.unshift(z,E),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,E,I){I.length&&(I=[]);var z=D[D.length-1];return I.unshift(z,E),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,E,I){I.length&&(I=[]);var z=D[D.length-1];return I.unshift(z,E),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},s,{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,c,w,h,i,d,a,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,E,I){var z=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",P=D.split(this.splitRegex);return I.push(z,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(D,E,I){return D===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(D,E,I){return D===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,E,I){return this.next="",D=="}"&&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(D,E,I){return I.length&&D===I[0]?(I.unshift(D,E),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(D,E,I){return I.length&&D===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,E,I){return I.length&&D===I[0]?(I.unshift(D,E),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,E,I){return I.length&&D===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,E,I){return I.length&&D===I[0]?(I.unshift(D,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,E,I){return I.length&&D===L[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(D,E,I){return I.length&&D===I[0]?(I.unshift(D,E),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(D,E,I){return I.length&&D===L[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(D,E,I){return I.length&&D===I[0]?(I.unshift(D,E),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,E,I){return I.length&&D[0]===L[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()};g.inherits(p,m),r.RubyHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var g=e("../range").Range,m=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=w.findMatchingBracket({row:h,column:l});if(!u||u.row==h)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new g(h,0,h,l-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(m.prototype),r.MatchingBraceOutdent=m}),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 g=e("../../lib/oop"),m=e("./fold_mode").FoldMode,w=e("../../range").Range,h=e("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};g.inherits(d,m),(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(a,l,u){var c=a.getLine(u),i=this.foldingStartMarker.test(c),s=this.foldingStopMarker.test(c);if(i&&!s){var p=c.match(this.foldingStartMarker);if(p[1]){if((p[1]=="if"||p[1]=="else"||p[1]=="while"||p[1]=="until"||p[1]=="unless")&&(p[1]=="else"&&/^\s*else\s*$/.test(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||p[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(a.getTokenAt(u,p.index+2).type==="keyword")return"start"}else if(!p[3]||a.getTokenAt(u,p.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!s||i&&s)return"";var p=c.match(this.foldingStopMarker);if(p[3]==="end"){if(a.getTokenAt(u,p.index+1).type==="keyword")return"end"}else if(!p[1]||a.getTokenAt(u,p.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,l,u){var c=a.doc.getLine(u),i=this.foldingStartMarker.exec(c);if(i)return i[1]||i[3]?this.rubyBlock(a,u,i.index+2):this.openingBracketBlock(a,"{",u,i.index);var i=this.foldingStopMarker.exec(c);if(i)return i[3]==="end"&&a.getTokenAt(u,i.index+1).type==="keyword"?this.rubyBlock(a,u,i.index+1):i[1]==="=end"&&a.getTokenAt(u,i.index+1).type==="comment.multiline"?this.rubyBlock(a,u,i.index+1):this.closingBracketBlock(a,"}",u,i.index+i[0].length)},this.rubyBlock=function(a,l,u,c){var i=new h(a,l,u),s=i.getCurrentToken();if(!(!s||s.type!="keyword"&&s.type!="comment.multiline")){var p=s.value,b=a.getLine(l);switch(s.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);if(!x.test(b))return;var R=this.indentKeywords[p];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");if(!x.test(b))return;var R=1;break;default:var R=this.indentKeywords[p]}var $=[p];if(R){var k=R===-1?a.getLine(l-1).length:a.getLine(l).length,C=l,L=[];if(L.push(i.getCurrentTokenRange()),i.step=R===-1?i.stepBackward:i.stepForward,s.type=="comment.multiline"){for(;s=i.step();)if(s.type==="comment.multiline"){if(R==1){if(k=6,s.value=="=end")break}else if(s.value=="=begin")break}}else for(;s=i.step();){var D=!1;if(s.type==="keyword"){var E=R*this.indentKeywords[s.value];switch(b=a.getLine(i.getCurrentTokenRow()),s.value){case"do":for(var I=i.$tokenIndex-1;I>=0;I--){var z=i.$rowTokens[I];if(z&&(z.value=="while"||z.value=="until"||z.value=="for")){E=0;break}}break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");(!x.test(b)||p=="case")&&(E=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);x.test(b)||(E=0,D=!0);break;case"when":(/\sthen\s/.test(b)||p=="case")&&(E=0,D=!0)}if(E>0)$.unshift(s.value);else if(E<=0&&D===!1){if($.shift(),!$.length&&((p=="while"||p=="until"||p=="for")&&s.value!="do"||s.value=="do"&&R==-1&&E!=0||s.value!="do"))break;E===0&&$.unshift(s.value)}}}if(!s)return null;if(c)return L.push(i.getCurrentTokenRange()),L;var l=i.getCurrentTokenRow();if(R===-1){if(s.type==="comment.multiline")var P=6;else var P=a.getLine(l).length;return new w(l,P,C-1,k)}return new w(C,k,l-1,a.getLine(l-1).length)}}}}).call(d.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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../range").Range,a=e("./folding/ruby").FoldMode,l=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};g.inherits(l,m),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var s=this.$getIndent(c),p=this.getTokenizer().getLineTokens(c,u),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(u=="start"){var x=c.match(/^.*[\{\(\[]\s*$/),R=c.match(/^\s*(class|def|module)\s.*$/),$=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||$||k)&&(s+=i)}return s},this.checkOutdent=function(u,c,i){return/^\s+(end|else|rescue|ensure)$/.test(c+i)||this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){var s=c.getLine(i);if(/}/.test(s))return this.$outdent.autoOutdent(c,i);var p=this.$getIndent(s),b=c.getLine(i-1),x=this.$getIndent(b),R=c.getTabString();x.length<=p.length&&p.slice(-R.length)==R&&c.remove(new d(i,p.length-R.length,i,p.length))},this.getMatching=function(u,c,i){if(c==null){var s=u.selection.lead;i=s.column,c=s.row}var p=u.getTokenAt(c,i);if(p&&p.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,c,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})}()}(sf)),sf.exports}Cx();var lf={exports:{}},cf;function kx(){return cf||(cf=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 g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=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",d="True|False|None|NotImplemented|Ellipsis|__debug__",a="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",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":d,keyword:h},"identifier"),u="[uU]?",c="[rR]",i="[fF]",s="(?:[rR][fF]|[fF][rR])",p="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",$="(?:"+p+"|"+b+"|"+x+"|"+R+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",D="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",E="(?:(?:"+D+"|"+L+")"+k+")",I="(?:"+E+"|"+D+")",z=`\\\\(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:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:s+'"{3}',next:"rfqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rfqqstring"},{token:"string",regex:s+"'{3}",next:"rfqstring3"},{token:"string",regex:s+"'(?=.)",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:z},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:z},{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:z},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:z},{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:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};g.inherits(w,m),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,f){var g=e("../../lib/oop"),m=e("./fold_mode").FoldMode,w=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};g.inherits(w,m),(function(){this.getFoldWidgetRange=function(h,d,a){var l=h.getLine(a),u=l.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],a,u.index):u[2]?this.indentationBlock(h,a,u.index+u[2].length):this.indentationBlock(h,a)}}).call(w.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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,d=e("../range").Range,a=function(){this.HighlightRules=w,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};g.inherits(a,m),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,c,i){var s=this.$getIndent(c),p=this.getTokenizer().getLineTokens(c,u),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(s+=i)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
|
|
986
|
+
`&&i!=="\r"&&i!==`
|
|
987
|
+
`)return!1;var s=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!s)return!1;do var p=s.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&l[p.value]:!1},this.autoOutdent=function(u,c,i){i+=1;var s=this.$getIndent(c.getLine(i)),p=c.getTabString();s.slice(-p.length)==p&&c.remove(new d(i,s.length-p.length,i,s.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})}()}(lf)),lf.exports}kx();var uf={exports:{}},hf;function Ax(){return hf||(hf=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 g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};g.inherits(w,m),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var g=e("../range").Range,m=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=w.findMatchingBracket({row:h,column:l});if(!u||u.row==h)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new g(h,0,h,l-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(m.prototype),r.MatchingBraceOutdent=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,f){var g=e("../../lib/oop"),m=e("../../range").Range,w=e("./fold_mode").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};g.inherits(h,w),(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(d,a,l){var u=d.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(d,a,l);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(d,a,l,u){var c=d.getLine(l);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(d,c,l);var i=c.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(d,i[1],l,s);var p=d.getCommentFoldRange(l,s+i[0].length,1);return p&&!p.isMultiLine()&&(u?p=this.getSectionRange(d,l):a!="all"&&(p=null)),p}if(a!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(d,i[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),u=l.search(/\S/),c=a,i=l.length;a+=1;for(var s=a,p=d.getLength();++a<p;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(u>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=c)break;if(x.isMultiLine())a=x.end.row;else if(u==b)break}s=a}}return new m(c,i,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var u=a.search(/\s*$/),c=d.getLength(),i=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++l<c;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?p--:p++,!p))break}var x=l;if(x>i)return new m(i,u,x,a.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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};g.inherits(l,m),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,c,i){var s=this.$getIndent(c);if(u=="start"){var p=c.match(/^.*[\{\(\[]\s*$/);p&&(s+=i)}return s},this.checkOutdent=function(u,c,i){return this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){this.$outdent.autoOutdent(c,i)},this.createWorker=function(u){var c=new a(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(u.getDocument()),c.on("annotate",function(i){u.setAnnotations(i.data)}),c.on("terminate",function(){u.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()}(uf)),uf.exports}Ax();var df={exports:{}},pf;function Sx(){return pf||(pf=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 g=e("../lib/oop");e("../lib/lang");var m=e("./text_highlight_rules").TextHighlightRules,w=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",d=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",a=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",l=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]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=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",s=function(){var p=this.createKeywordMapper({"support.function":h,"support.constant":d,"support.type":w,"support.constant.color":a,"support.constant.fonts":l},"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:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{include:"url"},{token:p,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()};g.inherits(s,m),r.CssHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=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|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};g.inherits(w,m),w.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},w.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=w}),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 g(){var u=a.replace("\\d","\\d\\-"),c={onMatch:function(s,p,b){var x=s.charAt(1)=="/"?2:1;return x==1?(p!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):x==2&&p==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:s.slice(0,x)},{type:"meta.tag.tag-name.xml",value:s.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(s,p,b){return p==b[0]&&b.shift(),s.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},i,m("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"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function m(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 w=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",l=function(u){var c={"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"},i=this.createKeywordMapper(c,"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",p="\\\\(?: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]?|.)",b="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),m("no_regex"),x,{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:"("+a+")(\\s*)(=)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:i,regex:a},{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:b+"(\\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:a},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),m("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:[m("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,$,k){if(this.next=R=="{"?this.nextState:"",R=="{"&&k.length)k.unshift("start",$);else if(R=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:p},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\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)&&g.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(l,d),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=function(h){var d="[_: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:"(<\\?)("+d+")",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:d},{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:"(<\\!)("+d+")",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:"(?:(<)|(</))((?:"+d+":)?"+d+")",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:d},{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===w&&this.normalizeRules()};(function(){this.embedTagRules=function(h,d,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:d+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,u,c){return c.splice(0),this.token}}],this.embedRules(h,d,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(m.prototype),g.inherits(w,m),r.XmlHighlightRules=w}),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 g=e("../lib/oop"),m=e("../lib/lang"),w=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,d=e("./xml_highlight_rules").XmlHighlightRules,a=m.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"}),l=function(){d.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,c){var i=a[c];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".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(w,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};g.inherits(l,d),r.HtmlHighlightRules=l}),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 g=e("../config").$modes,m=e("../lib/oop"),w=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,d=e("./html_highlight_rules").HtmlHighlightRules,a=function(u){return"(?:[^"+w.escapeRegExp(u)+"\\\\]|\\\\.)*"},l=function(){d.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,s,p,b){var x=i.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return g[R]||(R=""),p.unshift("githubblock",[],[x[1],x[2],R],s),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(i,s,p,b){var x=p[1],R=p[2][0],$=p[2][1],k=p[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);if(C&&C[1].length<R.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return p.splice(0,3),this.next=p.shift(),this.token;if(this.next="",k&&g[k]){var L=g[k].getTokenizer().getLineTokens(i,x.slice(0));return p[1]=L.state,L.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(i){return"markup.heading."+i.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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\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:c}),this.normalizeRules()};m.inherits(l,h),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,f){var g=e("../../lib/oop"),m=e("./fold_mode").FoldMode,w=e("../../range").Range,h=r.FoldMode=function(){};g.inherits(h,m),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,a,l){var u=d.getLine(l);return this.foldingStartMarker.test(u)?u[0]=="`"&&d.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,a,l){function u(D){return R=d.getTokens(D)[0],R&&R.type.lastIndexOf($,0)===0}function c(){var D=R.value[0];return D=="="?6:D=="-"?5:7-R.value.search(/[^#]|$/)}var i=d.getLine(l),s=i.length,p=d.getLength(),b=l,x=l;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(d.bgTokenizer.getState(l)!=="start"){for(;++l<p&&(i=d.getLine(l),!(i[0]=="`"&i.substring(0,3)=="```")););return new w(b,s,l,0)}for(;l-- >0&&(i=d.getLine(l),!(i[0]=="`"&i.substring(0,3)=="```")););return new w(l,i.length,b,0)}var R,$="markup.heading";if(u(l)){for(var k=c();++l<p;)if(u(l)){var C=c();if(C>=k)break}if(x=l-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>b)for(;x>b&&/^\s*$/.test(d.getLine(x));)x--;if(x>b){var L=d.getLine(x).length;return new w(b,s,x,L)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,f){var g=e("../range").Range,m=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=w.findMatchingBracket({row:h,column:l});if(!u||u.row==h)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new g(h,0,h,l-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(m.prototype),r.MatchingBraceOutdent=m}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,f){function g(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var m=e("../../lib/oop"),w=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(a,l,u,c,i){if(i=='"'||i=="'"){var s=i,p=c.doc.getTextRange(u.getSelectionRange());if(p!==""&&p!=="'"&&p!='"'&&u.getWrapBehavioursEnabled())return{text:s+p+s,selection:!1};var b=u.getCursorPosition(),x=c.doc.getLine(b.row),R=x.substring(b.column,b.column+1),$=new h(c,b.row,b.column),k=$.getCurrentToken();if(R==s&&(g(k,"attribute-value")||g(k,"string")))return{text:"",selection:[1,1]};if(k||(k=$.stepBackward()),!k)return;for(;g(k,"tag-whitespace")||g(k,"whitespace");)k=$.stepBackward();var C=!R||R.match(/\s/);if(g(k,"attribute-equals")&&(C||R==">")||g(k,"decl-attribute-equals")&&(C||R=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,u,c,i){var s=c.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var p=c.doc.getLine(i.start.row),b=p.substring(i.start.column+1,i.start.column+2);if(b==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(a,l,u,c,i){if(i==">"){var s=u.getSelectionRange().start,p=new h(c,s.row,s.column),b=p.getCurrentToken()||p.stepBackward();if(!b||!(g(b,"tag-name")||g(b,"tag-whitespace")||g(b,"attribute-name")||g(b,"attribute-equals")||g(b,"attribute-value"))||g(b,"reference.attribute-value"))return;if(g(b,"attribute-value")){var x=p.getCurrentTokenColumn()+b.value.length;if(s.column<x)return;if(s.column==x){var R=p.stepForward();if(R&&g(R,"attribute-value"))return;p.stepBackward()}}if(/^\s*>/.test(c.getLine(s.row).slice(s.column)))return;for(;!g(b,"tag-name");)if(b=p.stepBackward(),b.value=="<"){b=p.stepForward();break}var $=p.getCurrentTokenRow(),k=p.getCurrentTokenColumn();if(g(p.stepBackward(),"end-tag-open"))return;var C=b.value;return $==s.row&&(C=C.substring(0,s.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,u,c,i){if(i==`
|
|
988
|
+
`){var s=u.getCursorPosition(),p=c.getLine(s.row),b=new h(c,s.row,s.column),x=b.getCurrentToken();if(g(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=b.stepBackward();if(!x)return;var R=x.value,$=b.getCurrentTokenRow();if(x=b.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var k=c.getTokenAt(s.row,s.column+1),p=c.getLine($),C=this.$getIndent(p),L=C+c.getTabString();return k&&k.value==="</"?{text:`
|
|
989
|
+
`+L+`
|
|
990
|
+
`+C,selection:[1,L.length,1,L.length]}:{text:`
|
|
991
|
+
`+L}}}}})};m.inherits(d,w),r.XmlBehaviour=d}),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 g=e("../../lib/oop"),m=e("../../token_iterator").TokenIterator,w=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,d=function(){var a=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(w),this.add("autoclosing-fragment","insertion",function(l,u,c,i,s){if(s==">"){var p=c.getSelectionRange().start,b=new m(i,p.row,p.column),x=b.getCurrentToken()||b.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};g.inherits(d,w),r.JavaScriptBehaviour=d}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,f){function g(l,u){return l&&l.type&&l.type.lastIndexOf(u+".xml")>-1}var m=e("../../lib/oop"),w=e("../../range").Range,h=e("./fold_mode").FoldMode,d=r.FoldMode=function(l,u){h.call(this),this.voidElements=l||{},this.optionalEndTags=m.mixin({},this.voidElements),u&&m.mixin(this.optionalEndTags,u)};m.inherits(d,h);var a=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(l,u,c){var i=this._getFirstTagInLine(l,c);return i?i.closing||!i.tagName&&i.selfClosing?u==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(l,c,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(l,c)},this.getCommentFoldWidget=function(l,u){return/comment/.test(l.getState(u))&&/<!-/.test(l.getLine(u))?"start":""},this._getFirstTagInLine=function(l,u){for(var c=l.getTokens(u),i=new a,s=0;s<c.length;s++){var p=c[s];if(g(p,"tag-open")){if(i.end.column=i.start.column+p.value.length,i.closing=g(p,"end-tag-open"),p=c[++s],!p)return null;if(i.tagName=p.value,p.value===""){if(p=c[++s],!p)return null;i.tagName=p.value}for(i.end.column+=p.value.length,s++;s<c.length;s++)if(p=c[s],i.end.column+=p.value.length,g(p,"tag-close")){i.selfClosing=p.value=="/>";break}return i}if(g(p,"tag-close"))return i.selfClosing=p.value=="/>",i;i.start.column+=p.value.length}return null},this._findEndTagInLine=function(l,u,c,i){for(var s=l.getTokens(u),p=0,b=0;b<s.length;b++){var x=s[b];if(p+=x.value.length,!(p<i-1)&&g(x,"end-tag-open")&&(x=s[b+1],g(x,"tag-name")&&x.value===""&&(x=s[b+2]),x&&x.value==c))return!0}return!1},this.getFoldWidgetRange=function(l,u,c){var i=this._getFirstTagInLine(l,c);if(!i)return this.getCommentFoldWidget(l,c)&&l.getCommentFoldRange(c,l.getLine(c).length);var s=l.getMatchingTags({row:c,column:0});if(s)return new w(s.openTag.end.row,s.openTag.end.column,s.closeTag.start.row,s.closeTag.start.column)}}).call(d.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 g=e("../../lib/oop"),m=e("../../range").Range,w=e("./fold_mode").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};g.inherits(h,w),(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(d,a,l){var u=d.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(d,a,l);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(d,a,l,u){var c=d.getLine(l);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(d,c,l);var i=c.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(d,i[1],l,s);var p=d.getCommentFoldRange(l,s+i[0].length,1);return p&&!p.isMultiLine()&&(u?p=this.getSectionRange(d,l):a!="all"&&(p=null)),p}if(a!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(d,i[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),u=l.search(/\S/),c=a,i=l.length;a+=1;for(var s=a,p=d.getLength();++a<p;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(u>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=c)break;if(x.isMultiLine())a=x.end.row;else if(u==b)break}s=a}}return new m(c,i,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var u=a.search(/\s*$/),c=d.getLength(),i=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++l<c;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?p--:p++,!p))break}var x=l;if(x>i)return new m(i,u,x,a.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 g=e("../../lib/oop"),m=e("./xml").FoldMode,w=e("./cstyle").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end))),this.xmlFoldMode=new m};g.inherits(h,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var u=this.getFoldWidgetBase(d,a,l);return u||this.xmlFoldMode.getFoldWidget(d,a,l)},this.getFoldWidgetRange=function(d,a,l,u){var c=this.getFoldWidgetRangeBase(d,a,l,u);return c||this.xmlFoldMode.getFoldWidgetRange(d,a,l)}}).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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,l=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=new a,this.foldingRules=new l};g.inherits(u,m),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,i,s){var p=this.$getIndent(i),b=this.getTokenizer().getLineTokens(i,c),x=b.tokens,R=b.state;if(x.length&&x[x.length-1].type=="comment")return p;if(c=="start"||c=="no_regex"){var $=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(p+=s)}else if(c=="doc-start"&&(R=="start"||R=="no_regex"))return"";return p},this.checkOutdent=function(c,i,s){return this.$outdent.checkOutdent(i,s)},this.autoOutdent=function(c,i,s){this.$outdent.autoOutdent(i,s)},this.createWorker=function(c){var i=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(c.getDocument()),i.on("annotate",function(s){c.setAnnotations(s.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},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 g={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},m=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var h in w)if(typeof w[h]=="string"){var d=h.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});g.hasOwnProperty(d)||(g[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,h,d,a){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||h.$mode.$id=="ace/mode/scss"){var l=h.getLine(d.row).substr(0,d.column),u=/\([^)]*$/.test(l);return u&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(w,h,d,a):this.getPropertyCompletions(w,h,d,a,u)}return[]},this.getPropertyCompletions=function(w,h,d,a,l){l=l||!1;var u=Object.keys(g);return u.map(function(c){return{caption:c,snippet:c+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,h,d,a){var l=h.getLine(d.row).substr(0,d.column),u=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!u)return[];var c=[];return u in g&&typeof g[u]=="object"&&(c=Object.keys(g[u])),c.map(function(i){return{caption:i,snippet:i,meta:"property value",score:1e6}})}}).call(m.prototype),r.CssCompletions=m}),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 g=e("../../lib/oop");e("../behaviour").Behaviour;var m=e("./cstyle").CstyleBehaviour,w=e("../../token_iterator").TokenIterator,h=function(){this.inherit(m),this.add("colon","insertion",function(d,a,l,u,c){if(c===":"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=new w(u,i.row,i.column),p=s.getCurrentToken();if(p&&p.value.match(/\s+/)&&(p=s.stepBackward()),p&&p.type==="support.type"){var b=u.doc.getLine(i.row),x=b.substring(i.column,i.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(i.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(d,a,l,u,c){var i=u.doc.getTextRange(c);if(!c.isMultiLine()&&i===":"){var s=l.getCursorPosition(),p=new w(u,s.row,s.column),b=p.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=p.stepBackward()),b&&b.type==="support.type"){var x=u.doc.getLine(c.start.row),R=x.substring(c.end.column,c.end.column+1);if(R===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(d,a,l,u,c){if(c===";"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=u.doc.getLine(i.row),p=s.substring(i.column,i.column+1);if(p===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,a,l,u,c){if(c==="!"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=u.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(s.substring(i.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(h,m),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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new u};g.inherits(c,m),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,s,p){var b=this.$getIndent(s),x=this.getTokenizer().getLineTokens(s,i).tokens;if(x.length&&x[x.length-1].type=="comment")return b;var R=s.match(/^.*\{\s*$/);return R&&(b+=p),b},this.checkOutdent=function(i,s,p){return this.$outdent.checkOutdent(s,p)},this.autoOutdent=function(i,s,p){this.$outdent.autoOutdent(s,p)},this.getCompletions=function(i,s,p,b){return this.$completer.getCompletions(i,s,p,b)},this.createWorker=function(i){var s=new d(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(i.getDocument()),s.on("annotate",function(p){i.setAnnotations(p.data)}),s.on("terminate",function(){i.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,f){var g=e("../../lib/oop"),m=e("./fold_mode").FoldMode,w=r.FoldMode=function(h,d){this.defaultMode=h,this.subModes=d};g.inherits(w,m),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var d in this.subModes)if(h.indexOf(d)===0)return this.subModes[d];return null},this.$tryMode=function(h,d,a,l){var u=this.$getMode(h);return u?u.getFoldWidget(d,a,l):""},this.getFoldWidget=function(h,d,a){return this.$tryMode(h.getState(a-1),h,d,a)||this.$tryMode(h.getState(a),h,d,a)||this.defaultMode.getFoldWidget(h,d,a)},this.getFoldWidgetRange=function(h,d,a){var l=this.$getMode(h.getState(a-1));return(!l||!l.getFoldWidget(h,d,a))&&(l=this.$getMode(h.getState(a))),(!l||!l.getFoldWidget(h,d,a))&&(l=this.defaultMode),l.getFoldWidgetRange(h,d,a)}}).call(w.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 g=e("../../lib/oop"),m=e("./mixed").FoldMode,w=e("./xml").FoldMode,h=e("./cstyle").FoldMode,d=r.FoldMode=function(a,l){m.call(this,new w(a,l),{"js-":new h,"css-":new h})};g.inherits(d,m)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,f){function g(s,p){return s.type.lastIndexOf(p+".xml")>-1}function m(s,p){for(var b=new h(s,p.row,p.column),x=b.getCurrentToken();x&&!g(x,"tag-name");)x=b.stepBackward();if(x)return x.value}function w(s,p){for(var b=new h(s,p.row,p.column),x=b.getCurrentToken();x&&!g(x,"attribute-name");)x=b.stepBackward();if(x)return x.value}var h=e("../token_iterator").TokenIterator,d=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["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"],l=d.concat(a),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:{}},c=Object.keys(u),i=function(){};(function(){this.getCompletions=function(s,p,b,x){var R=p.getTokenAt(b.row,b.column);if(!R)return[];if(g(R,"tag-name")||g(R,"tag-open")||g(R,"end-tag-open"))return this.getTagCompletions(s,p,b,x);if(g(R,"tag-whitespace")||g(R,"attribute-name"))return this.getAttributeCompletions(s,p,b,x);if(g(R,"attribute-value"))return this.getAttributeValueCompletions(s,p,b,x);var $=p.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(s,p,b,x):[]},this.getTagCompletions=function(s,p,b,x){return c.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,p,b,x){var R=m(p,b);if(!R)return[];var $=l;return R in u&&($=$.concat(Object.keys(u[R]))),$.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,p,b,x){var R=m(p,b),$=w(p,b);if(!R)return[];var k=[];return R in u&&$ in u[R]&&typeof u[R][$]=="object"&&(k=Object.keys(u[R][$])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,p,b,x){var R=["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 R.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(i.prototype),r.HtmlCompletions=i}),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 g=e("../lib/oop"),m=e("../lib/lang"),w=e("./text").Mode,h=e("./javascript").Mode,d=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,i=e("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new c,this.createModeDelegates({"js-":h,"css-":d}),this.foldingRules=new u(this.voidElements,m.arrayToMap(p))};g.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=m.arrayToMap(s),this.getNextLineIndent=function(x,R,$){return this.$getIndent(R)},this.checkOutdent=function(x,R,$){return!1},this.getCompletions=function(x,R,$,k){return this.$completer.getCompletions(x,R,$,k)},this.createWorker=function(x){if(this.constructor==b){var R=new i(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function($){x.setAnnotations($.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),r.Mode=b}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,f){var g=e("../lib/oop"),m=e("./text_highlight_rules").TextHighlightRules,w=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",d=function(){var a=this.createKeywordMapper({keyword:w,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",c="(?:\\d+)",i="(?:(?:"+c+"?"+u+")|(?:"+c+"\\.))",s="(?:(?:"+i+"|"+c+"))",p="(?:"+s+"|"+i+")",b="(?:&"+c+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\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,L,D){var E=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return D.push(E,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,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[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:R},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:l+"\\b"},{token:a,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()};g.inherits(d,m),r.ShHighlightRules=d}),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 g=e("../lib/oop"),m=e("./text").Mode,w=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,d=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=w,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};g.inherits(a,m),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var s=this.$getIndent(c),p=this.getTokenizer().getLineTokens(c,u),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(s+=i)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
|
|
992
|
+
`&&i!=="\r"&&i!==`
|
|
993
|
+
`)return!1;var s=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!s)return!1;do var p=s.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&l[p.value]:!1},this.autoOutdent=function(u,c,i){i+=1;var s=this.$getIndent(c.getLine(i)),p=c.getTabString();s.slice(-p.length)==p&&c.remove(new h(i,s.length-p.length,i,s.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),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 g=e("../lib/oop"),m=e("../lib/lang"),w=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,d=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,l=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new d,this.foldingRules=new a};g.inherits(u,w),(function(){this.voidElements=m.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var i=new l(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(c.getDocument()),i.on("error",function(s){c.setAnnotations(s.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},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 g=e("../lib/oop"),m=e("./behaviour/cstyle").CstyleBehaviour,w=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,d=e("./folding/markdown").FoldMode,a=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 d,this.$behaviour=new m({braces:!0})};g.inherits(a,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,u,c){if(l=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!i)return"";var s=i[2];return s||(s=parseInt(i[3],10)+1+"."),i[1]+s+i[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})}()}(df)),df.exports}Sx();var ff={exports:{}},gf;function $x(){return gf||(gf=1,function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,f){f.exports=`.ace-twilight .ace_gutter {
|
|
994
|
+
background: #232323;
|
|
995
|
+
color: #E2E2E2
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.ace-twilight .ace_print-margin {
|
|
999
|
+
width: 1px;
|
|
1000
|
+
background: #232323
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.ace-twilight {
|
|
1004
|
+
background-color: #141414;
|
|
1005
|
+
color: #F8F8F8
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.ace-twilight .ace_cursor {
|
|
1009
|
+
color: #A7A7A7
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
|
1013
|
+
background: rgba(221, 240, 255, 0.20)
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
|
1017
|
+
box-shadow: 0 0 3px 0px #141414;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
|
1021
|
+
background: rgb(102, 82, 0)
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
|
1025
|
+
margin: -1px 0 0 -1px;
|
|
1026
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
|
1030
|
+
background: rgba(255, 255, 255, 0.031)
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.ace-twilight .ace_gutter-active-line {
|
|
1034
|
+
background-color: rgba(255, 255, 255, 0.031)
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
|
1038
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.ace-twilight .ace_invisible {
|
|
1042
|
+
color: rgba(255, 255, 255, 0.25)
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.ace-twilight .ace_keyword,
|
|
1046
|
+
.ace-twilight .ace_meta {
|
|
1047
|
+
color: #CDA869
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.ace-twilight .ace_constant,
|
|
1051
|
+
.ace-twilight .ace_constant.ace_character,
|
|
1052
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
|
1053
|
+
.ace-twilight .ace_constant.ace_other,
|
|
1054
|
+
.ace-twilight .ace_heading,
|
|
1055
|
+
.ace-twilight .ace_markup.ace_heading,
|
|
1056
|
+
.ace-twilight .ace_support.ace_constant {
|
|
1057
|
+
color: #CF6A4C
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
|
1061
|
+
color: #F8F8F8;
|
|
1062
|
+
background-color: rgba(86, 45, 86, 0.75)
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
|
1066
|
+
text-decoration: underline;
|
|
1067
|
+
font-style: italic;
|
|
1068
|
+
color: #D2A8A1
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.ace-twilight .ace_support {
|
|
1072
|
+
color: #9B859D
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.ace-twilight .ace_fold {
|
|
1076
|
+
background-color: #AC885B;
|
|
1077
|
+
border-color: #F8F8F8
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.ace-twilight .ace_support.ace_function {
|
|
1081
|
+
color: #DAD085
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.ace-twilight .ace_list,
|
|
1085
|
+
.ace-twilight .ace_markup.ace_list,
|
|
1086
|
+
.ace-twilight .ace_storage {
|
|
1087
|
+
color: #F9EE98
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
|
1091
|
+
.ace-twilight .ace_meta.ace_tag {
|
|
1092
|
+
color: #AC885B
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.ace-twilight .ace_string {
|
|
1096
|
+
color: #8F9D6A
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.ace-twilight .ace_string.ace_regexp {
|
|
1100
|
+
color: #E9C062
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.ace-twilight .ace_comment {
|
|
1104
|
+
font-style: italic;
|
|
1105
|
+
color: #5F5A60
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.ace-twilight .ace_variable {
|
|
1109
|
+
color: #7587A6
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.ace-twilight .ace_xml-pe {
|
|
1113
|
+
color: #494949
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.ace-twilight .ace_indent-guide {
|
|
1117
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.ace-twilight .ace_indent-guide-active {
|
|
1121
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1122
|
+
}
|
|
1123
|
+
`}),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 g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})}()}(ff)),ff.exports}$x();var mf={exports:{}},vf;function _x(){return vf||(vf=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 g(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var m=e("./lib/dom"),w=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,d=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,i=e("./clipboard"),s={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,D){var E=C.session.getTextRange();return D?E.replace(/\n\r?([ \t]*\S)/g,`
|
|
1124
|
+
`+D+"$1"):E},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 i.getText&&i.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 L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;var p=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function D(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var E={regex:"/("+D("/")+"+)/",onMatch:function(I,z,P){var O=P[0];return O.fmtString=!0,O.guard=I.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(I,z,P){var O=I[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(I=O),[I]}},{regex:/}/,onMatch:function(I,z,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,z,P){var O=L(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(I,z,P){var O=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return P[0].choices=O,[O[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,z,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,z,P){var O=I[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?I=O:O=="n"?I=`
|
|
1125
|
+
`:O=="t"?I=" ":"ulULE".indexOf(O)!=-1&&(I={changeCase:O,local:O>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,z,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,z,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,z,P){var O={text:I.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,z,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,z,P){var O=P[0];return O.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(I,z,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(L,D){return this.getTokenizer().getLineTokens(L,D).tokens.map(function(E){return E.value||E})},C.prototype.getVariableValue=function(L,D,E){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var I=this.variables[D];return typeof I=="function"&&(I=this.variables[D](L,D,E)),I??""},C.prototype.tmStrFormat=function(L,D,E){if(!D.fmt)return L;var I=D.flag||"",z=D.guard;z=new RegExp(z,I.replace(/[^gim]/g,""));var P=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,_=L.replace(z,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,E),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 _},C.prototype.tmFormatFunction=function(L,D,E){return D.formatFunction=="upcase"?L.toUpperCase():D.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,D){function E(B){var U=L.indexOf(B,O+1);U!=-1&&(O=U)}for(var I=[],z="",P=!0,O=0;O<L.length;O++){var _=L[O];if(typeof _=="string"){I.push(_),_==`
|
|
1126
|
+
`?(P=!0,z=""):P&&(z=/^\t*/.exec(_)[0],P=/\S/.test(_));continue}if(_){if(P=!1,_.fmtString){var A=L.indexOf(_,O+1);A==-1&&(A=L.length),_.fmt=L.slice(O+1,A),O=A}if(_.text){var N=this.getVariableValue(D,_.text,z)+"";_.fmtString&&(N=this.tmStrFormat(N,_,D)),_.formatFunction&&(N=this.tmFormatFunction(N,_,D)),N&&!_.ifEnd?(I.push(N),E(_)):!N&&_.ifEnd&&E(_.ifEnd)}else _.elseEnd?E(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&I.push(_)}}return I},C.prototype.getDisplayTextForSnippet=function(L,D){var E=b.call(this,L,D);return E.text},C.prototype.insertSnippetForSelection=function(L,D,E){E===void 0&&(E={});var I=b.call(this,L,D,E),z=L.getSelectionRange(),P=L.session.replace(z,I.text),O=new x(L),_=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(I.tabstops,z.start,P,_)},C.prototype.insertSnippet=function(L,D,E){E===void 0&&(E={});var I=this;if(L.inVirtualSelectionMode)return I.insertSnippetForSelection(L,D,E);L.forEachSelection(function(){I.insertSnippetForSelection(L,D,E)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var D=L.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!L.session.$mode.inlinePhp&&(D="html");var E=L.getCursorPosition(),I=L.session.getState(E.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?D="javascript":I.substring(0,4)=="css-"?D="css":I.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(L){var D=this.$getScope(L),E=[D],I=this.snippetMap;return I[D]&&I[D].includeScopes&&E.push.apply(E,I[D].includeScopes),E.push("_"),E},C.prototype.expandWithTab=function(L,D){var E=this,I=L.forEachSelection(function(){return E.expandSnippetForSelection(L,D)},null,{keepOrder:!0});return I&&L.tabstopManager&&L.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(L,D){var E=L.getCursorPosition(),I=L.session.getLine(E.row),z=I.substring(0,E.column),P=I.substr(E.column),O=this.snippetMap,_;return this.getActiveScopes(L).some(function(A){var N=O[A];return N&&(_=this.findMatchingSnippet(N,z,P)),!!_},this),_?(D&&D.dryRun||(L.session.doc.removeInLine(E.row,E.column-_.replaceBefore.length,E.column+_.replaceAfter.length),this.variables.M__=_.matchBefore,this.variables.T__=_.matchAfter,this.insertSnippetForSelection(L,_.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,D,E){for(var I=L.length;I--;){var z=L[I];if(!(z.startRe&&!z.startRe.test(D))&&!(z.endRe&&!z.endRe.test(E))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(D):[""],z.matchAfter=z.endRe?z.endRe.exec(E):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(D)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(E)[0]:"",z}},C.prototype.register=function(L,D){function E(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function I(A,N,B){return A=E(A),N=E(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function z(A){A.scope||(A.scope=D||"_"),D=A.scope,P[D]||(P[D]=[],O[D]={});var N=O[D];if(A.name){var B=N[A.name];B&&_.unregister(B),N[A.name]=A}P[D].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
|
1127
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=d.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,_=this;L||(L=[]),Array.isArray(L)?L.forEach(z):Object.keys(L).forEach(function(A){z(L[A])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(L,D){function E(P){var O=z[P.scope||D];if(O&&O[P.name]){delete O[P.name];var _=I[P.scope||D],A=_&&_.indexOf(P);A>=0&&_.splice(A,1)}}var I=this.snippetMap,z=this.snippetNameMap;L.content?E(L):Array.isArray(L)&&L.forEach(E)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var D=[],E={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=I.exec(L);){if(z[1])try{E=JSON.parse(z[1]),D.push(E)}catch{}if(z[4])E.content=z[4].replace(/^\t/gm,""),D.push(E),E={};else{var P=z[2],O=z[3];if(P=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=_.exec(O)[1],E.trigger=_.exec(O)[1],E.endTrigger=_.exec(O)[1],E.endGuard=_.exec(O)[1]}else P=="snippet"?(E.tabTrigger=O.match(/^\S*/)[0],E.name||(E.name=O)):P&&(E[P]=O)}}return D},C.prototype.getSnippetByName=function(L,D){var E=this.snippetNameMap,I;return this.getActiveScopes(D).some(function(z){var P=E[z];return P&&(I=P[L]),!!I},this),I},C}();w.implement(p.prototype,h);var b=function(C,L,D){function E(de){for(var me=[],$e=0;$e<de.length;$e++){var Te=de[$e];if(typeof Te=="object"){if(N[Te.tabstopId])continue;var Me=de.lastIndexOf(Te,$e-1);Te=me[Me]||{tabstopId:Te.tabstopId}}me[$e]=Te}return me}D===void 0&&(D={});var I=C.getCursorPosition(),z=C.session.getLine(I.row),P=C.session.getTabString(),O=z.match(/^\s*/)[0];I.column<O.length&&(O=O.slice(0,I.column)),L=L.replace(/\r/g,"");var _=this.tokenizeTmSnippet(L);_=this.resolveVariables(_,C),_=_.map(function(de){return de==`
|
|
1128
|
+
`&&!D.excludeExtraIndent?de+O:typeof de=="string"?de.replace(/\t/g,P):de});var A=[];_.forEach(function(de,me){if(typeof de=="object"){var $e=de.tabstopId,Te=A[$e];if(Te||(Te=A[$e]=[],Te.index=$e,Te.value="",Te.parents={}),Te.indexOf(de)===-1){de.choices&&!Te.choices&&(Te.choices=de.choices),Te.push(de);var Me=_.indexOf(de,me+1);if(Me!==-1){var Xe=_.slice(me+1,Me),Ke=Xe.some(function(at){return typeof at=="object"});Ke&&!Te.value?Te.value=Xe:Xe.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Xe.join(""))}}}}),A.forEach(function(de){de.length=0});for(var N={},B=0;B<_.length;B++){var U=_[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],J=_.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(de){Z.parents[de]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=E(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),_.splice.apply(_,[B+1,Math.max(0,J-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,le=0,se="";return _.forEach(function(de){if(typeof de=="string"){var me=de.split(`
|
|
1129
|
+
`);me.length>1?(le=me[me.length-1].length,ne+=me.length-1):le+=de.length,se+=de}else de&&(de.start?de.end={row:ne,column:le}:de.start={row:ne,column:le})}),{text:se,tabstops:A,tokens:_}},x=function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.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(L){for(var D=L.action[0]=="r",E=this.selectedTabstop||{},I=E.parents||{},z=this.tabstops.slice(),P=0;P<z.length;P++){var O=z[P],_=O==E||I[O.index];if(O.rangeList.$bias=_?0:1,L.action=="remove"&&O!==E){var A=O.parents&&O.parents[E.index],N=O.rangeList.pointIndex(L.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(L.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(L)}var Z=this.session;!this.$inChange&&D&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var D=this.session,E=D.getTextRange(L.firstNonLinked),I=0;I<L.length;I++){var z=L[I];if(z.linked){var P=z.original,O=r.snippetManager.tmStrFormat(E,P,this.editor);D.replace(z,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,D=this.editor.selection.anchor,E=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var z=this.ranges[I].contains(L.row,L.column),P=E||this.ranges[I].contains(D.row,D.column);if(z&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var D=this.tabstops.length,E=this.index+(L||1);E=Math.min(Math.max(E,1),D),E==D&&(E=0),this.selectTabstop(E),this.updateTabstopMarkers(),E===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=L,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var E=D.firstNonLinked||D;if(D.choices&&(E.cursor=E.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(E);else{var I=this.editor.multiSelect;I.toSingleRange(E);for(var z=0;z<D.length;z++)D.hasLinkedRanges&&D[z].linked||I.addRange(D[z].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(L,D,E){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var z=a.fromPoints(E,E);$(z.start,D),$(z.end,D),L[0]=[z],L[0].index=0}var P=this.index,O=[P+1,0],_=this.ranges,A=this.snippetId=(this.snippetId||0)+1;L.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],J=a.fromPoints(Z.start,Z.end||Z.start);R(J.start,D),R(J.end,D),J.original=Z,J.tabstop=U,_.push(J),U!=N?U.unshift(J):U[K]=J,Z.fmtString||U.firstNonLinked&&I?(J.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=J)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,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(L){var D=this.session;L.forEach(function(E){E.markerId||(E.markerId=D.addMarker(E,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var D=this.session;L.forEach(function(E){D.removeMarker(E.markerId),E.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(D){D.snippetId===L?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(L){var D=L.tabstop.indexOf(L);D!=-1&&L.tabstop.splice(D,1),D=this.ranges.indexOf(L),D!=-1&&this.ranges.splice(D,1),D=L.tabstop.rangeList.ranges.indexOf(L),D!=-1&&L.tabstop.splice(D,1),this.session.removeMarker(L.markerId),L.tabstop.length||(D=this.tabstops.indexOf(L.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C}();x.prototype.keyboardHandler=new u,x.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 R=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},$=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};m.importCssString(`
|
|
1130
|
+
.ace_snippet-marker {
|
|
1131
|
+
-moz-box-sizing: border-box;
|
|
1132
|
+
box-sizing: border-box;
|
|
1133
|
+
background: rgba(194, 193, 208, 0.09);
|
|
1134
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1135
|
+
position: absolute;
|
|
1136
|
+
}`,"snippets.css",!1),r.snippetManager=new p;var k=e("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.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 g=e("../virtual_renderer").VirtualRenderer,m=e("../editor").Editor,w=e("../range").Range,h=e("../lib/event"),d=e("../lib/lang"),a=e("../lib/dom"),l=e("../config").nls,u=e("./../lib/useragent"),c=function(R){return"suggest-aria-id:".concat(R)},i=u.isSafari?"menu":"listbox",s=u.isSafari?"menuitem":"option",p=u.isSafari?"aria-current":"aria-selected",b=function(R){var $=new g(R);$.$maxLines=4;var k=new m($);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=function(){function R($){var k=a.createElement("div"),C=b(k);$&&$.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",i),C.renderer.$textLayer.element.setAttribute("aria-roledescription",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,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(_){var A=_.getDocumentPosition();C.selection.moveToPosition(A),I.start.row=I.end.row=A.row,_.stop()});var D,E=new w(-1,0,-1,1/0),I=new w(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(_){_?E.id&&(C.session.removeMarker(E.id),E.id=null):E.id=C.session.addMarker(E,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(_){if(!D){D=_;return}if(!(D.x==_.x&&D.y==_.y)){D=_,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=D.getDocumentPosition().row;E.start.row!=A&&(E.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(D&&E.start.row!=-1){D.$pos=null;var _=D.getDocumentPosition().row;E.id||C.setRow(_),P(_,!0)}}),C.renderer.on("afterRender",function(){for(var _=C.renderer.$textLayer,A=_.config.firstRow,N=_.config.lastRow;A<=N;A++){var B=_.element.childNodes[A-_.config.firstRow];B.setAttribute("role",s),B.setAttribute("aria-roledescription",l("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(J){J.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var _=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[_-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(p),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=c(_);a.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(p,"true")}});var z=function(){P(-1)},P=function(_,A){_!==E.start.row&&(E.start.row=E.end.row=_,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return E.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,z()}),C.on("hide",z),C.on("changeSelection",z),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(_){var A=C.data[_];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(_){function A(de,me){de&&B.push({type:(N.className||"")+(me||""),value:de})}var N=C.data[_],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(),J=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var le=Z.slice(he,ne);he=ne;var se=K.indexOf(le,J);if(se==-1)continue;A(U.slice(J,se),""),J=se+le.length,A(U.slice(se,J),"completion-highlight")}return A(U.slice(J,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=L,O.start=L,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(_,A){C.filterText=A||"",C.setValue(d.stringRepeat(`
|
|
1137
|
+
`,_.length),-1),C.data=_||[],C.setRow(0)},C.getData=function(_){return C.data[_]},C.getRow=function(){return I.start.row},C.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),I.start.row!=_&&(C.selection.clearSelection(),I.start.row=I.end.row=_||0,C.session._emit("changeBackMarker"),C.moveCursorTo(_||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(_,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===_.top&&C.anchorPos.left===_.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,J=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,le={top:0,bottom:0},se=Z-_.top-3*this.$borderSize-A,de=_.top-3*this.$borderSize;N||(de<=se||se>=ne?N="bottom":N="top"),N==="top"?(le.bottom=_.top-this.$borderSize,le.top=le.bottom-ne):N==="bottom"&&(le.top=_.top+A+this.$borderSize,le.bottom=le.top+ne);var me=le.top>=0&&le.bottom<=Z;if(!B&&!me)return!1;me?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=de:he.$maxPixelHeight=se,N==="top"?(U.style.top="",U.style.bottom=Z+K-le.bottom+"px",C.isTopdown=!1):(U.style.top=le.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=_.left;return $e+U.offsetWidth>J&&($e=J-U.offsetWidth),U.style.left=$e+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=_,C.anchor=N,a.$fixPositionBug(U),!0},C.show=function(_,A,N){this.tryShow(_,A,N?"bottom":void 0,!0)},C.goTo=function(_){var A=this.getRow(),N=this.session.getLength()-1;switch(_){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 R}();a.importCssString(`
|
|
1138
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1139
|
+
background-color: #CAD6FA;
|
|
1140
|
+
z-index: 1;
|
|
1141
|
+
}
|
|
1142
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1143
|
+
background-color: #3a674e;
|
|
1144
|
+
}
|
|
1145
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1146
|
+
border: 1px solid #abbffe;
|
|
1147
|
+
margin-top: -1px;
|
|
1148
|
+
background: rgba(233,233,253,0.4);
|
|
1149
|
+
position: absolute;
|
|
1150
|
+
z-index: 2;
|
|
1151
|
+
}
|
|
1152
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1153
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
1154
|
+
background: rgba(58, 103, 78, 0.62);
|
|
1155
|
+
}
|
|
1156
|
+
.ace_completion-meta {
|
|
1157
|
+
opacity: 0.5;
|
|
1158
|
+
margin-left: 0.9em;
|
|
1159
|
+
}
|
|
1160
|
+
.ace_completion-message {
|
|
1161
|
+
margin-left: 0.9em;
|
|
1162
|
+
color: blue;
|
|
1163
|
+
}
|
|
1164
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1165
|
+
color: #2d69c7;
|
|
1166
|
+
}
|
|
1167
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1168
|
+
color: #93ca12;
|
|
1169
|
+
}
|
|
1170
|
+
.ace_editor.ace_autocomplete {
|
|
1171
|
+
width: 300px;
|
|
1172
|
+
z-index: 200000;
|
|
1173
|
+
border: 1px lightgray solid;
|
|
1174
|
+
position: fixed;
|
|
1175
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
1176
|
+
line-height: 1.4;
|
|
1177
|
+
background: #fefefe;
|
|
1178
|
+
color: #111;
|
|
1179
|
+
}
|
|
1180
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
|
1181
|
+
border: 1px #484747 solid;
|
|
1182
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
1183
|
+
line-height: 1.4;
|
|
1184
|
+
background: #25282c;
|
|
1185
|
+
color: #c1c1c1;
|
|
1186
|
+
}
|
|
1187
|
+
.ace_autocomplete .ace_text-layer {
|
|
1188
|
+
width: calc(100% - 8px);
|
|
1189
|
+
}
|
|
1190
|
+
.ace_autocomplete .ace_line {
|
|
1191
|
+
display: flex;
|
|
1192
|
+
align-items: center;
|
|
1193
|
+
}
|
|
1194
|
+
.ace_autocomplete .ace_line > * {
|
|
1195
|
+
min-width: 0;
|
|
1196
|
+
flex: 0 0 auto;
|
|
1197
|
+
}
|
|
1198
|
+
.ace_autocomplete .ace_line .ace_ {
|
|
1199
|
+
flex: 0 1 auto;
|
|
1200
|
+
overflow: hidden;
|
|
1201
|
+
text-overflow: ellipsis;
|
|
1202
|
+
}
|
|
1203
|
+
.ace_autocomplete .ace_completion-spacer {
|
|
1204
|
+
flex: 1;
|
|
1205
|
+
}
|
|
1206
|
+
.ace_autocomplete.ace_loading:after {
|
|
1207
|
+
content: "";
|
|
1208
|
+
position: absolute;
|
|
1209
|
+
top: 0px;
|
|
1210
|
+
height: 2px;
|
|
1211
|
+
width: 8%;
|
|
1212
|
+
background: blue;
|
|
1213
|
+
z-index: 100;
|
|
1214
|
+
animation: ace_progress 3s infinite linear;
|
|
1215
|
+
animation-delay: 300ms;
|
|
1216
|
+
transform: translateX(-100%) scaleX(1);
|
|
1217
|
+
}
|
|
1218
|
+
@keyframes ace_progress {
|
|
1219
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
|
1220
|
+
50% { transform: translateX(625%) scaleX(2) }
|
|
1221
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
|
1222
|
+
}
|
|
1223
|
+
@media (prefers-reduced-motion) {
|
|
1224
|
+
.ace_autocomplete.ace_loading:after {
|
|
1225
|
+
transform: translateX(625%) scaleX(2);
|
|
1226
|
+
animation: none;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=b,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,f){var g=function(){function m(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return m.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),a=this.popup.renderer.$textLayer,l=a.element.childNodes[d-a.config.firstRow];if(l){for(var u="doc-tooltip ",c=0;c<this._lines.length;c++)u+="ace-inline-screenreader-line-".concat(c," ");l.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},m.prototype.destroy=function(){this.screenReaderDiv.remove()},m.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(h));var a=document.createTextNode(this._lines[h]);d.appendChild(a),w.appendChild(d)}return w},m}();r.AceInlineScreenReader=g}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,f){var g=e("../snippets").snippetManager,m=e("./inline_screenreader").AceInlineScreenReader,w=function(){function h(){this.editor=null}return h.prototype.show=function(d,a,l){if(l=l||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new m(d));var u=a.snippet?g.getDisplayTextForSnippet(d,a.snippet):a.value;return a.hideInlinePreview||!u||!u.startsWith(l)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(l.length),u===""?d.removeGhostText():d.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=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,f){r.parForEach=function(m,w,h){var d=0,a=m.length;a===0&&h();for(var l=0;l<a;l++)w(m[l],function(u,c){d++,d===a&&h(u,c)})};var g=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(m,w,h){h=h||g;for(var d=[],a=w-1;a>=0&&h.test(m[a]);a--)d.push(m[a]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(m,w,h){h=h||g;for(var d=[],a=w;a<m.length&&h.test(m[a]);a++)d.push(m[a]);return d},r.getCompletionPrefix=function(m){var w=m.getCursorPosition(),h=m.session.getLine(w.row),d;return m.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(l){!d&&l&&(d=this.retrievePrecedingIdentifier(h,w.column,l))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(h,w.column)},r.triggerAutocomplete=function(m,h){var h=h??m.session.getPrecedingCharacter();return m.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.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 g=e("./keyboard/hash_handler").HashHandler,m=e("./autocomplete/popup").AcePopup,w=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),a=e("./lib/lang"),l=e("./lib/dom"),u=e("./snippets").snippetManager,c=e("./config"),i=e("./lib/event"),s=e("./lib/scroll").preventParentScroll,p=function($,k){k.completer&&k.completer.destroy()},b=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new g,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=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new R($.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new m(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,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(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},$.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?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(k){var C=this.base.row,L=this.base.column,D=this.editor.getCursorPosition().column,E=this.editor.session.getLine(C).slice(L,D);this.inlineRenderer.show(this.editor,k,E)?this.$seen(k):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var k=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 L=this.popup.getData(C);L&&(!k||L.hideInlinePreview)&&this.$seen(L)}},$.prototype.$onPopupShow=function(k){this.$onPopupChange(k),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 k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,L=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var E=k.container.getBoundingClientRect();D.top+=E.top-C.layerConfig.offset,D.left+=E.left-k.renderer.scrollLeft,D.left+=C.gutterWidth;var I={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var z=k.container.getBoundingClientRect().bottom-L,P=z<I.top?{top:z,left:I.left}:I;this.popup.tryShow(P,L,"bottom")||this.popup.tryShow(D,L,"top")||this.popup.show(D,L)},$.prototype.openPopup=function(k,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),E=this.popup.data[D];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}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(E)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===D&&E!==this.completions.filtered[I]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(I===D&&z){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}L||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.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(k){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(k){var C=document.activeElement,L=this.editor.textInput.getElement(),D=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),E=this.popup&&this.popup.container;C!=L&&C.parentNode!=E&&!D&&C!=this.tooltipNode&&k.relatedTarget!=L&&this.detach()},$.prototype.mousedownListener=function(k){this.detach()},$.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(k){this.popup.goTo(k)},$.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var L=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,k,L.filterText,C);return this.completions==L&&this.detach(),D},$.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},$.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},$.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var D=this.editor.getCursorPosition(),E=this.editor.session.getTextRange({start:this.base,end:D});if(E==this.completions.filterText)return;if(this.completions.setFilter(E),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==E&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,E,k);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var L=this.editor.getSession(),D=this.editor.getCursorPosition(),E=d.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(D.row,D.column-E.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:E,pos:D}).provideCompletions(this.editor,I,(function(z,P,O){var _=P.filtered,A=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!_.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new R(B),this.openPopup(this.editor,A,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==A&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!O&&this.showLoadingState?new R($.completionsForLoading.concat(_),P.filterText):P,this.openPopup(this.editor,A,k),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 k=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[k.getHoveredRow()]||C[k.getRow()]),D=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var E=this.editor.completers.length,I=0;I<E;I++){var z=this.editor.completers[I];if(z.getDocTooltip&&L.completerId===z.id){D=z.getDocTooltip(L);break}}if(!D&&typeof L!="string"&&(D=L),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},$.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",s));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;k.docHTML?L.innerHTML=k.docHTML:k.docText&&(L.textContent=k.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,E=D.container.getBoundingClientRect(),I=400,z=300,P=D.renderer.scrollBar.width||10,O=E.left,_=window.innerWidth-E.right-P,A=D.isTopdown?E.top:window.innerHeight-P-E.bottom,N=[Math.min(_/I,1),Math.min(O/I,1),Math.min(A/z*.9)],B=Math.max.apply(Math,N),U=L.style;U.display="block",B==N[0]?(U.left=E.right+1+"px",U.right="",U.maxWidth=I*B+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.top,z)+"px"):B==N[1]?(U.right=window.innerWidth-E.left+"px",U.left="",U.maxWidth=I*B+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.top,z)+"px"):B==N[2]&&(U.left=window.innerWidth-E.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",D.isTopdown?(U.top=E.bottom+"px",U.left=E.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.bottom,z)+"px"):(U.top=D.container.offsetTop-L.offsetHeight+"px",U.left=E.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(D.container.offsetTop,z)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},$.prototype.onTooltipClick=function(k){for(var C=k.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 k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(k){return k.completer instanceof $||(k.completer&&(k.completer.destroy(),k.completer=null),c.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),k.completer=$.$sharedInstance):(k.completer=new $,k.once("destroy",p))),k.completer},$}();b.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 k=$.completer.insertMatch();if(k||$.tabstopManager)return k;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var k=d.getCompletionPrefix($);!k&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function($,k){var C=b.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function $(k){this.initialPosition=k,this.active=!0}return $.prototype.insertByIndex=function(k,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],L)},$.prototype.insertMatch=function(k,C,L){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var D=this.completions.filterText.length,E=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,E+=C.range.end.column-this.initialPosition.pos.column),D||E){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var z=0,P;P=I[z];z++)P.start.column-=D,P.end.column+=E,k.session.remove(P)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},$.prototype.$insertString=function(k,C){var L=C.value||C;k.execCommand("insertstring",L)},$.prototype.gatherCompletions=function(k,C){var L=k.getSession(),D=k.getCursorPosition(),E=d.getCompletionPrefix(k),I=[];this.completers=k.completers;var z=k.completers.length;return k.completers.forEach(function(P,O){P.getCompletions(k,L,D,E,function(_,A){P.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!_&&A&&(I=I.concat(A)),C(null,{prefix:d.getCompletionPrefix(k),matches:I,finished:--z===0})})}),!0},$.prototype.provideCompletions=function(k,C,L){var D=(function(P){var O=P.prefix,_=P.matches;this.completions=new R(_),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&L(null,this.completions,P.finished)}).bind(this),E=!0,I=null;if(this.gatherCompletions(k,(function(P,O){if(this.active){P&&(L(P,[],!0),this.detach());var _=O.prefix;if(_.indexOf(O.prefix)===0){if(E){I=O;return}D(O)}}}).bind(this)),E=!1,I){var z=I;I=null,D(z)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},$}(),R=function(){function $(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(D,E){return E.exactMatch-D.exactMatch||E.$score-D.$score||(D.caption||D.value).localeCompare(E.caption||E.value)});var L=null;C=C.filter(function(D){var E=D.snippet||D.caption||D.value;return E===L?!1:(L=E,!0)}),this.filtered=C},$.prototype.filterCompletions=function(k,C){var L=[],D=C.toUpperCase(),E=C.toLowerCase();e:for(var I=0,z;z=k[I];I++){if(z.skipFilter){z.$score=z.score,L.push(z);continue}var P=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(P){var O=-1,_=0,A=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(E);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(E[K],O+1),J=P.indexOf(D[K],O+1);if(N=Z>=0&&(J<0||Z<J)?Z:J,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,_|=1<<K),O=N}}z.matchMask=_,z.exactMatch=A?0:1,z.$score=(z.score||0)-A,L.push(z)}}return L},$}();r.Autocomplete=b,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,f){var g=function(){function m(w,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return m.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(h){return h.range.contains(w.row,w.column)})},m.prototype.markersComparator=function(w,h){return w.range.start.row-h.range.start.row},m.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},m.prototype.update=function(w,h,d,a){if(!(!this.markers||!this.markers.length))for(var l=a.firstRow,u=a.lastRow,c,i=0,s=0,p=0;p<this.markers.length;p++){var b=this.markers[p];if(!(b.range.end.row<l)&&!(b.range.start.row>u)&&(b.range.start.row===s?i++:(s=b.range.start.row,i=0),!(i>200))){var x=b.range.clipRows(l,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(d);if(R.isEmpty()){c=d.getNextFoldLine(x.end.row,c),c&&c.end.row>x.end.row&&(l=c.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(w,R,b.className,a):R.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(w,R,b.className,a):h.drawTextMarker(w,R,b.className,a):h.drawSingleLineMarker(w,R,b.className+" ace_br15",a)}}}},m}();g.prototype.MAX_MARKERS=1e4,r.MarkerGroup=g}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,f){function g(d,a){var l=d.getTextRange(w.fromPoints({row:0,column:0},a));return l.split(h).length-1}function m(d,a){var l=g(d,a),u=d.getValue().split(h),c=Object.create(null),i=u[l];return u.forEach(function(s,p){if(!(!s||s===i)){var b=Math.abs(l-p),x=u.length-b;c[s]?c[s]=Math.max(x,c[s]):c[s]=x}}),c}var w=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(d,a,l,u,c){var i=m(a,l),s=Object.keys(i);c(null,s.map(function(p){return{caption:p,value:p,score:i[p],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,f){var g=e("../snippets").snippetManager,m=e("../autocomplete").Autocomplete,w=e("../config"),h=e("../lib/lang"),d=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,l=e("../autocomplete/text_completer"),u={getCompletions:function(E,I,z,P,O){if(I.$mode.completer)return I.$mode.completer.getCompletions(E,I,z,P,O);var _=E.session.getState(z.row),A=I.$mode.getCompletions(_,I,z,P);A=A.map(function(N){return N.completerId=u.id,N}),O(null,A)},id:"keywordCompleter"},c=function(E){var I={};return E.replace(/\${(\d+)(:(.*?))?}/g,function(z,P,O,_){return I[P]=_||""}).replace(/\$(\d+?)/g,function(z,P){return I[P]})},i={getCompletions:function(E,I,z,P,O){var _=[],A=I.getTokenAt(z.row,z.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?_.push("html-tag"):_=g.getActiveScopes(E);var N=g.snippetMap,B=[];_.forEach(function(U){for(var K=N[U]||[],Z=K.length;Z--;){var J=K[Z],he=J.name||J.tabTrigger;he&&B.push({caption:he,snippet:J.content,meta:J.tabTrigger&&!J.name?J.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),O(null,B)},getDocTooltip:function(E){E.snippet&&!E.docHTML&&(E.docHTML=["<b>",h.escapeHTML(E.caption),"</b>","<hr></hr>",h.escapeHTML(c(E.snippet))].join(""))},id:"snippetCompleter"},s=[i,l,u];r.setCompleters=function(E){s.length=0,E&&s.push.apply(s,E)},r.addCompleter=function(E){s.push(E)},r.textCompleter=l,r.keyWordCompleter=u,r.snippetCompleter=i;var p={name:"expandSnippet",exec:function(E){return g.expandWithTab(E)},bindKey:"Tab"},b=function(E,I){x(I.session.$mode)},x=function(E){typeof E=="string"&&(E=w.$modes[E]),E&&(g.files||(g.files={}),R(E.$id,E.snippetFileId),E.modes&&E.modes.forEach(x))},R=function(E,I){!I||!E||g.files[E]||(g.files[E]={},w.loadModule(I,function(z){z&&(g.files[E]=z,!z.snippets&&z.snippetText&&(z.snippets=g.parseSnippetFile(z.snippetText)),g.register(z.snippets||[],z.scope),z.includeScopes&&(g.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(P){x("ace/mode/"+P)})))}))},$=function(E){var I=E.editor,z=I.completer&&I.completer.activated;if(E.command.name==="backspace")z&&!d.getCompletionPrefix(I)&&I.completer.detach();else if(E.command.name==="insertstring"&&!z){k=E;var P=E.editor.$liveAutocompletionDelay;P?C.delay(P):L(E)}},k,C=h.delayedCall(function(){L(k)},0),L=function(E){var I=E.editor,z=d.getCompletionPrefix(I),P=E.args,O=d.triggerAutocomplete(I,P);if(z&&z.length>=I.$liveAutocompletionThreshold||O){var _=m.for(I);_.autoShown=!0,_.showPopup(I)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(E){E?(m.for(this),this.completers||(this.completers=Array.isArray(E)?E:s),this.commands.addCommand(m.startCommand)):this.commands.removeCommand(m.startCommand)},value:!1},enableLiveAutocompletion:{set:function(E){E?(this.completers||(this.completers=Array.isArray(E)?E:s),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(E){E?(this.commands.addCommand(p),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(p),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=a}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()}(mf)),mf.exports}_x();var yf={exports:{}},bf;function Tx(){return bf||(bf=1,function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,f){f.exports=`
|
|
1230
|
+
|
|
1231
|
+
/* ------------------------------------------------------------------------------------------
|
|
1232
|
+
* Editor Search Form
|
|
1233
|
+
* --------------------------------------------------------------------------------------- */
|
|
1234
|
+
.ace_search {
|
|
1235
|
+
background-color: #ddd;
|
|
1236
|
+
color: #666;
|
|
1237
|
+
border: 1px solid #cbcbcb;
|
|
1238
|
+
border-top: 0 none;
|
|
1239
|
+
overflow: hidden;
|
|
1240
|
+
margin: 0;
|
|
1241
|
+
padding: 4px 6px 0 4px;
|
|
1242
|
+
position: absolute;
|
|
1243
|
+
top: 0;
|
|
1244
|
+
z-index: 99;
|
|
1245
|
+
white-space: normal;
|
|
1246
|
+
}
|
|
1247
|
+
.ace_search.left {
|
|
1248
|
+
border-left: 0 none;
|
|
1249
|
+
border-radius: 0px 0px 5px 0px;
|
|
1250
|
+
left: 0;
|
|
1251
|
+
}
|
|
1252
|
+
.ace_search.right {
|
|
1253
|
+
border-radius: 0px 0px 0px 5px;
|
|
1254
|
+
border-right: 0 none;
|
|
1255
|
+
right: 0;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.ace_search_form, .ace_replace_form {
|
|
1259
|
+
margin: 0 20px 4px 0;
|
|
1260
|
+
overflow: hidden;
|
|
1261
|
+
line-height: 1.9;
|
|
1262
|
+
}
|
|
1263
|
+
.ace_replace_form {
|
|
1264
|
+
margin-right: 0;
|
|
1265
|
+
}
|
|
1266
|
+
.ace_search_form.ace_nomatch {
|
|
1267
|
+
outline: 1px solid red;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.ace_search_field {
|
|
1271
|
+
border-radius: 3px 0 0 3px;
|
|
1272
|
+
background-color: white;
|
|
1273
|
+
color: black;
|
|
1274
|
+
border: 1px solid #cbcbcb;
|
|
1275
|
+
border-right: 0 none;
|
|
1276
|
+
outline: 0;
|
|
1277
|
+
padding: 0;
|
|
1278
|
+
font-size: inherit;
|
|
1279
|
+
margin: 0;
|
|
1280
|
+
line-height: inherit;
|
|
1281
|
+
padding: 0 6px;
|
|
1282
|
+
min-width: 17em;
|
|
1283
|
+
vertical-align: top;
|
|
1284
|
+
min-height: 1.8em;
|
|
1285
|
+
box-sizing: content-box;
|
|
1286
|
+
}
|
|
1287
|
+
.ace_searchbtn {
|
|
1288
|
+
border: 1px solid #cbcbcb;
|
|
1289
|
+
line-height: inherit;
|
|
1290
|
+
display: inline-block;
|
|
1291
|
+
padding: 0 6px;
|
|
1292
|
+
background: #fff;
|
|
1293
|
+
border-right: 0 none;
|
|
1294
|
+
border-left: 1px solid #dcdcdc;
|
|
1295
|
+
cursor: pointer;
|
|
1296
|
+
margin: 0;
|
|
1297
|
+
position: relative;
|
|
1298
|
+
color: #666;
|
|
1299
|
+
}
|
|
1300
|
+
.ace_searchbtn:last-child {
|
|
1301
|
+
border-radius: 0 3px 3px 0;
|
|
1302
|
+
border-right: 1px solid #cbcbcb;
|
|
1303
|
+
}
|
|
1304
|
+
.ace_searchbtn:disabled {
|
|
1305
|
+
background: none;
|
|
1306
|
+
cursor: default;
|
|
1307
|
+
}
|
|
1308
|
+
.ace_searchbtn:hover {
|
|
1309
|
+
background-color: #eef1f6;
|
|
1310
|
+
}
|
|
1311
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
1312
|
+
padding: 0px 0.7em
|
|
1313
|
+
}
|
|
1314
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
1315
|
+
content: "";
|
|
1316
|
+
border: solid 2px #888;
|
|
1317
|
+
width: 0.5em;
|
|
1318
|
+
height: 0.5em;
|
|
1319
|
+
border-width: 2px 0 0 2px;
|
|
1320
|
+
display:inline-block;
|
|
1321
|
+
transform: rotate(-45deg);
|
|
1322
|
+
}
|
|
1323
|
+
.ace_searchbtn.next:after {
|
|
1324
|
+
border-width: 0 2px 2px 0 ;
|
|
1325
|
+
}
|
|
1326
|
+
.ace_searchbtn_close {
|
|
1327
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
1328
|
+
border-radius: 50%;
|
|
1329
|
+
border: 0 none;
|
|
1330
|
+
color: #656565;
|
|
1331
|
+
cursor: pointer;
|
|
1332
|
+
font: 16px/16px Arial;
|
|
1333
|
+
padding: 0;
|
|
1334
|
+
height: 14px;
|
|
1335
|
+
width: 14px;
|
|
1336
|
+
top: 9px;
|
|
1337
|
+
right: 7px;
|
|
1338
|
+
position: absolute;
|
|
1339
|
+
}
|
|
1340
|
+
.ace_searchbtn_close:hover {
|
|
1341
|
+
background-color: #656565;
|
|
1342
|
+
background-position: 50% 100%;
|
|
1343
|
+
color: white;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.ace_button {
|
|
1347
|
+
margin-left: 2px;
|
|
1348
|
+
cursor: pointer;
|
|
1349
|
+
-webkit-user-select: none;
|
|
1350
|
+
-moz-user-select: none;
|
|
1351
|
+
-o-user-select: none;
|
|
1352
|
+
-ms-user-select: none;
|
|
1353
|
+
user-select: none;
|
|
1354
|
+
overflow: hidden;
|
|
1355
|
+
opacity: 0.7;
|
|
1356
|
+
border: 1px solid rgba(100,100,100,0.23);
|
|
1357
|
+
padding: 1px;
|
|
1358
|
+
box-sizing: border-box!important;
|
|
1359
|
+
color: black;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.ace_button:hover {
|
|
1363
|
+
background-color: #eee;
|
|
1364
|
+
opacity:1;
|
|
1365
|
+
}
|
|
1366
|
+
.ace_button:active {
|
|
1367
|
+
background-color: #ddd;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.ace_button.checked {
|
|
1371
|
+
border-color: #3399ff;
|
|
1372
|
+
opacity:1;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.ace_search_options{
|
|
1376
|
+
margin-bottom: 3px;
|
|
1377
|
+
text-align: right;
|
|
1378
|
+
-webkit-user-select: none;
|
|
1379
|
+
-moz-user-select: none;
|
|
1380
|
+
-o-user-select: none;
|
|
1381
|
+
-ms-user-select: none;
|
|
1382
|
+
user-select: none;
|
|
1383
|
+
clear: both;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.ace_search_counter {
|
|
1387
|
+
float: left;
|
|
1388
|
+
font-family: arial;
|
|
1389
|
+
padding: 0 8px;
|
|
1390
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","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 g=e("../lib/dom"),m=e("../lib/lang"),w=e("../lib/event"),h=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),l=e("../config").nls,u=999;g.importCssString(h,"ace_searchbox",!1);var c=function(){function p(b,x,R){this.activeInput,this.element=g.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("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"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("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:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("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(b),g.importCssString(h,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function($){$.stopPropagation()},b)}return p.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},p.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},p.prototype.onEditorInput=function(){this.find(!1,!1,!0)},p.prototype.$initElements=function(b){this.searchBox=b.querySelector(".ace_search_form"),this.replaceBox=b.querySelector(".ace_replace_form"),this.searchOption=b.querySelector("[action=searchInSelection]"),this.replaceOption=b.querySelector("[action=toggleReplace]"),this.regExpOption=b.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=b.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=b.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=b.querySelector(".ace_search_counter")},p.prototype.$init=function(){var b=this.element;this.$initElements(b);var x=this;w.addListener(b,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),w.stopPropagation(R)}),w.addListener(b,"click",function(R){var $=R.target||R.srcElement,k=$.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),w.stopPropagation(R)}),w.addCommandKeyListener(b,function(R,$,k){var C=a.keyCodeToString(k),L=x.$searchBarKb.findKeyCommand($,C);L&&L.exec&&(L.exec(x),w.stopEvent(R))}),this.$onChange=m.delayedCall(function(){x.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),w.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},p.prototype.setSearchRange=function(b){this.searchRange=b,b?this.searchRangeMarker=this.editor.session.addMarker(b,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},p.prototype.$syncOptions=function(b){g.setCssClass(this.replaceOption,"checked",this.searchRange),g.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",g.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),g.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),g.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,b)},p.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},p.prototype.find=function(b,x,R){if(this.editor.session){var $=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),k=!$&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},p.prototype.updateCounter=function(){var b=this.editor,x=b.$search.$options.re,R=x.unicode,$=0,k=0;if(x){var C=this.searchRange?b.session.getTextRange(this.searchRange):b.getValue();b.$search.$isMultilineSearch(b.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
|
1391
|
+
`),b.session.doc.$autoNewLine=`
|
|
1392
|
+
`);var L=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(L-=b.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,E;(E=x.exec(C))&&($++,D=E.index,D<=L&&k++,!($>u||!E[0]&&(x.lastIndex=D+=m.skipEmptyMatch(C,D,R),D>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[k,$>u?u+"+":$])},p.prototype.findNext=function(){this.find(!0,!1)},p.prototype.findPrev=function(){this.find(!0,!0)},p.prototype.findAll=function(){var b=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!b&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},p.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},p.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},p.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},p.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()},p.prototype.show=function(b,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(b=m.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},p.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},p}(),i=new d;i.bindKeys({"Ctrl-f|Command-f":function(p){var b=p.isReplace=!p.isReplace;p.replaceBox.style.display=b?"":"none",p.replaceOption.checked=!1,p.$syncOptions(),p.searchInput.focus()},"Ctrl-H|Command-Option-F":function(p){p.editor.getReadOnly()||(p.replaceOption.checked=!0,p.$syncOptions(),p.replaceInput.focus())},"Ctrl-G|Command-G":function(p){p.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(p){p.findPrev()},esc:function(p){setTimeout(function(){p.hide()})},Return:function(p){p.activeInput==p.replaceInput&&p.replace(),p.findNext()},"Shift-Return":function(p){p.activeInput==p.replaceInput&&p.replace(),p.findPrev()},"Alt-Return":function(p){p.activeInput==p.replaceInput&&p.replaceAll(),p.findAll()},Tab:function(p){(p.activeInput==p.replaceInput?p.searchInput:p.replaceInput).focus()}}),i.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(p){p.regExpOption.checked=!p.regExpOption.checked,p.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(p){p.caseSensitiveOption.checked=!p.caseSensitiveOption.checked,p.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(p){p.wholeWordOption.checked=!p.wholeWordOption.checked,p.$syncOptions()}},{name:"toggleReplace",exec:function(p){p.replaceOption.checked=!p.replaceOption.checked,p.$syncOptions()}},{name:"searchInSelection",exec:function(p){p.searchOption.checked=!p.searchRange,p.setSearchRange(p.searchOption.checked&&p.editor.getSelectionRange()),p.$syncOptions()}}]);var s=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(p){p.searchBox.hide()}}]);c.prototype.$searchBarKb=i,c.prototype.$closeSearchBarKb=s,r.SearchBox=c,r.Search=function(p,b){var x=p.searchBox||new c(p),R=p.session.selection.getRange(),$=R.isMultiLine()?"":p.session.getTextRange(R);x.show($,b)}}),function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})}()}(yf)),yf.exports}Tx();var Mx=Object.defineProperty,Ix=(n,t,e)=>t in n?Mx(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Rl=(n,t,e)=>Ix(n,typeof t!="symbol"?t+"":t,e);function wf(n,t){return function(){return n.apply(t,arguments)}}const{toString:Ex}=Object.prototype,{getPrototypeOf:wu}=Object,{iterator:Ll,toStringTag:xf}=Symbol,Ol=(n=>t=>{const e=Ex.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Gi=n=>(n=n.toLowerCase(),t=>Ol(t)===n),Nl=n=>t=>typeof t===n,{isArray:ta}=Array,na=Nl("undefined");function Na(n){return n!==null&&!na(n)&&n.constructor!==null&&!na(n.constructor)&&oi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Cf=Gi("ArrayBuffer");function Rx(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Cf(n.buffer),t}const Lx=Nl("string"),oi=Nl("function"),kf=Nl("number"),Da=n=>n!==null&&typeof n=="object",Ox=n=>n===!0||n===!1,Dl=n=>{if(Ol(n)!=="object")return!1;const t=wu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(xf in n)&&!(Ll in n)},Nx=n=>{if(!Da(n)||Na(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Dx=Gi("Date"),Fx=Gi("File"),Px=Gi("Blob"),Wx=Gi("FileList"),Bx=n=>Da(n)&&oi(n.pipe),zx=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||oi(n.append)&&((t=Ol(n))==="formdata"||t==="object"&&oi(n.toString)&&n.toString()==="[object FormData]"))},Hx=Gi("URLSearchParams"),[jx,Ux,Vx,qx]=["ReadableStream","Request","Response","Headers"].map(Gi),Kx=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fa(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,f;if(typeof n!="object"&&(n=[n]),ta(n))for(r=0,f=n.length;r<f;r++)t.call(null,n[r],r,n);else{if(Na(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),m=g.length;let w;for(r=0;r<m;r++)w=g[r],t.call(null,n[w],w,n)}}function Af(n,t){if(Na(n))return null;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 bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sf=n=>!na(n)&&n!==bs;function xu(){const{caseless:n,skipUndefined:t}=Sf(this)&&this||{},e={},r=(f,g)=>{const m=n&&Af(e,g)||g;Dl(e[m])&&Dl(f)?e[m]=xu(e[m],f):Dl(f)?e[m]=xu({},f):ta(f)?e[m]=f.slice():(!t||!na(f))&&(e[m]=f)};for(let f=0,g=arguments.length;f<g;f++)arguments[f]&&Fa(arguments[f],r);return e}const Gx=(n,t,e,{allOwnKeys:r}={})=>(Fa(t,(f,g)=>{e&&oi(f)?n[g]=wf(f,e):n[g]=f},{allOwnKeys:r}),n),Yx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Xx=(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)},Qx=(n,t,e,r)=>{let f,g,m;const w={};if(t=t||{},n==null)return t;do{for(f=Object.getOwnPropertyNames(n),g=f.length;g-- >0;)m=f[g],(!r||r(m,n,t))&&!w[m]&&(t[m]=n[m],w[m]=!0);n=e!==!1&&wu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Zx=(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},Jx=n=>{if(!n)return null;if(ta(n))return n;let t=n.length;if(!kf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},e1=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&wu(Uint8Array)),t1=(n,t)=>{const e=(n&&n[Ll]).call(n);let r;for(;(r=e.next())&&!r.done;){const f=r.value;t.call(n,f[0],f[1])}},n1=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},r1=Gi("HTMLFormElement"),i1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),$f=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),o1=Gi("RegExp"),_f=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Fa(e,(f,g)=>{let m;(m=t(f,g,n))!==!1&&(r[g]=m||f)}),Object.defineProperties(n,r)},s1=n=>{_f(n,(t,e)=>{if(oi(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(oi(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+"'")})}})},a1=(n,t)=>{const e={},r=f=>{f.forEach(g=>{e[g]=!0})};return ta(n)?r(n):r(String(n).split(t)),e},l1=()=>{},c1=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function u1(n){return!!(n&&oi(n.append)&&n[xf]==="FormData"&&n[Ll])}const h1=n=>{const t=new Array(10),e=(r,f)=>{if(Da(r)){if(t.indexOf(r)>=0)return;if(Na(r))return r;if(!("toJSON"in r)){t[f]=r;const g=ta(r)?[]:{};return Fa(r,(m,w)=>{const h=e(m,f+1);!na(h)&&(g[w]=h)}),t[f]=void 0,g}}return r};return e(n,0)},d1=Gi("AsyncFunction"),p1=n=>n&&(Da(n)||oi(n))&&oi(n.then)&&oi(n.catch),Tf=((n,t)=>n?setImmediate:t?((e,r)=>(bs.addEventListener("message",({source:f,data:g})=>{f===bs&&g===e&&r.length&&r.shift()()},!1),f=>{r.push(f),bs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",oi(bs.postMessage)),f1=typeof queueMicrotask<"u"?queueMicrotask.bind(bs):typeof process<"u"&&process.nextTick||Tf,g1=n=>n!=null&&oi(n[Ll]),Ae={isArray:ta,isArrayBuffer:Cf,isBuffer:Na,isFormData:zx,isArrayBufferView:Rx,isString:Lx,isNumber:kf,isBoolean:Ox,isObject:Da,isPlainObject:Dl,isEmptyObject:Nx,isReadableStream:jx,isRequest:Ux,isResponse:Vx,isHeaders:qx,isUndefined:na,isDate:Dx,isFile:Fx,isBlob:Px,isRegExp:o1,isFunction:oi,isStream:Bx,isURLSearchParams:Hx,isTypedArray:e1,isFileList:Wx,forEach:Fa,merge:xu,extend:Gx,trim:Kx,stripBOM:Yx,inherits:Xx,toFlatObject:Qx,kindOf:Ol,kindOfTest:Gi,endsWith:Zx,toArray:Jx,forEachEntry:t1,matchAll:n1,isHTMLForm:r1,hasOwnProperty:$f,hasOwnProp:$f,reduceDescriptors:_f,freezeMethods:s1,toObjectSet:a1,toCamelCase:i1,noop:l1,toFiniteNumber:c1,findKey:Af,global:bs,isContextDefined:Sf,isSpecCompliantForm:u1,toJSONObject:h1,isAsyncFn:d1,isThenable:p1,setImmediate:Tf,asap:f1,isIterable:g1};function kt(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)}Ae.inherits(kt,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:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Mf=kt.prototype,If={};["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=>{If[n]={value:n}}),Object.defineProperties(kt,If),Object.defineProperty(Mf,"isAxiosError",{value:!0}),kt.from=(n,t,e,r,f,g)=>{const m=Object.create(Mf);Ae.toFlatObject(n,m,function(d){return d!==Error.prototype},d=>d!=="isAxiosError");const w=n&&n.message?n.message:"Error",h=t==null&&n?n.code:t;return kt.call(m,w,h,e,r,f),n&&m.cause==null&&Object.defineProperty(m,"cause",{value:n,configurable:!0}),m.name=n&&n.name||"Error",g&&Object.assign(m,g),m};const m1=null;function Cu(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function Ef(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function Rf(n,t,e){return n?n.concat(t).map(function(r,f){return r=Ef(r),!e&&f?"["+r+"]":r}).join(e?".":""):t}function v1(n){return Ae.isArray(n)&&!n.some(Cu)}const y1=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function Fl(n,t,e){if(!Ae.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,i){return!Ae.isUndefined(i[c])});const r=e.metaTokens,f=e.visitor||d,g=e.dots,m=e.indexes,w=(e.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(t);if(!Ae.isFunction(f))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Ae.isDate(c))return c.toISOString();if(Ae.isBoolean(c))return c.toString();if(!w&&Ae.isBlob(c))throw new kt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(c)||Ae.isTypedArray(c)?w&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function d(c,i,s){let p=c;if(c&&!s&&typeof c=="object"){if(Ae.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Ae.isArray(c)&&v1(c)||(Ae.isFileList(c)||Ae.endsWith(i,"[]"))&&(p=Ae.toArray(c)))return i=Ef(i),p.forEach(function(b,x){!(Ae.isUndefined(b)||b===null)&&t.append(m===!0?Rf([i],x,g):m===null?i:i+"[]",h(b))}),!1}return Cu(c)?!0:(t.append(Rf(s,i,g),h(c)),!1)}const a=[],l=Object.assign(y1,{defaultVisitor:d,convertValue:h,isVisitable:Cu});function u(c,i){if(!Ae.isUndefined(c)){if(a.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));a.push(c),Ae.forEach(c,function(s,p){(!(Ae.isUndefined(s)||s===null)&&f.call(t,s,Ae.isString(p)?p.trim():p,i,l))===!0&&u(s,i?i.concat(p):[p])}),a.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Lf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ku(n,t){this._pairs=[],n&&Fl(n,this,t)}const Of=ku.prototype;Of.append=function(n,t){this._pairs.push([n,t])},Of.toString=function(n){const t=n?function(e){return n.call(this,e,Lf)}:Lf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function b1(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nf(n,t,e){if(!t)return n;const r=e&&e.encode||b1;Ae.isFunction(e)&&(e={serialize:e});const f=e&&e.serialize;let g;if(f?g=f(t,e):g=Ae.isURLSearchParams(t)?t.toString():new ku(t,e).toString(r),g){const m=n.indexOf("#");m!==-1&&(n=n.slice(0,m)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class Df{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){Ae.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Ff={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w1=typeof URLSearchParams<"u"?URLSearchParams:ku,x1=typeof FormData<"u"?FormData:null,C1=typeof Blob<"u"?Blob:null,k1={isBrowser:!0,classes:{URLSearchParams:w1,FormData:x1,Blob:C1},protocols:["http","https","file","blob","url","data"]},Au=typeof window<"u"&&typeof document<"u",Su=typeof navigator=="object"&&navigator||void 0,A1=Au&&(!Su||["ReactNative","NativeScript","NS"].indexOf(Su.product)<0),S1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$1=Au&&window.location.href||"http://localhost",_1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Au,hasStandardBrowserEnv:A1,hasStandardBrowserWebWorkerEnv:S1,navigator:Su,origin:$1},Symbol.toStringTag,{value:"Module"})),Lr={..._1,...k1};function T1(n,t){return Fl(n,new Lr.classes.URLSearchParams,{visitor:function(e,r,f,g){return Lr.isNode&&Ae.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function M1(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function I1(n){const t={},e=Object.keys(n);let r;const f=e.length;let g;for(r=0;r<f;r++)g=e[r],t[g]=n[g];return t}function Pf(n){function t(e,r,f,g){let m=e[g++];if(m==="__proto__")return!0;const w=Number.isFinite(+m),h=g>=e.length;return m=!m&&Ae.isArray(f)?f.length:m,h?(Ae.hasOwnProp(f,m)?f[m]=[f[m],r]:f[m]=r,!w):((!f[m]||!Ae.isObject(f[m]))&&(f[m]=[]),t(e,r,f[m],g)&&Ae.isArray(f[m])&&(f[m]=I1(f[m])),!w)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const e={};return Ae.forEachEntry(n,(r,f)=>{t(M1(r),f,e,0)}),e}return null}function E1(n,t,e){if(Ae.isString(n))try{return(t||JSON.parse)(n),Ae.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Pa={transitional:Ff,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,f=Ae.isObject(n);if(f&&Ae.isHTMLForm(n)&&(n=new FormData(n)),Ae.isFormData(n))return r?JSON.stringify(Pf(n)):n;if(Ae.isArrayBuffer(n)||Ae.isBuffer(n)||Ae.isStream(n)||Ae.isFile(n)||Ae.isBlob(n)||Ae.isReadableStream(n))return n;if(Ae.isArrayBufferView(n))return n.buffer;if(Ae.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(f){if(e.indexOf("application/x-www-form-urlencoded")>-1)return T1(n,this.formSerializer).toString();if((g=Ae.isFileList(n))||e.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return Fl(g?{"files[]":n}:n,m&&new m,this.formSerializer)}}return f||r?(t.setContentType("application/json",!1),E1(n)):n}],transformResponse:[function(n){const t=this.transitional||Pa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(n)||Ae.isReadableStream(n))return n;if(n&&Ae.isString(n)&&(e&&!this.responseType||r)){const f=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(g){if(f)throw g.name==="SyntaxError"?kt.from(g,kt.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lr.classes.FormData,Blob:Lr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],n=>{Pa.headers[n]={}});const R1=Ae.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"]),L1=n=>{const t={};let e,r,f;return n&&n.split(`
|
|
1393
|
+
`).forEach(function(g){f=g.indexOf(":"),e=g.substring(0,f).trim().toLowerCase(),r=g.substring(f+1).trim(),!(!e||t[e]&&R1[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Wf=Symbol("internals");function Wa(n){return n&&String(n).trim().toLowerCase()}function Pl(n){return n===!1||n==null?n:Ae.isArray(n)?n.map(Pl):String(n)}function O1(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 N1=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function $u(n,t,e,r,f){if(Ae.isFunction(r))return r.call(this,t,e);if(f&&(t=e),!!Ae.isString(t)){if(Ae.isString(r))return t.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(t)}}function D1(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function F1(n,t){const e=Ae.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(f,g,m){return this[r].call(this,t,f,g,m)},configurable:!0})})}let si=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function f(m,w,h){const d=Wa(w);if(!d)throw new Error("header name must be a non-empty string");const a=Ae.findKey(r,d);(!a||r[a]===void 0||h===!0||h===void 0&&r[a]!==!1)&&(r[a||w]=Pl(m))}const g=(m,w)=>Ae.forEach(m,(h,d)=>f(h,d,w));if(Ae.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(Ae.isString(n)&&(n=n.trim())&&!N1(n))g(L1(n),t);else if(Ae.isObject(n)&&Ae.isIterable(n)){let m={},w,h;for(const d of n){if(!Ae.isArray(d))throw TypeError("Object iterator must return a key-value pair");m[h=d[0]]=(w=m[h])?Ae.isArray(w)?[...w,d[1]]:[w,d[1]]:d[1]}g(m,t)}else n!=null&&f(t,n,e);return this}get(n,t){if(n=Wa(n),n){const e=Ae.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return O1(r);if(Ae.isFunction(t))return t.call(this,r,e);if(Ae.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Wa(n),n){const e=Ae.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||$u(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function f(g){if(g=Wa(g),g){const m=Ae.findKey(e,g);m&&(!t||$u(e,e[m],m,t))&&(delete e[m],r=!0)}}return Ae.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||$u(this,this[f],f,n,!0))&&(delete this[f],r=!0)}return r}normalize(n){const t=this,e={};return Ae.forEach(this,(r,f)=>{const g=Ae.findKey(e,f);if(g){t[g]=Pl(r),delete t[f];return}const m=n?D1(f):String(f).trim();m!==f&&delete t[f],t[m]=Pl(r),e[m]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Ae.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Ae.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(`
|
|
1394
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}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[Wf]=this[Wf]={accessors:{}}).accessors,e=this.prototype;function r(f){const g=Wa(f);t[g]||(F1(e,f),t[g]=!0)}return Ae.isArray(n)?n.forEach(r):r(n),this}};si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(si.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ae.freezeMethods(si);function _u(n,t){const e=this||Pa,r=t||e,f=si.from(r.headers);let g=r.data;return Ae.forEach(n,function(m){g=m.call(e,g,f.normalize(),t?t.status:void 0)}),f.normalize(),g}function Bf(n){return!!(n&&n.__CANCEL__)}function ra(n,t,e){kt.call(this,n??"canceled",kt.ERR_CANCELED,t,e),this.name="CanceledError"}Ae.inherits(ra,kt,{__CANCEL__:!0});function zf(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new kt("Request failed with status code "+e.status,[kt.ERR_BAD_REQUEST,kt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function P1(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function W1(n,t){n=n||10;const e=new Array(n),r=new Array(n);let f=0,g=0,m;return t=t!==void 0?t:1e3,function(w){const h=Date.now(),d=r[g];m||(m=h),e[f]=w,r[f]=h;let a=g,l=0;for(;a!==f;)l+=e[a++],a=a%n;if(f=(f+1)%n,f===g&&(g=(g+1)%n),h-m<t)return;const u=d&&h-d;return u?Math.round(l*1e3/u):void 0}}function B1(n,t){let e=0,r=1e3/t,f,g;const m=(w,h=Date.now())=>{e=h,f=null,g&&(clearTimeout(g),g=null),n(...w)};return[(...w)=>{const h=Date.now(),d=h-e;d>=r?m(w,h):(f=w,g||(g=setTimeout(()=>{g=null,m(f)},r-d)))},()=>f&&m(f)]}const Wl=(n,t,e=3)=>{let r=0;const f=W1(50,250);return B1(g=>{const m=g.loaded,w=g.lengthComputable?g.total:void 0,h=m-r,d=f(h),a=m<=w;r=m;const l={loaded:m,total:w,progress:w?m/w:void 0,bytes:h,rate:d||void 0,estimated:d&&w&&a?(w-m)/d:void 0,event:g,lengthComputable:w!=null,[t?"download":"upload"]:!0};n(l)},e)},Hf=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},jf=n=>(...t)=>Ae.asap(()=>n(...t)),z1=Lr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Lr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Lr.origin),Lr.navigator&&/(msie|trident)/i.test(Lr.navigator.userAgent)):()=>!0,H1=Lr.hasStandardBrowserEnv?{write(n,t,e,r,f,g,m){if(typeof document>"u")return;const w=[`${n}=${encodeURIComponent(t)}`];Ae.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),Ae.isString(r)&&w.push(`path=${r}`),Ae.isString(f)&&w.push(`domain=${f}`),g===!0&&w.push("secure"),Ae.isString(m)&&w.push(`SameSite=${m}`),document.cookie=w.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function j1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function U1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Uf(n,t,e){let r=!j1(t);return n&&(r||e==!1)?U1(n,t):t}const Vf=n=>n instanceof si?{...n}:n;function ws(n,t){t=t||{};const e={};function r(d,a,l,u){return Ae.isPlainObject(d)&&Ae.isPlainObject(a)?Ae.merge.call({caseless:u},d,a):Ae.isPlainObject(a)?Ae.merge({},a):Ae.isArray(a)?a.slice():a}function f(d,a,l,u){if(Ae.isUndefined(a)){if(!Ae.isUndefined(d))return r(void 0,d,l,u)}else return r(d,a,l,u)}function g(d,a){if(!Ae.isUndefined(a))return r(void 0,a)}function m(d,a){if(Ae.isUndefined(a)){if(!Ae.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(l in t)return r(d,a);if(l in n)return r(void 0,d)}const h={url:g,method:g,data:g,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:w,headers:(d,a,l)=>f(Vf(d),Vf(a),l,!0)};return Ae.forEach(Object.keys({...n,...t}),function(d){const a=h[d]||f,l=a(n[d],t[d],d);Ae.isUndefined(l)&&a!==w||(e[d]=l)}),e}const qf=n=>{const t=ws({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:g,headers:m,auth:w}=t;if(t.headers=m=si.from(m),t.url=Nf(Uf(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),w&&m.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):""))),Ae.isFormData(e)){if(Lr.hasStandardBrowserEnv||Lr.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(Ae.isFunction(e.getHeaders)){const h=e.getHeaders(),d=["content-type","content-length"];Object.entries(h).forEach(([a,l])=>{d.includes(a.toLowerCase())&&m.set(a,l)})}}if(Lr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(t)),r||r!==!1&&z1(t.url))){const h=f&&g&&H1.read(g);h&&m.set(f,h)}return t},V1=typeof XMLHttpRequest<"u",q1=V1&&function(n){return new Promise(function(t,e){const r=qf(n);let f=r.data;const g=si.from(r.headers).normalize();let{responseType:m,onUploadProgress:w,onDownloadProgress:h}=r,d,a,l,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function p(){if(!s)return;const x=si.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),R={data:!m||m==="text"||m==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:n,request:s};zf(function($){t($),i()},function($){e($),i()},R),s=null}"onloadend"in s?s.onloadend=p:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(p)},s.onabort=function(){s&&(e(new kt("Request aborted",kt.ECONNABORTED,n,s)),s=null)},s.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new kt(R,kt.ERR_NETWORK,n,s);$.event=x||null,e($),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||Ff;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new kt(x,R.clarifyTimeoutError?kt.ETIMEDOUT:kt.ECONNABORTED,n,s)),s=null},f===void 0&&g.setContentType(null),"setRequestHeader"in s&&Ae.forEach(g.toJSON(),function(x,R){s.setRequestHeader(R,x)}),Ae.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),m&&m!=="json"&&(s.responseType=r.responseType),h&&([l,c]=Wl(h,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,u]=Wl(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new ra(null,n,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=P1(r.url);if(b&&Lr.protocols.indexOf(b)===-1){e(new kt("Unsupported protocol "+b+":",kt.ERR_BAD_REQUEST,n));return}s.send(f||null)})},K1=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,f;const g=function(d){if(!f){f=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof kt?a:new ra(a instanceof Error?a.message:a))}};let m=t&&setTimeout(()=>{m=null,g(new kt(`timeout ${t} of ms exceeded`,kt.ETIMEDOUT))},t);const w=()=>{n&&(m&&clearTimeout(m),m=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(g):d.removeEventListener("abort",g)}),n=null)};n.forEach(d=>d.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(w),h}},G1=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},Y1=async function*(n,t){for await(const e of X1(n))yield*G1(e,t)},X1=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()}},Kf=(n,t,e,r)=>{const f=Y1(n,t);let g=0,m,w=h=>{m||(m=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:a}=await f.next();if(d){w(),h.close();return}let l=a.byteLength;if(e){let u=g+=l;e(u)}h.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(h){return w(h),f.return()}},{highWaterMark:2})},Gf=64*1024,{isFunction:Bl}=Ae,Q1=(({Request:n,Response:t})=>({Request:n,Response:t}))(Ae.global),{ReadableStream:Yf,TextEncoder:Xf}=Ae.global,Qf=(n,...t)=>{try{return!!n(...t)}catch{return!1}},Z1=n=>{n=Ae.merge.call({skipUndefined:!0},Q1,n);const{fetch:t,Request:e,Response:r}=n,f=t?Bl(t):typeof fetch=="function",g=Bl(e),m=Bl(r);if(!f)return!1;const w=f&&Bl(Yf),h=f&&(typeof Xf=="function"?(i=>s=>i.encode(s))(new Xf):async i=>new Uint8Array(await new e(i).arrayBuffer())),d=g&&w&&Qf(()=>{let i=!1;const s=new e(Lr.origin,{body:new Yf,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!s}),a=m&&w&&Qf(()=>Ae.isReadableStream(new r("").body)),l={stream:a&&(i=>i.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!l[i]&&(l[i]=(s,p)=>{let b=s&&s[i];if(b)return b.call(s);throw new kt(`Response type '${i}' is not supported`,kt.ERR_NOT_SUPPORT,p)})});const u=async i=>{if(i==null)return 0;if(Ae.isBlob(i))return i.size;if(Ae.isSpecCompliantForm(i))return(await new e(Lr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(i)||Ae.isArrayBuffer(i))return i.byteLength;if(Ae.isURLSearchParams(i)&&(i=i+""),Ae.isString(i))return(await h(i)).byteLength},c=async(i,s)=>Ae.toFiniteNumber(i.getContentLength())??u(s);return async i=>{let{url:s,method:p,data:b,signal:x,cancelToken:R,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:L,headers:D,withCredentials:E="same-origin",fetchOptions:I}=qf(i),z=t||fetch;L=L?(L+"").toLowerCase():"text";let P=K1([x,R&&R.toAbortSignal()],$),O=null;const _=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let A;try{if(C&&d&&p!=="get"&&p!=="head"&&(A=await c(D,b))!==0){let J=new e(s,{method:"POST",body:b,duplex:"half"}),he;if(Ae.isFormData(b)&&(he=J.headers.get("content-type"))&&D.setContentType(he),J.body){const[ne,le]=Hf(A,Wl(jf(C)));b=Kf(J.body,Gf,ne,le)}}Ae.isString(E)||(E=E?"include":"omit");const N=g&&"credentials"in e.prototype,B={...I,signal:P,method:p.toUpperCase(),headers:D.normalize().toJSON(),body:b,duplex:"half",credentials:N?E:void 0};O=g&&new e(s,B);let U=await(g?z(O,I):z(s,B));const K=a&&(L==="stream"||L==="response");if(a&&(k||K&&_)){const J={};["status","statusText","headers"].forEach(se=>{J[se]=U[se]});const he=Ae.toFiniteNumber(U.headers.get("content-length")),[ne,le]=k&&Hf(he,Wl(jf(k),!0))||[];U=new r(Kf(U.body,Gf,ne,()=>{le&&le(),_&&_()}),J)}L=L||"text";let Z=await l[Ae.findKey(l,L)||"text"](U,i);return!K&&_&&_(),await new Promise((J,he)=>{zf(J,he,{data:Z,headers:si.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:O})})}catch(N){throw _&&_(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new kt("Network Error",kt.ERR_NETWORK,i,O),{cause:N.cause||N}):kt.from(N,N&&N.code,i,O)}}},J1=new Map,Zf=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:f}=t,g=[r,f,e];let m=g.length,w=m,h,d,a=J1;for(;w--;)h=g[w],d=a.get(h),d===void 0&&a.set(h,d=w?new Map:Z1(t)),a=d;return d};Zf();const Tu={http:m1,xhr:q1,fetch:{get:Zf}};Ae.forEach(Tu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Jf=n=>`- ${n}`,eC=n=>Ae.isFunction(n)||n===null||n===!1;function tC(n,t){n=Ae.isArray(n)?n:[n];const{length:e}=n;let r,f;const g={};for(let m=0;m<e;m++){r=n[m];let w;if(f=r,!eC(r)&&(f=Tu[(w=String(r)).toLowerCase()],f===void 0))throw new kt(`Unknown adapter '${w}'`);if(f&&(Ae.isFunction(f)||(f=f.get(t))))break;g[w||"#"+m]=f}if(!f){const m=Object.entries(g).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?m.length>1?`since :
|
|
1395
|
+
`+m.map(Jf).join(`
|
|
1396
|
+
`):" "+Jf(m[0]):"as no adapter specified";throw new kt("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return f}const eg={getAdapter:tC,adapters:Tu};function Mu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ra(null,n)}function tg(n){return Mu(n),n.headers=si.from(n.headers),n.data=_u.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),eg.getAdapter(n.adapter||Pa.adapter,n)(n).then(function(t){return Mu(n),t.data=_u.call(n,n.transformResponse,t),t.headers=si.from(t.headers),t},function(t){return Bf(t)||(Mu(n),t&&t.response&&(t.response.data=_u.call(n,n.transformResponse,t.response),t.response.headers=si.from(t.response.headers))),Promise.reject(t)})}const ng="1.13.1",zl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{zl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const rg={};zl.transitional=function(n,t,e){function r(f,g){return"[Axios v"+ng+"] Transitional option '"+f+"'"+g+(e?". "+e:"")}return(f,g,m)=>{if(n===!1)throw new kt(r(g," has been removed"+(t?" in "+t:"")),kt.ERR_DEPRECATED);return t&&!rg[g]&&(rg[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(f,g,m):!0}},zl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function nC(n,t,e){if(typeof n!="object")throw new kt("options must be an object",kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let f=r.length;for(;f-- >0;){const g=r[f],m=t[g];if(m){const w=n[g],h=w===void 0||m(w,g,n);if(h!==!0)throw new kt("option "+g+" must be "+h,kt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new kt("Unknown option "+g,kt.ERR_BAD_OPTION)}}const Hl={assertOptions:nC,validators:zl},co=Hl.validators;let xs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Df,response:new Df}}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+=`
|
|
1397
|
+
`+f):e.stack=f}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=ws(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:f}=t;e!==void 0&&Hl.assertOptions(e,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),r!=null&&(Ae.isFunction(r)?t.paramsSerializer={serialize:r}:Hl.assertOptions(r,{encode:co.function,serialize:co.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Hl.assertOptions(t,{baseUrl:co.spelling("baseURL"),withXsrfToken:co.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=f&&Ae.merge(f.common,f[t.method]);f&&Ae.forEach(["delete","get","head","post","put","patch","common"],c=>{delete f[c]}),t.headers=si.concat(g,f);const m=[];let w=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(t)===!1||(w=w&&c.synchronous,m.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let d,a=0,l;if(!w){const c=[tg.bind(this),void 0];for(c.unshift(...m),c.push(...h),l=c.length,d=Promise.resolve(t);a<l;)d=d.then(c[a++],c[a++]);return d}l=m.length;let u=t;for(;a<l;){const c=m[a++],i=m[a++];try{u=c(u)}catch(s){i.call(this,s);break}}try{d=tg.call(this,u)}catch(c){return Promise.reject(c)}for(a=0,l=h.length;a<l;)d=d.then(h[a++],h[a++]);return d}getUri(n){n=ws(this.defaults,n);const t=Uf(n.baseURL,n.url,n.allowAbsoluteUrls);return Nf(t,n.params,n.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){xs.prototype[n]=function(t,e){return this.request(ws(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function t(e){return function(r,f,g){return this.request(ws(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}xs.prototype[n]=t(),xs.prototype[n+"Form"]=t(!0)});let rC=class iw{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 g=r._listeners.length;for(;g-- >0;)r._listeners[g](f);r._listeners=null}),this.promise.then=f=>{let g;const m=new Promise(w=>{r.subscribe(w),g=w}).then(f);return m.cancel=function(){r.unsubscribe(g)},m},t(function(f,g,m){r.reason||(r.reason=new ra(f,g,m),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 iw(function(e){t=e}),cancel:t}}};function iC(n){return function(t){return n.apply(null,t)}}function oC(n){return Ae.isObject(n)&&n.isAxiosError===!0}const Iu={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Iu).forEach(([n,t])=>{Iu[t]=n});function ig(n){const t=new xs(n),e=wf(xs.prototype.request,t);return Ae.extend(e,xs.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return ig(ws(n,r))},e}const Kn=ig(Pa);Kn.Axios=xs,Kn.CanceledError=ra,Kn.CancelToken=rC,Kn.isCancel=Bf,Kn.VERSION=ng,Kn.toFormData=Fl,Kn.AxiosError=kt,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=iC,Kn.isAxiosError=oC,Kn.mergeConfig=ws,Kn.AxiosHeaders=si,Kn.formToJSON=n=>Pf(Ae.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=eg.getAdapter,Kn.HttpStatusCode=Iu,Kn.default=Kn;const{Axios:XN,AxiosError:QN,CanceledError:ZN,isCancel:JN,CancelToken:eD,VERSION:tD,all:nD,Cancel:rD,isAxiosError:iD,spread:oD,toFormData:sD,AxiosHeaders:aD,HttpStatusCode:lD,formToJSON:cD,getAdapter:uD,mergeConfig:hD}=Kn,Eu=Kn.create({baseURL:location.origin,timeout:6e4,params:{}});Eu.interceptors.response.use(n=>n,n=>{var t,e,r,f,g,m,w,h,d,a,l;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(i){i&&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} `),(g=(f=n.response)==null?void 0:f.data)!=null&&g.message?u+=`${n.response.data.message}`:(w=(m=n.response)==null?void 0:m.data)!=null&&w.exception?u+=`${n.response.data.exception}`:(a=(d=(h=n.response)==null?void 0:h.data)==null?void 0:d.error)!=null&&a.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(l=n.response)==null?void 0:l.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),n}else throw n});const jl=async function(n,t,{data:e,params:r={},headers:f,noAuth:g=!1,noScope:m=!1,onUploadProgress:w=!1}={}){if(!g){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!m&&!r.scope&&(r.scope=window.openc3Scope),Eu({method:n,url:t,data:e,params:r,headers:f,onUploadProgress:w})},Ru={Accept:"application/json"},og={...Ru,"Content-Type":"application/json"},dD=gr("F",{get:function(n,{params:t,headers:e=Ru,noScope:r,noAuth:f,onUploadProgress:g}={}){return jl("get",n,{params:t,headers:e,noScope:r,noAuth:f,onUploadProgress:g})},put:function(n,{data:t,params:e,headers:r=og,noScope:f,noAuth:g,onUploadProgress:m}={}){return jl("put",n,{data:t,params:e,headers:r,noScope:f,noAuth:g,onUploadProgress:m})},post:function(n,{data:t,params:e,headers:r=og,noScope:f,noAuth:g,onUploadProgress:m}={}){return jl("post",n,{data:t,params:e,headers:r,noScope:f,noAuth:g,onUploadProgress:m})},delete:function(n,{params:t,headers:e=Ru,noScope:r,noAuth:f,onUploadProgress:g}={}){return jl("delete",n,{params:t,headers:e,noScope:r,noAuth:f,onUploadProgress:g})}});let Ul=()=>({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 Ba extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class Lu extends Ba{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class sC extends Ba{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Yi extends Ba{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class aC extends Yi{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function sg(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 lC{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 Cs=Symbol("state");class ag{constructor(t={}){this.emitter=Ul(),this.params=Object.freeze(t),this.presence=new lC(this),this.initialConnect=!0,this[Cs]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=sg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Cs]}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[Cs]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Cs]="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[Cs]="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[Cs]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[Cs]="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(g=>g()),e(f||new Ba("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class cC{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(g=>{e=g}),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 uC{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 hC{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new uC),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 cC(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 dC{constructor(t={}){this.subscriptions=new hC(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 g=this.subscriptions.get(f);g&&g.channels.forEach(m=>{m.receive(e,r)})}notify(t,e,r){let f=this._remoteToLocal[t];if(!f)return;let g=this.subscriptions.get(f);g&&g.channels.forEach(m=>m.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 cg{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 za extends cg{writeLogEntry(){}}class pC{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let fC=0;class ug{constructor(t={}){let{logger:e}=t;this.logger=e||new za,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=sg(r);if(this.pendingUnsubscriptions[f]){let m=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${m}`,f),new Promise(w=>{setTimeout(()=>{w(this.subscribe(t,e))},m)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let g=this.subscribeRetryInterval;return new Promise((m,w)=>{let h=++fC;this.pendingSubscriptions[f]={resolve:m,reject:w,id:h},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(h,f,g)})}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 sC(`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:g,reconnect:m}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let w=t.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(e==="disconnect"){let w=new Yi(g);this.reset(w),m===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(e==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(e==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new Lu)):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 hg=()=>Date.now()/1e3|0;class gC extends ug{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=hg()),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")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(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=hg()),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.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let g=t.restored_ids||Object.keys(this.subscriptionStreams);for(let m of g)this.cable.send({identifier:m,command:"history",history:this.historyRequestFor(m)}),this.presenceInfo[m]&&this.cable.send({identifier:m,command:"join",presence:this.presenceInfo[m]});return this.cable.restored(g)}return this.cable.connected(this.sessionId)}if(e==="presence"){let g=f.type;if(g==="info"){let m=this.pendingPresence[r];m&&(delete this.pendingPresence[r],m.resolve(f))}else if(g==="error"){let m=this.pendingPresence[r];m&&(delete this.pendingPresence[r],m.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:f}}if(f){let g=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:f,meta:g}}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 g=this.streamsPositions[f];g&&(r=!0,e[f]=g)}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 mC extends Ba{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Ou extends ag{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}Rl(Ou,"identifier","__ghost__");const vC="$pubsub";class Nu extends ag{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}Rl(Nu,"identifier",vC);const ks=Symbol("state");let yC=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:f,hubOptions:g,performFailures:m,transportConfigurator:w}){this.emitter=Ul(),this.transport=n,this.encoder=e,this.logger=r||new za,this.protocol=t,this.performFailures=m||"throw",this.protocol.attached(this),this.hub=new dC(g||{}),this[ks]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,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[ks]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[ks]="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[ks]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Yi("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[ks]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Yi("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 Yi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[ks]="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 Yi?n:new Yi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ks]="closed";let e=t||new Yi("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:g,meta:m}=e;r?this.hub.notify(f,r,g):this.hub.transmit(f,g,m)}}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 Nu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new Nu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=Ou),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 g={identifier:t,params:e};this.logger.debug("subscribing",g);try{let m=await this.protocol.subscribe(t,e);this.hub.subscribe(r,m),this.logger.debug("subscribed",{...g,remoteId:m}),n.notify("connected")}catch(m){if(m){if(m instanceof Lu&&this.logger.warn("rejected",g),m instanceof Yi){this.logger.debug("disconnected during subscription; will retry on connect",g),f.release();return}this.logger.error("failed to subscribe",{error:m,...g})}n.close(m),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 Yi?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 mC;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,g={id:f,action:t,payload:e};this.logger.debug("perform",g);try{let m=await this.protocol.perform(f,t,e);return m&&this.logger.debug("perform result",{message:m,request:g}),m}catch(m){throw this.logger.error("perform failed",{error:m,request:g}),m}}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 bC={maxMissingPings:2,maxReconnectAttempts:1/0},ia=()=>Date.now(),dg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:f}=t;return e=e||2,r===void 0&&(r=.5),g=>{let m=n*e**g,w=m*e,h=m+(w-m)*Math.random(),d=2*(Math.random()-.5)*r;return h=h*(1+d),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({},bC,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 za,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ia()}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=ia(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ia(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ia(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ia()})),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=ia()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new aC))}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 wC{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Ul(),this.unbind=[],this.logger=e.logger||new za}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 xC{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=Ul();let{format:f,subprotocol:g,authStrategy:m}=e;this.format=f||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=m||"param",this.authProtocol="",this.subprotocol=g}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(g=>g()),e()})),f.push(this.once("close",()=>{f.forEach(g=>g()),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 fg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function CC(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({},fg,t);let{protocol:e,websocketImplementation:r,websocketFormat:f,websocketOptions:g,websocketAuthStrategy:m,fallbacks:w,logLevel:h,logger:d,transport:a,encoder:l,lazy:u,monitor:c,pingInterval:i,reconnectStrategy:s,maxMissingPings:p,maxReconnectAttempts:b,subprotocol:x,tokenRefresher:R,historyTimestamp:$,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:D,auth:E}=t;if(d=d||new za(h),typeof e=="string"){x=x||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")e=new ug({logger:d,...k});else if(P==="actioncable-v1-ext")e=new gC({logger:d,historyTimestamp:$,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")l=l||new pC,f=f||"text";else if(O==="msgpack"){if(f="binary",!l)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",!l)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");a=a||new xC(n,{websocketImplementation:r,websocketOptions:g,subprotocol:x,authStrategy:m,format:f}),w&&(a=new wC([a,...w],{logger:d})),E&&E.token&&a.setToken(E.token,E.param||"jid"),s=s||dg(i),c!==!1&&(c=c||new pg({pingInterval:i,reconnectStrategy:s,maxMissingPings:p,maxReconnectAttempts:b,logger:d}));let I={concurrentSubscribes:C},z=new yC({protocol:e,transport:a,encoder:l,logger:d,lazy:u,hubOptions:I,performFailures:L,transportConfigurator:D});return c&&(c.watch(z),z.monitor=c),R&&kC(z,async()=>{try{await R(a)}catch(P){return d.error("Failed to refresh authentication token: "+P),!1}return z.connect().catch(()=>{}),!0}),z}function kC(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 AC{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 SC extends Ou{constructor(t,e,r){super(t,e),this.subscription=new AC(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 Lu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class $C{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 g=new SC(r,f,e);return g.subscription.notify("initialized"),this.cable.subscribe(g),g.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class _C{constructor(t){this.cable=t,this.subscriptions=new $C(t)}}class TC extends cg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class MC 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 Yi("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 IC=["cable","action-cable"],EC="/cable",Vl=(n,t)=>{for(let e of IC){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},gg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,RC=()=>{if(typeof document<"u"&&document.head){let n=Vl(document,"url");if(n)return gg(n)}return gg(EC)},LC=()=>{if(typeof document<"u"&&document.head){let n=Vl(document,"history-timestamp");if(n)return n|0}},OC=()=>{if(typeof document<"u"&&document.head)return Vl(document,"token")},NC=()=>{if(typeof document<"u"&&document.head)return Vl(document,"token-param")};function DC(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||RC(),t=t||{},t.historyTimestamp||(t.historyTimestamp=LC());let e=OC();if(e){let d=NC();t.auth=Object.assign({token:e,param:d},t.auth||{})}t=Object.assign({},fg,t);let{logLevel:r,logger:f,pingInterval:g,reconnectStrategy:m,maxMissingPings:w,maxReconnectAttempts:h}=t;return f=t.logger=t.logger||new TC(r),m=t.reconnectStrategy=t.reconnectStrategy||dg(g),t.monitor!==!1&&(t.monitor=t.monitor||new MC({pingInterval:g,reconnectStrategy:m,maxMissingPings:w,maxReconnectAttempts:h,logger:f})),CC(n,t)}function FC(n,t){let e=DC(n,t);return new _C(e)}class PC{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(g=>{if(g&&OpenC3Auth.setTokens(),this._cable==null){let m=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);m=new URL(m,document.baseURI).href,this._cable=FC(m)}return this._cable.subscriptions.create({channel:t,...f},r)})}recordPing(){}}gr("P",PC);class WC{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}}gr("k",WC);function Ha(n){return BC.test(n)}const BC=/^-?[0-9]+$/;function mg(n){return zC.test(n)}const zC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function vg(n,t){if(Ha(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const f=yg(n),g=yg(r);return!!(f===g||(t==null?void 0:t.approx)===!0&&!Ha(n)&&g.length>=14&&f.startsWith(g.substring(0,14)))}let ja=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function HC(n){if(vg(n,{approx:!1}))return;if(Ha(n))return ja.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?ja.underflow:ja.truncate_float:ja.overflow}function yg(n){const{start:t,end:e}=jC(n),r=n.substring(t,e),f=r.indexOf(".");return f===-1?r:r.substring(0,f)+r.substring(f+1)}function jC(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}class UC{constructor(t){if(Rl(this,"isLosslessNumber",!0),!mg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=HC(this.value);if(t===void 0||t===ja.truncate_float)return Number.parseFloat(this.value);if(Ha(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 VC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function qC(n){return new UC(n)}function KC(n,t){return Du({"":n},"",n,t)}function Du(n,t,e,r){return Array.isArray(e)?r.call(n,t,YC(e,r)):e&&typeof e=="object"&&!VC(e)?r.call(n,t,GC(e,r)):r.call(n,t,e)}function GC(n,t){for(const e of Object.keys(n)){const r=Du(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function YC(n,t){for(let e=0;e<n.length;e++)n[e]=Du(n,String(e),n[e],t);return n}function XC(n,t,e){const r=typeof e=="function"?{parseNumber:e}:e,f=(r==null?void 0:r.parseNumber)??qC,g=(r==null?void 0:r.onDuplicateKey)??L;let m=0;const w=a();return b(w),R(),t?KC(w,t):w;function h(){if(n.charCodeAt(m)===nk){m++,u();const B={};let U=!0;for(;m<n.length&&n.charCodeAt(m)!==wg;){U?U=!1:(s(),u());const K=m,Z=c();if(Z===void 0){C();return}u(),p();const J=a();if(J===void 0){P();return}if(Object.prototype.hasOwnProperty.call(B,Z)&&!Fu(J,B[Z])){const he=g({key:Z,position:K+1,oldValue:B[Z],newValue:J});he!==void 0&&(B[Z]=he)}else B[Z]=J}return n.charCodeAt(m)!==wg&&D(),m++,B}}function d(){if(n.charCodeAt(m)===rk){m++,u();const B=[];let U=!0;for(;m<n.length&&n.charCodeAt(m)!==xg;){U?U=!1:s();const K=a();x(K),B.push(K)}return n.charCodeAt(m)!==xg&&E(),m++,B}}function a(){u();const B=c()??i()??h()??d()??l("true",!0)??l("false",!1)??l("null",null);return u(),B}function l(B,U){if(n.slice(m,m+B.length)===B)return m+=B.length,U}function u(){for(;QC(n.charCodeAt(m));)m++}function c(){if(n.charCodeAt(m)===Pu){m++;let B="";for(;m<n.length&&n.charCodeAt(m)!==Pu;){if(n.charCodeAt(m)===tk){const U=n[m+1],K=ek[U];K!==void 0?(B+=K,m++):U==="u"?ql(n.charCodeAt(m+2))&&ql(n.charCodeAt(m+3))&&ql(n.charCodeAt(m+4))&&ql(n.charCodeAt(m+5))?(B+=String.fromCharCode(Number.parseInt(n.slice(m+2,m+6),16)),m+=5):O(m):z(m)}else JC(n.charCodeAt(m))?B+=n[m]:I(n[m]);m++}return k(),m++,B}}function i(){const B=m;if(n.charCodeAt(m)===Cg&&(m++,$(B)),n.charCodeAt(m)===Wu)m++;else if(ZC(n.charCodeAt(m)))for(m++;Kl(n.charCodeAt(m));)m++;if(n.charCodeAt(m)===hk)for(m++,$(B);Kl(n.charCodeAt(m));)m++;if(n.charCodeAt(m)===mk||n.charCodeAt(m)===gk)for(m++,(n.charCodeAt(m)===Cg||n.charCodeAt(m)===lk)&&m++,$(B);Kl(n.charCodeAt(m));)m++;if(m>B)return f(n.slice(B,m))}function s(){if(n.charCodeAt(m)!==uk)throw new SyntaxError(`Comma ',' expected after value ${N()}`);m++}function p(){if(n.charCodeAt(m)!==dk)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);m++}function b(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function R(){if(m<n.length)throw new SyntaxError(`Expected end of input ${N()}`)}function $(B){if(!Kl(n.charCodeAt(m))){const U=n.slice(B,m);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function k(){if(n.charCodeAt(m)!==Pu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function L(B){let{key:U,position:K}=B;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${K}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function E(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function I(B){throw new SyntaxError(`Invalid character '${B}' ${_()}`)}function z(B){const U=n.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${U}' ${_()}`)}function P(){throw new SyntaxError(`Object value expected after ':' ${_()}`)}function O(B){const U=n.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${U}' ${_()}`)}function _(){return`at position ${m}`}function A(){return m<n.length?`but got '${n[m]}'`:"but reached end of input"}function N(){return`${A()} ${_()}`}}function QC(n){return n===ik||n===ok||n===sk||n===ak}function ql(n){return n>=Wu&&n<=Bu||n>=pk&&n<=vk||n>=fk&&n<=yk}function Kl(n){return n>=Wu&&n<=Bu}function ZC(n){return n>=ck&&n<=Bu}function JC(n){return n>=32&&n<=1114111}function Fu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>Fu(e,t[r])):bg(n)&&bg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>Fu(n[e],t[e])):!1}function bg(n){return typeof n=="object"&&n!==null}const ek={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
1398
|
+
`,r:"\r",t:" "},tk=92,nk=123,wg=125,rk=91,xg=93,ik=32,ok=10,sk=9,ak=13,Pu=34,lk=43,Cg=45,Wu=48,ck=49,Bu=57,uk=44,hk=46,dk=58,pk=65,fk=97,gk=69,mk=101,vk=70,yk=102;function kg(n,t,e,r){return f(n);function f(h,d){if(Array.isArray(r)){const a=r.find(l=>l.test(h));if(a){const l=a.stringify(h);if(typeof l!="string"||!mg(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}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 g(h);if(h&&typeof h=="object")return m(h)}function g(h,d){if(h.length===0)return"[]";let a="[";for(let l=0;l<h.length;l++){const u=h[l];typeof u<"u"&&typeof u!="function"?a+=f(u):a+="null",l<h.length-1&&(a+=",")}return a+="]",a}function m(h,d){if(typeof h.toJSON=="function")return kg(h.toJSON(),t,e,void 0);const a=Array.isArray(t)?t.map(String):Object.keys(h);if(a.length===0)return"{}";let l=!0,u="{";for(const c of a){const i=h[c];if(w(c,i)){l?l=!1:u+=",";const s=JSON.stringify(c);u+=`${s}:`,u+=f(i)}}return u+="}",u}function w(h,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function bk(n){return Ha(n)&&!vg(n)?BigInt(n):parseFloat(n)}class As{constructor(){Rl(this,"id",1)}async exec(t,e,r={},f={},g=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 Eu.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:g,transformRequest:[(m,w)=>kg(m)],transformResponse:[m=>XC(m,void 0,bk)]})).data.result}catch(m){let w=new Error;throw m.response?(w.name=m.response.data.error.data.class,w.message=m.response.data.error.data.message,w.object=m.response.data.error):m.request?(w.name="Request error",w.message="Request error, no response received"):w=m,w}}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,r,f,g){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:f,unmap_old:g})}unmap_target_from_interface(t,e,r,f){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:f})}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])}interface_target_enable(t,e,r=!1,f=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:f})}interface_target_disable(t,e,r=!1,f=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:f})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,f,g){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:f,unmap_old:g})}unmap_target_from_router(t,e,r,f){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:f})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,f=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:f})}router_target_disable(t,e,r=!1,f=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:f})}router_details(t){return this.exec("router_details",[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 g=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:f});if(g!=null){let m=g.length,w=null;for(let h=0;h<m;h++)w=this.decode_openc3_type(g[h][1]),w!==null&&(g[h][1]=w)}return g}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])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,f=null,g=null){let m={stale_time:e};r!==null&&(m.cache_timeout=r),f!==null&&(m.start_time=f.toISOString()),g!==null&&(m.end_time=g.toISOString());const w=await this.exec("get_tlm_values",[t],m,{},1e4);if(w&&w.length>0){let h=w[0].length,d=null;for(let a=0;a<h;a++)d=this.decode_openc3_type(w[0][a]),d!==null&&(w[0][a]=d)}return w}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,f="CONVERTED"){let g=null;if(e===void 0)g=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))g=await this.exec("tlm",[t],{type:e});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,w}else g=await this.exec("tlm",[t,e,r],{type:f});let m=this.decode_openc3_type(g);return m!==null&&(g=m),g}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,g,m={}){let w=null;for(let h in f)Object.prototype.hasOwnProperty.call(f,h)&&(w=this.encode_openc3_type(f[h]),w!==null&&(f[h]=w));return this.exec(t,[e,r,f],m,g)}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={},g={}){return e===void 0?this.exec("cmd",t,g,f):this._cmd("cmd",t,e,r,f,g)}cmd_no_range_check(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_no_range_check",t,g,f):this._cmd("cmd_no_range_check",t,e,r,f,g)}cmd_raw(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_raw",t,g,f):this._cmd("cmd_raw",t,e,r,f,g)}cmd_raw_no_range_check(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,g,f):this._cmd("cmd_raw_no_range_check",t,e,r,f,g)}cmd_no_hazardous_check(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,g,f):this._cmd("cmd_no_hazardous_check",t,e,r,f,g)}cmd_no_checks(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_no_checks",t,g,f):this._cmd("cmd_no_checks",t,e,r,f,g)}cmd_raw_no_hazardous_check(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,g,f):this._cmd("cmd_raw_no_hazardous_check",t,e,r,f,g)}cmd_raw_no_checks(t,e,r,f={},g={}){return e===void 0?this.exec("cmd_raw_no_checks",t,g,f):this._cmd("cmd_raw_no_checks",t,e,r,f,g)}build_cmd(t,e,r,f={},g={}){return e===void 0?this.exec("build_cmd",t,g,f):this._cmd("build_cmd",t,e,r,f,g)}build_command(t,e,r,f={},g={}){return e===void 0?this.exec("build_cmd",t,g,f):this._cmd("build_cmd",t,e,r,f,g)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_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,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}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(g=>g.toString(16).padStart(2,"0")).join("")}}}gr("B",As);var Ag={exports:{}},Sg;function wk(){return Sg||(Sg=1,function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,f){function g(d,a){function l(E,I,z){if(!(E.length<I)){var P=E.slice(0,I),O=E.slice(I),_=/^(?:(\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),_&&!_[2]&&(N||(N=I),B=I+_[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>z)return{start:A.index,end:A.index+A[2].length};if(_&&_[2])return N=I+_[2].length,{start:N,end:N+_[3].length}}}for(var u=a.column||d.getOption("printMarginColumn"),c=a.allowMerge!=0,i=Math.min(a.startRow,a.endRow),s=Math.max(a.startRow,a.endRow),p=d.session;i<=s;){var b=p.getLine(i);if(b.length>u){var x=l(b,u,5);if(x){var R=/^\s*/.exec(b)[0];p.replace(new w(i,x.start,i,x.end),`
|
|
1399
|
+
`+R)}s++}else if(c&&/\S/.test(b)&&i!=s){var $=p.getLine(i+1);if($&&/\S/.test($)){var k=b.replace(/\s+$/,""),C=$.replace(/^\s+/,""),L=k+" "+C,x=l(L,u,5);if(x&&x.start>k.length||L.length<u){var D=new w(i,k.length,i+1,$.length-C.length);p.replace(D," "),i--,s--}else k.length<b.length&&p.remove(new w(i,k.length,i,b.length))}}i++}}function m(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var a=d.editor,l=a.selection.cursor;if(l.column<=a.renderer.$printMarginColumn)return;var u=a.session.$undoManager.$lastDelta;g(a,{startRow:l.row,endRow:l.row,allowMerge:!1}),u!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var w=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",m):this.commands.off("afterExec",m)},value:!1}}),r.hardWrap=g}),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 g(y){return{row:y.line,column:y.ch}}function m(y){return new Ne(y.row,y.column)}function w(y,T,S){if(T.line===S.line&&T.ch>=S.ch-1){var F=y.getLine(T.line),W=F.charCodeAt(T.ch);55296<=W&&W<=55551&&(S.ch+=1)}return{start:T,end:S}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),We.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",ns),L(y),We.on(y.getInputField(),"paste",a(y))}function d(y){y.setOption("disableInput",!1),y.off("cursorActivity",ns),We.off(y.getInputField(),"paste",a(y)),y.state.vim=null,Ar&&clearTimeout(Ar)}function a(y){var T=y.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(y.setCursor(me(y.getCursor(),0,1)),Un.enterInsertMode(y,{},T))}),T.onPasteFn}function l(y,T){return T>=y.firstLine()&&T<=y.lastLine()}function u(y){return/^[a-z]$/.test(y)}function c(y){return"()[]{}".indexOf(y)!=-1}function i(y){return ka.test(y)}function s(y){return rn.test(y)}function p(y){return/^\s*$/.test(y)}function b(y){return".?!".indexOf(y)!=-1}function x(y,T){for(var S=0;S<T.length;S++)if(T[S]==y)return!0;return!1}function R(y,T,S,F,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),jt[y]={type:S,defaultValue:T,callback:W},F)for(var H=0;H<F.length;H++)jt[F[H]]=jt[y];T&&$(y,T)}function $(y,T,S,F){var W=jt[y];F=F||{};var H=F.scope;if(!W)return new Error("Unknown option: "+y);if(W.type=="boolean"){if(T&&T!==!0)return new Error("Invalid argument: "+y+"="+T);T!==!1&&(T=!0)}W.callback?(H!=="local"&&W.callback(T,void 0),H!=="global"&&S&&W.callback(T,S)):(H!=="local"&&(W.value=W.type=="boolean"?!!T:T),H!=="global"&&S&&(S.state.vim.options[y]={value:T}))}function k(y,T,S){var F=jt[y];S=S||{};var W=S.scope;if(!F)return new Error("Unknown option: "+y);if(F.callback){var H=T&&F.callback(void 0,T);return W!=="global"&&H!==void 0?H:W!=="local"?F.callback():void 0}var H=W!=="global"&&T&&T.state.vim.options[y];return(H||W!=="local"&&F||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Hn()}function L(y){return y.state.vim||(y.state.vim={inputState:new _,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}),y.state.vim}function D(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Wi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in jt){var T=jt[y];T.value=T.defaultValue}}function E(y){function T(Y){typeof Y=="string"?An.value=Y:An=null}if(y[0]=="<"){var S=y.toLowerCase().slice(1,-1),F=S.split("-");if(S=F.pop()||"",S=="lt")y="<";else if(S=="space")y=" ";else if(S=="cr")y=`
|
|
1400
|
+
`;else if(Bi[S]){var W=An.value,H={key:Bi[S],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};An.onKeyDown&&An.onKeyDown(H,An.value,T),An&&An.onKeyUp&&An.onKeyUp(H,An.value,T);return}}if(y==`
|
|
1401
|
+
`){var q=An;An=null,q.onClose&&q.onClose(q.value)}else An.value=(An.value||"")+y}function I(y,T,S){var F=hn;if(S){if(Qr.indexOf(S)!=-1)return;Qr.push(S),hn=S.noremap!=0}try{for(var W=L(y),H=/<(?:[CSMA]-)*\w+>|./gi,q;q=H.exec(T);){var Y=q[0],Q=W.insertMode;if(An){E(Y);continue}var re=vt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var ae=Y.toLowerCase().slice(1,-1),be=ae.split("-");if(ae=be.pop()||"",ae=="lt")Y="<";else if(ae=="space")Y=" ";else if(ae=="cr")Y=`
|
|
1402
|
+
`;else{if(Bi.hasOwnProperty(ae)){Y=Bi[ae],is(y,Y);continue}Y=Y[0],H.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Qr.pop(),hn=Qr.length?F:!1,!Qr.length&&An){var ke=An;An=null,wr(y,ke)}}}function z(y,T){var S=y.key;if(!Zr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=rr[S]||S;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),We.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||S.length>1)&&y.shiftKey&&(F+="S-"),T&&!T.expectLiteralNext&&S.length==1){if(Qn.keymap&&S in Qn.keymap)(Qn.remapCtrl!=0||!F)&&(S=Qn.keymap[S]);else if(S.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(S=W)}}return F+=S,F.length>1&&(F="<"+F+">"),F}}function P(y,T){Qn.string!==y&&(Qn=O(y)),Qn.remapCtrl=T}function O(y){function T(F){return F.split(/\\?(.)/).filter(Boolean)}var S={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var H=T(W[1]),q=T(W[2]);if(H.length!==q.length)return;for(var Y=0;Y<H.length;++Y)S[H[Y]]=q[Y]}else if(W.length==1){var Q=T(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)S[Q[Y]]=Q[Y+1]}}}),{keymap:S,string:y}):{keymap:S,string:""}}function _(){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(y,T){y.state.vim.inputState=new _,y.state.vim.expectLiteralNext=!1,We.signal(y,"vim-command-done",T)}function N(){this.removed=[],this.inserted=""}function B(y,T,S){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!S}function U(y,T){var S=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");S[y]=T,nn.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new B,y["."]=new B,y[":"]=new B,y["/"]=new B,y["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function J(y,T){mi[y]=T}function he(y,T){for(var S=[],F=0;F<T;F++)S.push(y);return S}function ne(y,T){ls[y]=T}function le(y,T){Un[y]=T}function se(y,T,S){var F=y.state.vim,W=F.insertMode||F.visualMode,H=Math.min(Math.max(y.firstLine(),T.line),y.lastLine()),q=y.getLine(H),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var ae=1;S&&S.line==H&&S.ch>Q&&(ae=-1),Q+=ae,Q>Y&&(Q-=2)}return new Ne(H,Q)}function de(y){var T={};for(var S in y)y.hasOwnProperty(S)&&(T[S]=y[S]);return T}function me(y,T,S){return typeof T=="object"&&(S=T.ch,T=T.line),new Ne(y.line+T,y.ch+S)}function $e(y,T,S,F){F.operator&&(S="operatorPending");for(var W,H=[],q=[],Y=hn?T.length-Oo:0,Q=Y;Q<T.length;Q++){var re=T[Q];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||F.operator&&re.type=="action"||!(W=Te(y,re.keys))||(W=="partial"&&H.push(re),W=="full"&&q.push(re))}return{partial:H.length&&H,full:q.length&&q}}function Te(y,T){var S=T.slice(-11)=="<character>",F=T.slice(-10)=="<register>";if(S||F){var W=T.length-(S?11:10),H=y.slice(0,W),q=T.slice(0,W);return H==q&&y.length>W?"full":q.indexOf(H)==0?"partial":!1}return y==T?"full":T.indexOf(y)==0?"partial":!1}function Me(y){var T=/^.*(<[^>]+>)$/.exec(y),S=T?T[1]:y.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
|
|
1403
|
+
`;break;case"<Space>":S=" ";break;default:S=""}return S}function Xe(y,T,S){return function(){for(var F=0;F<S;F++)T(y)}}function Ke(y){return new Ne(y.line,y.ch)}function at(y,T){return y.ch==T.ch&&y.line==T.line}function et(y,T){return y.line<T.line?!0:y.line==T.line&&y.ch<T.ch}function lt(y,T){return arguments.length>2&&(T=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),et(y,T)?y:T}function Yt(y,T){return arguments.length>2&&(T=Yt.apply(void 0,Array.prototype.slice.call(arguments,1))),et(y,T)?T:y}function xn(y,T,S){var F=et(y,T),W=et(T,S);return F&&W}function Wt(y,T){return y.getLine(T).length}function vr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function un(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Ln(y,T,S){var F=Wt(y,T),W=new Array(S-F+1).join(" ");y.setCursor(new Ne(T,F)),y.replaceRange(W,y.getCursor())}function Xn(y,T){var S=[],F=y.listSelections(),W=Ke(y.clipPos(T)),H=!at(T,W),q=y.getCursor("head"),Y=mt(F,q),Q=at(F[Y].head,F[Y].anchor),re=F.length-1,ae=re-Y>Y?re:0,be=F[ae].anchor,ke=Math.min(be.line,W.line),ve=Math.max(be.line,W.line),we=be.ch,Oe=W.ch,Le=F[ae].head.ch-we,Ve=Oe-we;Le>0&&Ve<=0?(we++,H||Oe--):Le<0&&Ve>=0?(we--,Q||Oe++):Le<0&&Ve==-1&&(we--,Oe++);for(var st=ke;st<=ve;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};S.push(Qe)}return y.setSelections(S),T.ch=Oe,be.ch=we,be}function Tr(y,T,S){for(var F=[],W=0;W<S;W++){var H=me(T,W,0);F.push({anchor:H,head:H})}y.setSelections(F,0)}function mt(y,T,S){for(var F=0;F<y.length;F++){var W=at(y[F].anchor,T),H=at(y[F].head,T);if(W||H)return F}return-1}function je(y,T){var S=T.lastSelection,F=function(){var H=y.listSelections(),q=H[0],Y=H[H.length-1],Q=et(q.anchor,q.head)?q.anchor:q.head,re=et(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var H=y.getCursor(),q=y.getCursor(),Y=S.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(H.line+re,H.ch+Q);for(var ae=[],be=H.line;be<q.line;be++){var ke=new Ne(be,H.ch),ve=new Ne(be,q.ch),we={anchor:ke,head:ve};ae.push(we)}y.setSelections(ae)}else{var Oe=S.anchorMark.find(),Le=S.headMark.find(),Ve=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ve,ch:Ve?q.ch:st+q.ch},S.visualLine&&(H=new Ne(H.line,0),q=new Ne(q.line,Wt(y,q.line))),y.setSelection(H,q)}return[H,q]};return T.visualMode?F():W()}function Lt(y,T){var S=T.sel.anchor,F=T.sel.head;T.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(S)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:y.setBookmark(S),headMark:y.setBookmark(F),anchor:Ke(S),head:Ke(F),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function Zt(y,T,S,F){var W=y.state.vim.sel,H=F?T:W.head,q=F?T:W.anchor,Y;return et(S,T)&&(Y=S,S=T,T=Y),et(H,q)?(H=lt(T,H),q=Yt(q,S)):(q=lt(T,q),H=Yt(H,S),H=me(H,0,-1),H.ch==-1&&H.line!=y.firstLine()&&(H=new Ne(H.line-1,Wt(y,H.line-1)))),[q,H]}function On(y,T,W){var F=y.state.vim;T=T||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",H=yr(y,T,W);y.setSelections(H.ranges,H.primary)}function yr(y,T,S,F){var W=Ke(T.head),H=Ke(T.anchor);if(S=="char"){var q=!F&&!et(T.head,T.anchor)?1:0,Y=et(T.head,T.anchor)?1:0;return W=me(T.head,0,q),H=me(T.anchor,0,Y),{ranges:[{anchor:H,head:W}],primary:0}}if(S=="line"){if(et(T.head,T.anchor))W.ch=0,H.ch=Wt(y,H.line);else{H.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Wt(y,W.line)}return{ranges:[{anchor:H,head:W}],primary:0}}if(S=="block"){var re=Math.min(H.line,W.line),ae=H.ch,be=Math.max(H.line,W.line),ke=W.ch;ae<ke?ke+=1:ae+=1;for(var ve=be-re+1,we=W.line==re?0:ve-1,Oe=[],Le=0;Le<ve;Le++)Oe.push({anchor:new Ne(re+Le,ae),head:new Ne(re+Le,ke)});return{ranges:Oe,primary:we}}}function cr(y){var T=y.getCursor("head");return y.getSelection().length==1&&(T=lt(T,y.getCursor("anchor"))),T}function gn(y,T){var S=y.state.vim;T!==!1&&y.setCursor(se(y,S.sel.head)),Lt(y,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||We.signal(y,"vim-mode-change",{mode:"normal"})}function Wn(y,T,S){var F=y.getRange(T,S);if(/\n\s*$/.test(F)){var W=F.split(`
|
|
1404
|
+
`);W.pop();for(var H,H=W.pop();W.length>0&&H&&p(H);H=W.pop())S.line--,S.ch=0;H?(S.line--,S.ch=Wt(y,S.line)):S.ch=0}}function Nn(y,T,S){T.ch=0,S.ch=0,S.line++}function Kt(y){if(!y)return 0;var T=y.search(/\S/);return T==-1?y.length:T}function ln(y,T,S){var F=T.inclusive,W=T.innerWord,H=T.bigWord,q=T.noSymbol,Y=T.multiline,Q=S||cr(y),re=y.getLine(Q.line),ae=re,be=Q.line,ke=be,ve=Q.ch,we,Oe=q?No[0]:Pi[0];if(W&&/\s/.test(re.charAt(ve)))Oe=function(bn){return/\s/.test(bn)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!Y)return null;ve--,we=ci(y,Q,!0,H,!0);break}H?Oe=Pi[0]:(Oe=No[0],Oe(re.charAt(ve))||(Oe=No[1]))}for(var Le=ve,Ve=ve;Oe(re.charAt(Ve))&&Ve>=0;)Ve--;if(Ve++,we)Le=we.to,ke=we.line,ae=y.getLine(ke),!ae&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(F){var st=Le,Qe=Q.ch<=Ve&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(ae.charAt(Le))&&Le<ae.length;)Le++;if(st==Le||Qe){for(var tt=Ve;/\s/.test(re.charAt(Ve-1))&&Ve>0;)Ve--;!Ve&&!Qe&&(Ve=tt)}}return{start:new Ne(be,Ve),end:new Ne(ke,Le)}}function Dr(y,T,S){var F=T;if(!We.findMatchingTag||!We.findEnclosingTag)return{start:F,end:F};var W=We.findMatchingTag(y,T)||We.findEnclosingTag(y,T);return!W||!W.open||!W.close?{start:F,end:F}:S?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Kr(y,T,S){at(T,S)||He.jumpList.add(y,T,S)}function Gr(y,T){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=T.forward,He.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Ai(y,T,S,F){var W=Ke(y.getCursor()),H=S?1:-1,q=S?y.lineCount():-1,Y=W.ch,Q=W.line,re=y.getLine(Q),ae={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:S,depth:0,curMoveThrough:!1},be=$i[F];if(!be)return W;var ke=_i[be].init,ve=_i[be].isComplete;for(ke&&ke(ae);Q!==q&&T;){if(ae.index+=H,ae.nextCh=ae.lineText.charAt(ae.index),!ae.nextCh){if(Q+=H,ae.lineText=y.getLine(Q)||"",H>0)ae.index=0;else{var we=ae.lineText.length;ae.index=we>0?we-1:0}ae.nextCh=ae.lineText.charAt(ae.index)}ve(ae)&&(W.line=Q,W.ch=ae.index,T--)}return ae.nextCh||ae.curMoveThrough?new Ne(Q,ae.index):W}function ci(y,T,S,F,W){var H=T.line,q=T.ch,Y=y.getLine(H),Q=S?1:-1,re=F?Pi:No;if(W&&Y==""){if(H+=Q,Y=y.getLine(H),!l(y,H))return null;q=S?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:H};for(var ae=Q>0?Y.length:-1,be=ae,ke=ae;q!=ae;){for(var ve=!1,we=0;we<re.length&&!ve;++we)if(re[we](Y.charAt(q))){for(be=q;q!=ae&&re[we](Y.charAt(q));)q+=Q;if(ke=q,ve=be!=ke,be==T.ch&&H==T.line&&ke==be+Q)continue;return{from:Math.min(be,ke+1),to:Math.max(be,ke),line:H}}ve||(q+=Q)}if(H+=Q,!l(y,H))return null;Y=y.getLine(H),q=Q>0?0:Y.length}}function Bn(y,T,S,F,W,H){var q=Ke(T),Y=[];(F&&!W||!F&&W)&&S++;for(var Q=!F||!W,re=0;re<S;re++){var ae=ci(y,T,F,H,Q);if(!ae){var be=Wt(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}Y.push(ae),T=new Ne(ae.line,F?ae.to-1:ae.from)}var ke=Y.length!=S,ve=Y[0],we=Y.pop();return F&&!W?(!ke&&(ve.from!=q.ch||ve.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):F&&W?new Ne(we.line,we.to-1):!F&&W?(!ke&&(ve.to!=q.ch||ve.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function to(y,T,S,F,W){var H=T,q=new Ne(H.line+S.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),q}function ui(y,T,S,F,W){for(var H=W||y.getCursor(),q=H.ch,Y,Q=0;Q<T;Q++){var re=y.getLine(H.line);if(Y=$n(q,re,F,S),Y==-1)return null;q=Y}return new Ne(y.getCursor().line,Y)}function Os(y,T){var S=y.getCursor().line;return se(y,new Ne(S,T-1))}function Yr(y,T,S,F){!x(S,wo)&&!Jt.test(S)||(T.marks[S]&&T.marks[S].clear(),T.marks[S]=y.setBookmark(F))}function $n(y,T,S,F,W){var H;return F?(H=T.indexOf(S,y+1),H!=-1):(H=T.lastIndexOf(S,y-1),H!=-1),H}function hi(y,T,S,F,W){function H(Ve){return!/\S/.test(y.getLine(Ve))}function q(Ve,st,Qe){return Qe?H(Ve)!=H(Ve+st):!H(Ve)&&H(Ve+st)}function Y(Ve){F=F>0?1:-1;var st=y.ace.session.getFoldLine(Ve);st&&Ve+F>st.start.row&&Ve+F<st.end.row&&(F=(F>0?st.end.row:st.start.row)-Ve)}var Q=T.line,re=y.firstLine(),ae=y.lastLine(),be,ke,ve=Q;if(F){for(;re<=ve&&ve<=ae&&S>0;)Y(ve),q(ve,F)&&S--,ve+=F;return new Ne(ve,0)}var we=y.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=H(Q);for(ve=Q;ve<=ae&&S;ve++)q(ve,1,!0)&&(!W||H(ve)!=Le)&&S--;for(ke=new Ne(ve,0),ve>ae&&!Le?Le=!0:W=!1,ve=Q;ve>re&&!((!W||H(ve)==Le||ve==Q)&&q(ve,-1,!0));ve--);return be=new Ne(ve,0),{start:be,end:ke}}function Zo(y,T,S,F,W){function H(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(Oe=we.pos,b(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&p(we.line[we.pos]);)Oe=we.pos,H(we);return{ln:we.ln,pos:Oe+1}}H(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(!p(we.line[we.pos])&&!b(we.line[we.pos]))Oe=we.pos;else if(b(we.line[we.pos]))return W?p(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};H(we)}return we.line=ve,W&&p(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};S>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=q(y,Q.ln,Q.pos,F),S--;return new Ne(Q.ln,Q.pos)}function di(y,T,S,F){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!l(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 H(Q,re,ae,be){var Le=Q.getLine(re),ke=Le==="",ve={line:Le,ln:re,pos:ae,dir:be},we={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(W(Q,ve);ve.line!==null;){if(we.ln=ve.ln,we.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(ke&&ve.line!==""&&!p(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};b(ve.line[ve.pos])&&!ke&&(ve.pos===ve.line.length-1||p(ve.line[ve.pos+1]))&&(ke=!0),W(Q,ve)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ve=Le.length-1;Ve>=0;--Ve)if(!p(Le[Ve])){we.pos=Ve;break}return we}function q(Q,re,ae,be){var Oe=Q.getLine(re),ke={line:Oe,ln:re,pos:ae,dir:be},ve={ln:ke.ln,pos:null},we=ke.line==="";for(W(Q,ke);ke.line!==null;){if(ke.line===""&&!we)return ve.pos!==null?ve:{ln:ke.ln,pos:ke.pos};if(!(!b(ke.line[ke.pos])||ve.pos===null||ke.ln===ve.ln&&ke.pos+1===ve.pos))return ve;ke.line!==""&&!p(ke.line[ke.pos])&&(we=!1,ve={ln:ke.ln,pos:ke.pos}),W(Q,ke)}var Oe=Q.getLine(ve.ln);ve.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!p(Oe[Le])){ve.pos=Le;break}return ve}for(var Y={ln:T.line,pos:T.ch};S>0;)F<0?Y=q(y,Y.ln,Y.pos,F):Y=H(y,Y.ln,Y.pos,F),S--;return new Ne(Y.ln,Y.pos)}function Cn(y,T,S,F){var W=T,H,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],re=y.getLine(W.line).charAt(W.ch),ae=re===Q?1:0;if(H=y.scanForBracket(new Ne(W.line,W.ch+ae),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new Ne(W.line,W.ch+ae),1,void 0,{bracketRegex:Y}),!H||!q)return null;if(H=H.pos,q=q.pos,H.line==q.line&&H.ch>q.ch||H.line>q.line){var be=H;H=q,q=be}return F?q.ch+=1:H.ch+=1,{start:H,end:q}}function ur(y,T,S,F){var W=Ke(T),H=y.getLine(W.line),q=H.split(""),Y,Q,re,ae,be=q.indexOf(S);if(W.ch<be)W.ch=be;else if(be<W.ch&&q[W.ch]==S){var ke=/string/.test(y.getTokenTypeAt(me(T,0,1))),ve=/string/.test(y.getTokenTypeAt(T)),we=ke&&!ve;we||(Q=W.ch,--W.ch)}if(q[W.ch]==S&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==S&&(Y=re+1);if(Y&&!Q)for(re=Y,ae=q.length;re<ae&&!Q;re++)q[re]==S&&(Q=re);return!Y||!Q?{start:W,end:W}:(F&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function pi(){}function kn(y){var T=y.state.vim;return T.searchState_||(T.searchState_=new pi)}function _n(y){return fi(y,"/")}function br(y){return go(y,"/")}function fi(y,T){var S=go(y,T)||[];if(!S.length)return[];var F=[];if(S[0]===0){for(var W=0;W<S.length;W++)typeof S[W]=="number"&&F.push(y.substring(S[W]+1,S[W+1]));return F}}function go(y,T){T||(T="/");for(var S=!1,F=[],W=0;W<y.length;W++){var H=y.charAt(W);!S&&H==T&&F.push(W),S=!S&&H=="\\"}return F}function mo(y){for(var T="|(){",S="}",F=!1,W=[],H=-1;H<y.length;H++){var q=y.charAt(H)||"",Y=y.charAt(H+1)||"",Q=Y&&T.indexOf(Y)!=-1;F?((q!=="\\"||!Q)&&W.push(q),F=!1):q==="\\"?(F=!0,Y&&S.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Jo(y){for(var T=!1,S=[],F=-1;F<y.length;F++){var W=y.charAt(F)||"",H=y.charAt(F+1)||"";zi[W+H]?(S.push(zi[W+H]),F++):T?(S.push(W),T=!1):W==="\\"?(T=!0,i(H)||H==="$"?S.push("$"):H!=="/"&&H!=="\\"&&S.push("\\")):(W==="$"&&S.push("$"),S.push(W),H==="/"&&S.push("\\"))}return S.join("")}function Xr(y){for(var T=new We.StringStream(y),S=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)S.push(T.next());var F=!1;for(var W in kr)if(T.match(W,!0)){F=!0,S.push(kr[W]);break}F||S.push(T.next())}return S.join("")}function gi(y,T,S){var F=He.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var W=br(y),H,q;if(!W.length)H=y;else{H=y.substring(0,W[0]);var Y=y.substring(W[0]);q=Y.indexOf("i")!=-1}if(!H)return null;k("pcre")||(H=mo(H)),S&&(T=/^[^A-Z]*$/.test(H));var Q=new RegExp(H,T||q?"im":"m");return Q}function Fr(y){typeof y=="string"&&(y=document.createElement(y));for(var T,S=1;S<arguments.length;S++)if(T=arguments[S])if(typeof T!="object"&&(T=document.createTextNode(T)),T.nodeType)y.appendChild(T);else for(var F in T)Object.prototype.hasOwnProperty.call(T,F)&&(F[0]==="$"?y.style[F.slice(1)]=T[F]:y.setAttribute(F,T[F]));return y}function Ot(y,T){var S=Fr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);y.openNotification?y.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function To(y,T){return Fr("div",{$display:"flex"},Fr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,Fr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&Fr("span",{$color:"#888"},T))}function wr(y,T){if(Qr.length){T.value||(T.value=""),An=T;return}var S=To(T.prefix,T.desc);if(y.openDialog)y.openDialog(S,T.onClose,{onKeyDown:T.onKeyDown,onKeyUp:T.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:T.value});else{var F="";typeof T.prefix!="string"&&T.prefix&&(F+=T.prefix.textContent),T.desc&&(F+=" "+T.desc),T.onClose(prompt(F,""))}}function ce(y,T){if(y instanceof RegExp&&T instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],F=0;F<S.length;F++){var W=S[F];if(y[W]!==T[W])return!1}return!0}return!1}function ze(y,T,S,F){if(T){var W=kn(y),H=gi(T,!!S,!!F);if(H)return St(y,H),ce(H,W.getQuery())||W.setQuery(H),H}}function Fe(y){if(y.source.charAt(0)=="^")var T=!0;return{token:function(S){if(T&&!S.sol()){S.skipToEnd();return}var F=S.match(y,!1);if(F)return F[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!y.exec(S.next()+F[0]))?(S.next(),null):(S.match(y),"searching");for(;!S.eol()&&(S.next(),!S.match(y,!1)););},query:y}}function St(y,T){clearTimeout(Ar);var S=kn(y);S.highlightTimeout=Ar,Ar=setTimeout(function(){if(y.state.vim){var F=kn(y);F.highlightTimeout=null;var W=F.getOverlay();(!W||T!=W.query)&&(W&&y.removeOverlay(W),W=Fe(T),y.addOverlay(W),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(T))),F.setOverlay(W))}},50)}function Gt(y,T,S,F){return F===void 0&&(F=1),y.operation(function(){for(var W=y.getCursor(),H=y.getSearchCursor(S,W),q=0;q<F;q++){var Y=H.find(T);if(q==0&&Y&&at(H.from(),W)){var Q=T?H.from():H.to();Y=H.find(T),Y&&!Y[0]&&at(H.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=H.find(T))}if(!Y&&(H=y.getSearchCursor(S,T?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!H.find(T)))return}return H.from()})}function Ht(y,T,S,F,W){return F===void 0&&(F=1),y.operation(function(){var H=y.getCursor(),q=y.getSearchCursor(S,H),Y=q.find(!T);!W.visualMode&&Y&&at(q.from(),H)&&q.find(!T);for(var Q=0;Q<F;Q++)if(Y=q.find(T),!Y&&(q=y.getSearchCursor(S,T?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!q.find(T)))return;return[q.from(),q.to()]})}function xr(y){var T=kn(y);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),y.removeOverlay(kn(y).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function hr(y,T,S){return typeof y!="number"&&(y=y.line),T instanceof Array?x(y,T):typeof S=="number"?y>=T&&y<=S:y==T}function zn(y){var T=y.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function Cr(y,T,S){if(S=="'"||S=="`")return He.jumpList.find(y,-1)||new Ne(0,0);if(S==".")return mn(y);var F=T.marks[S];return F&&F.find()}function mn(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var T=y.doc.history.done,S=T.length;S--;)if(T[S].changes)return Ke(T[S].changes[0].to)}function no(y,T,S,F,W,H,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)ae(),ke();ve()})}function ae(){var Qe=y.getRange(H.from(),H.to()),tt=Qe.replace(q,Y),bn=H.to().line;H.replace(tt),Ve=H.to().line,W+=Ve-bn,st=Ve<bn}function be(){var Qe=Le&&Ke(H.to()),tt=H.findNext();return tt&&!tt[0]&&Qe&&at(H.from(),Qe)&&(tt=H.findNext()),tt}function ke(){for(;be()&&hr(H.from(),F,W);)if(!(!S&&H.from().line==Ve&&!st)){y.scrollIntoView(H.from(),30),y.setSelection(H.from(),H.to()),Le=H.from(),Oe=!1;return}Oe=!0}function ve(Qe){if(Qe&&Qe(),y.focus(),Le){y.setCursor(Le);var tt=y.state.vim;tt.exMode=!1,tt.lastHPos=tt.lastHSPos=Le.ch}Q&&Q()}function we(Qe,tt,bn){We.e_stop(Qe);var ct=z(Qe);switch(ct){case"y":ae(),ke();break;case"n":ke();break;case"a":var Tn=Q;Q=void 0,y.operation(re),Q=Tn;break;case"l":ae();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(bn)}return Oe&&ve(bn),!0}y.state.vim.exMode=!0;var Oe=!1,Le,Ve,st;if(ke(),Oe){Ot(y,"No matches for "+q.source);return}if(!T){re(),Q&&Q();return}wr(y,{prefix:Fr("span","replace with ",Fr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Pr(y,T){var S=y.state.vim,F=He.macroModeState,W=He.registerController.getRegister("."),H=F.isPlaying,q=F.lastInsertModeChanges;H||(y.off("change",Mo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,We.off(y.getInputField(),"keydown",Ps)),!H&&S.insertModeRepeat>1&&(ba(y,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,T||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),W.setText(q.changes.join("")),We.signal(y,"vim-mode-change",{mode:"normal"}),F.isRecording&&dr(F)}function es(y){Dn.unshift(y)}function Ns(y,T,S,F,W){var H={keys:y,type:T};H[T]=S,H[T+"Args"]=F;for(var q in W)H[q]=W[q];es(H)}function Ds(y,T,S,F){var W=He.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&Ir.processCommand(y,W.keyBuffer[0]),S.isPlaying=!1;return}var H=W.keyBuffer,q=0;S.isPlaying=!0,S.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var Q=H[Y],re,ae;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),ae=re[0],Q=Q.substring(re.index+ae.length),vt.handleKey(y,ae,"macro"),T.insertMode){var be=W.insertModeChanges[q++].changes;He.macroModeState.lastInsertModeChanges.changes=be,os(y,be,1),Pr(y)}S.isPlaying=!1}function ts(y,T){if(!y.isPlaying){var S=y.latestRegister,F=He.registerController.getRegister(S);F&&F.pushText(T)}}function dr(y){if(!y.isPlaying){var T=y.latestRegister,S=He.registerController.getRegister(T);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(y.lastInsertModeChanges)}}function Fs(y,T){if(!y.isPlaying){var S=y.latestRegister,F=He.registerController.getRegister(S);F&&F.pushSearchQuery&&F.pushSearchQuery(T)}}function Mo(y,T){var S=He.macroModeState,F=S.lastInsertModeChanges;if(!S.isPlaying)for(var W=y.state.vim;T;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var H=y.listSelections().length;H>1&&(F.ignoreCount=H);var q=T.text.join(`
|
|
1405
|
+
`);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))F.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(F.changes.push([q,re]),q="")}}q&&F.changes.push(q)}}T=T.next}}function ns(y){var T=y.state.vim;if(T.insertMode){var S=He.macroModeState;if(S.isPlaying)return;var F=S.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||rs(y,T)}function rs(y,T,S){var F=y.getCursor("anchor"),W=y.getCursor("head");if(T.visualMode&&!y.somethingSelected()?gn(y,!1):!T.visualMode&&!T.insertMode&&y.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,We.signal(y,"vim-mode-change",{mode:"visual"})),T.visualMode){var H=et(W,F)?0:-1,q=et(W,F)?-1:0;W=me(W,0,H),F=me(F,0,q),T.sel={anchor:F,head:W},Yr(y,T,"<",lt(W,F)),Yr(y,T,">",Yt(W,F))}else!T.insertMode&&!S&&(T.lastHPos=y.getCursor().ch)}function vo(y,T){this.keyName=y,this.key=T.key,this.ctrlKey=T.ctrlKey,this.altKey=T.altKey,this.metaKey=T.metaKey,this.shiftKey=T.shiftKey}function Ps(y){var T=He.macroModeState,S=T.lastInsertModeChanges,F=We.keyName?We.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new vo(F,y)))}function ba(y,T,S,F){function W(){Y?jn.processAction(y,T,T.lastEditActionCommand):jn.evalInput(y,T)}function H(ae){if(q.lastInsertModeChanges.changes.length>0){ae=T.lastEditActionCommand?ae:1;var be=q.lastInsertModeChanges;os(y,be.changes,ae)}}var q=He.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<S;re++)W(),H(1);else F||W(),H(S);T.inputState=Q,T.insertMode&&!F&&Pr(y),q.isPlaying=!1}function is(y,T){We.lookupKey(T,"vim-insert",function(S){return typeof S=="string"?We.commands[S](y):S(y),!0})}function os(y,T,S){var F=y.getCursor("head"),W=He.macroModeState.lastInsertModeChanges.visualBlock;W&&(Tr(y,F,W+1),S=y.listSelections().length,y.setCursor(F));for(var H=0;H<S;H++){W&&y.setCursor(me(F,H,0));for(var q=0;q<T.length;q++){var Y=T[q];if(Y instanceof vo)is(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=me(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}W&&y.setCursor(me(F,0,1))}function Ws(y,T,S,F){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Wr[T]||T;var W="";if(S.ctrlKey&&(W+="C-"),S.altKey&&(W+="A-"),(W||T.length>1)&&S.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&T.length==1){if(Qn.keymap&&T in Qn.keymap)(Qn.remapCtrl!==!1||!W)&&(T=Qn.keymap[T]);else if(T.charCodeAt(0)>255){var H=S.code&&S.code.slice(-1)||"";S.shiftKey||(H=H.toLowerCase()),H&&(T=H)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function ss(y){var T=new y.constructor;return Object.keys(y).forEach(function(S){if(S!="insertEnd"){var F=y[S];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=ss(F)),T[S]=F}}),y.sel&&(T.sel={head:y.sel.head&&Ke(y.sel.head),anchor:y.sel.anchor&&Ke(y.sel.anchor)}),T}function Io(y,T,S){var F=!1,W=vt.maybeInitVimState_(y),H=W.visualBlock||W.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)y.ace.exitMultiSelectMode();else if(H||!q||y.ace.inVirtualSelectionMode)F=vt.handleKey(y,T,S);else{var Y=ss(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ae=y.ace.selection;y.state.vim.lastHPos=ae.$desiredColumn==null?ae.lead.column:ae.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var be=y.getCursor("head"),ke=y.getCursor("anchor"),ve=et(be,ke)?0:-1,we=et(be,ke)?-1:0;be=me(be,0,ve),ke=me(ke,0,we),y.state.vim.sel.head=be,y.state.vim.sel.anchor=ke,F=Ti(y,T,S),ae.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=ss(Y)),re++}),y.curOp.cursorActivity&&!F&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return F&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&rs(y,W,!0),F}function Fi(y,T){T.off("beforeEndOperation",Fi);var S=T.state.cm.vimCmd;S&&T.execCommand(S.exec?S:S.name,S.args),T.curOp=T.prevOp}var pr=e("../range").Range,yo=e("../lib/event_emitter").EventEmitter,ro=e("../lib/dom"),wa=e("../lib/oop"),ul=e("../lib/keys"),Eo=e("../lib/event"),io=e("../search").Search,Ro=e("../lib/useragent"),as=e("../search_highlight").SearchHighlight,Lo=e("../commands/multi_select_commands"),xa=e("../mode/text").Mode.prototype.tokenRe,bo=e("../ext/hardwrap").hardWrap;e("../multi_select");var We=function(y){this.ace=y,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)};We.Pos=function(y,T){if(!(this instanceof Ne))return new Ne(y,T);this.line=y,this.ch=T},We.defineOption=function(y,T,S){},We.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
|
|
1406
|
+
`)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},We.keyMap={},We.addClass=We.rmClass=function(){},We.e_stop=We.e_preventDefault=Eo.stopEvent,We.keyName=function(y){var T=ul[y.keyCode]||y.key||"";return T.length==1&&(T=T.toUpperCase()),T=Eo.getModifierString(y).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+T,T},We.keyMap.default=function(y){return function(T){var S=T.ace.commands.commandKeyBinding[y.toLowerCase()];return S&&T.ace.execCommand(S)!==!1}},We.lookupKey=function y(T,S,F){S||(S="default"),typeof S=="string"&&(S=We.keyMap[S]||We.keyMap.default);var W=typeof S=="function"?S(T):S[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&F(W))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return y(T,S.fallthrough,F);for(var H=0;H<S.fallthrough.length;H++){var q=y(T,S.fallthrough[H],F);if(q)return q}}},We.findMatchingTag=function(y,T){return y.findMatchingTag(T)},We.findEnclosingTag=function(y,T){},We.signal=function(y,T,S){return y._signal(T,S)},We.on=Eo.addListener,We.off=Eo.removeListener,We.isWordChar=function(y){return y<""?/^\w$/.test(y):(xa.lastIndex=0,xa.test(y))},(function(){wa.implement(We.prototype,yo),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(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var F={text:S.action[0]=="i"?S.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=F:W.lastChange=W.change=F,this.$updateMarkers(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Lo.keyboardHandler)},this.operation=function(S,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return S();if((F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=F;var q=S();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(),!H.cursorActivity&&!H.lastChange&&W&&(this.ace.prevOp=W)),(F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,F,W){var H=W?W[S+"Handlers"]:(this._eventRegistry||{})[S];if(H){H=H.slice();for(var q=0;q<H.length;q++)H[q](this,F)}},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(S,F){typeof S=="object"&&(F=S.ch,S=S.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:F}),this.ace.selection.moveTo(S,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var F=this.ace.selection,W=S=="anchor"?F.isEmpty()?F.lead:F.anchor:S=="head"||!S?F.lead:F.getRange()[S];return m(W)},this.listSelections=function(S){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.map(function(W){return{anchor:this.clipPos(m(W.cursor==W.end?W.start:W.end)),head:this.clipPos(m(W.cursor))}},this)},this.setSelections=function(S,F){var W=this.ace.multiSelect,H=S.map(function(re){var ae=g(re.anchor),be=g(re.head),ke=pr.comparePoints(ae,be)<0?new pr.fromPoints(ae,be):new pr.fromPoints(be,ae);return ke.cursor=pr.comparePoints(ke.start,be)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}F?H[F]&&H.push(H.splice(F,1)[0]):H=H.reverse(),W.toSingleRange(H[0].clone());for(var q=this.ace.session,Y=0;Y<H.length;Y++){var Q=q.$clipRangeToDocument(H[Y]);W.addRange(Q)}},this.setSelection=function(S,F,W){var H=this.ace.selection;H.moveTo(S.line,S.ch),H.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var F=this.ace.session.$clipPositionToDocument(S.line,S.ch);return m(F)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var F=S.action=="insert",W=S.start,H=S.end,q=(H.row-W.row)*(F?1:-1),Y=(H.column-W.column)*(F?1:-1);F&&(H=W);for(var Q in this.marks){var re=this.marks[Q],ae=pr.comparePoints(re,W);if(!(ae<0)){if(ae===0&&F)if(!re.$insertRight)ae=1;else{if(re.bias!=1){re.bias=-1;continue}ae=1}var be=F?ae:pr.comparePoints(re,H);if(be>0){re.row+=q,re.column+=re.row==H.row?Y:0;continue}!F&&be<=0&&(re.row=W.row,re.column=W.column,be===0&&(re.bias=1))}}};var y=function(S,F,W,H){this.cm=S,this.id=F,this.row=W,this.column=H,S.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return m(this)},this.setBookmark=function(S,F){var W=new y(this,this.$uid++,S.line,S.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(S,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,S)}},this.findPosV=function(S,F,W,H){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(S.line,S.ch);H!=null&&(Q.column=H),Q.row+=F,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 m(re)}debugger},this.charCoords=function(S,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:W.column,top:W.row}}if(F=="local"){var H=this.ace.renderer,W=this.ace.session.documentToScreenPosition(S.line,S.ch),q=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(S,F){var W=this.ace.renderer;if(F=="local"){var H=Math.max(0,Math.floor(S.top/W.lineHeight)),q=Math.max(0,Math.floor(S.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(H,q);return m(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(S,F,W){var H=!1,q=!1;S instanceof RegExp&&!S.global&&(H=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
|
|
1407
|
+
`,q=!1);var Y=new io;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,ae=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){Y.setOptions({needle:S,caseSensitive:H,wrap:!1,backwards:be,regExp:q,start:ae||Q});var ke=Y.find(re.ace.session);return ae=ke,ae&&[!ae.isEmpty()]},from:function(){return ae&&m(ae.start)},to:function(){return ae&&m(ae.end)},replace:function(be){ae&&(ae.end=re.ace.session.doc.replace(ae,be))}}},this.scrollTo=function(S,F){var W=this.ace.renderer,H=W.layerConfig,q=H.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,F){if(S){var W=this.ace.renderer,H={top:0,bottom:F};W.scrollCursorIntoView(g(S),W.lineHeight*2/W.$size.scrollerHeight,H)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,F){return this.ace.session.getTextRange(new pr(S.line,S.ch,F.line,F.ch))},this.replaceRange=function(S,F,W){W||(W=F);var H=new pr(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,S)},this.replaceSelection=this.replaceSelections=function(S){var F=Array.isArray(S)&&S,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?S[0]||"":S);return}W.inVirtualSelectionMode=!0;var H=W.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var q=H.length;q--;)this.ace.session.replace(H[q],F?S[q]||"":S);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.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(S,F){switch(this.state[S]=F,S){case"indentWithTabs":S=T[S],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:S=T[S]}S&&this.ace.setOption(S,F)},this.getOption=function(S){var F,W=T[S];switch(W&&(F=this.ace.getOption(W)),S){case"indentWithTabs":return S=T[S],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var F=new as(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(q){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var H=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=F,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,F=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var F=this.ace.session.getTokenAt(S.line,S.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(S){var F=this.ace.session.findMatchingBracket(g(S));return{to:F&&m(F)}},this.findMatchingTag=function(S){var F=this.ace.session.getMatchingTags(g(S));if(F)return{open:{from:m(F.openTag.start),to:m(F.openTag.end)},close:{from:m(F.closeTag.start),to:m(F.closeTag.end)}}},this.indentLine=function(S,F){F===!0?this.ace.session.indentRows(S,S," "):F===!1&&this.ace.session.outdentRows(new pr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(g(S))},this.posFromIndex=function(S){return m(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,F,W,H){var q=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),g(S),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:S.line,column:S.ch+1},Y);!Q&&H.bracketRegex&&H.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Q={row:S.line,column:S.ch-1})}return Q&&{pos:m(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(We.commands.hasOwnProperty(S))return We.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var F=this.$lineHandleChanges;if(!F)return null;for(var W=S.row,H=0;H<F.length;H++){var q=F[H];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(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return m(S.$lastDelta.end)}}).call(We.prototype);var Ca=We.StringStream=function(y,T){this.pos=this.start=0,this.string=y,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ca.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(y){var T=this.string.charAt(this.pos);if(typeof y=="string")var S=T==y;else var S=T&&(y.test?y.test(T):y(T));if(S)return++this.pos,T},eatWhile:function(y){for(var T=this.pos;this.eat(y););return this.pos>T},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var T=this.string.indexOf(y,this.pos);if(T>-1)return this.pos=T,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,T,S){if(typeof y!="string"){var F=this.string.slice(this.pos).match(y);return F&&F.index>0?null:(F&&T!==!1&&(this.pos+=F[0].length),F)}var W=function(q){return S?q.toLowerCase():q},H=this.string.substr(this.pos,y.length);if(W(H)==W(y))return T!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,T){this.lineStart+=y;try{return T()}finally{this.lineStart-=y}}},We.defineExtension=function(y,T){We.prototype[y]=T},ro.importCssString(`.normal-mode .ace_cursor{
|
|
1408
|
+
border: none;
|
|
1409
|
+
background-color: rgba(255,0,0,0.5);
|
|
1410
|
+
}
|
|
1411
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
|
1412
|
+
background-color: transparent;
|
|
1413
|
+
border: 1px solid red;
|
|
1414
|
+
opacity: 0.7
|
|
1415
|
+
}
|
|
1416
|
+
.ace_dialog {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
left: 0; right: 0;
|
|
1419
|
+
background: inherit;
|
|
1420
|
+
z-index: 15;
|
|
1421
|
+
padding: .1em .8em;
|
|
1422
|
+
overflow: hidden;
|
|
1423
|
+
color: inherit;
|
|
1424
|
+
}
|
|
1425
|
+
.ace_dialog-top {
|
|
1426
|
+
border-bottom: 1px solid #444;
|
|
1427
|
+
top: 0;
|
|
1428
|
+
}
|
|
1429
|
+
.ace_dialog-bottom {
|
|
1430
|
+
border-top: 1px solid #444;
|
|
1431
|
+
bottom: 0;
|
|
1432
|
+
}
|
|
1433
|
+
.ace_dialog input {
|
|
1434
|
+
border: none;
|
|
1435
|
+
outline: none;
|
|
1436
|
+
background: transparent;
|
|
1437
|
+
width: 20em;
|
|
1438
|
+
color: inherit;
|
|
1439
|
+
font-family: monospace;
|
|
1440
|
+
}`,"vimMode",!1),function(){function y(S,F,W){var H=S.ace.container,q;return q=H.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof F=="string"?q.innerHTML=F:q.appendChild(F),q}function T(S,F){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=F}We.defineExtension("openDialog",function(S,F,W){function H(be){if(typeof be=="string")re.value=be;else{if(Y||be&&be.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 ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),T(this,null);var q=y(this,S,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],ae;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&We.on(re,"input",function(be){W.onInput(be,re.value,H)}),W.onKeyUp&&We.on(re,"keyup",function(be){W.onKeyUp(be,re.value,H)}),We.on(re,"keydown",function(be){W&&W.onKeyDown&&W.onKeyDown(be,re.value,H)||(be.keyCode==13&&F(re.value),(be.keyCode==27||W.closeOnEnter!==!1&&be.keyCode==13)&&(We.e_stop(be),H()))}),W.closeOnBlur!==!1&&We.on(re,"blur",H),re.focus()):(ae=q.getElementsByTagName("button")[0])&&(We.on(ae,"click",function(){H(),Q.focus()}),W.closeOnBlur!==!1&&We.on(ae,"blur",H),ae.focus()),H}}),We.defineExtension("openNotification",function(S,F){function W(){q||(q=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){T(this,W);var H=y(this,S,F&&F.bottom),q=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return We.on(H,"click",function(re){We.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=We.Pos,Dn=[{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"}],Oo=Dn.length,Si=[{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"}],Qn=O(""),ka=/[\d]/,No=[We.isWordChar,function(y){return y&&!We.isWordChar(y)&&!/\s/.test(y)}],Pi=[function(y){return/\S/.test(y)}],wo=["<",">"],nn=["-",'"',".",":","_","/","+"],Jt=/^\w$/,rn;try{rn=new RegExp("^[\\p{Lu}]$","u")}catch{rn=/^[A-Z]$/}var jt={};R("filetype",void 0,"string",["ft"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.getOption("mode");return S=="null"?"":S}var S=y==""?"null":y;T.setOption("mode",S)}}),R("textwidth",80,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.getOption("textwidth");return S}var F=Math.round(y);F>1&&T.setOption("textwidth",F)}});var Wi=function(){function y(Q,re,ae){function be(Oe){var Le=++W%F,Ve=Y[Le];Ve&&Ve.clear(),Y[Le]=Q.setBookmark(Oe)}var ke=W%F,ve=Y[ke];if(ve){var we=ve.find();we&&!at(we,re)&&be(re)}else be(re);be(ae),H=W,q=W-F+1,q<0&&(q=0)}function T(Q,re){W+=re,W>H?W=H:W<q&&(W=q);var ae=Y[(F+W)%F];if(ae&&!ae.find()){var be=re>0?1:-1,ke,ve=Q.getCursor();do if(W+=be,ae=Y[(F+W)%F],ae&&(ke=ae.find())&&!at(ve,ke))break;while(W<H&&W>q)}return ae}function S(Q,re){var ae=W,be=T(Q,re);return W=ae,be&&be.find()}var F=100,W=-1,H=0,q=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:S,move:T}},Hn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,T){var S=He.registerController.getRegister(T);if(S){if(S.clear(),this.latestRegister=T,y.openDialog){var F=Fr("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var He,yn,vt={enterVimMode:h,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:vo,map:function(y,T,S){Ir.map(y,T,S)},unmap:function(y,T){return Ir.unmap(y,T)},noremap:function(y,T,S){Ir.map(y,T,S,!0)},mapclear:function(y){var T=Dn.length,S=Oo,F=Dn.slice(0,T-S);if(Dn=Dn.slice(T-S),y)for(var W=F.length-1;W>=0;W--){var H=F[W];if(y!==H.context)if(H.context)this._mapCommand(H);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in H)Q[re]=H[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:z,setOption:$,getOption:k,defineOption:R,defineEx:function(y,T,S){if(!T)T=y;else if(y.indexOf(T)!==0)throw new Error('(Vim.defineEx) "'+T+'" is not a prefix of "'+y+'", command not registered');Bs[y]=S,Ir.commandMap_[T]={name:y,shortName:T,type:"api"}},handleKey:function(y,T,S){var F=this.findKey(y,T,S);if(typeof F=="function")return F()},multiSelectHandleKey:Io,findKey:function(y,T,S){function F(){var re=He.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),A(y),!0;S!="mapping"&&ts(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)gn(y);else{if(!Y.insertMode)return;Pr(y)}return A(y),!0}}function H(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),ae=T.length==1,be=jn.matchCommand(re,Dn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(be.type=="none")return A(y),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(Y.expectLiteralNext=!0),yn&&window.clearTimeout(yn),yn=ae&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(y)},k("insertModeEscKeysTimeout")),ae){var ve=y.listSelections();(!ke||ke.removed.length!=ve.length)&&(ke=Y.inputState.changeQueue=new N),ke.inserted+=T;for(var we=0;we<ve.length;we++){var Oe=lt(ve[we].anchor,ve[we].head),Le=Yt(ve[we].anchor,ve[we].head),Ve=y.getRange(Oe,y.state.overwrite?me(Le,0,1):Le);ke.removed[we]=(ke.removed[we]||"")+Ve}}return!ae}if(Y.expectLiteralNext=!1,yn&&window.clearTimeout(yn),be.command&&ke){for(var ve=y.listSelections(),we=0;we<ve.length;we++){var st=ve[we].head;y.replaceRange(ke.removed[we]||"",me(st,0,-ke.inserted.length),st,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||A(y),be.command}function q(){if(F()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ae=/^(\d*)(.*)$/.exec(re);if(!ae)return A(y),!1;var be=Y.visualMode?"visual":"normal",ke=ae[2]||ae[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var ve=jn.matchCommand(ke,Dn,Y.inputState,be);return ve.type=="none"?(A(y),!1):ve.type=="partial"?(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ve.type=="clear"?(A(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ae=/^(\d*)(.*)$/.exec(re),ae[1]&&ae[1]!="0"&&Y.inputState.pushRepeatDigit(ae[1]),ve.command)}var Y=L(y),Q;return Y.insertMode?Q=H():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)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),vt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,T){Ir.processCommand(y,T)},defineMotion:J,defineAction:le,defineOperator:ne,mapCommand:Ns,_mapCommand:es,defineRegister:U,exitVisualMode:gn,exitInsertMode:Pr},Qr=[],hn=!1,An,rr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Zr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Bi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(rr)).forEach(function(y){Bi[(rr[y]||"").toLowerCase()]=Bi[y.toLowerCase()]=y}),R("langmap",void 0,"string",["lmap"],function(y,T){if(y===void 0)return Qn.string;P(y)}),_.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},_.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},B.prototype={setText:function(y,T,S){this.keyBuffer=[y||""],this.linewise=!!T,this.blockwise=!!S},pushText:function(y,T){T&&(this.linewise||this.keyBuffer.push(`
|
|
1441
|
+
`),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Hn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(y,T,S,F,W){if(y!=="_"){F&&S.charAt(S.length-1)!==`
|
|
1442
|
+
`&&(S+=`
|
|
1443
|
+
`);var H=this.isValidRegister(y)?this.getRegister(y):null;if(!H){switch(T){case"yank":this.registers[0]=new B(S,F,W);break;case"delete":case"change":S.indexOf(`
|
|
1444
|
+
`)==-1?this.registers["-"]=new B(S,F):(this.shiftNumericRegisters_(),this.registers[1]=new B(S,F))}this.unnamedRegister.setText(S,F,W);return}var q=s(y);q?H.pushText(S,F):H.setText(S,F,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(H.toString(),F)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new B),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,nn)||Jt.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,T){var S=this.historyBuffer,F=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+F;T?W>=0:W<S.length;W+=F)for(var H=S[W],q=0;q<=H.length;q++)if(this.initialPrefix==H.substring(0,q))return this.iterator=W,H;if(W>=S.length)return this.iterator=S.length,this.initialPrefix;if(W<0)return y},pushInput:function(y){var T=this.historyBuffer.indexOf(y);T>-1&&this.historyBuffer.splice(T,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,T,S,F){var W=$e(y,T,F,S);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 H,q=0;q<W.full.length;q++){var Y=W.full[q];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var Q=Me(y);if(!Q||Q.length>1)return{type:"clear"};S.selectedCharacter=Q}return{type:"full",command:H}},processCommand:function(y,T,S){switch(T.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(y,T,S);break;case"operator":this.processOperator(y,T,S);break;case"operatorMotion":this.processOperatorMotion(y,T,S);break;case"action":this.processAction(y,T,S);break;case"search":this.processSearch(y,T,S);break;case"ex":case"keyToEx":this.processEx(y,T,S);break}},processMotion:function(y,T,S){T.inputState.motion=S.motion,T.inputState.motionArgs=de(S.motionArgs),this.evalInput(y,T)},processOperator:function(y,T,S){var F=T.inputState;if(F.operator){if(F.operator==S.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,T);return}A(y)}F.operator=S.operator,F.operatorArgs=de(S.operatorArgs),S.keys.length>1&&(F.operatorShortcut=S.keys),S.exitVisualBlock&&(T.visualBlock=!1,On(y)),T.visualMode&&this.evalInput(y,T)},processOperatorMotion:function(y,T,S){var F=T.visualMode,W=de(S.operatorMotionArgs);W&&F&&W.visualLine&&(T.visualLine=!0),this.processOperator(y,T,S),F||this.processMotion(y,T,S)},processAction:function(y,T,S){var F=T.inputState,W=F.getRepeat(),H=!!W,q=de(S.actionArgs)||{};F.selectedCharacter&&(q.selectedCharacter=F.selectedCharacter),S.operator&&this.processOperator(y,T,S),S.motion&&this.processMotion(y,T,S),(S.motion||S.operator)&&this.evalInput(y,T),q.repeat=W||1,q.repeatIsExplicit=H,q.registerName=F.registerName,A(y),T.lastMotion=null,S.isEdit&&this.recordLastEdit(T,F,S),Un[S.action](y,q,T)},processSearch:function(y,T,S){function F(Le,Ve,st){He.searchHistoryController.pushInput(Le),He.searchHistoryController.reset();try{ze(y,Le,Ve,st)}catch{Ot(y,"Invalid regex: "+Le),A(y);return}jn.processMotion(y,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function W(Le){F(Le,!0,!0);var Ve=He.macroModeState;Ve.isRecording&&Fs(Ve,Le)}function H(Le,Ve,st){var Qe=z(Le),tt,bn;Qe=="<Up>"||Qe=="<Down>"?(tt=Qe=="<Up>",bn=Le.target?Le.target.selectionEnd:0,Ve=He.searchHistoryController.nextMatch(Ve,tt)||"",st(Ve),bn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(bn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&He.searchHistoryController.reset();var ct;try{ct=ze(y,Ve,!0,!0)}catch{}ct?y.scrollIntoView(Gt(y,!Y,ct),30):(xr(y),y.scrollTo(be.left,be.top))}function q(Le,Ve,st){var Qe=z(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ve==""?(He.searchHistoryController.pushInput(Ve),He.searchHistoryController.reset(),ze(y,ae),xr(y),y.scrollTo(be.left,be.top),We.e_stop(Le),A(y),st(),y.focus()):Qe=="<Up>"||Qe=="<Down>"?We.e_stop(Le):Qe=="<C-u>"&&(We.e_stop(Le),st(""))}if(y.getSearchCursor){var Y=S.searchArgs.forward,Q=S.searchArgs.wholeWordOnly;kn(y).setReversed(!Y);var re=Y?"/":"?",ae=kn(y).getQuery(),be=y.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var ke=He.macroModeState;if(ke.isPlaying){var Oe=ke.replaySearchQueries.shift();F(Oe,!0,!1)}else wr(y,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:q});break;case"wordUnderCursor":var ve=ln(y,{noSymbol:!0}),we=!0;if(ve||(ve=ln(y,{noSymbol:!1}),we=!1),!ve){Ot(y,"No word under cursor"),A(y);return}var Oe=y.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=un(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(ve.start),F(Oe,!0,!1)}}},processEx:function(y,T,S){function F(H){He.exCommandHistoryController.pushInput(H),He.exCommandHistoryController.reset(),Ir.processCommand(y,H),y.state.vim&&A(y)}function W(H,q,Y){var Q=z(H),re,ae;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(He.exCommandHistoryController.pushInput(q),He.exCommandHistoryController.reset(),We.e_stop(H),A(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(We.e_stop(H),re=Q=="<Up>",ae=H.target?H.target.selectionEnd:0,q=He.exCommandHistoryController.nextMatch(q,re)||"",Y(q),ae&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(ae,H.target.value.length))):Q=="<C-u>"?(We.e_stop(H),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}S.type=="keyToEx"?Ir.processCommand(y,S.exArgs.input):T.visualMode?wr(y,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):wr(y,{onClose:F,prefix:":",onKeyDown:W})},evalInput:function(y,T){var S=T.inputState,F=S.motion,W=S.motionArgs||{},H=S.operator,q=S.operatorArgs||{},Y=S.registerName,Q=T.sel,re=Ke(T.visualMode?se(y,Q.head):y.getCursor("head")),ae=Ke(T.visualMode?se(y,Q.anchor):y.getCursor("anchor")),be=Ke(re),ke=Ke(ae),ve,we,Oe;if(H&&this.recordLastEdit(T,S),S.repeatOverride!==void 0?Oe=S.repeatOverride:Oe=S.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),S.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=S.selectedCharacter),W.repeat=Oe,A(y),F){var Le=mi[F](y,re,W,T,S);if(T.lastMotion=mi[F],!Le)return;if(W.toJumplist){!H&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ve=He.jumpList,st=Ve.cachedCursor;st?(Kr(y,st,Le),delete Ve.cachedCursor):Kr(y,re,Le)}Le instanceof Array?(we=Le[0],ve=Le[1]):ve=Le,ve||(ve=Ke(re)),T.visualMode?((!T.visualBlock||ve.ch!==1/0)&&(ve=se(y,ve,be)),we&&(we=se(y,we)),we=we||ke,Q.anchor=we,Q.head=ve,On(y),Yr(y,T,"<",et(we,ve)?we:ve),Yr(y,T,">",et(we,ve)?ve:we)):H||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ve=se(y,ve,be),y.setCursor(ve.line,ve.ch))}if(H){if(q.lastSel){we=ke;var Qe=q.lastSel,tt=Math.abs(Qe.head.line-Qe.anchor.line),bn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?ve=new Ne(ke.line+tt,ke.ch):Qe.visualBlock?ve=new Ne(ke.line+tt,ke.ch+bn):Qe.head.line==Qe.anchor.line?ve=new Ne(ke.line,ke.ch+bn):ve=new Ne(ke.line+tt,ke.ch),T.visualMode=!0,T.visualLine=Qe.visualLine,T.visualBlock=Qe.visualBlock,Q=T.sel={anchor:we,head:ve},On(y)}else T.visualMode&&(q.lastSel={anchor:Ke(Q.anchor),head:Ke(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var ct,Tn,bt,$t,ir;if(T.visualMode){ct=lt(Q.head,Q.anchor),Tn=Yt(Q.head,Q.anchor),bt=T.visualLine||q.linewise,$t=T.visualBlock?"block":bt?"line":"char";var Sr=w(y,ct,Tn);if(ir=yr(y,{anchor:Sr.start,head:Sr.end},$t),bt){var Mn=ir.ranges;if($t=="block")for(var V=0;V<Mn.length;V++)Mn[V].head.ch=Wt(y,Mn[V].head.line);else $t=="line"&&(Mn[0].head=new Ne(Mn[0].head.line+1,0))}}else{if(ct=Ke(we||ke),Tn=Ke(ve||be),et(Tn,ct)){var X=ct;ct=Tn,Tn=X}bt=W.linewise||q.linewise,bt?Nn(y,ct,Tn):W.forward&&Wn(y,ct,Tn),$t="char";var ie=!W.inclusive||bt,Sr=w(y,ct,Tn);ir=yr(y,{anchor:Sr.start,head:Sr.end},$t,ie)}y.setSelections(ir.ranges,ir.primary),T.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=bt;var oe=ls[H](y,q,ir.ranges,ke,ve);T.visualMode&&gn(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,T,S){var F=He.macroModeState;F.isPlaying||(y.lastEditInputState=T,y.lastEditActionCommand=S,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},mi={moveToTopLine:function(y,T,S){var F=zn(y).top+S.repeat-1;return new Ne(F,Kt(y.getLine(F)))},moveToMiddleLine:function(y){var T=zn(y),S=Math.floor((T.top+T.bottom)*.5);return new Ne(S,Kt(y.getLine(S)))},moveToBottomLine:function(y,T,S){var F=zn(y).bottom-S.repeat+1;return new Ne(F,Kt(y.getLine(F)))},expandToLine:function(y,T,S){var F=T;return new Ne(F.line+S.repeat-1,1/0)},findNext:function(y,T,S){var F=kn(y),W=F.getQuery();if(W){var H=!S.forward;return H=F.isReversed()?!H:H,St(y,W),Gt(y,H,W,S.repeat)}},findAndSelectNextInclusive:function(y,T,S,F,W){var H=kn(y),q=H.getQuery();if(q){var Y=!S.forward;Y=H.isReversed()?!Y:Y;var Q=Ht(y,Y,q,S.repeat,F);if(Q){if(W.operator)return Q;var re=Q[0],ae=new Ne(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,We.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var be=F.sel.anchor;if(be)return H.isReversed()?S.forward?[be,re]:[be,ae]:S.forward?[be,ae]:[be,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,We.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ae,re]:[re,ae]}}},goToMark:function(y,T,S,F){var W=Cr(y,F,S.selectedCharacter);return W?S.linewise?{line:W.line,ch:Kt(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,T,S,F){if(F.visualBlock&&S.sameLine){var W=F.sel;return[se(y,new Ne(W.anchor.line,W.head.ch)),se(y,new Ne(W.head.line,W.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(y,T,S,F){for(var W=T,H=0;H<S.repeat;H++){var q=W;for(var Y in F.marks)if(u(Y)){var Q=F.marks[Y].find(),re=S.forward?et(Q,q):et(q,Q);if(!re&&!(S.linewise&&Q.line==q.line)){var ae=at(q,W),be=S.forward?xn(q,Q,W):xn(W,Q,q);(ae||be)&&(W=Q)}}}return S.linewise&&(W=new Ne(W.line,Kt(y.getLine(W.line)))),W},moveByCharacters:function(y,T,S){var F=T,W=S.repeat,H=S.forward?F.ch+W:F.ch-W;return new Ne(F.line,H)},moveByLines:function(y,T,S,F){var W=T,H=W.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=F.lastHPos;break;default:F.lastHPos=H}var q=S.repeat+(S.repeatOffset||0),Y=S.forward?W.line+q:W.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(y,T,S,F);if(Y>re&&W.line==re)return to(y,T,S,F,!0);var ae=y.ace.session.getFoldLine(Y);return ae&&(S.forward?Y>ae.start.row&&(Y=ae.end.row+1):Y=ae.start.row),S.toFirstChar&&(H=Kt(y.getLine(Y)),F.lastHPos=H),F.lastHSPos=y.charCoords(new Ne(Y,H),"div").left,new Ne(Y,H)},moveByDisplayLines:function(y,T,S,F){var W=T;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=y.charCoords(W,"div").left}var H=S.repeat,Q=y.findPosV(W,S.forward?H:-H,"line",F.lastHSPos);if(Q.hitSide)if(S.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:F.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new Ne(y.firstLine(),0),"div");re.left=F.lastHSPos,Q=y.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(y,T,S){var F=T,W=S.repeat;return y.findPosV(F,S.forward?W:-W,"page")},moveByParagraph:function(y,T,S){var F=S.forward?1:-1;return hi(y,T,S.repeat,F)},moveBySentence:function(y,T,S){var F=S.forward?1:-1;return di(y,T,S.repeat,F)},moveByScroll:function(y,T,S,F){var W=y.getScrollInfo(),H=null,q=S.repeat;q||(q=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(T,"local");if(S.repeat=q,H=mi.moveByDisplayLines(y,T,S,F),!H)return null;var Q=y.charCoords(H,"local");return y.scrollTo(null,W.top+Q.top-Y.top),H},moveByWords:function(y,T,S){return Bn(y,T,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(y,T,S){var F=S.repeat,W=ui(y,F,S.forward,S.selectedCharacter,T),H=S.forward?-1:1;return Gr(H,S),W?(W.ch+=H,W):null},moveToCharacter:function(y,T,S){var F=S.repeat;return Gr(0,S),ui(y,F,S.forward,S.selectedCharacter,T)||T},moveToSymbol:function(y,T,S){var F=S.repeat;return Ai(y,F,S.forward,S.selectedCharacter)||T},moveToColumn:function(y,T,S,F){var W=S.repeat;return F.lastHPos=W-1,F.lastHSPos=y.charCoords(T,"div").left,Os(y,W)},moveToEol:function(y,T,S,F){return to(y,T,S,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,T){var S=T;return new Ne(S.line,Kt(y.getLine(S.line)))},moveToMatchedSymbol:function(y,T){for(var S=T,F=S.line,W=S.ch,H=y.getLine(F),q;W<H.length;W++)if(q=H.charAt(W),q&&c(q)){var Y=y.getTokenTypeAt(new Ne(F,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<H.length){var Q=/[<>]/.test(H[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new Ne(F,W+1),{bracketRegex:Q});return re.to}return S},moveToStartOfLine:function(y,T){return new Ne(T.line,0)},moveToLineOrEdgeOfDocument:function(y,T,S){var F=S.forward?y.lastLine():y.firstLine();return S.repeatIsExplicit&&(F=S.repeat-y.getOption("firstLineNumber")),new Ne(F,Kt(y.getLine(F)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var T=y.getCursor();return T.sticky=="before"&&T.ch--,T},textObjectManipulation:function(y,T,S,F){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},q=S.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!S.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=Cn(y,T,q,Y),!Q){var ae=y.getSearchCursor(new RegExp("\\"+q,"g"),T);ae.find()&&(Q=Cn(y,ae.from(),q,Y))}}else if(H[q])re=!0,Q=ur(y,T,q,Y);else if(q==="W"||q==="w")for(var be=S.repeat||1;be-- >0;){var ke=ln(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(q==="p")if(Q=hi(y,T,S.repeat,0,Y),S.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var ve=F.inputState.operatorArgs;ve&&(ve.linewise=!0),Q.end.line--}else if(q==="t")Q=Dr(y,T,Y);else if(q==="s"){var we=y.getLine(T.line);T.ch>0&&b(we[T.ch])&&(T.ch-=1);var Oe=Zo(y,T,S.repeat,1,Y),Le=Zo(y,T,S.repeat,-1,Y);p(y.getLine(Le.line)[Le.ch])&&p(y.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?y.state.vim.visualMode?Zt(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,T,S){var F=He.lastCharacterSearch,W=S.repeat,H=S.forward===F.forward,q=(F.increment?1:0)*(H?-1:1);y.moveH(-q,"char"),S.inclusive=!!H;var Y=ui(y,W,H,F.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),T)}},ls={change:function(y,T,S){var F,W,H=y.state.vim,q=S[0].anchor,Y=S[0].head;if(H.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),W=y.getSelection(),y.replaceSelection(""),F=q;else{W=y.getSelection();var Q=he("",S.length);y.replaceSelections(Q),F=lt(S[0].head,S[0].anchor)}else{W=y.getRange(q,Y);var re=H.lastEditInputState||{};if(re.motion=="moveByWords"&&!p(W)){var ae=/\s+$/.exec(W);ae&&re.motionArgs&&re.motionArgs.forward&&(Y=me(Y,0,-ae[0].length),W=W.slice(0,-ae[0].length))}T.linewise&&(q=new Ne(q.line,Kt(y.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),F=q}He.registerController.pushText(T.registerName,"change",W,T.linewise,S.length>1),Un.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,T,S){var F,W,H=y.state.vim;if(H.visualBlock){W=y.getSelection();var q=he("",S.length);y.replaceSelections(q),F=lt(S[0].head,S[0].anchor)}else{var Y=S[0].anchor,Q=S[0].head;T.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,Wt(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,T.linewise&&(F=mi.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText(T.registerName,"delete",W,T.linewise,H.visualBlock),se(y,F)},indent:function(y,T,S){var F=y.state.vim,W=F.visualMode?T.repeat:1;if(F.visualBlock){for(var H=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(H),Y,Q=S.length-1;Q>=0;Q--)if(Y=lt(S[Q].anchor,S[Q].head),T.indentRight)y.replaceRange(q.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),ae=0,be=0;be<W;be++){var ke=re[Y.ch+ae];if(ke==" ")ae++;else{if(ke!=" ")break;ae++;for(var ve=1;ve<q.length&&(ke=re[Y.ch+ae],ke===" ");ve++)ae++}}y.replaceRange("",Y,me(Y,0,ae))}return Y}if(y.indentMore)for(var be=0;be<W;be++)T.indentRight?y.indentMore():y.indentLess();else{var we=S[0].anchor.line,Oe=F.visualBlock?S[S.length-1].anchor.line:S[0].head.line;T.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var be=0;be<W;be++)y.indentLine(Q,T.indentRight)}return mi.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},indentAuto:function(y,T,S){return y.execCommand("indentAuto"),mi.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},hardWrap:function(y,T,S,F,W){if(y.hardWrap){var H=S[0].anchor.line,q=S[0].head.line;T.linewise&&q--;var Y=y.hardWrap({from:H,to:q});return Y>H&&T.linewise&&Y--,T.keepCursor?F:new Ne(Y,0)}},changeCase:function(y,T,S,F,W){for(var H=y.getSelections(),q=[],Y=T.toLower,Q=0;Q<H.length;Q++){var re=H[Q],ae="";if(Y===!0)ae=re.toLowerCase();else if(Y===!1)ae=re.toUpperCase();else for(var be=0;be<re.length;be++){var ke=re.charAt(be);ae+=s(ke)?ke.toLowerCase():ke.toUpperCase()}q.push(ae)}return y.replaceSelections(q),T.shouldMoveCursor?W:!y.state.vim.visualMode&&T.linewise&&S[0].anchor.line+1==S[0].head.line?mi.moveToFirstNonWhiteSpaceCharacter(y,F):T.linewise?F:lt(S[0].anchor,S[0].head)},yank:function(y,T,S,F){var W=y.state.vim,H=y.getSelection(),q=W.visualMode?lt(W.sel.anchor,W.sel.head,S[0].head,S[0].anchor):F;return He.registerController.pushText(T.registerName,"yank",H,T.linewise,W.visualBlock),q}},Un={jumpListWalk:function(y,T,S){if(!S.visualMode){var F=T.repeat,W=T.forward,H=He.jumpList,q=H.move(y,W?F:-F),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,T,S){if(!S.visualMode){var F=T.repeat||1,W=y.defaultTextHeight(),H=y.getScrollInfo().top,q=W*F,Y=T.forward?H+q:H-q,Q=Ke(y.getCursor()),re=y.charCoords(Q,"local");if(T.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var ae=Y+y.getScrollInfo().clientHeight;ae<re.bottom?(Q.line-=(re.bottom-ae)/W,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,T){var S=y.getCursor().line,F=y.charCoords(new Ne(S,0),"local"),W=y.getScrollInfo().clientHeight,H=F.top;switch(T.position){case"center":H=F.bottom-W/2;break;case"bottom":var q=new Ne(S,y.getLine(S).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-H;H=H-W+Q}y.scrollTo(null,H)},replayMacro:function(y,T,S){var F=T.selectedCharacter,W=T.repeat,H=He.macroModeState;for(F=="@"?F=H.latestRegister:H.latestRegister=F;W--;)Ds(y,S,H,F)},enterMacroRecordMode:function(y,T){var S=He.macroModeState,F=T.selectedCharacter;He.registerController.isValidRegister(F)&&S.enterMacroRecordMode(y,F)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),We.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),We.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,T,S){if(!y.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=T&&T.repeat||1;var F=T?T.insertAt:null,W=S.sel,H=T.head||y.getCursor("head"),q=y.listSelections().length;if(F=="eol")H=new Ne(H.line,Wt(y,H.line));else if(F=="bol")H=new Ne(H.line,0);else if(F=="charAfter"){var Y=w(y,H,me(H,0,1));H=Y.end}else if(F=="firstNonBlank"){var Y=w(y,H,mi.moveToFirstNonWhiteSpaceCharacter(y,H));H=Y.end}else if(F=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(H=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?H=W.head:H=new Ne(W.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(H=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?H=me(W.head,0,1):H=new Ne(W.anchor.line,0)}else if(F=="inplace"){if(S.visualMode)return}else F=="lastEdit"&&(H=mn(y)||H);y.setOption("disableInput",!1),T&&T.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),We.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),We.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",Mo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(H,{insertLeft:!0}),We.on(y.getInputField(),"keydown",Ps)),S.visualMode&&gn(y),Tr(y,H,q)}},toggleVisualMode:function(y,T,S){var F=T.repeat,W=y.getCursor(),H;if(S.visualMode)S.visualLine^T.linewise||S.visualBlock^T.blockwise?(S.visualLine=!!T.linewise,S.visualBlock=!!T.blockwise,We.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),On(y)):gn(y);else{S.visualMode=!0,S.visualLine=!!T.linewise,S.visualBlock=!!T.blockwise,H=se(y,new Ne(W.line,W.ch+F-1));var q=w(y,W,H);S.sel={anchor:q.start,head:q.end},We.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),On(y),Yr(y,S,"<",lt(W,H)),Yr(y,S,">",Yt(W,H))}},reselectLastSelection:function(y,T,S){var F=S.lastSelection;if(S.visualMode&&Lt(y,S),F){var W=F.anchorMark.find(),H=F.headMark.find();if(!W||!H)return;S.sel={anchor:W,head:H},S.visualMode=!0,S.visualLine=F.visualLine,S.visualBlock=F.visualBlock,On(y),Yr(y,S,"<",lt(W,H)),Yr(y,S,">",Yt(W,H)),We.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(y,T,S){var F,W;if(S.visualMode){if(F=y.getCursor("anchor"),W=y.getCursor("head"),et(W,F)){var H=W;W=F,F=H}W.ch=Wt(y,W.line)-1}else{var q=Math.max(T.repeat,2);F=y.getCursor(),W=se(y,new Ne(F.line+q-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Wt(y,F.line);var re="",ae=0;if(!T.keepSpaces){var be=y.getLine(F.line+1);ae=be.search(/\S/),ae==-1?ae=be.length:re=" "}y.replaceRange(re,new Ne(F.line,Y),new Ne(F.line+1,ae))}var ke=se(y,new Ne(F.line,Y));S.visualMode&&gn(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,T,S){S.insertMode=!0;var F=Ke(y.getCursor());if(F.line===y.firstLine()&&!T.after)y.replaceRange(`
|
|
1445
|
+
`,new Ne(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{F.line=T.after?F.line:F.line-1,F.ch=Wt(y,F.line),y.setCursor(F);var W=We.commands.newlineAndIndentContinueComment||We.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:T.repeat},S)},paste:function(y,T,S){var F=this,W=He.registerController.getRegister(T.registerName),H=function(){var q=W.toString();F.continuePaste(y,T,S,q,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){F.continuePaste(y,T,S,q,W)},function(){H()}):H()},continuePaste:function(y,T,S,F,W){var H=Ke(y.getCursor());if(F){if(T.matchIndent){var q=y.getOption("tabSize"),Y=function(Mn){var V=Mn.split(" ").length-1,X=Mn.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),ae=F.replace(/\n$/,""),be=F!==ae,ke=Y(F.match(/^\s*/)[0]),F=ae.replace(/^\s*/gm,function(Mn){var V=re+(Y(Mn)-ke);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});F+=be?`
|
|
1446
|
+
`:""}if(T.repeat>1)var F=Array(T.repeat+1).join(F);var ve=W.linewise,we=W.blockwise;if(we){F=F.split(`
|
|
1447
|
+
`),ve&&F.pop();for(var Oe=0;Oe<F.length;Oe++)F[Oe]=F[Oe]==""?" ":F[Oe];H.ch+=T.after?1:0,H.ch=Math.min(Wt(y,H.line),H.ch)}else ve?S.visualMode?F=S.visualLine?F.slice(0,-1):`
|
|
1448
|
+
`+F.slice(0,F.length-1)+`
|
|
1449
|
+
`:T.after?(F=`
|
|
1450
|
+
`+F.slice(0,F.length-1),H.ch=Wt(y,H.line)):H.ch=0:H.ch+=T.after?1:0;var Le;if(S.visualMode){S.lastPastedText=F;var Ve,st=je(y,S),Qe=st[0],tt=st[1],bn=y.getSelection(),ct=y.listSelections(),Tn=new Array(ct.length).join("1").split("1");S.lastSelection&&(Ve=S.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(bn),we?(y.replaceSelections(Tn),tt=new Ne(Qe.line+F.length-1,Qe.ch),y.setCursor(Qe),Xn(y,tt),y.replaceSelections(F),Le=Qe):S.visualBlock?(y.replaceSelections(Tn),y.setCursor(Qe),y.replaceRange(F,Qe,Qe),Le=Qe):(y.replaceRange(F,Qe,tt),Le=y.posFromIndex(y.indexFromPos(Qe)+F.length-1)),Ve&&(S.lastSelection.headMark=y.setBookmark(Ve)),ve&&(Le.ch=0)}else if(we){y.setCursor(H);for(var Oe=0;Oe<F.length;Oe++){var bt=H.line+Oe;bt>y.lastLine()&&y.replaceRange(`
|
|
1451
|
+
`,new Ne(bt,0));var $t=Wt(y,bt);$t<H.ch&&Ln(y,bt,H.ch)}y.setCursor(H),Xn(y,new Ne(H.line+F.length-1,H.ch)),y.replaceSelections(F),Le=H}else if(y.replaceRange(F,H),ve){var bt=T.after?H.line+1:H.line;Le=new Ne(bt,Kt(y.getLine(bt)))}else Le=Ke(H),/\n/.test(F)||(Le.ch+=F.length-(T.after?1:0));S.visualMode&&gn(y,!1),y.setCursor(Le)}},undo:function(y,T){y.operation(function(){Xe(y,We.commands.undo,T.repeat)(),y.setCursor(se(y,y.getCursor("start")))})},redo:function(y,T){Xe(y,We.commands.redo,T.repeat)()},setRegister:function(y,T,S){S.inputState.registerName=T.selectedCharacter},insertRegister:function(y,T,S){var F=T.selectedCharacter,W=He.registerController.getRegister(F),H=W&&W.toString();H&&y.replaceSelection(H)},oneNormalCommand:function(y,T,S){Pr(y,!0),S.insertModeReturn=!0,We.on(y,"vim-command-done",function F(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Un.enterInsertMode(y,{},S)),We.off(y,"vim-command-done",F))})},setMark:function(y,T,S){var F=T.selectedCharacter;Yr(y,S,F,y.getCursor())},replace:function(y,T,S){var F=T.selectedCharacter,W=y.getCursor(),H,q,Y=y.listSelections();if(S.visualMode)W=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(W.line);H=W.ch+T.repeat,H>Q.length&&(H=Q.length),q=new Ne(W.line,H)}var re=w(y,W,q);if(W=re.start,q=re.end,F==`
|
|
1452
|
+
`)S.visualMode||y.replaceRange("",W,q),(We.commands.newlineAndIndentContinueComment||We.commands.newlineAndIndent)(y);else{var ae=y.getRange(W,q);if(ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/[^\n]/g,F),S.visualBlock){var be=new Array(y.getOption("tabSize")+1).join(" ");ae=y.getSelection(),ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/\t/g,be).replace(/[^\n]/g,F).split(`
|
|
1453
|
+
`),y.replaceSelections(ae)}else y.replaceRange(ae,W,q);S.visualMode?(W=et(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),gn(y,!1)):y.setCursor(me(q,0,-1))}},incrementNumberToken:function(y,T){for(var S=y.getCursor(),F=y.getLine(S.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,q,Y,Q;(H=W.exec(F))!==null&&(q=H.index,Y=q+H[0].length,!(S.ch<Y)););if(!(!T.backtrack&&Y<=S.ch)&&H){var re=H[2]||H[4],ae=H[3]||H[5],be=T.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(H[1]+ae,ke)+be*T.repeat;Q=ve.toString(ke);var we=re?new Array(ae.length-Q.length+1+H[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(S.line,q),Le=new Ne(S.line,Y);y.replaceRange(Q,Oe,Le),y.setCursor(new Ne(S.line,q+Q.length-1))}},repeatLastEdit:function(y,T,S){var F=S.lastEditInputState;if(F){var W=T.repeat;W&&T.repeatIsExplicit?S.lastEditInputState.repeatOverride=W:W=S.lastEditInputState.repeatOverride||W,ba(y,S,W,!1)}},indent:function(y,T){y.indentLine(y.getCursor().line,T.indentRight)},exitInsertMode:Pr},$i={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},_i={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var T=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,T}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var T=y.lineText.match(/^#(\w+)/)[1];if(T==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(T==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(T==="else"&&y.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),pi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var zi={"\\n":`
|
|
1454
|
+
`,"\\r":"\r","\\t":" "},kr={"\\/":"/","\\\\":"\\","\\n":`
|
|
1455
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},Ar=0,Mr=function(){this.buildCommandMap_()};Mr.prototype={processCommand:function(y,T,S){var F=this;y.operation(function(){y.curOp.isVimOp=!0,F._processCommand(y,T,S)})},_processCommand:function(y,T,S){var F=y.state.vim,W=He.registerController.getRegister(":"),H=W.toString(),q=new We.StringStream(T);W.setText(T);var Y=S||{};Y.input=T;try{this.parseInput_(y,q,Y)}catch(ae){throw Ot(y,ae.toString()),ae}F.visualMode&&gn(y);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(H),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Ot(y,'Not an editor command ":'+T+'"');return}try{Bs[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(ae){throw Ot(y,ae.toString()),ae}},parseInput_:function(y,T,S){if(T.eatWhile(":"),T.eat("%")?(S.line=y.firstLine(),S.lineEnd=y.lastLine()):(S.line=this.parseLineSpec_(y,T),S.line!==void 0&&T.eat(",")&&(S.lineEnd=this.parseLineSpec_(y,T))),S.line==null)if(y.state.vim.visualMode){var F=Cr(y,y.state.vim,"<");S.selectionLine=F&&F.line,F=Cr(y,y.state.vim,">"),S.selectionLineEnd=F&&F.line}else S.selectionLine=y.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?S.commandName=W[1]:S.commandName=T.match(/.*/)[0],S},parseLineSpec_:function(y,T){var S=T.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(T.next()){case".":return this.parseLineSpecOffset_(T,y.getCursor().line);case"$":return this.parseLineSpecOffset_(T,y.lastLine());case"'":var F=T.next(),W=Cr(y,y.state.vim,F);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_(T,W.line);case"-":case"+":return T.backUp(1),this.parseLineSpecOffset_(T,y.getCursor().line);default:return T.backUp(1),void 0}},parseLineSpecOffset_:function(y,T){var S=y.match(/^([+-])?(\d+)/);if(S){var F=parseInt(S[2],10);S[1]=="-"?T-=F:T+=F}return T},parseCommandArgs_:function(y,T,S){if(!y.eol()){T.argString=y.match(/.*/)[0];var F=S.argDelimiter||/\s+/,W=vr(T.argString).split(F);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(y){for(var T=y.length;T>0;T--){var S=y.substring(0,T);if(this.commandMap_[S]){var F=this.commandMap_[S];if(F.name.indexOf(y)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Si.length;y++){var T=Si[y],S=T.shortName||T.name;this.commandMap_[S]=T}},map:function(y,T,S,F){if(y!=":"&&y.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var W=y.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 H={keys:y,type:"keyToKey",toKeys:T,noremap:!!F};S&&(H.context=S),Dn.unshift(H)}},unmap:function(y,T){if(y!=":"&&y.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var S=y.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var F=y,W=0;W<Dn.length;W++)if(F==Dn[W].keys&&Dn[W].context===T)return Dn.splice(W,1),!0}};var Bs={colorscheme:function(y,T){if(!T.args||T.args.length<1){Ot(y,y.getOption("theme"));return}y.setOption("theme",T.args[0])},map:function(y,T,S,F){var W=T.args;if(!W||W.length<2){y&&Ot(y,"Invalid mapping: "+T.input);return}Ir.map(W[0],W[1],S,F)},imap:function(y,T){this.map(y,T,"insert")},nmap:function(y,T){this.map(y,T,"normal")},vmap:function(y,T){this.map(y,T,"visual")},omap:function(y,T){this.map(y,T,"operatorPending")},noremap:function(y,T){this.map(y,T,void 0,!0)},inoremap:function(y,T){this.map(y,T,"insert",!0)},nnoremap:function(y,T){this.map(y,T,"normal",!0)},vnoremap:function(y,T){this.map(y,T,"visual",!0)},onoremap:function(y,T){this.map(y,T,"operatorPending",!0)},unmap:function(y,T,S){var F=T.args;(!F||F.length<1||!Ir.unmap(F[0],S))&&y&&Ot(y,"No such mapping: "+T.input)},mapclear:function(y,T){vt.mapclear()},imapclear:function(y,T){vt.mapclear("insert")},nmapclear:function(y,T){vt.mapclear("normal")},vmapclear:function(y,T){vt.mapclear("visual")},omapclear:function(y,T){vt.mapclear("operatorPending")},move:function(y,T){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:T.line+1})},set:function(y,T){var S=T.args,F=T.setCfg||{};if(!S||S.length<1){y&&Ot(y,"Invalid mapping: "+T.input);return}var W=S[0].split("="),H=W[0],q=W[1],Y=!1,Q=!1;if(H.charAt(H.length-1)=="?"){if(q)throw Error("Trailing characters: "+T.argString);H=H.substring(0,H.length-1),Y=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),Q=!0);q===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),q=!1);var re=jt[H]&&jt[H].type=="boolean";if(re&&(Q?q=!k(H,y,F):q==null&&(q=!0)),!re&&q===void 0||Y){var ae=k(H,y,F);ae instanceof Error?Ot(y,ae.message):ae===!0||ae===!1?Ot(y," "+(ae?"":"no")+H):Ot(y," "+H+"="+ae)}else{var be=$(H,q,y,F);be instanceof Error&&Ot(y,be.message)}},setlocal:function(y,T){T.setCfg={scope:"local"},this.set(y,T)},setglobal:function(y,T){T.setCfg={scope:"global"},this.set(y,T)},registers:function(y,T){var S=T.args,F=He.registerController.registers,W=`----------Registers----------
|
|
1456
|
+
|
|
1457
|
+
`;if(S){var H;S=S.join("");for(var q=0;q<S.length;q++)if(H=S.charAt(q),!!He.registerController.isValidRegister(H)){var Y=F[H]||new B;W+='"'+H+" "+Y.toString()+`
|
|
1458
|
+
`}}else for(var H in F){var Q=F[H].toString();Q.length&&(W+='"'+H+" "+Q+`
|
|
1459
|
+
`)}Ot(y,W)},sort:function(y,T){function S(){if(T.argString){var bt=new We.StringStream(T.argString);if(bt.eat("!")&&(H=!0),bt.eol())return;if(!bt.eatSpace())return"Invalid arguments";var $t=bt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!bt.eol())return"Invalid arguments";if($t[1]){q=$t[1].indexOf("i")!=-1,Y=$t[1].indexOf("u")!=-1;var ir=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,Sr=$t[1].indexOf("x")!=-1&&1,Mn=$t[1].indexOf("o")!=-1&&1;if(ir+Sr+Mn>1)return"Invalid arguments";Q=ir&&"decimal"||Sr&&"hex"||Mn&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),q?"i":""))}}function F(bt,$t){if(H){var ir;ir=bt,bt=$t,$t=ir}q&&(bt=bt.toLowerCase(),$t=$t.toLowerCase());var Sr=Q&&Le.exec(bt),Mn=Q&&Le.exec($t);return Sr?(Sr=parseInt((Sr[1]+Sr[2]).toLowerCase(),Ve),Mn=parseInt((Mn[1]+Mn[2]).toLowerCase(),Ve),Sr-Mn):bt<$t?-1:1}function W(bt,$t){if(H){var ir;ir=bt,bt=$t,$t=ir}return q&&(bt[0]=bt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),bt[0]<$t[0]?-1:1}var H,q,Y,Q,re,ae=S();if(ae){Ot(y,ae+": "+T.argString);return}var be=T.line||y.firstLine(),ke=T.lineEnd||T.line||y.lastLine();if(be!=ke){var ve=new Ne(be,0),we=new Ne(ke,Wt(y,ke)),Oe=y.getRange(ve,we).split(`
|
|
1460
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ve=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var tt=0;tt<Oe.length;tt++){var bn=re?Oe[tt].match(re):null;bn&&bn[0]!=""?st.push(bn):!re&&Le.exec(Oe[tt])?st.push(Oe[tt]):Qe.push(Oe[tt])}else Qe=Oe;if(st.sort(re?W:F),re)for(var tt=0;tt<st.length;tt++)st[tt]=st[tt].input;else Q||Qe.sort(F);if(Oe=H?st.concat(Qe):Qe.concat(st),Y){var ct=Oe,Tn;Oe=[];for(var tt=0;tt<ct.length;tt++)ct[tt]!=Tn&&Oe.push(ct[tt]),Tn=ct[tt]}y.replaceRange(Oe.join(`
|
|
1461
|
+
`),ve,we)}},vglobal:function(y,T){this.global(y,T)},normal:function(y,T){var S=T.argString;if(S&&S[0]=="!"&&(S=S.slice(1),hn=!0),S=S.trimStart(),!S){Ot(y,"Argument is required.");return}var F=T.line;if(typeof F=="number")for(var W=isNaN(T.lineEnd)?F:T.lineEnd,H=F;H<=W;H++)y.setCursor(H,0),I(y,T.argString.trimStart()),y.state.vim.insertMode&&Pr(y,!0);else I(y,T.argString.trimStart()),y.state.vim.insertMode&&Pr(y,!0)},global:function(y,T){var S=T.argString;if(!S){Ot(y,"Regular Expression missing from global");return}var F=T.commandName[0]==="v";S[0]==="!"&&T.commandName[0]==="g"&&(F=!0,S=S.slice(1));var W=T.line!==void 0?T.line:y.firstLine(),H=T.lineEnd||T.line||y.lastLine(),q=_n(S),Y=S,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{ze(y,Y,!0,!0)}catch{Ot(y,"Invalid regex: "+Y);return}for(var re=kn(y).getQuery(),ae=[],be=W;be<=H;be++){var ke=y.getLine(be),ve=re.test(ke);ve!==F&&ae.push(Q?y.getLineHandle(be):ke)}if(!Q){Ot(y,ae.join(`
|
|
1462
|
+
`));return}var we=0,Oe=function(){if(we<ae.length){var Le=ae[we++],Ve=y.getLineNumber(Le);if(Ve==null){Oe();return}var st=Ve+1+Q;Ir.processCommand(y,st,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,T){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=T.argString,F=S?fi(S,S[0]):[],W,H="",q,Y,Q,re=!1,ae=!1;if(F.length)W=F[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),H=F[1],H!==void 0&&(k("pcre")?H=Xr(H.replace(/([^\\])&/g,"$1$$&")):H=Jo(H),He.lastSubstituteReplacePart=H),q=F[2]?F[2].split(" "):[];else if(S&&S.length){Ot(y,"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&&(ae=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{ze(y,W,!0,!0)}catch{Ot(y,"Invalid regex: "+W);return}if(H=H||He.lastSubstituteReplacePart,H===void 0){Ot(y,"No previous substitute regular expression");return}var be=kn(y),ke=be.getQuery(),ve=T.line!==void 0?T.line:y.getCursor().line,we=T.lineEnd||ve;ve==y.firstLine()&&we==y.lastLine()&&(we=1/0),Q&&(ve=we,we=ve+Q-1);var Oe=se(y,new Ne(ve,0)),Le=y.getSearchCursor(ke,Oe);no(y,re,ae,ve,we,Le,ke,H,T.callback)},startinsert:function(y,T){I(y,T.argString=="!"?"A":"i",{})},redo:We.commands.redo,undo:We.commands.undo,write:function(y){We.commands.save?We.commands.save(y):y.save&&y.save()},nohlsearch:function(y){xr(y)},yank:function(y){var T=Ke(y.getCursor()),S=T.line,F=y.getLine(S);He.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,T){var S=T.selectionLine,F=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;ls.delete(y,{linewise:!0},[{anchor:new Ne(S,0),head:new Ne(F+1,0)}])},join:function(y,T){var S=T.selectionLine,F=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;y.setCursor(new Ne(S,0)),Un.joinLines(y,{repeat:F-S},y.state.vim)},delmarks:function(y,T){if(!T.argString||!vr(T.argString)){Ot(y,"Argument required");return}for(var S=y.state.vim,F=new We.StringStream(vr(T.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Ot(y,"Invalid argument: "+T.argString.substring(W));return}var H=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Ot(y,"Invalid argument: "+T.argString.substring(W));return}var q=H,Y=F.next();if(!(u(q)&&u(Y)||s(q)&&s(Y))){Ot(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Ot(y,"Invalid argument: "+T.argString.substring(W));return}for(var ae=0;ae<=re-Q;ae++){var be=String.fromCharCode(Q+ae);delete S.marks[be]}}else delete S.marks[H]}}},Ir=new Mr;R("insertModeEscKeysTimeout",200,"number"),We.Vim=vt;var Wr={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"},Ti=vt.handleKey.bind(vt);vt.handleKey=function(y,T,S){return y.operation(function(){return Ti(y,T,S)},!0)},D(),r.CodeMirror=We;var Mi=vt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,T,S,F,W){var H=this.state.vim||{},q=S.characterWidth,Y=S.lineHeight,Q=T.top,re=T.left;if(!H.insertMode){var ae=F.cursor?pr.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!ae&&re>q&&(re-=q)}!H.insertMode&&H.status&&(Y/=2,Q+=Y),ro.translate(y,re,Q),ro.setStyle(y.style,"width",q+"px"),ro.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var T=y.state.cm,S=Mi(T);if(!S.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,T,S,F,W){var H=y.editor,q=H.state.cm,Y=Mi(q);if(F!=-1){if(Y.insertMode||(T==-1?(S.charCodeAt(0)>255&&y.inputKey&&(S=y.inputKey,S&&y.inputHash==4&&(S=S.toUpperCase())),y.inputChar=S):T==4||T==0?y.inputKey==S&&y.inputHash==T&&y.inputChar?(S=y.inputChar,T=-1):(y.inputChar=null,y.inputKey=S,y.inputHash=T):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&S=="backspace"&&T==0)return{command:"gotoleft"};if(S=="c"&&T==1&&!Ro.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():q.operation(function(){gn(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=kn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(T==-1||T&1||T===0&&S.length>1){var ae=Y.insertMode,be=Ws(T,S,W||{},Y);Y.status==null&&(Y.status="");var ke=Io(q,be,"user");return Y=Mi(q),ke&&Y.status!=null?Y.status+=be:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!ke&&(T!=-1||ae)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function T(){var F=Mi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var S=new We(y);y.state.cm=S,y.$vimModeHandler=this,h(S),Mi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(Mi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(T(),S._signal("changeStatus"))}),T(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(y){var T=y.state.cm;d(T),T.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var T=y.state.cm,S=Mi(T);if(S.insertMode)return"INSERT";var F="";return S.visualMode&&(F+="VISUAL",S.visualLine&&(F+=" LINE"),S.visualBlock&&(F+=" BLOCK")),S.status&&(F+=(F?" ":"")+S.status),F}},vt.defineOption({name:"wrap",set:function(y,T){T&&T.ace.setOption("wrap",y)},type:"boolean"},!1),vt.defineEx("write","w",function(){console.log(":write is not implemented")}),Dn.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"}}),Dn.push({keys:"gq",type:"operator",operator:"hardWrap"}),vt.defineOperator("hardWrap",function(y,T,S,F,W){var H=S[0].anchor.line,q=S[0].head.line;return T.linewise&&q--,bo(y.ace,{startRow:H,endRow:q}),Ne(q,0)}),R("textwidth",void 0,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.ace.getOption("printMarginColumn");return S}var F=Math.round(y);F>1&&T.ace.setOption("printMarginColumn",F)}}),Un.aceCommand=function(y,T,S){y.vimCmd=T,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Fi):Fi(null,y.ace)},Un.fold=function(y,T,S){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},Oo=Dn.length,r.handler.defaultKeymap=Dn,r.handler.actions=Un,r.Vim=vt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(Ag)),Ag.exports}wk();var $g={},_g;function xk(){return _g||(_g=1,function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(w){return f(m(w),arguments)}function r(w,h){return e.apply(null,[w].concat(h||[]))}function f(w,h){var d=1,a=w.length,l,u="",c,i,s,p,b,x,R,$;for(c=0;c<a;c++)if(typeof w[c]=="string")u+=w[c];else if(typeof w[c]=="object"){if(s=w[c],s.keys)for(l=h[d],i=0;i<s.keys.length;i++){if(l==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[i],s.keys[i-1]));l=l[s.keys[i]]}else s.param_no?l=h[s.param_no]:l=h[d++];if(t.not_type.test(s.type)&&t.not_primitive.test(s.type)&&l instanceof Function&&(l=l()),t.numeric_arg.test(s.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(e("[sprintf] expecting number but found %T",l));switch(t.number.test(s.type)&&(R=l>=0),s.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,s.width?parseInt(s.width):0);break;case"e":l=s.precision?parseFloat(l).toExponential(s.precision):parseFloat(l).toExponential();break;case"f":l=s.precision?parseFloat(l).toFixed(s.precision):parseFloat(l);break;case"g":l=s.precision?String(Number(l.toPrecision(s.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=s.precision?l.substring(0,s.precision):l;break;case"t":l=String(!!l),l=s.precision?l.substring(0,s.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=s.precision?l.substring(0,s.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=s.precision?l.substring(0,s.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}t.json.test(s.type)?u+=l:(t.number.test(s.type)&&(!R||s.sign)?($=R?"+":"-",l=l.toString().replace(t.sign,"")):$="",b=s.pad_char?s.pad_char==="0"?"0":s.pad_char.charAt(1):" ",x=s.width-($+l).length,p=s.width&&x>0?b.repeat(x):"",u+=s.align?$+l+p:b==="0"?$+p+l:p+$+l)}return u}var g=Object.create(null);function m(w){if(g[w])return g[w];for(var h=w,d,a=[],l=0;h;){if((d=t.text.exec(h))!==null)a.push(d[0]);else if((d=t.modulo.exec(h))!==null)a.push("%");else if((d=t.placeholder.exec(h))!==null){if(d[2]){l|=1;var u=[],c=d[2],i=[];if((i=t.key.exec(c))!==null)for(u.push(i[1]);(c=c.substring(i[0].length))!=="";)if((i=t.key_access.exec(c))!==null)u.push(i[1]);else if((i=t.index_access.exec(c))!==null)u.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=u}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");h=h.substring(d[0].length)}return g[w]=a}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()}($g)),$g}xk();var Gl={exports:{}};/**
|
|
1463
|
+
* @license
|
|
1464
|
+
* Lodash <https://lodash.com/>
|
|
1465
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
1466
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1467
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1468
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1469
|
+
*/var Ck=Gl.exports,Tg;function kk(){return Tg||(Tg=1,function(n,t){(function(){var e,r="4.17.21",f=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",w="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",d=500,a="__lodash_placeholder__",l=1,u=2,c=4,i=1,s=2,p=1,b=2,x=4,R=8,$=16,k=32,C=64,L=128,D=256,E=512,I=30,z="...",P=800,O=16,_=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,J=4294967295,he=J-1,ne=J>>>1,le=[["ary",L],["bind",p],["bindKey",b],["curry",R],["curryRight",$],["flip",E],["partial",k],["partialRight",C],["rearg",D]],se="[object Arguments]",de="[object Array]",me="[object AsyncFunction]",$e="[object Boolean]",Te="[object Date]",Me="[object DOMException]",Xe="[object Error]",Ke="[object Function]",at="[object GeneratorFunction]",et="[object Map]",lt="[object Number]",Yt="[object Null]",xn="[object Object]",Wt="[object Promise]",vr="[object Proxy]",un="[object RegExp]",Ln="[object Set]",Xn="[object String]",Tr="[object Symbol]",mt="[object Undefined]",je="[object WeakMap]",Lt="[object WeakSet]",Zt="[object ArrayBuffer]",On="[object DataView]",yr="[object Float32Array]",cr="[object Float64Array]",gn="[object Int8Array]",Wn="[object Int16Array]",Nn="[object Int32Array]",Kt="[object Uint8Array]",ln="[object Uint8ClampedArray]",Dr="[object Uint16Array]",Kr="[object Uint32Array]",Gr=/\b__p \+= '';/g,Ai=/\b(__p \+=) '' \+/g,ci=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bn=/&(?:amp|lt|gt|quot|#39);/g,to=/[&<>"']/g,ui=RegExp(Bn.source),Os=RegExp(to.source),Yr=/<%-([\s\S]+?)%>/g,$n=/<%([\s\S]+?)%>/g,hi=/<%=([\s\S]+?)%>/g,Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,di=/^\w*$/,Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ur=/[\\^$.*+?()[\]{}|]/g,pi=RegExp(ur.source),kn=/^\s+/,_n=/\s/,br=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fi=/\{\n\/\* \[wrapped with (.+)\] \*/,go=/,? & /,mo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jo=/[()=,{}\[\]\/\s]/,Xr=/\\(\\)?/g,gi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fr=/\w*$/,Ot=/^[-+]0x[0-9a-f]+$/i,To=/^0b[01]+$/i,wr=/^\[object .+?Constructor\]$/,ce=/^0o[0-7]+$/i,ze=/^(?:0|[1-9]\d*)$/,Fe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,St=/($^)/,Gt=/['\n\r\u2028\u2029\\]/g,Ht="\\ud800-\\udfff",xr="\\u0300-\\u036f",hr="\\ufe20-\\ufe2f",zn="\\u20d0-\\u20ff",Cr=xr+hr+zn,mn="\\u2700-\\u27bf",no="a-z\\xdf-\\xf6\\xf8-\\xff",Pr="\\xac\\xb1\\xd7\\xf7",es="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ns="\\u2000-\\u206f",Ds=" \\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",ts="A-Z\\xc0-\\xd6\\xd8-\\xde",dr="\\ufe0e\\ufe0f",Fs=Pr+es+Ns+Ds,Mo="['’]",ns="["+Ht+"]",rs="["+Fs+"]",vo="["+Cr+"]",Ps="\\d+",ba="["+mn+"]",is="["+no+"]",os="[^"+Ht+Fs+Ps+mn+no+ts+"]",Ws="\\ud83c[\\udffb-\\udfff]",ss="(?:"+vo+"|"+Ws+")",Io="[^"+Ht+"]",Fi="(?:\\ud83c[\\udde6-\\uddff]){2}",pr="[\\ud800-\\udbff][\\udc00-\\udfff]",yo="["+ts+"]",ro="\\u200d",wa="(?:"+is+"|"+os+")",ul="(?:"+yo+"|"+os+")",Eo="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",io="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Ro=ss+"?",as="["+dr+"]?",Lo="(?:"+ro+"(?:"+[Io,Fi,pr].join("|")+")"+as+Ro+")*",xa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",We=as+Ro+Lo,Ca="(?:"+[ba,Fi,pr].join("|")+")"+We,Ne="(?:"+[Io+vo+"?",vo,Fi,pr,ns].join("|")+")",Dn=RegExp(Mo,"g"),Oo=RegExp(vo,"g"),Si=RegExp(Ws+"(?="+Ws+")|"+Ne+We,"g"),Qn=RegExp([yo+"?"+is+"+"+Eo+"(?="+[rs,yo,"$"].join("|")+")",ul+"+"+io+"(?="+[rs,yo+wa,"$"].join("|")+")",yo+"?"+wa+"+"+Eo,yo+"+"+io,bo,xa,Ps,Ca].join("|"),"g"),ka=RegExp("["+ro+Ht+Cr+dr+"]"),No=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pi=["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"],wo=-1,nn={};nn[yr]=nn[cr]=nn[gn]=nn[Wn]=nn[Nn]=nn[Kt]=nn[ln]=nn[Dr]=nn[Kr]=!0,nn[se]=nn[de]=nn[Zt]=nn[$e]=nn[On]=nn[Te]=nn[Xe]=nn[Ke]=nn[et]=nn[lt]=nn[xn]=nn[un]=nn[Ln]=nn[Xn]=nn[je]=!1;var Jt={};Jt[se]=Jt[de]=Jt[Zt]=Jt[On]=Jt[$e]=Jt[Te]=Jt[yr]=Jt[cr]=Jt[gn]=Jt[Wn]=Jt[Nn]=Jt[et]=Jt[lt]=Jt[xn]=Jt[un]=Jt[Ln]=Jt[Xn]=Jt[Tr]=Jt[Kt]=Jt[ln]=Jt[Dr]=Jt[Kr]=!0,Jt[Xe]=Jt[Ke]=Jt[je]=!1;var rn={À:"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"},jt={"&":"&","<":"<",">":">",'"':""","'":"'"},Wi={"&":"&","<":"<",">":">",""":'"',"'":"'"},Hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,yn=parseInt,vt=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo,Qr=typeof self=="object"&&self&&self.Object===Object&&self,hn=vt||Qr||Function("return this")(),An=t&&!t.nodeType&&t,rr=An&&!0&&n&&!n.nodeType&&n,Zr=rr&&rr.exports===An,Bi=Zr&&vt.process,jn=function(){try{var fe=rr&&rr.require&&rr.require("util").types;return fe||Bi&&Bi.binding&&Bi.binding("util")}catch{}}(),mi=jn&&jn.isArrayBuffer,ls=jn&&jn.isDate,Un=jn&&jn.isMap,$i=jn&&jn.isRegExp,_i=jn&&jn.isSet,zi=jn&&jn.isTypedArray;function kr(fe,_e,Ce){switch(Ce.length){case 0:return fe.call(_e);case 1:return fe.call(_e,Ce[0]);case 2:return fe.call(_e,Ce[0],Ce[1]);case 3:return fe.call(_e,Ce[0],Ce[1],Ce[2])}return fe.apply(_e,Ce)}function Ar(fe,_e,Ce,Ue){for(var ut=-1,_t=fe==null?0:fe.length;++ut<_t;){var Xt=fe[ut];_e(Ue,Xt,Ce(Xt),fe)}return Ue}function Mr(fe,_e){for(var Ce=-1,Ue=fe==null?0:fe.length;++Ce<Ue&&_e(fe[Ce],Ce,fe)!==!1;);return fe}function Bs(fe,_e){for(var Ce=fe==null?0:fe.length;Ce--&&_e(fe[Ce],Ce,fe)!==!1;);return fe}function Ir(fe,_e){for(var Ce=-1,Ue=fe==null?0:fe.length;++Ce<Ue;)if(!_e(fe[Ce],Ce,fe))return!1;return!0}function Wr(fe,_e){for(var Ce=-1,Ue=fe==null?0:fe.length,ut=0,_t=[];++Ce<Ue;){var Xt=fe[Ce];_e(Xt,Ce,fe)&&(_t[ut++]=Xt)}return _t}function Ti(fe,_e){var Ce=fe==null?0:fe.length;return!!Ce&&ae(fe,_e,0)>-1}function Mi(fe,_e,Ce){for(var Ue=-1,ut=fe==null?0:fe.length;++Ue<ut;)if(Ce(_e,fe[Ue]))return!0;return!1}function y(fe,_e){for(var Ce=-1,Ue=fe==null?0:fe.length,ut=Array(Ue);++Ce<Ue;)ut[Ce]=_e(fe[Ce],Ce,fe);return ut}function T(fe,_e){for(var Ce=-1,Ue=_e.length,ut=fe.length;++Ce<Ue;)fe[ut+Ce]=_e[Ce];return fe}function S(fe,_e,Ce,Ue){var ut=-1,_t=fe==null?0:fe.length;for(Ue&&_t&&(Ce=fe[++ut]);++ut<_t;)Ce=_e(Ce,fe[ut],ut,fe);return Ce}function F(fe,_e,Ce,Ue){var ut=fe==null?0:fe.length;for(Ue&&ut&&(Ce=fe[--ut]);ut--;)Ce=_e(Ce,fe[ut],ut,fe);return Ce}function W(fe,_e){for(var Ce=-1,Ue=fe==null?0:fe.length;++Ce<Ue;)if(_e(fe[Ce],Ce,fe))return!0;return!1}var H=we("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(mo)||[]}function Q(fe,_e,Ce){var Ue;return Ce(fe,function(ut,_t,Xt){if(_e(ut,_t,Xt))return Ue=_t,!1}),Ue}function re(fe,_e,Ce,Ue){for(var ut=fe.length,_t=Ce+(Ue?1:-1);Ue?_t--:++_t<ut;)if(_e(fe[_t],_t,fe))return _t;return-1}function ae(fe,_e,Ce){return _e===_e?Ze(fe,_e,Ce):re(fe,ke,Ce)}function be(fe,_e,Ce,Ue){for(var ut=Ce-1,_t=fe.length;++ut<_t;)if(Ue(fe[ut],_e))return ut;return-1}function ke(fe){return fe!==fe}function ve(fe,_e){var Ce=fe==null?0:fe.length;return Ce?st(fe,_e)/Ce:Z}function we(fe){return function(_e){return _e==null?e:_e[fe]}}function Oe(fe){return function(_e){return fe==null?e:fe[_e]}}function Le(fe,_e,Ce,Ue,ut){return ut(fe,function(_t,Xt,It){Ce=Ue?(Ue=!1,_t):_e(Ce,_t,Xt,It)}),Ce}function Ve(fe,_e){var Ce=fe.length;for(fe.sort(_e);Ce--;)fe[Ce]=fe[Ce].value;return fe}function st(fe,_e){for(var Ce,Ue=-1,ut=fe.length;++Ue<ut;){var _t=_e(fe[Ue]);_t!==e&&(Ce=Ce===e?_t:Ce+_t)}return Ce}function Qe(fe,_e){for(var Ce=-1,Ue=Array(fe);++Ce<fe;)Ue[Ce]=_e(Ce);return Ue}function tt(fe,_e){return y(_e,function(Ce){return[Ce,fe[Ce]]})}function bn(fe){return fe&&fe.slice(0,Nt(fe)+1).replace(kn,"")}function ct(fe){return function(_e){return fe(_e)}}function Tn(fe,_e){return y(_e,function(Ce){return fe[Ce]})}function bt(fe,_e){return fe.has(_e)}function $t(fe,_e){for(var Ce=-1,Ue=fe.length;++Ce<Ue&&ae(_e,fe[Ce],0)>-1;);return Ce}function ir(fe,_e){for(var Ce=fe.length;Ce--&&ae(_e,fe[Ce],0)>-1;);return Ce}function Sr(fe,_e){for(var Ce=fe.length,Ue=0;Ce--;)fe[Ce]===_e&&++Ue;return Ue}var Mn=Oe(rn),V=Oe(jt);function X(fe){return"\\"+Hn[fe]}function ie(fe,_e){return fe==null?e:fe[_e]}function oe(fe){return ka.test(fe)}function ge(fe){return No.test(fe)}function xe(fe){for(var _e,Ce=[];!(_e=fe.next()).done;)Ce.push(_e.value);return Ce}function Ie(fe){var _e=-1,Ce=Array(fe.size);return fe.forEach(function(Ue,ut){Ce[++_e]=[ut,Ue]}),Ce}function Pe(fe,_e){return function(Ce){return fe(_e(Ce))}}function Be(fe,_e){for(var Ce=-1,Ue=fe.length,ut=0,_t=[];++Ce<Ue;){var Xt=fe[Ce];(Xt===_e||Xt===a)&&(fe[Ce]=a,_t[ut++]=Ce)}return _t}function qe(fe){var _e=-1,Ce=Array(fe.size);return fe.forEach(function(Ue){Ce[++_e]=Ue}),Ce}function Ye(fe){var _e=-1,Ce=Array(fe.size);return fe.forEach(function(Ue){Ce[++_e]=[Ue,Ue]}),Ce}function Ze(fe,_e,Ce){for(var Ue=Ce-1,ut=fe.length;++Ue<ut;)if(fe[Ue]===_e)return Ue;return-1}function yt(fe,_e,Ce){for(var Ue=Ce+1;Ue--;)if(fe[Ue]===_e)return Ue;return Ue}function Ft(fe){return oe(fe)?rt(fe):H(fe)}function wt(fe){return oe(fe)?vn(fe):q(fe)}function Nt(fe){for(var _e=fe.length;_e--&&_n.test(fe.charAt(_e)););return _e}var dt=Oe(Wi);function rt(fe){for(var _e=Si.lastIndex=0;Si.test(fe);)++_e;return _e}function vn(fe){return fe.match(Si)||[]}function In(fe){return fe.match(Qn)||[]}var or=function fe(_e){_e=_e==null?hn:Vt.defaults(hn.Object(),_e,Vt.pick(hn,Pi));var Ce=_e.Array,Ue=_e.Date,ut=_e.Error,_t=_e.Function,Xt=_e.Math,It=_e.Object,Jr=_e.RegExp,Hi=_e.String,dn=_e.TypeError,$r=Ce.prototype,Do=_t.prototype,Vn=It.prototype,zs=_e["__core-js_shared__"],Ec=Do.toString,cn=Vn.hasOwnProperty,HI=0,gb=function(){var o=/[^.]+$/.exec(zs&&zs.keys&&zs.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Rc=Vn.toString,jI=Ec.call(It),UI=hn._,VI=Jr("^"+Ec.call(cn).replace(ur,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lc=Zr?_e.Buffer:e,cs=_e.Symbol,Oc=_e.Uint8Array,mb=Lc?Lc.allocUnsafe:e,Nc=Pe(It.getPrototypeOf,It),vb=It.create,yb=Vn.propertyIsEnumerable,Dc=$r.splice,bb=cs?cs.isConcatSpreadable:e,hl=cs?cs.iterator:e,Hs=cs?cs.toStringTag:e,Fc=function(){try{var o=Ks(It,"defineProperty");return o({},"",{}),o}catch{}}(),qI=_e.clearTimeout!==hn.clearTimeout&&_e.clearTimeout,KI=Ue&&Ue.now!==hn.Date.now&&Ue.now,GI=_e.setTimeout!==hn.setTimeout&&_e.setTimeout,Pc=Xt.ceil,Wc=Xt.floor,Ed=It.getOwnPropertySymbols,YI=Lc?Lc.isBuffer:e,wb=_e.isFinite,XI=$r.join,QI=Pe(It.keys,It),fr=Xt.max,Br=Xt.min,ZI=Ue.now,JI=_e.parseInt,xb=Xt.random,eE=$r.reverse,Rd=Ks(_e,"DataView"),dl=Ks(_e,"Map"),Ld=Ks(_e,"Promise"),Aa=Ks(_e,"Set"),pl=Ks(_e,"WeakMap"),fl=Ks(It,"create"),Bc=pl&&new pl,Sa={},tE=Gs(Rd),nE=Gs(dl),rE=Gs(Ld),iE=Gs(Aa),oE=Gs(pl),zc=cs?cs.prototype:e,gl=zc?zc.valueOf:e,Cb=zc?zc.toString:e;function ee(o){if(qn(o)&&!Ct(o)&&!(o instanceof Ut)){if(o instanceof ji)return o;if(cn.call(o,"__wrapped__"))return k0(o)}return new ji(o)}var $a=function(){function o(){}return function(v){if(!Fn(v))return{};if(vb)return vb(v);o.prototype=v;var M=new o;return o.prototype=e,M}}();function Hc(){}function ji(o,v){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}ee.templateSettings={escape:Yr,evaluate:$n,interpolate:hi,variable:"",imports:{_:ee}},ee.prototype=Hc.prototype,ee.prototype.constructor=ee,ji.prototype=$a(Hc.prototype),ji.prototype.constructor=ji;function Ut(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function sE(){var o=new Ut(this.__wrapped__);return o.__actions__=vi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=vi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=vi(this.__views__),o}function aE(){if(this.__filtered__){var o=new Ut(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function lE(){var o=this.__wrapped__.value(),v=this.__dir__,M=Ct(o),j=v<0,G=M?o.length:0,te=wR(0,G,this.__views__),ue=te.start,pe=te.end,ye=pe-ue,Ee=j?pe:ue-1,Re=this.__iteratees__,De=Re.length,Ge=0,nt=Br(ye,this.__takeCount__);if(!M||!j&&G==ye&&nt==ye)return qb(o,this.__actions__);var ft=[];e:for(;ye--&&Ge<nt;){Ee+=v;for(var Et=-1,gt=o[Ee];++Et<De;){var Bt=Re[Et],qt=Bt.iteratee,Ri=Bt.type,ni=qt(gt);if(Ri==A)gt=ni;else if(!ni){if(Ri==_)continue e;break e}}ft[Ge++]=gt}return ft}Ut.prototype=$a(Hc.prototype),Ut.prototype.constructor=Ut;function js(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function cE(){this.__data__=fl?fl(null):{},this.size=0}function uE(o){var v=this.has(o)&&delete this.__data__[o];return this.size-=v?1:0,v}function hE(o){var v=this.__data__;if(fl){var M=v[o];return M===h?e:M}return cn.call(v,o)?v[o]:e}function dE(o){var v=this.__data__;return fl?v[o]!==e:cn.call(v,o)}function pE(o,v){var M=this.__data__;return this.size+=this.has(o)?0:1,M[o]=fl&&v===e?h:v,this}js.prototype.clear=cE,js.prototype.delete=uE,js.prototype.get=hE,js.prototype.has=dE,js.prototype.set=pE;function Fo(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function fE(){this.__data__=[],this.size=0}function gE(o){var v=this.__data__,M=jc(v,o);if(M<0)return!1;var j=v.length-1;return M==j?v.pop():Dc.call(v,M,1),--this.size,!0}function mE(o){var v=this.__data__,M=jc(v,o);return M<0?e:v[M][1]}function vE(o){return jc(this.__data__,o)>-1}function yE(o,v){var M=this.__data__,j=jc(M,o);return j<0?(++this.size,M.push([o,v])):M[j][1]=v,this}Fo.prototype.clear=fE,Fo.prototype.delete=gE,Fo.prototype.get=mE,Fo.prototype.has=vE,Fo.prototype.set=yE;function Po(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function bE(){this.size=0,this.__data__={hash:new js,map:new(dl||Fo),string:new js}}function wE(o){var v=tu(this,o).delete(o);return this.size-=v?1:0,v}function xE(o){return tu(this,o).get(o)}function CE(o){return tu(this,o).has(o)}function kE(o,v){var M=tu(this,o),j=M.size;return M.set(o,v),this.size+=M.size==j?0:1,this}Po.prototype.clear=bE,Po.prototype.delete=wE,Po.prototype.get=xE,Po.prototype.has=CE,Po.prototype.set=kE;function Us(o){var v=-1,M=o==null?0:o.length;for(this.__data__=new Po;++v<M;)this.add(o[v])}function AE(o){return this.__data__.set(o,h),this}function SE(o){return this.__data__.has(o)}Us.prototype.add=Us.prototype.push=AE,Us.prototype.has=SE;function oo(o){var v=this.__data__=new Fo(o);this.size=v.size}function $E(){this.__data__=new Fo,this.size=0}function _E(o){var v=this.__data__,M=v.delete(o);return this.size=v.size,M}function TE(o){return this.__data__.get(o)}function ME(o){return this.__data__.has(o)}function IE(o,v){var M=this.__data__;if(M instanceof Fo){var j=M.__data__;if(!dl||j.length<f-1)return j.push([o,v]),this.size=++M.size,this;M=this.__data__=new Po(j)}return M.set(o,v),this.size=M.size,this}oo.prototype.clear=$E,oo.prototype.delete=_E,oo.prototype.get=TE,oo.prototype.has=ME,oo.prototype.set=IE;function kb(o,v){var M=Ct(o),j=!M&&Ys(o),G=!M&&!j&&fs(o),te=!M&&!j&&!G&&Ia(o),ue=M||j||G||te,pe=ue?Qe(o.length,Hi):[],ye=pe.length;for(var Ee in o)(v||cn.call(o,Ee))&&!(ue&&(Ee=="length"||G&&(Ee=="offset"||Ee=="parent")||te&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Ho(Ee,ye)))&&pe.push(Ee);return pe}function Ab(o){var v=o.length;return v?o[Ud(0,v-1)]:e}function EE(o,v){return nu(vi(o),Vs(v,0,o.length))}function RE(o){return nu(vi(o))}function Od(o,v,M){(M!==e&&!so(o[v],M)||M===e&&!(v in o))&&Wo(o,v,M)}function ml(o,v,M){var j=o[v];(!(cn.call(o,v)&&so(j,M))||M===e&&!(v in o))&&Wo(o,v,M)}function jc(o,v){for(var M=o.length;M--;)if(so(o[M][0],v))return M;return-1}function LE(o,v,M,j){return us(o,function(G,te,ue){v(j,G,M(G),ue)}),j}function Sb(o,v){return o&&Co(v,_r(v),o)}function OE(o,v){return o&&Co(v,bi(v),o)}function Wo(o,v,M){v=="__proto__"&&Fc?Fc(o,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):o[v]=M}function Nd(o,v){for(var M=-1,j=v.length,G=Ce(j),te=o==null;++M<j;)G[M]=te?e:gp(o,v[M]);return G}function Vs(o,v,M){return o===o&&(M!==e&&(o=o<=M?o:M),v!==e&&(o=o>=v?o:v)),o}function Ui(o,v,M,j,G,te){var ue,pe=v&l,ye=v&u,Ee=v&c;if(M&&(ue=G?M(o,j,G,te):M(o)),ue!==e)return ue;if(!Fn(o))return o;var Re=Ct(o);if(Re){if(ue=CR(o),!pe)return vi(o,ue)}else{var De=zr(o),Ge=De==Ke||De==at;if(fs(o))return Yb(o,pe);if(De==xn||De==se||Ge&&!G){if(ue=ye||Ge?{}:f0(o),!pe)return ye?hR(o,OE(ue,o)):uR(o,Sb(ue,o))}else{if(!Jt[De])return G?o:{};ue=kR(o,De,pe)}}te||(te=new oo);var nt=te.get(o);if(nt)return nt;te.set(o,ue),j0(o)?o.forEach(function(gt){ue.add(Ui(gt,v,M,gt,o,te))}):z0(o)&&o.forEach(function(gt,Bt){ue.set(Bt,Ui(gt,v,M,Bt,o,te))});var ft=Ee?ye?tp:ep:ye?bi:_r,Et=Re?e:ft(o);return Mr(Et||o,function(gt,Bt){Et&&(Bt=gt,gt=o[Bt]),ml(ue,Bt,Ui(gt,v,M,Bt,o,te))}),ue}function NE(o){var v=_r(o);return function(M){return $b(M,o,v)}}function $b(o,v,M){var j=M.length;if(o==null)return!j;for(o=It(o);j--;){var G=M[j],te=v[G],ue=o[G];if(ue===e&&!(G in o)||!te(ue))return!1}return!0}function _b(o,v,M){if(typeof o!="function")throw new dn(m);return kl(function(){o.apply(e,M)},v)}function vl(o,v,M,j){var G=-1,te=Ti,ue=!0,pe=o.length,ye=[],Ee=v.length;if(!pe)return ye;M&&(v=y(v,ct(M))),j?(te=Mi,ue=!1):v.length>=f&&(te=bt,ue=!1,v=new Us(v));e:for(;++G<pe;){var Re=o[G],De=M==null?Re:M(Re);if(Re=j||Re!==0?Re:0,ue&&De===De){for(var Ge=Ee;Ge--;)if(v[Ge]===De)continue e;ye.push(Re)}else te(v,De,j)||ye.push(Re)}return ye}var us=e0(xo),Tb=e0(Fd,!0);function DE(o,v){var M=!0;return us(o,function(j,G,te){return M=!!v(j,G,te),M}),M}function Uc(o,v,M){for(var j=-1,G=o.length;++j<G;){var te=o[j],ue=v(te);if(ue!=null&&(pe===e?ue===ue&&!Ei(ue):M(ue,pe)))var pe=ue,ye=te}return ye}function FE(o,v,M,j){var G=o.length;for(M=Mt(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:Mt(j),j<0&&(j+=G),j=M>j?0:V0(j);M<j;)o[M++]=v;return o}function Mb(o,v){var M=[];return us(o,function(j,G,te){v(j,G,te)&&M.push(j)}),M}function Er(o,v,M,j,G){var te=-1,ue=o.length;for(M||(M=SR),G||(G=[]);++te<ue;){var pe=o[te];v>0&&M(pe)?v>1?Er(pe,v-1,M,j,G):T(G,pe):j||(G[G.length]=pe)}return G}var Dd=t0(),Ib=t0(!0);function xo(o,v){return o&&Dd(o,v,_r)}function Fd(o,v){return o&&Ib(o,v,_r)}function Vc(o,v){return Wr(v,function(M){return jo(o[M])})}function qs(o,v){v=ds(v,o);for(var M=0,j=v.length;o!=null&&M<j;)o=o[ko(v[M++])];return M&&M==j?o:e}function Eb(o,v,M){var j=v(o);return Ct(o)?j:T(j,M(o))}function ei(o){return o==null?o===e?mt:Yt:Hs&&Hs in It(o)?bR(o):RR(o)}function Pd(o,v){return o>v}function PE(o,v){return o!=null&&cn.call(o,v)}function WE(o,v){return o!=null&&v in It(o)}function BE(o,v,M){return o>=Br(v,M)&&o<fr(v,M)}function Wd(o,v,M){for(var j=M?Mi:Ti,G=o[0].length,te=o.length,ue=te,pe=Ce(te),ye=1/0,Ee=[];ue--;){var Re=o[ue];ue&&v&&(Re=y(Re,ct(v))),ye=Br(Re.length,ye),pe[ue]=!M&&(v||G>=120&&Re.length>=120)?new Us(ue&&Re):e}Re=o[0];var De=-1,Ge=pe[0];e:for(;++De<G&&Ee.length<ye;){var nt=Re[De],ft=v?v(nt):nt;if(nt=M||nt!==0?nt:0,!(Ge?bt(Ge,ft):j(Ee,ft,M))){for(ue=te;--ue;){var Et=pe[ue];if(!(Et?bt(Et,ft):j(o[ue],ft,M)))continue e}Ge&&Ge.push(ft),Ee.push(nt)}}return Ee}function zE(o,v,M,j){return xo(o,function(G,te,ue){v(j,M(G),te,ue)}),j}function yl(o,v,M){v=ds(v,o),o=y0(o,v);var j=o==null?o:o[ko(qi(v))];return j==null?e:kr(j,o,M)}function Rb(o){return qn(o)&&ei(o)==se}function HE(o){return qn(o)&&ei(o)==Zt}function jE(o){return qn(o)&&ei(o)==Te}function bl(o,v,M,j,G){return o===v?!0:o==null||v==null||!qn(o)&&!qn(v)?o!==o&&v!==v:UE(o,v,M,j,bl,G)}function UE(o,v,M,j,G,te){var ue=Ct(o),pe=Ct(v),ye=ue?de:zr(o),Ee=pe?de:zr(v);ye=ye==se?xn:ye,Ee=Ee==se?xn:Ee;var Re=ye==xn,De=Ee==xn,Ge=ye==Ee;if(Ge&&fs(o)){if(!fs(v))return!1;ue=!0,Re=!1}if(Ge&&!Re)return te||(te=new oo),ue||Ia(o)?h0(o,v,M,j,G,te):vR(o,v,ye,M,j,G,te);if(!(M&i)){var nt=Re&&cn.call(o,"__wrapped__"),ft=De&&cn.call(v,"__wrapped__");if(nt||ft){var Et=nt?o.value():o,gt=ft?v.value():v;return te||(te=new oo),G(Et,gt,M,j,te)}}return Ge?(te||(te=new oo),yR(o,v,M,j,G,te)):!1}function VE(o){return qn(o)&&zr(o)==et}function Bd(o,v,M,j){var G=M.length,te=G,ue=!j;if(o==null)return!te;for(o=It(o);G--;){var pe=M[G];if(ue&&pe[2]?pe[1]!==o[pe[0]]:!(pe[0]in o))return!1}for(;++G<te;){pe=M[G];var ye=pe[0],Ee=o[ye],Re=pe[1];if(ue&&pe[2]){if(Ee===e&&!(ye in o))return!1}else{var De=new oo;if(j)var Ge=j(Ee,Re,ye,o,v,De);if(!(Ge===e?bl(Re,Ee,i|s,j,De):Ge))return!1}}return!0}function Lb(o){if(!Fn(o)||_R(o))return!1;var v=jo(o)?VI:wr;return v.test(Gs(o))}function qE(o){return qn(o)&&ei(o)==un}function KE(o){return qn(o)&&zr(o)==Ln}function GE(o){return qn(o)&&lu(o.length)&&!!nn[ei(o)]}function Ob(o){return typeof o=="function"?o:o==null?wi:typeof o=="object"?Ct(o)?Fb(o[0],o[1]):Db(o):nw(o)}function zd(o){if(!Cl(o))return QI(o);var v=[];for(var M in It(o))cn.call(o,M)&&M!="constructor"&&v.push(M);return v}function YE(o){if(!Fn(o))return ER(o);var v=Cl(o),M=[];for(var j in o)j=="constructor"&&(v||!cn.call(o,j))||M.push(j);return M}function Hd(o,v){return o<v}function Nb(o,v){var M=-1,j=yi(o)?Ce(o.length):[];return us(o,function(G,te,ue){j[++M]=v(G,te,ue)}),j}function Db(o){var v=rp(o);return v.length==1&&v[0][2]?m0(v[0][0],v[0][1]):function(M){return M===o||Bd(M,o,v)}}function Fb(o,v){return op(o)&&g0(v)?m0(ko(o),v):function(M){var j=gp(M,o);return j===e&&j===v?mp(M,o):bl(v,j,i|s)}}function qc(o,v,M,j,G){o!==v&&Dd(v,function(te,ue){if(G||(G=new oo),Fn(te))XE(o,v,ue,M,qc,j,G);else{var pe=j?j(ap(o,ue),te,ue+"",o,v,G):e;pe===e&&(pe=te),Od(o,ue,pe)}},bi)}function XE(o,v,M,j,G,te,ue){var pe=ap(o,M),ye=ap(v,M),Ee=ue.get(ye);if(Ee){Od(o,M,Ee);return}var Re=te?te(pe,ye,M+"",o,v,ue):e,De=Re===e;if(De){var Ge=Ct(ye),nt=!Ge&&fs(ye),ft=!Ge&&!nt&&Ia(ye);Re=ye,Ge||nt||ft?Ct(pe)?Re=pe:Zn(pe)?Re=vi(pe):nt?(De=!1,Re=Yb(ye,!0)):ft?(De=!1,Re=Xb(ye,!0)):Re=[]:Al(ye)||Ys(ye)?(Re=pe,Ys(pe)?Re=q0(pe):(!Fn(pe)||jo(pe))&&(Re=f0(ye))):De=!1}De&&(ue.set(ye,Re),G(Re,ye,j,te,ue),ue.delete(ye)),Od(o,M,Re)}function Pb(o,v){var M=o.length;if(M)return v+=v<0?M:0,Ho(v,M)?o[v]:e}function Wb(o,v,M){v.length?v=y(v,function(te){return Ct(te)?function(ue){return qs(ue,te.length===1?te[0]:te)}:te}):v=[wi];var j=-1;v=y(v,ct(pt()));var G=Nb(o,function(te,ue,pe){var ye=y(v,function(Ee){return Ee(te)});return{criteria:ye,index:++j,value:te}});return Ve(G,function(te,ue){return cR(te,ue,M)})}function QE(o,v){return Bb(o,v,function(M,j){return mp(o,j)})}function Bb(o,v,M){for(var j=-1,G=v.length,te={};++j<G;){var ue=v[j],pe=qs(o,ue);M(pe,ue)&&wl(te,ds(ue,o),pe)}return te}function ZE(o){return function(v){return qs(v,o)}}function jd(o,v,M,j){var G=j?be:ae,te=-1,ue=v.length,pe=o;for(o===v&&(v=vi(v)),M&&(pe=y(o,ct(M)));++te<ue;)for(var ye=0,Ee=v[te],Re=M?M(Ee):Ee;(ye=G(pe,Re,ye,j))>-1;)pe!==o&&Dc.call(pe,ye,1),Dc.call(o,ye,1);return o}function zb(o,v){for(var M=o?v.length:0,j=M-1;M--;){var G=v[M];if(M==j||G!==te){var te=G;Ho(G)?Dc.call(o,G,1):Kd(o,G)}}return o}function Ud(o,v){return o+Wc(xb()*(v-o+1))}function JE(o,v,M,j){for(var G=-1,te=fr(Pc((v-o)/(M||1)),0),ue=Ce(te);te--;)ue[j?te:++G]=o,o+=M;return ue}function Vd(o,v){var M="";if(!o||v<1||v>U)return M;do v%2&&(M+=o),v=Wc(v/2),v&&(o+=o);while(v);return M}function Dt(o,v){return lp(v0(o,v,wi),o+"")}function eR(o){return Ab(Ea(o))}function tR(o,v){var M=Ea(o);return nu(M,Vs(v,0,M.length))}function wl(o,v,M,j){if(!Fn(o))return o;v=ds(v,o);for(var G=-1,te=v.length,ue=te-1,pe=o;pe!=null&&++G<te;){var ye=ko(v[G]),Ee=M;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return o;if(G!=ue){var Re=pe[ye];Ee=j?j(Re,ye,pe):e,Ee===e&&(Ee=Fn(Re)?Re:Ho(v[G+1])?[]:{})}ml(pe,ye,Ee),pe=pe[ye]}return o}var Hb=Bc?function(o,v){return Bc.set(o,v),o}:wi,nR=Fc?function(o,v){return Fc(o,"toString",{configurable:!0,enumerable:!1,value:yp(v),writable:!0})}:wi;function rR(o){return nu(Ea(o))}function Vi(o,v,M){var j=-1,G=o.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var te=Ce(G);++j<G;)te[j]=o[j+v];return te}function iR(o,v){var M;return us(o,function(j,G,te){return M=v(j,G,te),!M}),!!M}function Kc(o,v,M){var j=0,G=o==null?j:o.length;if(typeof v=="number"&&v===v&&G<=ne){for(;j<G;){var te=j+G>>>1,ue=o[te];ue!==null&&!Ei(ue)&&(M?ue<=v:ue<v)?j=te+1:G=te}return G}return qd(o,v,wi,M)}function qd(o,v,M,j){var G=0,te=o==null?0:o.length;if(te===0)return 0;v=M(v);for(var ue=v!==v,pe=v===null,ye=Ei(v),Ee=v===e;G<te;){var Re=Wc((G+te)/2),De=M(o[Re]),Ge=De!==e,nt=De===null,ft=De===De,Et=Ei(De);if(ue)var gt=j||ft;else Ee?gt=ft&&(j||Ge):pe?gt=ft&&Ge&&(j||!nt):ye?gt=ft&&Ge&&!nt&&(j||!Et):nt||Et?gt=!1:gt=j?De<=v:De<v;gt?G=Re+1:te=Re}return Br(te,he)}function jb(o,v){for(var M=-1,j=o.length,G=0,te=[];++M<j;){var ue=o[M],pe=v?v(ue):ue;if(!M||!so(pe,ye)){var ye=pe;te[G++]=ue===0?0:ue}}return te}function Ub(o){return typeof o=="number"?o:Ei(o)?Z:+o}function Ii(o){if(typeof o=="string")return o;if(Ct(o))return y(o,Ii)+"";if(Ei(o))return Cb?Cb.call(o):"";var v=o+"";return v=="0"&&1/o==-B?"-0":v}function hs(o,v,M){var j=-1,G=Ti,te=o.length,ue=!0,pe=[],ye=pe;if(M)ue=!1,G=Mi;else if(te>=f){var Ee=v?null:gR(o);if(Ee)return qe(Ee);ue=!1,G=bt,ye=new Us}else ye=v?[]:pe;e:for(;++j<te;){var Re=o[j],De=v?v(Re):Re;if(Re=M||Re!==0?Re:0,ue&&De===De){for(var Ge=ye.length;Ge--;)if(ye[Ge]===De)continue e;v&&ye.push(De),pe.push(Re)}else G(ye,De,M)||(ye!==pe&&ye.push(De),pe.push(Re))}return pe}function Kd(o,v){return v=ds(v,o),o=y0(o,v),o==null||delete o[ko(qi(v))]}function Vb(o,v,M,j){return wl(o,v,M(qs(o,v)),j)}function Gc(o,v,M,j){for(var G=o.length,te=j?G:-1;(j?te--:++te<G)&&v(o[te],te,o););return M?Vi(o,j?0:te,j?te+1:G):Vi(o,j?te+1:0,j?G:te)}function qb(o,v){var M=o;return M instanceof Ut&&(M=M.value()),S(v,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function Gd(o,v,M){var j=o.length;if(j<2)return j?hs(o[0]):[];for(var G=-1,te=Ce(j);++G<j;)for(var ue=o[G],pe=-1;++pe<j;)pe!=G&&(te[G]=vl(te[G]||ue,o[pe],v,M));return hs(Er(te,1),v,M)}function Kb(o,v,M){for(var j=-1,G=o.length,te=v.length,ue={};++j<G;){var pe=j<te?v[j]:e;M(ue,o[j],pe)}return ue}function Yd(o){return Zn(o)?o:[]}function Xd(o){return typeof o=="function"?o:wi}function ds(o,v){return Ct(o)?o:op(o,v)?[o]:C0(sn(o))}var oR=Dt;function ps(o,v,M){var j=o.length;return M=M===e?j:M,!v&&M>=j?o:Vi(o,v,M)}var Gb=qI||function(o){return hn.clearTimeout(o)};function Yb(o,v){if(v)return o.slice();var M=o.length,j=mb?mb(M):new o.constructor(M);return o.copy(j),j}function Qd(o){var v=new o.constructor(o.byteLength);return new Oc(v).set(new Oc(o)),v}function sR(o,v){var M=v?Qd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.byteLength)}function aR(o){var v=new o.constructor(o.source,Fr.exec(o));return v.lastIndex=o.lastIndex,v}function lR(o){return gl?It(gl.call(o)):{}}function Xb(o,v){var M=v?Qd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.length)}function Qb(o,v){if(o!==v){var M=o!==e,j=o===null,G=o===o,te=Ei(o),ue=v!==e,pe=v===null,ye=v===v,Ee=Ei(v);if(!pe&&!Ee&&!te&&o>v||te&&ue&&ye&&!pe&&!Ee||j&&ue&&ye||!M&&ye||!G)return 1;if(!j&&!te&&!Ee&&o<v||Ee&&M&&G&&!j&&!te||pe&&M&&G||!ue&&G||!ye)return-1}return 0}function cR(o,v,M){for(var j=-1,G=o.criteria,te=v.criteria,ue=G.length,pe=M.length;++j<ue;){var ye=Qb(G[j],te[j]);if(ye){if(j>=pe)return ye;var Ee=M[j];return ye*(Ee=="desc"?-1:1)}}return o.index-v.index}function Zb(o,v,M,j){for(var G=-1,te=o.length,ue=M.length,pe=-1,ye=v.length,Ee=fr(te-ue,0),Re=Ce(ye+Ee),De=!j;++pe<ye;)Re[pe]=v[pe];for(;++G<ue;)(De||G<te)&&(Re[M[G]]=o[G]);for(;Ee--;)Re[pe++]=o[G++];return Re}function Jb(o,v,M,j){for(var G=-1,te=o.length,ue=-1,pe=M.length,ye=-1,Ee=v.length,Re=fr(te-pe,0),De=Ce(Re+Ee),Ge=!j;++G<Re;)De[G]=o[G];for(var nt=G;++ye<Ee;)De[nt+ye]=v[ye];for(;++ue<pe;)(Ge||G<te)&&(De[nt+M[ue]]=o[G++]);return De}function vi(o,v){var M=-1,j=o.length;for(v||(v=Ce(j));++M<j;)v[M]=o[M];return v}function Co(o,v,M,j){var G=!M;M||(M={});for(var te=-1,ue=v.length;++te<ue;){var pe=v[te],ye=j?j(M[pe],o[pe],pe,M,o):e;ye===e&&(ye=o[pe]),G?Wo(M,pe,ye):ml(M,pe,ye)}return M}function uR(o,v){return Co(o,ip(o),v)}function hR(o,v){return Co(o,d0(o),v)}function Yc(o,v){return function(M,j){var G=Ct(M)?Ar:LE,te=v?v():{};return G(M,o,pt(j,2),te)}}function _a(o){return Dt(function(v,M){var j=-1,G=M.length,te=G>1?M[G-1]:e,ue=G>2?M[2]:e;for(te=o.length>3&&typeof te=="function"?(G--,te):e,ue&&ti(M[0],M[1],ue)&&(te=G<3?e:te,G=1),v=It(v);++j<G;){var pe=M[j];pe&&o(v,pe,j,te)}return v})}function e0(o,v){return function(M,j){if(M==null)return M;if(!yi(M))return o(M,j);for(var G=M.length,te=v?G:-1,ue=It(M);(v?te--:++te<G)&&j(ue[te],te,ue)!==!1;);return M}}function t0(o){return function(v,M,j){for(var G=-1,te=It(v),ue=j(v),pe=ue.length;pe--;){var ye=ue[o?pe:++G];if(M(te[ye],ye,te)===!1)break}return v}}function dR(o,v,M){var j=v&p,G=xl(o);function te(){var ue=this&&this!==hn&&this instanceof te?G:o;return ue.apply(j?M:this,arguments)}return te}function n0(o){return function(v){v=sn(v);var M=oe(v)?wt(v):e,j=M?M[0]:v.charAt(0),G=M?ps(M,1).join(""):v.slice(1);return j[o]()+G}}function Ta(o){return function(v){return S(ew(J0(v).replace(Dn,"")),o,"")}}function xl(o){return function(){var v=arguments;switch(v.length){case 0:return new o;case 1:return new o(v[0]);case 2:return new o(v[0],v[1]);case 3:return new o(v[0],v[1],v[2]);case 4:return new o(v[0],v[1],v[2],v[3]);case 5:return new o(v[0],v[1],v[2],v[3],v[4]);case 6:return new o(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new o(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=$a(o.prototype),j=o.apply(M,v);return Fn(j)?j:M}}function pR(o,v,M){var j=xl(o);function G(){for(var te=arguments.length,ue=Ce(te),pe=te,ye=Ma(G);pe--;)ue[pe]=arguments[pe];var Ee=te<3&&ue[0]!==ye&&ue[te-1]!==ye?[]:Be(ue,ye);if(te-=Ee.length,te<M)return a0(o,v,Xc,G.placeholder,e,ue,Ee,e,e,M-te);var Re=this&&this!==hn&&this instanceof G?j:o;return kr(Re,this,ue)}return G}function r0(o){return function(v,M,j){var G=It(v);if(!yi(v)){var te=pt(M,3);v=_r(v),M=function(pe){return te(G[pe],pe,G)}}var ue=o(v,M,j);return ue>-1?G[te?v[ue]:ue]:e}}function i0(o){return zo(function(v){var M=v.length,j=M,G=ji.prototype.thru;for(o&&v.reverse();j--;){var te=v[j];if(typeof te!="function")throw new dn(m);if(G&&!ue&&eu(te)=="wrapper")var ue=new ji([],!0)}for(j=ue?j:M;++j<M;){te=v[j];var pe=eu(te),ye=pe=="wrapper"?np(te):e;ye&&sp(ye[0])&&ye[1]==(L|R|k|D)&&!ye[4].length&&ye[9]==1?ue=ue[eu(ye[0])].apply(ue,ye[3]):ue=te.length==1&&sp(te)?ue[pe]():ue.thru(te)}return function(){var Ee=arguments,Re=Ee[0];if(ue&&Ee.length==1&&Ct(Re))return ue.plant(Re).value();for(var De=0,Ge=M?v[De].apply(this,Ee):Re;++De<M;)Ge=v[De].call(this,Ge);return Ge}})}function Xc(o,v,M,j,G,te,ue,pe,ye,Ee){var Re=v&L,De=v&p,Ge=v&b,nt=v&(R|$),ft=v&E,Et=Ge?e:xl(o);function gt(){for(var Bt=arguments.length,qt=Ce(Bt),Ri=Bt;Ri--;)qt[Ri]=arguments[Ri];if(nt)var ni=Ma(gt),Li=Sr(qt,ni);if(j&&(qt=Zb(qt,j,G,nt)),te&&(qt=Jb(qt,te,ue,nt)),Bt-=Li,nt&&Bt<Ee){var Jn=Be(qt,ni);return a0(o,v,Xc,gt.placeholder,M,qt,Jn,pe,ye,Ee-Bt)}var ao=De?M:this,Vo=Ge?ao[o]:o;return Bt=qt.length,pe?qt=LR(qt,pe):ft&&Bt>1&&qt.reverse(),Re&&ye<Bt&&(qt.length=ye),this&&this!==hn&&this instanceof gt&&(Vo=Et||xl(Vo)),Vo.apply(ao,qt)}return gt}function o0(o,v){return function(M,j){return zE(M,o,v(j),{})}}function Qc(o,v){return function(M,j){var G;if(M===e&&j===e)return v;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=Ii(M),j=Ii(j)):(M=Ub(M),j=Ub(j)),G=o(M,j)}return G}}function Zd(o){return zo(function(v){return v=y(v,ct(pt())),Dt(function(M){var j=this;return o(v,function(G){return kr(G,j,M)})})})}function Zc(o,v){v=v===e?" ":Ii(v);var M=v.length;if(M<2)return M?Vd(v,o):v;var j=Vd(v,Pc(o/Ft(v)));return oe(v)?ps(wt(j),0,o).join(""):j.slice(0,o)}function fR(o,v,M,j){var G=v&p,te=xl(o);function ue(){for(var pe=-1,ye=arguments.length,Ee=-1,Re=j.length,De=Ce(Re+ye),Ge=this&&this!==hn&&this instanceof ue?te:o;++Ee<Re;)De[Ee]=j[Ee];for(;ye--;)De[Ee++]=arguments[++pe];return kr(Ge,G?M:this,De)}return ue}function s0(o){return function(v,M,j){return j&&typeof j!="number"&&ti(v,M,j)&&(M=j=e),v=Uo(v),M===e?(M=v,v=0):M=Uo(M),j=j===e?v<M?1:-1:Uo(j),JE(v,M,j,o)}}function Jc(o){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Ki(v),M=Ki(M)),o(v,M)}}function a0(o,v,M,j,G,te,ue,pe,ye,Ee){var Re=v&R,De=Re?ue:e,Ge=Re?e:ue,nt=Re?te:e,ft=Re?e:te;v|=Re?k:C,v&=~(Re?C:k),v&x||(v&=-4);var Et=[o,v,G,nt,De,ft,Ge,pe,ye,Ee],gt=M.apply(e,Et);return sp(o)&&b0(gt,Et),gt.placeholder=j,w0(gt,o,v)}function Jd(o){var v=Xt[o];return function(M,j){if(M=Ki(M),j=j==null?0:Br(Mt(j),292),j&&wb(M)){var G=(sn(M)+"e").split("e"),te=v(G[0]+"e"+(+G[1]+j));return G=(sn(te)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return v(M)}}var gR=Aa&&1/qe(new Aa([,-0]))[1]==B?function(o){return new Aa(o)}:xp;function l0(o){return function(v){var M=zr(v);return M==et?Ie(v):M==Ln?Ye(v):tt(v,o(v))}}function Bo(o,v,M,j,G,te,ue,pe){var ye=v&b;if(!ye&&typeof o!="function")throw new dn(m);var Ee=j?j.length:0;if(Ee||(v&=-97,j=G=e),ue=ue===e?ue:fr(Mt(ue),0),pe=pe===e?pe:Mt(pe),Ee-=G?G.length:0,v&C){var Re=j,De=G;j=G=e}var Ge=ye?e:np(o),nt=[o,v,M,j,G,Re,De,te,ue,pe];if(Ge&&IR(nt,Ge),o=nt[0],v=nt[1],M=nt[2],j=nt[3],G=nt[4],pe=nt[9]=nt[9]===e?ye?0:o.length:fr(nt[9]-Ee,0),!pe&&v&(R|$)&&(v&=-25),!v||v==p)var ft=dR(o,v,M);else v==R||v==$?ft=pR(o,v,pe):(v==k||v==(p|k))&&!G.length?ft=fR(o,v,M,j):ft=Xc.apply(e,nt);var Et=Ge?Hb:b0;return w0(Et(ft,nt),o,v)}function c0(o,v,M,j){return o===e||so(o,Vn[M])&&!cn.call(j,M)?v:o}function u0(o,v,M,j,G,te){return Fn(o)&&Fn(v)&&(te.set(v,o),qc(o,v,e,u0,te),te.delete(v)),o}function mR(o){return Al(o)?e:o}function h0(o,v,M,j,G,te){var ue=M&i,pe=o.length,ye=v.length;if(pe!=ye&&!(ue&&ye>pe))return!1;var Ee=te.get(o),Re=te.get(v);if(Ee&&Re)return Ee==v&&Re==o;var De=-1,Ge=!0,nt=M&s?new Us:e;for(te.set(o,v),te.set(v,o);++De<pe;){var ft=o[De],Et=v[De];if(j)var gt=ue?j(Et,ft,De,v,o,te):j(ft,Et,De,o,v,te);if(gt!==e){if(gt)continue;Ge=!1;break}if(nt){if(!W(v,function(Bt,qt){if(!bt(nt,qt)&&(ft===Bt||G(ft,Bt,M,j,te)))return nt.push(qt)})){Ge=!1;break}}else if(!(ft===Et||G(ft,Et,M,j,te))){Ge=!1;break}}return te.delete(o),te.delete(v),Ge}function vR(o,v,M,j,G,te,ue){switch(M){case On:if(o.byteLength!=v.byteLength||o.byteOffset!=v.byteOffset)return!1;o=o.buffer,v=v.buffer;case Zt:return!(o.byteLength!=v.byteLength||!te(new Oc(o),new Oc(v)));case $e:case Te:case lt:return so(+o,+v);case Xe:return o.name==v.name&&o.message==v.message;case un:case Xn:return o==v+"";case et:var pe=Ie;case Ln:var ye=j&i;if(pe||(pe=qe),o.size!=v.size&&!ye)return!1;var Ee=ue.get(o);if(Ee)return Ee==v;j|=s,ue.set(o,v);var Re=h0(pe(o),pe(v),j,G,te,ue);return ue.delete(o),Re;case Tr:if(gl)return gl.call(o)==gl.call(v)}return!1}function yR(o,v,M,j,G,te){var ue=M&i,pe=ep(o),ye=pe.length,Ee=ep(v),Re=Ee.length;if(ye!=Re&&!ue)return!1;for(var De=ye;De--;){var Ge=pe[De];if(!(ue?Ge in v:cn.call(v,Ge)))return!1}var nt=te.get(o),ft=te.get(v);if(nt&&ft)return nt==v&&ft==o;var Et=!0;te.set(o,v),te.set(v,o);for(var gt=ue;++De<ye;){Ge=pe[De];var Bt=o[Ge],qt=v[Ge];if(j)var Ri=ue?j(qt,Bt,Ge,v,o,te):j(Bt,qt,Ge,o,v,te);if(!(Ri===e?Bt===qt||G(Bt,qt,M,j,te):Ri)){Et=!1;break}gt||(gt=Ge=="constructor")}if(Et&&!gt){var ni=o.constructor,Li=v.constructor;ni!=Li&&"constructor"in o&&"constructor"in v&&!(typeof ni=="function"&&ni instanceof ni&&typeof Li=="function"&&Li instanceof Li)&&(Et=!1)}return te.delete(o),te.delete(v),Et}function zo(o){return lp(v0(o,e,$0),o+"")}function ep(o){return Eb(o,_r,ip)}function tp(o){return Eb(o,bi,d0)}var np=Bc?function(o){return Bc.get(o)}:xp;function eu(o){for(var v=o.name+"",M=Sa[v],j=cn.call(Sa,v)?M.length:0;j--;){var G=M[j],te=G.func;if(te==null||te==o)return G.name}return v}function Ma(o){var v=cn.call(ee,"placeholder")?ee:o;return v.placeholder}function pt(){var o=ee.iteratee||bp;return o=o===bp?Ob:o,arguments.length?o(arguments[0],arguments[1]):o}function tu(o,v){var M=o.__data__;return $R(v)?M[typeof v=="string"?"string":"hash"]:M.map}function rp(o){for(var v=_r(o),M=v.length;M--;){var j=v[M],G=o[j];v[M]=[j,G,g0(G)]}return v}function Ks(o,v){var M=ie(o,v);return Lb(M)?M:e}function bR(o){var v=cn.call(o,Hs),M=o[Hs];try{o[Hs]=e;var j=!0}catch{}var G=Rc.call(o);return j&&(v?o[Hs]=M:delete o[Hs]),G}var ip=Ed?function(o){return o==null?[]:(o=It(o),Wr(Ed(o),function(v){return yb.call(o,v)}))}:Cp,d0=Ed?function(o){for(var v=[];o;)T(v,ip(o)),o=Nc(o);return v}:Cp,zr=ei;(Rd&&zr(new Rd(new ArrayBuffer(1)))!=On||dl&&zr(new dl)!=et||Ld&&zr(Ld.resolve())!=Wt||Aa&&zr(new Aa)!=Ln||pl&&zr(new pl)!=je)&&(zr=function(o){var v=ei(o),M=v==xn?o.constructor:e,j=M?Gs(M):"";if(j)switch(j){case tE:return On;case nE:return et;case rE:return Wt;case iE:return Ln;case oE:return je}return v});function wR(o,v,M){for(var j=-1,G=M.length;++j<G;){var te=M[j],ue=te.size;switch(te.type){case"drop":o+=ue;break;case"dropRight":v-=ue;break;case"take":v=Br(v,o+ue);break;case"takeRight":o=fr(o,v-ue);break}}return{start:o,end:v}}function xR(o){var v=o.match(fi);return v?v[1].split(go):[]}function p0(o,v,M){v=ds(v,o);for(var j=-1,G=v.length,te=!1;++j<G;){var ue=ko(v[j]);if(!(te=o!=null&&M(o,ue)))break;o=o[ue]}return te||++j!=G?te:(G=o==null?0:o.length,!!G&&lu(G)&&Ho(ue,G)&&(Ct(o)||Ys(o)))}function CR(o){var v=o.length,M=new o.constructor(v);return v&&typeof o[0]=="string"&&cn.call(o,"index")&&(M.index=o.index,M.input=o.input),M}function f0(o){return typeof o.constructor=="function"&&!Cl(o)?$a(Nc(o)):{}}function kR(o,v,M){var j=o.constructor;switch(v){case Zt:return Qd(o);case $e:case Te:return new j(+o);case On:return sR(o,M);case yr:case cr:case gn:case Wn:case Nn:case Kt:case ln:case Dr:case Kr:return Xb(o,M);case et:return new j;case lt:case Xn:return new j(o);case un:return aR(o);case Ln:return new j;case Tr:return lR(o)}}function AR(o,v){var M=v.length;if(!M)return o;var j=M-1;return v[j]=(M>1?"& ":"")+v[j],v=v.join(M>2?", ":" "),o.replace(br,`{
|
|
1470
|
+
/* [wrapped with `+v+`] */
|
|
1471
|
+
`)}function SR(o){return Ct(o)||Ys(o)||!!(bb&&o&&o[bb])}function Ho(o,v){var M=typeof o;return v=v??U,!!v&&(M=="number"||M!="symbol"&&ze.test(o))&&o>-1&&o%1==0&&o<v}function ti(o,v,M){if(!Fn(M))return!1;var j=typeof v;return(j=="number"?yi(M)&&Ho(v,M.length):j=="string"&&v in M)?so(M[v],o):!1}function op(o,v){if(Ct(o))return!1;var M=typeof o;return M=="number"||M=="symbol"||M=="boolean"||o==null||Ei(o)?!0:di.test(o)||!Zo.test(o)||v!=null&&o in It(v)}function $R(o){var v=typeof o;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?o!=="__proto__":o===null}function sp(o){var v=eu(o),M=ee[v];if(typeof M!="function"||!(v in Ut.prototype))return!1;if(o===M)return!0;var j=np(M);return!!j&&o===j[0]}function _R(o){return!!gb&&gb in o}var TR=zs?jo:kp;function Cl(o){var v=o&&o.constructor,M=typeof v=="function"&&v.prototype||Vn;return o===M}function g0(o){return o===o&&!Fn(o)}function m0(o,v){return function(M){return M==null?!1:M[o]===v&&(v!==e||o in It(M))}}function MR(o){var v=su(o,function(j){return M.size===d&&M.clear(),j}),M=v.cache;return v}function IR(o,v){var M=o[1],j=v[1],G=M|j,te=G<(p|b|L),ue=j==L&&M==R||j==L&&M==D&&o[7].length<=v[8]||j==(L|D)&&v[7].length<=v[8]&&M==R;if(!(te||ue))return o;j&p&&(o[2]=v[2],G|=M&p?0:x);var pe=v[3];if(pe){var ye=o[3];o[3]=ye?Zb(ye,pe,v[4]):pe,o[4]=ye?Be(o[3],a):v[4]}return pe=v[5],pe&&(ye=o[5],o[5]=ye?Jb(ye,pe,v[6]):pe,o[6]=ye?Be(o[5],a):v[6]),pe=v[7],pe&&(o[7]=pe),j&L&&(o[8]=o[8]==null?v[8]:Br(o[8],v[8])),o[9]==null&&(o[9]=v[9]),o[0]=v[0],o[1]=G,o}function ER(o){var v=[];if(o!=null)for(var M in It(o))v.push(M);return v}function RR(o){return Rc.call(o)}function v0(o,v,M){return v=fr(v===e?o.length-1:v,0),function(){for(var j=arguments,G=-1,te=fr(j.length-v,0),ue=Ce(te);++G<te;)ue[G]=j[v+G];G=-1;for(var pe=Ce(v+1);++G<v;)pe[G]=j[G];return pe[v]=M(ue),kr(o,this,pe)}}function y0(o,v){return v.length<2?o:qs(o,Vi(v,0,-1))}function LR(o,v){for(var M=o.length,j=Br(v.length,M),G=vi(o);j--;){var te=v[j];o[j]=Ho(te,M)?G[te]:e}return o}function ap(o,v){if(!(v==="constructor"&&typeof o[v]=="function")&&v!="__proto__")return o[v]}var b0=x0(Hb),kl=GI||function(o,v){return hn.setTimeout(o,v)},lp=x0(nR);function w0(o,v,M){var j=v+"";return lp(o,AR(j,OR(xR(j),M)))}function x0(o){var v=0,M=0;return function(){var j=ZI(),G=O-(j-M);if(M=j,G>0){if(++v>=P)return arguments[0]}else v=0;return o.apply(e,arguments)}}function nu(o,v){var M=-1,j=o.length,G=j-1;for(v=v===e?j:v;++M<v;){var te=Ud(M,G),ue=o[te];o[te]=o[M],o[M]=ue}return o.length=v,o}var C0=MR(function(o){var v=[];return o.charCodeAt(0)===46&&v.push(""),o.replace(Cn,function(M,j,G,te){v.push(G?te.replace(Xr,"$1"):j||M)}),v});function ko(o){if(typeof o=="string"||Ei(o))return o;var v=o+"";return v=="0"&&1/o==-B?"-0":v}function Gs(o){if(o!=null){try{return Ec.call(o)}catch{}try{return o+""}catch{}}return""}function OR(o,v){return Mr(le,function(M){var j="_."+M[0];v&M[1]&&!Ti(o,j)&&o.push(j)}),o.sort()}function k0(o){if(o instanceof Ut)return o.clone();var v=new ji(o.__wrapped__,o.__chain__);return v.__actions__=vi(o.__actions__),v.__index__=o.__index__,v.__values__=o.__values__,v}function NR(o,v,M){(M?ti(o,v,M):v===e)?v=1:v=fr(Mt(v),0);var j=o==null?0:o.length;if(!j||v<1)return[];for(var G=0,te=0,ue=Ce(Pc(j/v));G<j;)ue[te++]=Vi(o,G,G+=v);return ue}function DR(o){for(var v=-1,M=o==null?0:o.length,j=0,G=[];++v<M;){var te=o[v];te&&(G[j++]=te)}return G}function FR(){var o=arguments.length;if(!o)return[];for(var v=Ce(o-1),M=arguments[0],j=o;j--;)v[j-1]=arguments[j];return T(Ct(M)?vi(M):[M],Er(v,1))}var PR=Dt(function(o,v){return Zn(o)?vl(o,Er(v,1,Zn,!0)):[]}),WR=Dt(function(o,v){var M=qi(v);return Zn(M)&&(M=e),Zn(o)?vl(o,Er(v,1,Zn,!0),pt(M,2)):[]}),BR=Dt(function(o,v){var M=qi(v);return Zn(M)&&(M=e),Zn(o)?vl(o,Er(v,1,Zn,!0),e,M):[]});function zR(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===e?1:Mt(v),Vi(o,v<0?0:v,j)):[]}function HR(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===e?1:Mt(v),v=j-v,Vi(o,0,v<0?0:v)):[]}function jR(o,v){return o&&o.length?Gc(o,pt(v,3),!0,!0):[]}function UR(o,v){return o&&o.length?Gc(o,pt(v,3),!0):[]}function VR(o,v,M,j){var G=o==null?0:o.length;return G?(M&&typeof M!="number"&&ti(o,v,M)&&(M=0,j=G),FE(o,v,M,j)):[]}function A0(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:Mt(M);return G<0&&(G=fr(j+G,0)),re(o,pt(v,3),G)}function S0(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=j-1;return M!==e&&(G=Mt(M),G=M<0?fr(j+G,0):Br(G,j-1)),re(o,pt(v,3),G,!0)}function $0(o){var v=o==null?0:o.length;return v?Er(o,1):[]}function qR(o){var v=o==null?0:o.length;return v?Er(o,B):[]}function KR(o,v){var M=o==null?0:o.length;return M?(v=v===e?1:Mt(v),Er(o,v)):[]}function GR(o){for(var v=-1,M=o==null?0:o.length,j={};++v<M;){var G=o[v];j[G[0]]=G[1]}return j}function _0(o){return o&&o.length?o[0]:e}function YR(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:Mt(M);return G<0&&(G=fr(j+G,0)),ae(o,v,G)}function XR(o){var v=o==null?0:o.length;return v?Vi(o,0,-1):[]}var QR=Dt(function(o){var v=y(o,Yd);return v.length&&v[0]===o[0]?Wd(v):[]}),ZR=Dt(function(o){var v=qi(o),M=y(o,Yd);return v===qi(M)?v=e:M.pop(),M.length&&M[0]===o[0]?Wd(M,pt(v,2)):[]}),JR=Dt(function(o){var v=qi(o),M=y(o,Yd);return v=typeof v=="function"?v:e,v&&M.pop(),M.length&&M[0]===o[0]?Wd(M,e,v):[]});function eL(o,v){return o==null?"":XI.call(o,v)}function qi(o){var v=o==null?0:o.length;return v?o[v-1]:e}function tL(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=j;return M!==e&&(G=Mt(M),G=G<0?fr(j+G,0):Br(G,j-1)),v===v?yt(o,v,G):re(o,ke,G,!0)}function nL(o,v){return o&&o.length?Pb(o,Mt(v)):e}var rL=Dt(T0);function T0(o,v){return o&&o.length&&v&&v.length?jd(o,v):o}function iL(o,v,M){return o&&o.length&&v&&v.length?jd(o,v,pt(M,2)):o}function oL(o,v,M){return o&&o.length&&v&&v.length?jd(o,v,e,M):o}var sL=zo(function(o,v){var M=o==null?0:o.length,j=Nd(o,v);return zb(o,y(v,function(G){return Ho(G,M)?+G:G}).sort(Qb)),j});function aL(o,v){var M=[];if(!(o&&o.length))return M;var j=-1,G=[],te=o.length;for(v=pt(v,3);++j<te;){var ue=o[j];v(ue,j,o)&&(M.push(ue),G.push(j))}return zb(o,G),M}function cp(o){return o==null?o:eE.call(o)}function lL(o,v,M){var j=o==null?0:o.length;return j?(M&&typeof M!="number"&&ti(o,v,M)?(v=0,M=j):(v=v==null?0:Mt(v),M=M===e?j:Mt(M)),Vi(o,v,M)):[]}function cL(o,v){return Kc(o,v)}function uL(o,v,M){return qd(o,v,pt(M,2))}function hL(o,v){var M=o==null?0:o.length;if(M){var j=Kc(o,v);if(j<M&&so(o[j],v))return j}return-1}function dL(o,v){return Kc(o,v,!0)}function pL(o,v,M){return qd(o,v,pt(M,2),!0)}function fL(o,v){var M=o==null?0:o.length;if(M){var j=Kc(o,v,!0)-1;if(so(o[j],v))return j}return-1}function gL(o){return o&&o.length?jb(o):[]}function mL(o,v){return o&&o.length?jb(o,pt(v,2)):[]}function vL(o){var v=o==null?0:o.length;return v?Vi(o,1,v):[]}function yL(o,v,M){return o&&o.length?(v=M||v===e?1:Mt(v),Vi(o,0,v<0?0:v)):[]}function bL(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===e?1:Mt(v),v=j-v,Vi(o,v<0?0:v,j)):[]}function wL(o,v){return o&&o.length?Gc(o,pt(v,3),!1,!0):[]}function xL(o,v){return o&&o.length?Gc(o,pt(v,3)):[]}var CL=Dt(function(o){return hs(Er(o,1,Zn,!0))}),kL=Dt(function(o){var v=qi(o);return Zn(v)&&(v=e),hs(Er(o,1,Zn,!0),pt(v,2))}),AL=Dt(function(o){var v=qi(o);return v=typeof v=="function"?v:e,hs(Er(o,1,Zn,!0),e,v)});function SL(o){return o&&o.length?hs(o):[]}function $L(o,v){return o&&o.length?hs(o,pt(v,2)):[]}function _L(o,v){return v=typeof v=="function"?v:e,o&&o.length?hs(o,e,v):[]}function up(o){if(!(o&&o.length))return[];var v=0;return o=Wr(o,function(M){if(Zn(M))return v=fr(M.length,v),!0}),Qe(v,function(M){return y(o,we(M))})}function M0(o,v){if(!(o&&o.length))return[];var M=up(o);return v==null?M:y(M,function(j){return kr(v,e,j)})}var TL=Dt(function(o,v){return Zn(o)?vl(o,v):[]}),ML=Dt(function(o){return Gd(Wr(o,Zn))}),IL=Dt(function(o){var v=qi(o);return Zn(v)&&(v=e),Gd(Wr(o,Zn),pt(v,2))}),EL=Dt(function(o){var v=qi(o);return v=typeof v=="function"?v:e,Gd(Wr(o,Zn),e,v)}),RL=Dt(up);function LL(o,v){return Kb(o||[],v||[],ml)}function OL(o,v){return Kb(o||[],v||[],wl)}var NL=Dt(function(o){var v=o.length,M=v>1?o[v-1]:e;return M=typeof M=="function"?(o.pop(),M):e,M0(o,M)});function I0(o){var v=ee(o);return v.__chain__=!0,v}function DL(o,v){return v(o),o}function ru(o,v){return v(o)}var FL=zo(function(o){var v=o.length,M=v?o[0]:0,j=this.__wrapped__,G=function(te){return Nd(te,o)};return v>1||this.__actions__.length||!(j instanceof Ut)||!Ho(M)?this.thru(G):(j=j.slice(M,+M+(v?1:0)),j.__actions__.push({func:ru,args:[G],thisArg:e}),new ji(j,this.__chain__).thru(function(te){return v&&!te.length&&te.push(e),te}))});function PL(){return I0(this)}function WL(){return new ji(this.value(),this.__chain__)}function BL(){this.__values__===e&&(this.__values__=U0(this.value()));var o=this.__index__>=this.__values__.length,v=o?e:this.__values__[this.__index__++];return{done:o,value:v}}function zL(){return this}function HL(o){for(var v,M=this;M instanceof Hc;){var j=k0(M);j.__index__=0,j.__values__=e,v?G.__wrapped__=j:v=j;var G=j;M=M.__wrapped__}return G.__wrapped__=o,v}function jL(){var o=this.__wrapped__;if(o instanceof Ut){var v=o;return this.__actions__.length&&(v=new Ut(this)),v=v.reverse(),v.__actions__.push({func:ru,args:[cp],thisArg:e}),new ji(v,this.__chain__)}return this.thru(cp)}function UL(){return qb(this.__wrapped__,this.__actions__)}var VL=Yc(function(o,v,M){cn.call(o,M)?++o[M]:Wo(o,M,1)});function qL(o,v,M){var j=Ct(o)?Ir:DE;return M&&ti(o,v,M)&&(v=e),j(o,pt(v,3))}function KL(o,v){var M=Ct(o)?Wr:Mb;return M(o,pt(v,3))}var GL=r0(A0),YL=r0(S0);function XL(o,v){return Er(iu(o,v),1)}function QL(o,v){return Er(iu(o,v),B)}function ZL(o,v,M){return M=M===e?1:Mt(M),Er(iu(o,v),M)}function E0(o,v){var M=Ct(o)?Mr:us;return M(o,pt(v,3))}function R0(o,v){var M=Ct(o)?Bs:Tb;return M(o,pt(v,3))}var JL=Yc(function(o,v,M){cn.call(o,M)?o[M].push(v):Wo(o,M,[v])});function eO(o,v,M,j){o=yi(o)?o:Ea(o),M=M&&!j?Mt(M):0;var G=o.length;return M<0&&(M=fr(G+M,0)),cu(o)?M<=G&&o.indexOf(v,M)>-1:!!G&&ae(o,v,M)>-1}var tO=Dt(function(o,v,M){var j=-1,G=typeof v=="function",te=yi(o)?Ce(o.length):[];return us(o,function(ue){te[++j]=G?kr(v,ue,M):yl(ue,v,M)}),te}),nO=Yc(function(o,v,M){Wo(o,M,v)});function iu(o,v){var M=Ct(o)?y:Nb;return M(o,pt(v,3))}function rO(o,v,M,j){return o==null?[]:(Ct(v)||(v=v==null?[]:[v]),M=j?e:M,Ct(M)||(M=M==null?[]:[M]),Wb(o,v,M))}var iO=Yc(function(o,v,M){o[M?0:1].push(v)},function(){return[[],[]]});function oO(o,v,M){var j=Ct(o)?S:Le,G=arguments.length<3;return j(o,pt(v,4),M,G,us)}function sO(o,v,M){var j=Ct(o)?F:Le,G=arguments.length<3;return j(o,pt(v,4),M,G,Tb)}function aO(o,v){var M=Ct(o)?Wr:Mb;return M(o,au(pt(v,3)))}function lO(o){var v=Ct(o)?Ab:eR;return v(o)}function cO(o,v,M){(M?ti(o,v,M):v===e)?v=1:v=Mt(v);var j=Ct(o)?EE:tR;return j(o,v)}function uO(o){var v=Ct(o)?RE:rR;return v(o)}function hO(o){if(o==null)return 0;if(yi(o))return cu(o)?Ft(o):o.length;var v=zr(o);return v==et||v==Ln?o.size:zd(o).length}function dO(o,v,M){var j=Ct(o)?W:iR;return M&&ti(o,v,M)&&(v=e),j(o,pt(v,3))}var pO=Dt(function(o,v){if(o==null)return[];var M=v.length;return M>1&&ti(o,v[0],v[1])?v=[]:M>2&&ti(v[0],v[1],v[2])&&(v=[v[0]]),Wb(o,Er(v,1),[])}),ou=KI||function(){return hn.Date.now()};function fO(o,v){if(typeof v!="function")throw new dn(m);return o=Mt(o),function(){if(--o<1)return v.apply(this,arguments)}}function L0(o,v,M){return v=M?e:v,v=o&&v==null?o.length:v,Bo(o,L,e,e,e,e,v)}function O0(o,v){var M;if(typeof v!="function")throw new dn(m);return o=Mt(o),function(){return--o>0&&(M=v.apply(this,arguments)),o<=1&&(v=e),M}}var hp=Dt(function(o,v,M){var j=p;if(M.length){var G=Be(M,Ma(hp));j|=k}return Bo(o,j,v,M,G)}),N0=Dt(function(o,v,M){var j=p|b;if(M.length){var G=Be(M,Ma(N0));j|=k}return Bo(v,j,o,M,G)});function D0(o,v,M){v=M?e:v;var j=Bo(o,R,e,e,e,e,e,v);return j.placeholder=D0.placeholder,j}function F0(o,v,M){v=M?e:v;var j=Bo(o,$,e,e,e,e,e,v);return j.placeholder=F0.placeholder,j}function P0(o,v,M){var j,G,te,ue,pe,ye,Ee=0,Re=!1,De=!1,Ge=!0;if(typeof o!="function")throw new dn(m);v=Ki(v)||0,Fn(M)&&(Re=!!M.leading,De="maxWait"in M,te=De?fr(Ki(M.maxWait)||0,v):te,Ge="trailing"in M?!!M.trailing:Ge);function nt(Jn){var ao=j,Vo=G;return j=G=e,Ee=Jn,ue=o.apply(Vo,ao),ue}function ft(Jn){return Ee=Jn,pe=kl(Bt,v),Re?nt(Jn):ue}function Et(Jn){var ao=Jn-ye,Vo=Jn-Ee,rw=v-ao;return De?Br(rw,te-Vo):rw}function gt(Jn){var ao=Jn-ye,Vo=Jn-Ee;return ye===e||ao>=v||ao<0||De&&Vo>=te}function Bt(){var Jn=ou();if(gt(Jn))return qt(Jn);pe=kl(Bt,Et(Jn))}function qt(Jn){return pe=e,Ge&&j?nt(Jn):(j=G=e,ue)}function Ri(){pe!==e&&Gb(pe),Ee=0,j=ye=G=pe=e}function ni(){return pe===e?ue:qt(ou())}function Li(){var Jn=ou(),ao=gt(Jn);if(j=arguments,G=this,ye=Jn,ao){if(pe===e)return ft(ye);if(De)return Gb(pe),pe=kl(Bt,v),nt(ye)}return pe===e&&(pe=kl(Bt,v)),ue}return Li.cancel=Ri,Li.flush=ni,Li}var gO=Dt(function(o,v){return _b(o,1,v)}),mO=Dt(function(o,v,M){return _b(o,Ki(v)||0,M)});function vO(o){return Bo(o,E)}function su(o,v){if(typeof o!="function"||v!=null&&typeof v!="function")throw new dn(m);var M=function(){var j=arguments,G=v?v.apply(this,j):j[0],te=M.cache;if(te.has(G))return te.get(G);var ue=o.apply(this,j);return M.cache=te.set(G,ue)||te,ue};return M.cache=new(su.Cache||Po),M}su.Cache=Po;function au(o){if(typeof o!="function")throw new dn(m);return function(){var v=arguments;switch(v.length){case 0:return!o.call(this);case 1:return!o.call(this,v[0]);case 2:return!o.call(this,v[0],v[1]);case 3:return!o.call(this,v[0],v[1],v[2])}return!o.apply(this,v)}}function yO(o){return O0(2,o)}var bO=oR(function(o,v){v=v.length==1&&Ct(v[0])?y(v[0],ct(pt())):y(Er(v,1),ct(pt()));var M=v.length;return Dt(function(j){for(var G=-1,te=Br(j.length,M);++G<te;)j[G]=v[G].call(this,j[G]);return kr(o,this,j)})}),dp=Dt(function(o,v){var M=Be(v,Ma(dp));return Bo(o,k,e,v,M)}),W0=Dt(function(o,v){var M=Be(v,Ma(W0));return Bo(o,C,e,v,M)}),wO=zo(function(o,v){return Bo(o,D,e,e,e,v)});function xO(o,v){if(typeof o!="function")throw new dn(m);return v=v===e?v:Mt(v),Dt(o,v)}function CO(o,v){if(typeof o!="function")throw new dn(m);return v=v==null?0:fr(Mt(v),0),Dt(function(M){var j=M[v],G=ps(M,0,v);return j&&T(G,j),kr(o,this,G)})}function kO(o,v,M){var j=!0,G=!0;if(typeof o!="function")throw new dn(m);return Fn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),P0(o,v,{leading:j,maxWait:v,trailing:G})}function AO(o){return L0(o,1)}function SO(o,v){return dp(Xd(v),o)}function $O(){if(!arguments.length)return[];var o=arguments[0];return Ct(o)?o:[o]}function _O(o){return Ui(o,c)}function TO(o,v){return v=typeof v=="function"?v:e,Ui(o,c,v)}function MO(o){return Ui(o,l|c)}function IO(o,v){return v=typeof v=="function"?v:e,Ui(o,l|c,v)}function EO(o,v){return v==null||$b(o,v,_r(v))}function so(o,v){return o===v||o!==o&&v!==v}var RO=Jc(Pd),LO=Jc(function(o,v){return o>=v}),Ys=Rb(function(){return arguments}())?Rb:function(o){return qn(o)&&cn.call(o,"callee")&&!yb.call(o,"callee")},Ct=Ce.isArray,OO=mi?ct(mi):HE;function yi(o){return o!=null&&lu(o.length)&&!jo(o)}function Zn(o){return qn(o)&&yi(o)}function NO(o){return o===!0||o===!1||qn(o)&&ei(o)==$e}var fs=YI||kp,DO=ls?ct(ls):jE;function FO(o){return qn(o)&&o.nodeType===1&&!Al(o)}function PO(o){if(o==null)return!0;if(yi(o)&&(Ct(o)||typeof o=="string"||typeof o.splice=="function"||fs(o)||Ia(o)||Ys(o)))return!o.length;var v=zr(o);if(v==et||v==Ln)return!o.size;if(Cl(o))return!zd(o).length;for(var M in o)if(cn.call(o,M))return!1;return!0}function WO(o,v){return bl(o,v)}function BO(o,v,M){M=typeof M=="function"?M:e;var j=M?M(o,v):e;return j===e?bl(o,v,e,M):!!j}function pp(o){if(!qn(o))return!1;var v=ei(o);return v==Xe||v==Me||typeof o.message=="string"&&typeof o.name=="string"&&!Al(o)}function zO(o){return typeof o=="number"&&wb(o)}function jo(o){if(!Fn(o))return!1;var v=ei(o);return v==Ke||v==at||v==me||v==vr}function B0(o){return typeof o=="number"&&o==Mt(o)}function lu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function Fn(o){var v=typeof o;return o!=null&&(v=="object"||v=="function")}function qn(o){return o!=null&&typeof o=="object"}var z0=Un?ct(Un):VE;function HO(o,v){return o===v||Bd(o,v,rp(v))}function jO(o,v,M){return M=typeof M=="function"?M:e,Bd(o,v,rp(v),M)}function UO(o){return H0(o)&&o!=+o}function VO(o){if(TR(o))throw new ut(g);return Lb(o)}function qO(o){return o===null}function KO(o){return o==null}function H0(o){return typeof o=="number"||qn(o)&&ei(o)==lt}function Al(o){if(!qn(o)||ei(o)!=xn)return!1;var v=Nc(o);if(v===null)return!0;var M=cn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&Ec.call(M)==jI}var fp=$i?ct($i):qE;function GO(o){return B0(o)&&o>=-U&&o<=U}var j0=_i?ct(_i):KE;function cu(o){return typeof o=="string"||!Ct(o)&&qn(o)&&ei(o)==Xn}function Ei(o){return typeof o=="symbol"||qn(o)&&ei(o)==Tr}var Ia=zi?ct(zi):GE;function YO(o){return o===e}function XO(o){return qn(o)&&zr(o)==je}function QO(o){return qn(o)&&ei(o)==Lt}var ZO=Jc(Hd),JO=Jc(function(o,v){return o<=v});function U0(o){if(!o)return[];if(yi(o))return cu(o)?wt(o):vi(o);if(hl&&o[hl])return xe(o[hl]());var v=zr(o),M=v==et?Ie:v==Ln?qe:Ea;return M(o)}function Uo(o){if(!o)return o===0?o:0;if(o=Ki(o),o===B||o===-B){var v=o<0?-1:1;return v*K}return o===o?o:0}function Mt(o){var v=Uo(o),M=v%1;return v===v?M?v-M:v:0}function V0(o){return o?Vs(Mt(o),0,J):0}function Ki(o){if(typeof o=="number")return o;if(Ei(o))return Z;if(Fn(o)){var v=typeof o.valueOf=="function"?o.valueOf():o;o=Fn(v)?v+"":v}if(typeof o!="string")return o===0?o:+o;o=bn(o);var M=To.test(o);return M||ce.test(o)?yn(o.slice(2),M?2:8):Ot.test(o)?Z:+o}function q0(o){return Co(o,bi(o))}function e2(o){return o?Vs(Mt(o),-U,U):o===0?o:0}function sn(o){return o==null?"":Ii(o)}var t2=_a(function(o,v){if(Cl(v)||yi(v)){Co(v,_r(v),o);return}for(var M in v)cn.call(v,M)&&ml(o,M,v[M])}),K0=_a(function(o,v){Co(v,bi(v),o)}),uu=_a(function(o,v,M,j){Co(v,bi(v),o,j)}),n2=_a(function(o,v,M,j){Co(v,_r(v),o,j)}),r2=zo(Nd);function i2(o,v){var M=$a(o);return v==null?M:Sb(M,v)}var o2=Dt(function(o,v){o=It(o);var M=-1,j=v.length,G=j>2?v[2]:e;for(G&&ti(v[0],v[1],G)&&(j=1);++M<j;)for(var te=v[M],ue=bi(te),pe=-1,ye=ue.length;++pe<ye;){var Ee=ue[pe],Re=o[Ee];(Re===e||so(Re,Vn[Ee])&&!cn.call(o,Ee))&&(o[Ee]=te[Ee])}return o}),s2=Dt(function(o){return o.push(e,u0),kr(G0,e,o)});function a2(o,v){return Q(o,pt(v,3),xo)}function l2(o,v){return Q(o,pt(v,3),Fd)}function c2(o,v){return o==null?o:Dd(o,pt(v,3),bi)}function u2(o,v){return o==null?o:Ib(o,pt(v,3),bi)}function h2(o,v){return o&&xo(o,pt(v,3))}function d2(o,v){return o&&Fd(o,pt(v,3))}function p2(o){return o==null?[]:Vc(o,_r(o))}function f2(o){return o==null?[]:Vc(o,bi(o))}function gp(o,v,M){var j=o==null?e:qs(o,v);return j===e?M:j}function g2(o,v){return o!=null&&p0(o,v,PE)}function mp(o,v){return o!=null&&p0(o,v,WE)}var m2=o0(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Rc.call(v)),o[v]=M},yp(wi)),v2=o0(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Rc.call(v)),cn.call(o,v)?o[v].push(M):o[v]=[M]},pt),y2=Dt(yl);function _r(o){return yi(o)?kb(o):zd(o)}function bi(o){return yi(o)?kb(o,!0):YE(o)}function b2(o,v){var M={};return v=pt(v,3),xo(o,function(j,G,te){Wo(M,v(j,G,te),j)}),M}function w2(o,v){var M={};return v=pt(v,3),xo(o,function(j,G,te){Wo(M,G,v(j,G,te))}),M}var x2=_a(function(o,v,M){qc(o,v,M)}),G0=_a(function(o,v,M,j){qc(o,v,M,j)}),C2=zo(function(o,v){var M={};if(o==null)return M;var j=!1;v=y(v,function(te){return te=ds(te,o),j||(j=te.length>1),te}),Co(o,tp(o),M),j&&(M=Ui(M,l|u|c,mR));for(var G=v.length;G--;)Kd(M,v[G]);return M});function k2(o,v){return Y0(o,au(pt(v)))}var A2=zo(function(o,v){return o==null?{}:QE(o,v)});function Y0(o,v){if(o==null)return{};var M=y(tp(o),function(j){return[j]});return v=pt(v),Bb(o,M,function(j,G){return v(j,G[0])})}function S2(o,v,M){v=ds(v,o);var j=-1,G=v.length;for(G||(G=1,o=e);++j<G;){var te=o==null?e:o[ko(v[j])];te===e&&(j=G,te=M),o=jo(te)?te.call(o):te}return o}function $2(o,v,M){return o==null?o:wl(o,v,M)}function _2(o,v,M,j){return j=typeof j=="function"?j:e,o==null?o:wl(o,v,M,j)}var X0=l0(_r),Q0=l0(bi);function T2(o,v,M){var j=Ct(o),G=j||fs(o)||Ia(o);if(v=pt(v,4),M==null){var te=o&&o.constructor;G?M=j?new te:[]:Fn(o)?M=jo(te)?$a(Nc(o)):{}:M={}}return(G?Mr:xo)(o,function(ue,pe,ye){return v(M,ue,pe,ye)}),M}function M2(o,v){return o==null?!0:Kd(o,v)}function I2(o,v,M){return o==null?o:Vb(o,v,Xd(M))}function E2(o,v,M,j){return j=typeof j=="function"?j:e,o==null?o:Vb(o,v,Xd(M),j)}function Ea(o){return o==null?[]:Tn(o,_r(o))}function R2(o){return o==null?[]:Tn(o,bi(o))}function L2(o,v,M){return M===e&&(M=v,v=e),M!==e&&(M=Ki(M),M=M===M?M:0),v!==e&&(v=Ki(v),v=v===v?v:0),Vs(Ki(o),v,M)}function O2(o,v,M){return v=Uo(v),M===e?(M=v,v=0):M=Uo(M),o=Ki(o),BE(o,v,M)}function N2(o,v,M){if(M&&typeof M!="boolean"&&ti(o,v,M)&&(v=M=e),M===e&&(typeof v=="boolean"?(M=v,v=e):typeof o=="boolean"&&(M=o,o=e)),o===e&&v===e?(o=0,v=1):(o=Uo(o),v===e?(v=o,o=0):v=Uo(v)),o>v){var j=o;o=v,v=j}if(M||o%1||v%1){var G=xb();return Br(o+G*(v-o+He("1e-"+((G+"").length-1))),v)}return Ud(o,v)}var D2=Ta(function(o,v,M){return v=v.toLowerCase(),o+(M?Z0(v):v)});function Z0(o){return vp(sn(o).toLowerCase())}function J0(o){return o=sn(o),o&&o.replace(Fe,Mn).replace(Oo,"")}function F2(o,v,M){o=sn(o),v=Ii(v);var j=o.length;M=M===e?j:Vs(Mt(M),0,j);var G=M;return M-=v.length,M>=0&&o.slice(M,G)==v}function P2(o){return o=sn(o),o&&Os.test(o)?o.replace(to,V):o}function W2(o){return o=sn(o),o&&pi.test(o)?o.replace(ur,"\\$&"):o}var B2=Ta(function(o,v,M){return o+(M?"-":"")+v.toLowerCase()}),z2=Ta(function(o,v,M){return o+(M?" ":"")+v.toLowerCase()}),H2=n0("toLowerCase");function j2(o,v,M){o=sn(o),v=Mt(v);var j=v?Ft(o):0;if(!v||j>=v)return o;var G=(v-j)/2;return Zc(Wc(G),M)+o+Zc(Pc(G),M)}function U2(o,v,M){o=sn(o),v=Mt(v);var j=v?Ft(o):0;return v&&j<v?o+Zc(v-j,M):o}function V2(o,v,M){o=sn(o),v=Mt(v);var j=v?Ft(o):0;return v&&j<v?Zc(v-j,M)+o:o}function q2(o,v,M){return M||v==null?v=0:v&&(v=+v),JI(sn(o).replace(kn,""),v||0)}function K2(o,v,M){return(M?ti(o,v,M):v===e)?v=1:v=Mt(v),Vd(sn(o),v)}function G2(){var o=arguments,v=sn(o[0]);return o.length<3?v:v.replace(o[1],o[2])}var Y2=Ta(function(o,v,M){return o+(M?"_":"")+v.toLowerCase()});function X2(o,v,M){return M&&typeof M!="number"&&ti(o,v,M)&&(v=M=e),M=M===e?J:M>>>0,M?(o=sn(o),o&&(typeof v=="string"||v!=null&&!fp(v))&&(v=Ii(v),!v&&oe(o))?ps(wt(o),0,M):o.split(v,M)):[]}var Q2=Ta(function(o,v,M){return o+(M?" ":"")+vp(v)});function Z2(o,v,M){return o=sn(o),M=M==null?0:Vs(Mt(M),0,o.length),v=Ii(v),o.slice(M,M+v.length)==v}function J2(o,v,M){var j=ee.templateSettings;M&&ti(o,v,M)&&(v=e),o=sn(o),v=uu({},v,j,c0);var G=uu({},v.imports,j.imports,c0),te=_r(G),ue=Tn(G,te),pe,ye,Ee=0,Re=v.interpolate||St,De="__p += '",Ge=Jr((v.escape||St).source+"|"+Re.source+"|"+(Re===hi?gi:St).source+"|"+(v.evaluate||St).source+"|$","g"),nt="//# sourceURL="+(cn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wo+"]")+`
|
|
1472
|
+
`;o.replace(Ge,function(gt,Bt,qt,Ri,ni,Li){return qt||(qt=Ri),De+=o.slice(Ee,Li).replace(Gt,X),Bt&&(pe=!0,De+=`' +
|
|
1473
|
+
__e(`+Bt+`) +
|
|
1474
|
+
'`),ni&&(ye=!0,De+=`';
|
|
1475
|
+
`+ni+`;
|
|
1476
|
+
__p += '`),qt&&(De+=`' +
|
|
1477
|
+
((__t = (`+qt+`)) == null ? '' : __t) +
|
|
1478
|
+
'`),Ee=Li+gt.length,gt}),De+=`';
|
|
1479
|
+
`;var ft=cn.call(v,"variable")&&v.variable;if(!ft)De=`with (obj) {
|
|
1480
|
+
`+De+`
|
|
1481
|
+
}
|
|
1482
|
+
`;else if(Jo.test(ft))throw new ut(w);De=(ye?De.replace(Gr,""):De).replace(Ai,"$1").replace(ci,"$1;"),De="function("+(ft||"obj")+`) {
|
|
1483
|
+
`+(ft?"":`obj || (obj = {});
|
|
1484
|
+
`)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(ye?`, __j = Array.prototype.join;
|
|
1485
|
+
function print() { __p += __j.call(arguments, '') }
|
|
1486
|
+
`:`;
|
|
1487
|
+
`)+De+`return __p
|
|
1488
|
+
}`;var Et=tw(function(){return _t(te,nt+"return "+De).apply(e,ue)});if(Et.source=De,pp(Et))throw Et;return Et}function eN(o){return sn(o).toLowerCase()}function tN(o){return sn(o).toUpperCase()}function nN(o,v,M){if(o=sn(o),o&&(M||v===e))return bn(o);if(!o||!(v=Ii(v)))return o;var j=wt(o),G=wt(v),te=$t(j,G),ue=ir(j,G)+1;return ps(j,te,ue).join("")}function rN(o,v,M){if(o=sn(o),o&&(M||v===e))return o.slice(0,Nt(o)+1);if(!o||!(v=Ii(v)))return o;var j=wt(o),G=ir(j,wt(v))+1;return ps(j,0,G).join("")}function iN(o,v,M){if(o=sn(o),o&&(M||v===e))return o.replace(kn,"");if(!o||!(v=Ii(v)))return o;var j=wt(o),G=$t(j,wt(v));return ps(j,G).join("")}function oN(o,v){var M=I,j=z;if(Fn(v)){var G="separator"in v?v.separator:G;M="length"in v?Mt(v.length):M,j="omission"in v?Ii(v.omission):j}o=sn(o);var te=o.length;if(oe(o)){var ue=wt(o);te=ue.length}if(M>=te)return o;var pe=M-Ft(j);if(pe<1)return j;var ye=ue?ps(ue,0,pe).join(""):o.slice(0,pe);if(G===e)return ye+j;if(ue&&(pe+=ye.length-pe),fp(G)){if(o.slice(pe).search(G)){var Ee,Re=ye;for(G.global||(G=Jr(G.source,sn(Fr.exec(G))+"g")),G.lastIndex=0;Ee=G.exec(Re);)var De=Ee.index;ye=ye.slice(0,De===e?pe:De)}}else if(o.indexOf(Ii(G),pe)!=pe){var Ge=ye.lastIndexOf(G);Ge>-1&&(ye=ye.slice(0,Ge))}return ye+j}function sN(o){return o=sn(o),o&&ui.test(o)?o.replace(Bn,dt):o}var aN=Ta(function(o,v,M){return o+(M?" ":"")+v.toUpperCase()}),vp=n0("toUpperCase");function ew(o,v,M){return o=sn(o),v=M?e:v,v===e?ge(o)?In(o):Y(o):o.match(v)||[]}var tw=Dt(function(o,v){try{return kr(o,e,v)}catch(M){return pp(M)?M:new ut(M)}}),lN=zo(function(o,v){return Mr(v,function(M){M=ko(M),Wo(o,M,hp(o[M],o))}),o});function cN(o){var v=o==null?0:o.length,M=pt();return o=v?y(o,function(j){if(typeof j[1]!="function")throw new dn(m);return[M(j[0]),j[1]]}):[],Dt(function(j){for(var G=-1;++G<v;){var te=o[G];if(kr(te[0],this,j))return kr(te[1],this,j)}})}function uN(o){return NE(Ui(o,l))}function yp(o){return function(){return o}}function hN(o,v){return o==null||o!==o?v:o}var dN=i0(),pN=i0(!0);function wi(o){return o}function bp(o){return Ob(typeof o=="function"?o:Ui(o,l))}function fN(o){return Db(Ui(o,l))}function gN(o,v){return Fb(o,Ui(v,l))}var mN=Dt(function(o,v){return function(M){return yl(M,o,v)}}),vN=Dt(function(o,v){return function(M){return yl(o,M,v)}});function wp(o,v,M){var j=_r(v),G=Vc(v,j);M==null&&!(Fn(v)&&(G.length||!j.length))&&(M=v,v=o,o=this,G=Vc(v,_r(v)));var te=!(Fn(M)&&"chain"in M)||!!M.chain,ue=jo(o);return Mr(G,function(pe){var ye=v[pe];o[pe]=ye,ue&&(o.prototype[pe]=function(){var Ee=this.__chain__;if(te||Ee){var Re=o(this.__wrapped__),De=Re.__actions__=vi(this.__actions__);return De.push({func:ye,args:arguments,thisArg:o}),Re.__chain__=Ee,Re}return ye.apply(o,T([this.value()],arguments))})}),o}function yN(){return hn._===this&&(hn._=UI),this}function xp(){}function bN(o){return o=Mt(o),Dt(function(v){return Pb(v,o)})}var wN=Zd(y),xN=Zd(Ir),CN=Zd(W);function nw(o){return op(o)?we(ko(o)):ZE(o)}function kN(o){return function(v){return o==null?e:qs(o,v)}}var AN=s0(),SN=s0(!0);function Cp(){return[]}function kp(){return!1}function $N(){return{}}function _N(){return""}function TN(){return!0}function MN(o,v){if(o=Mt(o),o<1||o>U)return[];var M=J,j=Br(o,J);v=pt(v),o-=J;for(var G=Qe(j,v);++M<o;)v(M);return G}function IN(o){return Ct(o)?y(o,ko):Ei(o)?[o]:vi(C0(sn(o)))}function EN(o){var v=++HI;return sn(o)+v}var RN=Qc(function(o,v){return o+v},0),LN=Jd("ceil"),ON=Qc(function(o,v){return o/v},1),NN=Jd("floor");function DN(o){return o&&o.length?Uc(o,wi,Pd):e}function FN(o,v){return o&&o.length?Uc(o,pt(v,2),Pd):e}function PN(o){return ve(o,wi)}function WN(o,v){return ve(o,pt(v,2))}function BN(o){return o&&o.length?Uc(o,wi,Hd):e}function zN(o,v){return o&&o.length?Uc(o,pt(v,2),Hd):e}var HN=Qc(function(o,v){return o*v},1),jN=Jd("round"),UN=Qc(function(o,v){return o-v},0);function VN(o){return o&&o.length?st(o,wi):0}function qN(o,v){return o&&o.length?st(o,pt(v,2)):0}return ee.after=fO,ee.ary=L0,ee.assign=t2,ee.assignIn=K0,ee.assignInWith=uu,ee.assignWith=n2,ee.at=r2,ee.before=O0,ee.bind=hp,ee.bindAll=lN,ee.bindKey=N0,ee.castArray=$O,ee.chain=I0,ee.chunk=NR,ee.compact=DR,ee.concat=FR,ee.cond=cN,ee.conforms=uN,ee.constant=yp,ee.countBy=VL,ee.create=i2,ee.curry=D0,ee.curryRight=F0,ee.debounce=P0,ee.defaults=o2,ee.defaultsDeep=s2,ee.defer=gO,ee.delay=mO,ee.difference=PR,ee.differenceBy=WR,ee.differenceWith=BR,ee.drop=zR,ee.dropRight=HR,ee.dropRightWhile=jR,ee.dropWhile=UR,ee.fill=VR,ee.filter=KL,ee.flatMap=XL,ee.flatMapDeep=QL,ee.flatMapDepth=ZL,ee.flatten=$0,ee.flattenDeep=qR,ee.flattenDepth=KR,ee.flip=vO,ee.flow=dN,ee.flowRight=pN,ee.fromPairs=GR,ee.functions=p2,ee.functionsIn=f2,ee.groupBy=JL,ee.initial=XR,ee.intersection=QR,ee.intersectionBy=ZR,ee.intersectionWith=JR,ee.invert=m2,ee.invertBy=v2,ee.invokeMap=tO,ee.iteratee=bp,ee.keyBy=nO,ee.keys=_r,ee.keysIn=bi,ee.map=iu,ee.mapKeys=b2,ee.mapValues=w2,ee.matches=fN,ee.matchesProperty=gN,ee.memoize=su,ee.merge=x2,ee.mergeWith=G0,ee.method=mN,ee.methodOf=vN,ee.mixin=wp,ee.negate=au,ee.nthArg=bN,ee.omit=C2,ee.omitBy=k2,ee.once=yO,ee.orderBy=rO,ee.over=wN,ee.overArgs=bO,ee.overEvery=xN,ee.overSome=CN,ee.partial=dp,ee.partialRight=W0,ee.partition=iO,ee.pick=A2,ee.pickBy=Y0,ee.property=nw,ee.propertyOf=kN,ee.pull=rL,ee.pullAll=T0,ee.pullAllBy=iL,ee.pullAllWith=oL,ee.pullAt=sL,ee.range=AN,ee.rangeRight=SN,ee.rearg=wO,ee.reject=aO,ee.remove=aL,ee.rest=xO,ee.reverse=cp,ee.sampleSize=cO,ee.set=$2,ee.setWith=_2,ee.shuffle=uO,ee.slice=lL,ee.sortBy=pO,ee.sortedUniq=gL,ee.sortedUniqBy=mL,ee.split=X2,ee.spread=CO,ee.tail=vL,ee.take=yL,ee.takeRight=bL,ee.takeRightWhile=wL,ee.takeWhile=xL,ee.tap=DL,ee.throttle=kO,ee.thru=ru,ee.toArray=U0,ee.toPairs=X0,ee.toPairsIn=Q0,ee.toPath=IN,ee.toPlainObject=q0,ee.transform=T2,ee.unary=AO,ee.union=CL,ee.unionBy=kL,ee.unionWith=AL,ee.uniq=SL,ee.uniqBy=$L,ee.uniqWith=_L,ee.unset=M2,ee.unzip=up,ee.unzipWith=M0,ee.update=I2,ee.updateWith=E2,ee.values=Ea,ee.valuesIn=R2,ee.without=TL,ee.words=ew,ee.wrap=SO,ee.xor=ML,ee.xorBy=IL,ee.xorWith=EL,ee.zip=RL,ee.zipObject=LL,ee.zipObjectDeep=OL,ee.zipWith=NL,ee.entries=X0,ee.entriesIn=Q0,ee.extend=K0,ee.extendWith=uu,wp(ee,ee),ee.add=RN,ee.attempt=tw,ee.camelCase=D2,ee.capitalize=Z0,ee.ceil=LN,ee.clamp=L2,ee.clone=_O,ee.cloneDeep=MO,ee.cloneDeepWith=IO,ee.cloneWith=TO,ee.conformsTo=EO,ee.deburr=J0,ee.defaultTo=hN,ee.divide=ON,ee.endsWith=F2,ee.eq=so,ee.escape=P2,ee.escapeRegExp=W2,ee.every=qL,ee.find=GL,ee.findIndex=A0,ee.findKey=a2,ee.findLast=YL,ee.findLastIndex=S0,ee.findLastKey=l2,ee.floor=NN,ee.forEach=E0,ee.forEachRight=R0,ee.forIn=c2,ee.forInRight=u2,ee.forOwn=h2,ee.forOwnRight=d2,ee.get=gp,ee.gt=RO,ee.gte=LO,ee.has=g2,ee.hasIn=mp,ee.head=_0,ee.identity=wi,ee.includes=eO,ee.indexOf=YR,ee.inRange=O2,ee.invoke=y2,ee.isArguments=Ys,ee.isArray=Ct,ee.isArrayBuffer=OO,ee.isArrayLike=yi,ee.isArrayLikeObject=Zn,ee.isBoolean=NO,ee.isBuffer=fs,ee.isDate=DO,ee.isElement=FO,ee.isEmpty=PO,ee.isEqual=WO,ee.isEqualWith=BO,ee.isError=pp,ee.isFinite=zO,ee.isFunction=jo,ee.isInteger=B0,ee.isLength=lu,ee.isMap=z0,ee.isMatch=HO,ee.isMatchWith=jO,ee.isNaN=UO,ee.isNative=VO,ee.isNil=KO,ee.isNull=qO,ee.isNumber=H0,ee.isObject=Fn,ee.isObjectLike=qn,ee.isPlainObject=Al,ee.isRegExp=fp,ee.isSafeInteger=GO,ee.isSet=j0,ee.isString=cu,ee.isSymbol=Ei,ee.isTypedArray=Ia,ee.isUndefined=YO,ee.isWeakMap=XO,ee.isWeakSet=QO,ee.join=eL,ee.kebabCase=B2,ee.last=qi,ee.lastIndexOf=tL,ee.lowerCase=z2,ee.lowerFirst=H2,ee.lt=ZO,ee.lte=JO,ee.max=DN,ee.maxBy=FN,ee.mean=PN,ee.meanBy=WN,ee.min=BN,ee.minBy=zN,ee.stubArray=Cp,ee.stubFalse=kp,ee.stubObject=$N,ee.stubString=_N,ee.stubTrue=TN,ee.multiply=HN,ee.nth=nL,ee.noConflict=yN,ee.noop=xp,ee.now=ou,ee.pad=j2,ee.padEnd=U2,ee.padStart=V2,ee.parseInt=q2,ee.random=N2,ee.reduce=oO,ee.reduceRight=sO,ee.repeat=K2,ee.replace=G2,ee.result=S2,ee.round=jN,ee.runInContext=fe,ee.sample=lO,ee.size=hO,ee.snakeCase=Y2,ee.some=dO,ee.sortedIndex=cL,ee.sortedIndexBy=uL,ee.sortedIndexOf=hL,ee.sortedLastIndex=dL,ee.sortedLastIndexBy=pL,ee.sortedLastIndexOf=fL,ee.startCase=Q2,ee.startsWith=Z2,ee.subtract=UN,ee.sum=VN,ee.sumBy=qN,ee.template=J2,ee.times=MN,ee.toFinite=Uo,ee.toInteger=Mt,ee.toLength=V0,ee.toLower=eN,ee.toNumber=Ki,ee.toSafeInteger=e2,ee.toString=sn,ee.toUpper=tN,ee.trim=nN,ee.trimEnd=rN,ee.trimStart=iN,ee.truncate=oN,ee.unescape=sN,ee.uniqueId=EN,ee.upperCase=aN,ee.upperFirst=vp,ee.each=E0,ee.eachRight=R0,ee.first=_0,wp(ee,function(){var o={};return xo(ee,function(v,M){cn.call(ee.prototype,M)||(o[M]=v)}),o}(),{chain:!1}),ee.VERSION=r,Mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){ee[o].placeholder=ee}),Mr(["drop","take"],function(o,v){Ut.prototype[o]=function(M){M=M===e?1:fr(Mt(M),0);var j=this.__filtered__&&!v?new Ut(this):this.clone();return j.__filtered__?j.__takeCount__=Br(M,j.__takeCount__):j.__views__.push({size:Br(M,J),type:o+(j.__dir__<0?"Right":"")}),j},Ut.prototype[o+"Right"]=function(M){return this.reverse()[o](M).reverse()}}),Mr(["filter","map","takeWhile"],function(o,v){var M=v+1,j=M==_||M==N;Ut.prototype[o]=function(G){var te=this.clone();return te.__iteratees__.push({iteratee:pt(G,3),type:M}),te.__filtered__=te.__filtered__||j,te}}),Mr(["head","last"],function(o,v){var M="take"+(v?"Right":"");Ut.prototype[o]=function(){return this[M](1).value()[0]}}),Mr(["initial","tail"],function(o,v){var M="drop"+(v?"":"Right");Ut.prototype[o]=function(){return this.__filtered__?new Ut(this):this[M](1)}}),Ut.prototype.compact=function(){return this.filter(wi)},Ut.prototype.find=function(o){return this.filter(o).head()},Ut.prototype.findLast=function(o){return this.reverse().find(o)},Ut.prototype.invokeMap=Dt(function(o,v){return typeof o=="function"?new Ut(this):this.map(function(M){return yl(M,o,v)})}),Ut.prototype.reject=function(o){return this.filter(au(pt(o)))},Ut.prototype.slice=function(o,v){o=Mt(o);var M=this;return M.__filtered__&&(o>0||v<0)?new Ut(M):(o<0?M=M.takeRight(-o):o&&(M=M.drop(o)),v!==e&&(v=Mt(v),M=v<0?M.dropRight(-v):M.take(v-o)),M)},Ut.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ut.prototype.toArray=function(){return this.take(J)},xo(Ut.prototype,function(o,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),j=/^(?:head|last)$/.test(v),G=ee[j?"take"+(v=="last"?"Right":""):v],te=j||/^find/.test(v);G&&(ee.prototype[v]=function(){var ue=this.__wrapped__,pe=j?[1]:arguments,ye=ue instanceof Ut,Ee=pe[0],Re=ye||Ct(ue),De=function(Bt){var qt=G.apply(ee,T([Bt],pe));return j&&Ge?qt[0]:qt};Re&&M&&typeof Ee=="function"&&Ee.length!=1&&(ye=Re=!1);var Ge=this.__chain__,nt=!!this.__actions__.length,ft=te&&!Ge,Et=ye&&!nt;if(!te&&Re){ue=Et?ue:new Ut(this);var gt=o.apply(ue,pe);return gt.__actions__.push({func:ru,args:[De],thisArg:e}),new ji(gt,Ge)}return ft&&Et?o.apply(this,pe):(gt=this.thru(De),ft?j?gt.value()[0]:gt.value():gt)})}),Mr(["pop","push","shift","sort","splice","unshift"],function(o){var v=$r[o],M=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",j=/^(?:pop|shift)$/.test(o);ee.prototype[o]=function(){var G=arguments;if(j&&!this.__chain__){var te=this.value();return v.apply(Ct(te)?te:[],G)}return this[M](function(ue){return v.apply(Ct(ue)?ue:[],G)})}}),xo(Ut.prototype,function(o,v){var M=ee[v];if(M){var j=M.name+"";cn.call(Sa,j)||(Sa[j]=[]),Sa[j].push({name:v,func:M})}}),Sa[Xc(e,b).name]=[{name:"wrapper",func:e}],Ut.prototype.clone=sE,Ut.prototype.reverse=aE,Ut.prototype.value=lE,ee.prototype.at=FL,ee.prototype.chain=PL,ee.prototype.commit=WL,ee.prototype.next=BL,ee.prototype.plant=HL,ee.prototype.reverse=jL,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=UL,ee.prototype.first=ee.prototype.head,hl&&(ee.prototype[hl]=zL),ee},Vt=or();rr?((rr.exports=Vt)._=Vt,An._=Vt):hn._=Vt}).call(Ck)}(Gl,Gl.exports)),Gl.exports}var Ak=kk();gr("O",El(Ak)).debounce(function(){this.rebuildDisplayText()},300);var Mg={exports:{}},Ig;function Sk(){return Ig||(Ig=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Mg)),Mg.exports}Sk();const $k=!0,sr="u-",_k="uplot",Tk=sr+"hz",Mk=sr+"vt",Ik=sr+"title",Ek=sr+"wrap",Rk=sr+"under",Lk=sr+"over",Ok=sr+"axis",Ss=sr+"off",Nk=sr+"select",Dk=sr+"cursor-x",Fk=sr+"cursor-y",Pk=sr+"cursor-pt",Wk=sr+"legend",Bk=sr+"live",zk=sr+"inline",Hk=sr+"series",jk=sr+"marker",Eg=sr+"label",Uk=sr+"value",Ua="width",Va="height",qa="top",Rg="bottom",oa="left",zu="right",Hu="#000",Lg=Hu+"0",ju="mousemove",Og="mousedown",Uu="mouseup",Ng="mouseenter",Dg="mouseleave",Fg="dblclick",Vk="resize",qk="scroll",Pg="change",Yl="dppxchange",Vu="--",sa=typeof window<"u",qu=sa?document:null,aa=sa?window:null,Kk=sa?navigator:null;let en,Xl;function Ku(){let n=devicePixelRatio;en!=n&&(en=n,Xl&&Xu(Pg,Xl,Ku),Xl=matchMedia(`(min-resolution: ${en-.001}dppx) and (max-resolution: ${en+.001}dppx)`),$s(Pg,Xl,Ku),aa.dispatchEvent(new CustomEvent(Yl)))}function xi(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Gu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function wn(n,t,e){n.style[t]=e+"px"}function Xi(n,t,e,r){let f=qu.createElement(n);return t!=null&&xi(f,t),e!=null&&e.insertBefore(f,r),f}function Oi(n,t){return Xi("div",n,t)}const Wg=new WeakMap;function uo(n,t,e,r,f){let g="translate("+t+"px,"+e+"px)",m=Wg.get(n);g!=m&&(n.style.transform=g,Wg.set(n,g),t<0||e<0||t>r||e>f?xi(n,Ss):Gu(n,Ss))}const Bg=new WeakMap;function zg(n,t,e){let r=t+e,f=Bg.get(n);r!=f&&(Bg.set(n,r),n.style.background=t,n.style.borderColor=e)}const Hg=new WeakMap;function jg(n,t,e,r){let f=t+""+e,g=Hg.get(n);f!=g&&(Hg.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 Yu={passive:!0},Gk={...Yu,capture:!0};function $s(n,t,e,r){t.addEventListener(n,e,r?Gk:Yu)}function Xu(n,t,e,r){t.removeEventListener(n,e,Yu)}sa&&Ku();function Qi(n,t,e,r){let f;e=e||0,r=r||t.length-1;let g=r<=2147483647;for(;r-e>1;)f=g?e+r>>1:ki((e+r)/2),t[f]<n?e=f:r=f;return n-t[e]<=t[r]-n?e:r}function Ug(n){return(t,e,r)=>{let f=-1,g=-1;for(let m=e;m<=r;m++)if(n(t[m])){f=m;break}for(let m=r;m>=e;m--)if(n(t[m])){g=m;break}return[f,g]}}const Vg=n=>n!=null,qg=n=>n!=null&&n>0,Ql=Ug(Vg),Yk=Ug(qg);function Xk(n,t,e,r=0,f=!1){let g=f?Yk:Ql,m=f?qg:Vg;[t,e]=g(n,t,e);let w=n[t],h=n[t];if(t>-1)if(r==1)w=n[t],h=n[e];else if(r==-1)w=n[e],h=n[t];else for(let d=t;d<=e;d++){let a=n[d];m(a)&&(a<w?w=a:a>h&&(h=a))}return[w??pn,h??-pn]}function Zl(n,t,e,r){let f=Yg(n),g=Yg(t);n==t&&(f==-1?(n*=e,t/=e):(n/=e,t*=e));let m=e==10?So:Xg,w=f==1?ki:Ni,h=g==1?Ni:ki,d=w(m(ar(n))),a=h(m(ar(t))),l=la(e,d),u=la(e,a);return e==10&&(d<0&&(l=fn(l,-d)),a<0&&(u=fn(u,-a))),r||e==2?(n=l*f,t=u*g):(n=rm(n,l),t=tc(t,u)),[n,t]}function Qu(n,t,e,r){let f=Zl(n,t,e,r);return n==0&&(f[0]=0),t==0&&(f[1]=0),f}const Zu=.1,Kg={mode:3,pad:Zu},Ka={pad:0,soft:null,mode:0},Qk={min:Ka,max:Ka};function Jl(n,t,e,r){return nc(e)?Gg(n,t,e):(Ka.pad=e,Ka.soft=r?0:null,Ka.mode=r?3:0,Gg(n,t,Qk))}function Qt(n,t){return n??t}function Zk(n,t,e){for(t=Qt(t,0),e=Qt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function Gg(n,t,e){let r=e.min,f=e.max,g=Qt(r.pad,0),m=Qt(f.pad,0),w=Qt(r.hard,-pn),h=Qt(f.hard,pn),d=Qt(r.soft,pn),a=Qt(f.soft,-pn),l=Qt(r.mode,0),u=Qt(f.mode,0),c=t-n,i=So(c),s=Hr(ar(n),ar(t)),p=So(s),b=ar(p-i);(c<1e-24||b>10)&&(c=0,(n==0||t==0)&&(c=1e-24,l==2&&d!=pn&&(g=0),u==2&&a!=-pn&&(m=0)));let x=c||s||1e3,R=So(x),$=la(10,ki(R)),k=x*(c==0?n==0?.1:1:g),C=fn(rm(n-k,$/10),24),L=n>=d&&(l==1||l==3&&C<=d||l==2&&C>=d)?d:pn,D=Hr(w,C<L&&n>=L?L:Zi(L,C)),E=x*(c==0?t==0?.1:1:m),I=fn(tc(t+E,$/10),24),z=t<=a&&(u==1||u==3&&I>=a||u==2&&I<=a)?a:-pn,P=Zi(h,I>z&&t<=z?z:Hr(z,I));return D==P&&D==0&&(P=100),[D,P]}const Jk=new Intl.NumberFormat(sa?Kk.language:"en-US"),Ju=n=>Jk.format(n),Ci=Math,ec=Ci.PI,ar=Ci.abs,ki=Ci.floor,lr=Ci.round,Ni=Ci.ceil,Zi=Ci.min,Hr=Ci.max,la=Ci.pow,Yg=Ci.sign,So=Ci.log10,Xg=Ci.log2,eA=(n,t=1)=>Ci.sinh(n)*t,eh=(n,t=1)=>Ci.asinh(n/t),pn=1/0;function Qg(n){return(So((n^n>>31)-(n>>31))|0)+1}function th(n,t,e){return Zi(Hr(n,t),e)}function Zg(n){return typeof n=="function"}function zt(n){return Zg(n)?n:()=>n}const tA=()=>{},Jg=n=>n,em=(n,t)=>t,nA=n=>null,tm=n=>!0,nm=(n,t)=>n==t,rA=/\.\d*?(?=9{6,}|0{6,})/gm,_s=n=>{if(om(n)||Xo.has(n))return n;const t=`${n}`,e=t.match(rA);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[f,g]=t.split("e");return+`${_s(f)}e${g}`}return fn(n,r)};function Ts(n,t){return _s(fn(_s(n/t))*t)}function tc(n,t){return _s(Ni(_s(n/t))*t)}function rm(n,t){return _s(ki(_s(n/t))*t)}function fn(n,t=0){if(om(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return lr(r)/e}const Xo=new Map;function im(n){return((""+n).split(".")[1]||"").length}function Ga(n,t,e,r){let f=[],g=r.map(im);for(let m=t;m<e;m++){let w=ar(m),h=fn(la(n,m),w);for(let d=0;d<r.length;d++){let a=n==10?+`${r[d]}e${m}`:r[d]*h,l=(m>=0?0:w)+(m>=g[d]?0:g[d]),u=n==10?a:fn(a,l);f.push(u),Xo.set(u,l)}}return f}const Ya={},nh=[],ca=[null,null],Qo=Array.isArray,om=Number.isInteger,iA=n=>n===void 0;function sm(n){return typeof n=="string"}function nc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function oA(n){return n!=null&&typeof n=="object"}const sA=Object.getPrototypeOf(Uint8Array),am="__proto__";function ua(n,t=nc){let e;if(Qo(n)){let r=n.find(f=>f!=null);if(Qo(r)||t(r)){e=Array(n.length);for(let f=0;f<n.length;f++)e[f]=ua(n[f],t)}else e=n.slice()}else if(n instanceof sA)e=n.slice();else if(t(n)){e={};for(let r in n)r!=am&&(e[r]=ua(n[r],t))}else e=n;return e}function tr(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let f in r)f!=am&&(nc(n[f])?tr(n[f],ua(r[f])):n[f]=ua(r[f]))}return n}const aA=0,lA=1,cA=2;function uA(n,t,e){for(let r=0,f,g=-1;r<t.length;r++){let m=t[r];if(m>g){for(f=m-1;f>=0&&n[f]==null;)n[f--]=null;for(f=m+1;f<e&&n[f]==null;)n[g=f++]=null}}}function hA(n,t){if(fA(n)){let m=n[0].slice();for(let w=1;w<n.length;w++)m.push(...n[w].slice(1));return gA(m[0])||(m=pA(m)),m}let e=new Set;for(let m=0;m<n.length;m++){let w=n[m][0],h=w.length;for(let d=0;d<h;d++)e.add(w[d])}let r=[Array.from(e).sort((m,w)=>m-w)],f=r[0].length,g=new Map;for(let m=0;m<f;m++)g.set(r[0][m],m);for(let m=0;m<n.length;m++){let w=n[m],h=w[0];for(let d=1;d<w.length;d++){let a=w[d],l=Array(f).fill(void 0),u=t?t[m][d]:lA,c=[];for(let i=0;i<a.length;i++){let s=a[i],p=g.get(h[i]);s===null?u!=aA&&(l[p]=s,u==cA&&c.push(p)):l[p]=s}uA(l,c,f),r.push(l)}}return r}const dA=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function pA(n){let t=n[0],e=t.length,r=Array(e);for(let g=0;g<r.length;g++)r[g]=g;r.sort((g,m)=>t[g]-t[m]);let f=[];for(let g=0;g<n.length;g++){let m=n[g],w=Array(e);for(let h=0;h<e;h++)w[h]=m[r[h]];f.push(w)}return f}function fA(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 g=0;g<e;g++)if(f[g]!=t[g])return!1}}return!0}function gA(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 g=Hr(1,ki((f-r+1)/t));for(let m=n[r],w=r+g;w<=f;w+=g){const h=n[w];if(h!=null){if(h<=m)return!1;m=h}}return!0}const lm=["January","February","March","April","May","June","July","August","September","October","November","December"],cm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function um(n){return n.slice(0,3)}const mA=cm.map(um),vA=lm.map(um),yA={MMMM:lm,MMM:vA,WWWW:cm,WWW:mA};function Xa(n){return(n<10?"0":"")+n}function bA(n){return(n<10?"00":n<100?"0":"")+n}const wA={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=>Xa(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>Xa(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>Xa(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=>Xa(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>Xa(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>bA(n.getMilliseconds())};function rh(n,t){t=t||yA;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(n);)e.push(f[0][0]=="{"?wA[f[1]]:f[0]);return g=>{let m="";for(let w=0;w<e.length;w++)m+=typeof e[w]=="string"?e[w]:e[w](g,t);return m}}const xA=new Intl.DateTimeFormat().resolvedOptions().timeZone;function CA(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==xA?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const hm=n=>n%1==0,rc=[1,2,2.5,5],kA=Ga(10,-32,0,rc),dm=Ga(10,0,32,rc),AA=dm.filter(hm),Ms=kA.concat(dm),ih=`
|
|
1489
|
+
`,pm="{YYYY}",fm=ih+pm,gm="{M}/{D}",Qa=ih+gm,ic=Qa+"/{YY}",mm="{aa}",SA="{h}:{mm}",ha=SA+mm,vm=ih+ha,ym=":{ss}",on=null;function bm(n){let t=n*1e3,e=t*60,r=e*60,f=r*24,g=f*30,m=f*365,w=(n==1?Ga(10,0,3,rc).filter(hm):Ga(10,-3,0,rc)).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,g,g*2,g*3,g*4,g*6,m,m*2,m*5,m*10,m*25,m*50,m*100]);const h=[[m,pm,on,on,on,on,on,on,1],[f*28,"{MMM}",fm,on,on,on,on,on,1],[f,gm,fm,on,on,on,on,on,1],[r,"{h}"+mm,ic,on,Qa,on,on,on,1],[e,ha,ic,on,Qa,on,on,on,1],[t,ym,ic+" "+ha,on,Qa+" "+ha,on,vm,on,1],[n,ym+".{fff}",ic+" "+ha,on,Qa+" "+ha,on,vm,on,1]];function d(a){return(l,u,c,i,s,p)=>{let b=[],x=s>=m,R=s>=g&&s<m,$=a(c),k=fn($*n,3),C=oh($.getFullYear(),x?0:$.getMonth(),R||x?1:$.getDate()),L=fn(C*n,3);if(R||x){let D=R?s/g:0,E=x?s/m:0,I=k==L?k:fn(oh(C.getFullYear()+E,C.getMonth()+D,1)*n,3),z=new Date(lr(I/n)),P=z.getFullYear(),O=z.getMonth();for(let _=0;I<=i;_++){let A=oh(P+E*_,O+D*_,1),N=A-a(fn(A*n,3));I=fn((+A+N)*n,3),I<=i&&b.push(I)}}else{let D=s>=f?f:s,E=ki(c)-ki(k),I=L+E+tc(k-L,D);b.push(I);let z=a(I),P=z.getHours()+z.getMinutes()/e+z.getSeconds()/r,O=s/r,_=l.axes[u]._space,A=p/_;for(;I=fn(I+s,n==1?0:3),!(I>i);)if(O>1){let N=ki(fn(P+O,6))%24,B=a(I).getHours()-N;B>1&&(B=-1),I-=B*r,P=(P+O)%24;let U=b[b.length-1];fn((I-U)/s,3)*A>=.7&&b.push(I)}else b.push(I)}return b}}return[w,h,d]}const[$A,_A,TA]=bm(1),[MA,IA,EA]=bm(.001);Ga(2,-53,53,[1]);function wm(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 xm(n,t){return(e,r,f,g,m)=>{let w=t.find(i=>m>=i[0])||t[t.length-1],h,d,a,l,u,c;return r.map(i=>{let s=n(i),p=s.getFullYear(),b=s.getMonth(),x=s.getDate(),R=s.getHours(),$=s.getMinutes(),k=s.getSeconds(),C=p!=h&&w[2]||b!=d&&w[3]||x!=a&&w[4]||R!=l&&w[5]||$!=u&&w[6]||k!=c&&w[7]||w[1];return h=p,d=b,a=x,l=R,u=$,c=k,C(s)})}}function RA(n,t){let e=rh(t);return(r,f,g,m,w)=>f.map(h=>e(n(h)))}function oh(n,t,e){return new Date(n,t,e)}function Cm(n,t){return t(n)}const LA="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function km(n,t){return(e,r,f,g)=>g==null?Vu:t(n(r))}function OA(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function NA(n,t){return n.series[t].fill(n,t)}const DA={show:!0,live:!0,isolate:!1,mount:tA,markers:{show:!0,width:2,stroke:OA,fill:NA,dash:"solid"},idx:null,idxs:null,values:[]};function FA(n,t){let e=n.cursor.points,r=Oi(),f=e.size(n,t);wn(r,Ua,f),wn(r,Va,f);let g=f/-2;wn(r,"marginLeft",g),wn(r,"marginTop",g);let m=e.width(n,t,f);return m&&wn(r,"borderWidth",m),r}function PA(n,t){let e=n.series[t].points;return e._fill||e._stroke}function WA(n,t){let e=n.series[t].points;return e._stroke||e._fill}function BA(n,t){return n.series[t].points.size}const sh=[0,0];function zA(n,t,e){return sh[0]=t,sh[1]=e,sh}function oc(n,t,e,r=!0){return f=>{f.button==0&&(!r||f.target==t)&&e(f)}}function ah(n,t,e,r=!0){return f=>{(!r||f.target==t)&&e(f)}}const HA={show:!0,x:!0,y:!0,lock:!1,move:zA,points:{one:!1,show:FA,size:BA,width:0,stroke:WA,fill:PA},bind:{mousedown:oc,mouseup:oc,click:oc,dblclick:oc,mousemove:ah,mouseleave:ah,mouseenter:ah},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},Am={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},lh=tr({},Am,{filter:em}),Sm=tr({},lh,{size:10}),$m=tr({},Am,{show:!1}),ch='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"',_m="bold "+ch,Tm=1.5,Mm={show:!0,scale:"x",stroke:Hu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:_m,side:2,grid:lh,ticks:Sm,border:$m,font:ch,lineGap:Tm,rotate:0},jA="Value",UA="Time",Im={show:!0,scale:"x",auto:!1,sorted:1,min:pn,max:-pn,idxs:[]};function VA(n,t,e,r,f){return t.map(g=>g==null?"":Ju(g))}function qA(n,t,e,r,f,g,m){let w=[],h=Xo.get(f)||0;e=m?e:fn(tc(e,f),h);for(let d=e;d<=r;d=fn(d+f,h))w.push(Object.is(d,-0)?0:d);return w}function uh(n,t,e,r,f,g,m){const w=[],h=n.scales[n.axes[t].scale].log,d=h==10?So:Xg,a=ki(d(e));f=la(h,a),h==10&&(f=Ms[Qi(f,Ms)]);let l=e,u=f*h;h==10&&(u=Ms[Qi(u,Ms)]);do w.push(l),l=l+f,h==10&&!Xo.has(l)&&(l=fn(l,Xo.get(f))),l>=u&&(f=l,u=f*h,h==10&&(u=Ms[Qi(u,Ms)]));while(l<=r);return w}function KA(n,t,e,r,f,g,m){let w=n.scales[n.axes[t].scale].asinh,h=r>w?uh(n,t,Hr(w,e),r,f):[w],d=r>=0&&e<=0?[0]:[];return(e<-w?uh(n,t,Hr(w,-r),-e,f):[w]).reverse().map(a=>-a).concat(d,h)}const Em=/./,GA=/[12357]/,YA=/[125]/,Rm=/1/,hh=(n,t,e,r)=>n.map((f,g)=>t==4&&f==0||g%r==0&&e.test(f.toExponential()[f<0?1:0])?f:null);function XA(n,t,e,r,f){let g=n.axes[e],m=g.scale,w=n.scales[m],h=n.valToPos,d=g._space,a=h(10,m),l=h(9,m)-a>=d?Em:h(7,m)-a>=d?GA:h(5,m)-a>=d?YA:Rm;if(l==Rm){let u=ar(h(1,m)-a);if(u<d)return hh(t.slice().reverse(),w.distr,l,Ni(d/u)).reverse()}return hh(t,w.distr,l,1)}function QA(n,t,e,r,f){let g=n.axes[e],m=g.scale,w=g._space,h=n.valToPos,d=ar(h(1,m)-h(2,m));return d<w?hh(t.slice().reverse(),3,Em,Ni(w/d)).reverse():t}function ZA(n,t,e,r){return r==null?Vu:t==null?"":Ju(t)}const Lm={show:!0,scale:"y",stroke:Hu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:_m,side:3,grid:lh,ticks:Sm,border:$m,font:ch,lineGap:Tm,rotate:0};function JA(n,t){let e=3+(n||1)*2;return fn(e*t,3)}function eS(n,t){let{scale:e,idxs:r}=n.series[0],f=n._data[0],g=n.valToPos(f[r[0]],e,!0),m=n.valToPos(f[r[1]],e,!0),w=ar(m-g),h=n.series[t],d=w/(h.points.space*en);return r[1]-r[0]<=d}const Om={scale:null,auto:!0,sorted:0,min:pn,max:-pn},Nm=(n,t,e,r,f)=>f,Dm={show:!0,auto:!0,sorted:0,gaps:Nm,alpha:1,facets:[tr({},Om,{scale:"x"}),tr({},Om,{scale:"y"})]},Fm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Nm,alpha:1,points:{show:eS,filter:null},values:null,min:pn,max:-pn,idxs:[],path:null,clip:null};function tS(n,t,e,r,f){return e/10}const Pm={time:$k,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},nS=tr({},Pm,{time:!1,ori:1}),Wm={};function Bm(n,t){let e=Wm[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,g,m,w,h,d){for(let a=0;a<e.plots.length;a++)e.plots[a]!=f&&e.plots[a].pub(r,f,g,m,w,h,d)}},n!=null&&(Wm[n]=e)),e}const da=1,dh=2;function Is(n,t,e){const r=n.mode,f=n.series[t],g=r==2?n._data[t]:n._data,m=n.scales,w=n.bbox;let h=g[0],d=r==2?g[1]:g[t],a=r==2?m[f.facets[0].scale]:m[n.series[0].scale],l=r==2?m[f.facets[1].scale]:m[f.scale],u=w.left,c=w.top,i=w.width,s=w.height,p=n.valToPosH,b=n.valToPosV;return a.ori==0?e(f,h,d,a,l,p,b,u,c,i,s,ac,pa,cc,jm,Vm):e(f,h,d,a,l,b,p,c,u,s,i,lc,fa,gh,Um,qm)}function ph(n,t){let e=0,r=0,f=Qt(n.bands,nh);for(let g=0;g<f.length;g++){let m=f[g];m.series[0]==t?e=m.dir:m.series[1]==t&&(m.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function rS(n,t,e,r,f){let g=n.mode,m=n.series[t],w=g==2?m.facets[1].scale:m.scale,h=n.scales[w];return f==-1?h.min:f==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function $o(n,t,e,r,f,g){return Is(n,t,(m,w,h,d,a,l,u,c,i,s,p)=>{let b=m.pxRound;const x=d.dir*(d.ori==0?1:-1),R=d.ori==0?pa:fa;let $,k;x==1?($=e,k=r):($=r,k=e);let C=b(l(w[$],d,s,c)),L=b(u(h[$],a,p,i)),D=b(l(w[k],d,s,c)),E=b(u(g==1?a.max:a.min,a,p,i)),I=new Path2D(f);return R(I,D,E),R(I,C,E),R(I,C,L),I})}function sc(n,t,e,r,f,g){let m=null;if(n.length>0){m=new Path2D;const w=t==0?cc:gh;let h=e;for(let l=0;l<n.length;l++){let u=n[l];if(u[1]>u[0]){let c=u[0]-h;c>0&&w(m,h,r,c,r+g),h=u[1]}}let d=e+f-h,a=10;d>0&&w(m,h,r-a/2,d,r+g+a)}return m}function iS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function fh(n,t,e,r,f,g,m){let w=[],h=n.length;for(let d=f==1?e:r;d>=e&&d<=r;d+=f)if(t[d]===null){let a=d,l=d;if(f==1)for(;++d<=r&&t[d]===null;)l=d;else for(;--d>=e&&t[d]===null;)l=d;let u=g(n[a]),c=l==a?u:g(n[l]),i=a-f;u=m<=0&&i>=0&&i<h?g(n[i]):u;let s=l+f;c=m>=0&&s>=0&&s<h?g(n[s]):c,c>=u&&w.push([u,c])}return w}function zm(n){return n==0?Jg:n==1?lr:t=>Ts(t,n)}function Hm(n){let t=n==0?ac:lc,e=n==0?(f,g,m,w,h,d)=>{f.arcTo(g,m,w,h,d)}:(f,g,m,w,h,d)=>{f.arcTo(m,g,h,w,d)},r=n==0?(f,g,m,w,h)=>{f.rect(g,m,w,h)}:(f,g,m,w,h)=>{f.rect(m,g,h,w)};return(f,g,m,w,h,d=0,a=0)=>{d==0&&a==0?r(f,g,m,w,h):(d=Zi(d,w/2,h/2),a=Zi(a,w/2,h/2),t(f,g+d,m),e(f,g+w,m,g+w,m+h,d),e(f,g+w,m+h,g,m+h,a),e(f,g,m+h,g,m,a),e(f,g,m,g+w,m,d),f.closePath())}}const ac=(n,t,e)=>{n.moveTo(t,e)},lc=(n,t,e)=>{n.moveTo(e,t)},pa=(n,t,e)=>{n.lineTo(t,e)},fa=(n,t,e)=>{n.lineTo(e,t)},cc=Hm(0),gh=Hm(1),jm=(n,t,e,r,f,g)=>{n.arc(t,e,r,f,g)},Um=(n,t,e,r,f,g)=>{n.arc(e,t,r,f,g)},Vm=(n,t,e,r,f,g,m)=>{n.bezierCurveTo(t,e,r,f,g,m)},qm=(n,t,e,r,f,g,m)=>{n.bezierCurveTo(e,t,f,r,m,g)};function Km(n){return(t,e,r,f,g)=>Is(t,e,(m,w,h,d,a,l,u,c,i,s,p)=>{let{pxRound:b,points:x}=m,R,$;d.ori==0?(R=ac,$=jm):(R=lc,$=Um);const k=fn(x.width*en,3);let C=(x.size-x.width)/2*en,L=fn(C*2,3),D=new Path2D,E=new Path2D,{left:I,top:z,width:P,height:O}=t.bbox;cc(E,I-L,z-L,P+L*2,O+L*2);const _=A=>{if(h[A]!=null){let N=b(l(w[A],d,s,c)),B=b(u(h[A],a,p,i));R(D,N+C,B),$(D,N,B,C,0,ec*2)}};if(g)g.forEach(_);else for(let A=r;A<=f;A++)_(A);return{stroke:k>0?D:null,fill:D,clip:E,flags:da|dh}})}function Gm(n){return(t,e,r,f,g,m)=>{r!=f&&(g!=r&&m!=r&&n(t,e,r),g!=f&&m!=f&&n(t,e,f),n(t,e,m))}}const oS=Gm(pa),sS=Gm(fa);function Ym(n){const t=Qt(n==null?void 0:n.alignGaps,0);return(e,r,f,g)=>Is(e,r,(m,w,h,d,a,l,u,c,i,s,p)=>{[f,g]=Ql(h,f,g);let b=m.pxRound,x=P=>b(l(P,d,s,c)),R=P=>b(u(P,a,p,i)),$,k;d.ori==0?($=pa,k=oS):($=fa,k=sS);const C=d.dir*(d.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},D=L.stroke;let E=!1;if(g-f>=s*4){let P=he=>e.posToVal(he,d.key,!0),O=null,_=null,A,N,B,U=x(w[C==1?f:g]),K=x(w[f]),Z=x(w[g]),J=P(C==1?K+1:Z-1);for(let he=C==1?f:g;he>=f&&he<=g;he+=C){let ne=w[he],le=(C==1?ne<J:ne>J)?U:x(ne),se=h[he];le==U?se!=null?(N=se,O==null?($(D,le,R(N)),A=O=_=N):N<O?O=N:N>_&&(_=N)):se===null&&(E=!0):(O!=null&&k(D,U,R(O),R(_),R(A),R(N)),se!=null?(N=se,$(D,le,R(N)),O=_=A=N):(O=_=null,se===null&&(E=!0)),U=le,J=P(U+C))}O!=null&&O!=_&&B!=U&&k(D,U,R(O),R(_),R(A),R(N))}else for(let P=C==1?f:g;P>=f&&P<=g;P+=C){let O=h[P];O===null?E=!0:O!=null&&$(D,x(w[P]),R(O))}let[I,z]=ph(e,r);if(m.fill!=null||I!=0){let P=L.fill=new Path2D(D),O=m.fillTo(e,r,m.min,m.max,I),_=R(O),A=x(w[f]),N=x(w[g]);C==-1&&([N,A]=[A,N]),$(P,N,_),$(P,A,_)}if(!m.spanGaps){let P=[];E&&P.push(...fh(w,h,f,g,C,x,t)),L.gaps=P=m.gaps(e,r,f,g,P),L.clip=sc(P,d.ori,c,i,s,p)}return z!=0&&(L.band=z==2?[$o(e,r,f,g,D,-1),$o(e,r,f,g,D,1)]:$o(e,r,f,g,D,z)),L})}function aS(n){const t=Qt(n.align,1),e=Qt(n.ascDesc,!1),r=Qt(n.alignGaps,0),f=Qt(n.extend,!1);return(g,m,w,h)=>Is(g,m,(d,a,l,u,c,i,s,p,b,x,R)=>{[w,h]=Ql(l,w,h);let $=d.pxRound,{left:k,width:C}=g.bbox,L=Z=>$(i(Z,u,x,p)),D=Z=>$(s(Z,c,R,b)),E=u.ori==0?pa:fa;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},z=I.stroke,P=u.dir*(u.ori==0?1:-1);let O=D(l[P==1?w:h]),_=L(a[P==1?w:h]),A=_,N=_;f&&t==-1&&(N=k,E(z,N,O)),E(z,_,O);for(let Z=P==1?w:h;Z>=w&&Z<=h;Z+=P){let J=l[Z];if(J==null)continue;let he=L(a[Z]),ne=D(J);t==1?E(z,he,O):E(z,A,ne),E(z,he,ne),O=ne,A=he}let B=A;f&&t==1&&(B=k+C,E(z,B,O));let[U,K]=ph(g,m);if(d.fill!=null||U!=0){let Z=I.fill=new Path2D(z),J=d.fillTo(g,m,d.min,d.max,U),he=D(J);E(Z,B,he),E(Z,N,he)}if(!d.spanGaps){let Z=[];Z.push(...fh(a,l,w,h,P,L,r));let J=d.width*en/2,he=e||t==1?J:-J,ne=e||t==-1?-J:J;Z.forEach(le=>{le[0]+=he,le[1]+=ne}),I.gaps=Z=d.gaps(g,m,w,h,Z),I.clip=sc(Z,u.ori,p,b,x,R)}return K!=0&&(I.band=K==2?[$o(g,m,w,h,z,-1),$o(g,m,w,h,z,1)]:$o(g,m,w,h,z,K)),I})}function Xm(n,t,e,r,f,g,m=pn){if(n.length>1){let w=null;for(let h=0,d=1/0;h<n.length;h++)if(t[h]!==void 0){if(w!=null){let a=ar(n[h]-n[w]);a<d&&(d=a,m=ar(e(n[h],r,f,g)-e(n[w],r,f,g)))}w=h}}return m}function lS(n){n=n||Ya;const t=Qt(n.size,[.6,pn,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 g=zt(f),m=1-t[0],w=Qt(t[1],pn),h=Qt(t[2],1),d=Qt(n.disp,Ya),a=Qt(n.each,c=>{}),{fill:l,stroke:u}=d;return(c,i,s,p)=>Is(c,i,(b,x,R,$,k,C,L,D,E,I,z)=>{let P=b.pxRound,O=e,_=r*en,A=w*en,N=h*en,B,U;$.ori==0?[B,U]=g(c,i):[U,B]=g(c,i);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?cc:gh,J=$.ori==0?a:(je,Lt,Zt,On,yr,cr,gn)=>{a(je,Lt,Zt,yr,On,gn,cr)},he=Qt(c.bands,nh).find(je=>je.series[0]==i),ne=he!=null?he.dir:0,le=b.fillTo(c,i,b.min,b.max,ne),se=P(L(le,k,z,E)),de,me,$e,Te=I,Me=P(b.width*en),Xe=!1,Ke=null,at=null,et=null,lt=null;l!=null&&(Me==0||u!=null)&&(Xe=!0,Ke=l.values(c,i,s,p),at=new Map,new Set(Ke).forEach(je=>{je!=null&&at.set(je,new Path2D)}),Me>0&&(et=u.values(c,i,s,p),lt=new Map,new Set(et).forEach(je=>{je!=null&<.set(je,new Path2D)})));let{x0:Yt,size:xn}=d;if(Yt!=null&&xn!=null){O=1,x=Yt.values(c,i,s,p),Yt.unit==2&&(x=x.map(Lt=>c.posToVal(D+Lt*I,$.key,!0)));let je=xn.values(c,i,s,p);xn.unit==2?me=je[0]*I:me=C(je[0],$,I,D)-C(0,$,I,D),Te=Xm(x,R,C,$,I,D,Te),$e=Te-me+_}else Te=Xm(x,R,C,$,I,D,Te),$e=Te*m+_,me=Te-$e;$e<1&&($e=0),Me>=me/2&&(Me=0),$e<5&&(P=Jg);let Wt=$e>0,vr=Te-$e-(Wt?Me:0);me=P(th(vr,N,A)),de=(O==0?me/2:O==K?0:me)-O*K*((O==0?_/2:0)+(Wt?Me/2:0));const un={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Ln=Xe?null:new Path2D;let Xn=null;if(he!=null)Xn=c.data[he.series[1]];else{let{y0:je,y1:Lt}=d;je!=null&&Lt!=null&&(R=Lt.values(c,i,s,p),Xn=je.values(c,i,s,p))}let Tr=B*me,mt=U*me;for(let je=K==1?s:p;je>=s&&je<=p;je+=K){let Lt=R[je];if(Lt==null)continue;if(Xn!=null){let Kt=Xn[je]??0;if(Lt-Kt==0)continue;se=L(Kt,k,z,E)}let Zt=$.distr!=2||d!=null?x[je]:je,On=C(Zt,$,I,D),yr=L(Qt(Lt,le),k,z,E),cr=P(On-de),gn=P(Hr(yr,se)),Wn=P(Zi(yr,se)),Nn=gn-Wn;if(Lt!=null){let Kt=Lt<0?mt:Tr,ln=Lt<0?Tr:mt;Xe?(Me>0&&et[je]!=null&&Z(lt.get(et[je]),cr,Wn+ki(Me/2),me,Hr(0,Nn-Me),Kt,ln),Ke[je]!=null&&Z(at.get(Ke[je]),cr,Wn+ki(Me/2),me,Hr(0,Nn-Me),Kt,ln)):Z(Ln,cr,Wn+ki(Me/2),me,Hr(0,Nn-Me),Kt,ln),J(c,i,je,cr-Me/2,Wn,me+Me,Nn)}}return Me>0?un.stroke=Xe?lt:Ln:Xe||(un._fill=b.width==0?b._fill:b._stroke??b._fill,un.width=0),un.fill=Xe?at:Ln,un})}function cS(n,t){const e=Qt(t==null?void 0:t.alignGaps,0);return(r,f,g,m)=>Is(r,f,(w,h,d,a,l,u,c,i,s,p,b)=>{[g,m]=Ql(d,g,m);let x=w.pxRound,R=B=>x(u(B,a,p,i)),$=B=>x(c(B,l,b,s)),k,C,L;a.ori==0?(k=ac,L=pa,C=Vm):(k=lc,L=fa,C=qm);const D=a.dir*(a.ori==0?1:-1);let E=R(h[D==1?g:m]),I=E,z=[],P=[];for(let B=D==1?g:m;B>=g&&B<=m;B+=D)if(d[B]!=null){let U=h[B],K=R(U);z.push(I=K),P.push($(d[B]))}const O={stroke:n(z,P,k,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:da},_=O.stroke;let[A,N]=ph(r,f);if(w.fill!=null||A!=0){let B=O.fill=new Path2D(_),U=w.fillTo(r,f,w.min,w.max,A),K=$(U);L(B,I,K),L(B,E,K)}if(!w.spanGaps){let B=[];B.push(...fh(h,d,g,m,D,R,e)),O.gaps=B=w.gaps(r,f,g,m,B),O.clip=sc(B,a.ori,i,s,p,b)}return N!=0&&(O.band=N==2?[$o(r,f,g,m,_,-1),$o(r,f,g,m,_,1)]:$o(r,f,g,m,_,N)),O})}function uS(n){return cS(hS,n)}function hS(n,t,e,r,f,g){const m=n.length;if(m<2)return null;const w=new Path2D;if(e(w,n[0],t[0]),m==2)r(w,n[1],t[1]);else{let h=Array(m),d=Array(m-1),a=Array(m-1),l=Array(m-1);for(let u=0;u<m-1;u++)a[u]=t[u+1]-t[u],l[u]=n[u+1]-n[u],d[u]=a[u]/l[u];h[0]=d[0];for(let u=1;u<m-1;u++)d[u]===0||d[u-1]===0||d[u-1]>0!=d[u]>0?h[u]=0:(h[u]=3*(l[u-1]+l[u])/((2*l[u]+l[u-1])/d[u-1]+(l[u]+2*l[u-1])/d[u]),isFinite(h[u])||(h[u]=0));h[m-1]=d[m-2];for(let u=0;u<m-1;u++)f(w,n[u]+l[u]/3,t[u]+h[u]*l[u]/3,n[u+1]-l[u]/3,t[u+1]-h[u+1]*l[u]/3,n[u+1],t[u+1])}return w}const mh=new Set;function Qm(){for(let n of mh)n.syncRect(!0)}sa&&($s(Vk,aa,Qm),$s(qk,aa,Qm,!0),$s(Yl,aa,()=>{Or.pxRatio=en}));const dS=Ym(),pS=Km();function Zm(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((f,g)=>vh(f,g,t,e))}function fS(n,t){return n.map((e,r)=>r==0?{}:tr({},t,e))}function vh(n,t,e,r){return tr({},t==0?e:r,n)}function Jm(n,t,e){return t==null?ca:[t,e]}const gS=Jm;function mS(n,t,e){return t==null?ca:Jl(t,e,Zu,!0)}function ev(n,t,e,r){return t==null?ca:Zl(t,e,n.scales[r].log,!1)}const vS=ev;function tv(n,t,e,r){return t==null?ca:Qu(t,e,n.scales[r].log,!1)}const yS=tv;function bS(n,t,e,r,f){let g=Hr(Qg(n),Qg(t)),m=t-n,w=Qi(f/r*m,e);do{let h=e[w],d=r*h/m;if(d>=f&&g+(h<5?Xo.get(h):0)<=17)return[h,d]}while(++w<e.length);return[0,0]}function nv(n){let t,e;return n=n.replace(/(\d+)px/,(r,f)=>(t=lr((e=+f)*en))+"px"),[n,t,e]}function wS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=fn(t[2]*en,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Or(n,t,e){const r={mode:Qt(n.mode,1)},f=r.mode;function g(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function m(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function w(V,X,ie,oe){return X.ori==0?g(V,X,ie,oe):m(V,X,ie,oe)}r.valToPosH=g,r.valToPosV=m;let h=!1;r.status=0;const d=r.root=Oi(_k);if(n.id!=null&&(d.id=n.id),xi(d,n.class),n.title){let V=Oi(Ik,d);V.textContent=n.title}const a=Xi("canvas"),l=r.ctx=a.getContext("2d"),u=Oi(Ek,d);$s("click",u,V=>{V.target===i&&(rn!=Pi||jt!=wo)&&Hn.click(r,V)},!0);const c=r.under=Oi(Rk,u);u.appendChild(a);const i=r.over=Oi(Lk,u);n=ua(n);const s=+Qt(n.pxAlign,1),p=zm(s);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const b=n.ms||.001,x=r.series=f==1?Zm(n.series||[],Im,Fm,!1):fS(n.series||[null],Dm),R=r.axes=Zm(n.axes||[],Mm,Lm,!0),$=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=zt(V.fill||null),V.dir=Qt(V.dir,-1)});const C=f==2?x[1].facets[0].scale:x[0].scale,L={axes:Eo,series:ba},D=(n.drawOrder||["axes","series"]).map(V=>L[V]);function E(V){const X=V.distr==3?ie=>So(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>eh(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:xe}=V,Ie=xe-ge;return(oe-ge)/Ie}}function I(V){let X=$[V];if(X==null){let ie=(n.scales||Ya)[V]||Ya;if(ie.from!=null){I(ie.from);let oe=tr({},$[ie.from],ie,{key:V});oe.valToPct=E(oe),$[V]=oe}else{X=$[V]=tr({},V==C?Pm:nS,ie),X.key=V;let oe=X.time,ge=X.range,xe=Qo(ge);if((V!=C||f==2&&!oe)&&(xe&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Kg:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Kg:{mode:1,hard:ge[1],soft:ge[1]}},xe=!1),!xe&&nc(ge))){let Ie=ge;ge=(Pe,Be,qe)=>Be==null?ca:Jl(Be,qe,Ie)}X.range=zt(ge||(oe?gS:V==C?X.distr==3?vS:X.distr==4?yS:Jm:X.distr==3?ev:X.distr==4?tv:mS)),X.auto=zt(xe?!1:X.auto),X.clamp=zt(X.clamp||tS),X._min=X._max=null,X.valToPct=E(X)}}}I("x"),I("y"),f==1&&x.forEach(V=>{I(V.scale)}),R.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const z=$[C],P=z.distr;let O,_;z.ori==0?(xi(d,Tk),O=g,_=m):(xi(d,Mk),O=m,_=g);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(lr(V/b))),B=n.fmtDate||rh,U=b==1?TA(N):EA(N),K=xm(N,wm(b==1?_A:IA,B)),Z=km(N,Cm(LA,B)),J=[],he=r.legend=tr({},DA,n.legend),ne=r.cursor=tr({},HA,{drag:{y:f==2}},n.cursor),le=he.show,se=ne.show,de=he.markers;he.idxs=J,de.width=zt(de.width),de.dash=zt(de.dash),de.stroke=zt(de.stroke),de.fill=zt(de.fill);let me,$e,Te,Me=[],Xe=[],Ke,at=!1,et={};if(he.live){const V=x[1]?x[1].values:null;at=V!=null,Ke=at?V(r,1,0):{_:0};for(let X in Ke)et[X]=Vu}if(le)if(me=Xi("table",Wk,d),Te=Xi("tbody",null,me),he.mount(r,me),at){$e=Xi("thead",null,me,Te);let V=Xi("tr",null,$e);Xi("th",null,V);for(var lt in Ke)Xi("th",Eg,V).textContent=lt}else xi(me,zk),he.live&&xi(me,Bk);const Yt={show:!0},xn={show:!1};function Wt(V,X){if(X==0&&(at||!he.live||f==2))return ca;let ie=[],oe=Xi("tr",Hk,Te,Te.childNodes[X]);xi(oe,V.class),V.show||xi(oe,Ss);let ge=Xi("th",null,oe);if(de.show){let Pe=Oi(jk,ge);if(X>0){let Be=de.width(r,X);Be&&(Pe.style.border=Be+"px "+de.dash(r,X)+" "+de.stroke(r,X)),Pe.style.background=de.fill(r,X)}}let xe=Oi(Eg,ge);V.label instanceof HTMLElement?xe.appendChild(V.label):xe.textContent=V.label,X>0&&(de.show||(xe.style.color=V.width>0?de.stroke(r,X):de.fill(r,X)),un("click",ge,Pe=>{if(ne._lock)return;di(Pe);let Be=x.indexOf(V);if((Pe.ctrlKey||Pe.metaKey)!=he.isolate){let qe=x.some((Ye,Ze)=>Ze>0&&Ze!=Be&&Ye.show);x.forEach((Ye,Ze)=>{Ze>0&&Zr(Ze,qe?Ze==Be?Yt:xn:Yt,!0,ct.setSeries)})}else Zr(Be,{show:!V.show},!0,ct.setSeries)},!1),pi&&un(Ng,ge,Pe=>{ne._lock||(di(Pe),Zr(x.indexOf(V),zi,!0,ct.setSeries))},!1));for(var Ie in Ke){let Pe=Xi("td",Uk,oe);Pe.textContent="--",ie.push(Pe)}return[oe,ie]}const vr=new Map;function un(V,X,ie,oe=!0){const ge=vr.get(X)||{},xe=ne.bind[V](r,X,ie,oe);xe&&($s(V,X,ge[V]=xe),vr.set(X,ge))}function Ln(V,X,ie){const oe=vr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Xu(ge,X,oe[ge]),delete oe[ge]);V==null&&vr.delete(X)}let Xn=0,Tr=0,mt=0,je=0,Lt=0,Zt=0,On=Lt,yr=Zt,cr=mt,gn=je,Wn=0,Nn=0,Kt=0,ln=0;r.bbox={};let Dr=!1,Kr=!1,Gr=!1,Ai=!1,ci=!1,Bn=!1;function to(V,X,ie){(ie||V!=r.width||X!=r.height)&&ui(V,X),io(!1),Gr=!0,Kr=!0,bo()}function ui(V,X){r.width=Xn=mt=V,r.height=Tr=je=X,Lt=Zt=0,hi(),Zo();let ie=r.bbox;Wn=ie.left=Ts(Lt*en,.5),Nn=ie.top=Ts(Zt*en,.5),Kt=ie.width=Ts(mt*en,.5),ln=ie.height=Ts(je*en,.5)}const Os=3;function Yr(){let V=!1,X=0;for(;!V;){X++;let ie=wa(X),oe=ul(X);V=X==Os||ie&&oe,V||(ui(r.width,r.height),Kr=!0)}}function $n({width:V,height:X}){to(V,X)}r.setSize=$n;function hi(){let V=!1,X=!1,ie=!1,oe=!1;R.forEach((ge,xe)=>{if(ge.show&&ge._show){let{side:Ie,_size:Pe}=ge,Be=Ie%2,qe=ge.label!=null?ge.labelSize:0,Ye=Pe+qe;Ye>0&&(Be?(mt-=Ye,Ie==3?(Lt+=Ye,oe=!0):ie=!0):(je-=Ye,Ie==0?(Zt+=Ye,V=!0):X=!0))}}),gi[0]=V,gi[1]=ie,gi[2]=X,gi[3]=oe,mt-=wr[1]+wr[3],Lt+=wr[3],je-=wr[2]+wr[0],Zt+=wr[0]}function Zo(){let V=Lt+mt,X=Zt+je,ie=Lt,oe=Zt;function ge(xe,Ie){switch(xe){case 1:return V+=Ie,V-Ie;case 2:return X+=Ie,X-Ie;case 3:return ie-=Ie,ie+Ie;case 0:return oe-=Ie,oe+Ie}}R.forEach((xe,Ie)=>{if(xe.show&&xe._show){let Pe=xe.side;xe._pos=ge(Pe,xe._size),xe.label!=null&&(xe._lpos=ge(Pe,xe.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,xe,Ie,Pe)=>{if(xe==0)return Ie;let Be=Ie,qe=ie(ge,xe,Ie,Pe)??pn,Ye=qe>=0&&qe<pn,Ze=z.ori==0?mt:je,yt=ne.left,Ft=t[0],wt=t[xe];if(X.has(wt[Ie])){Be=null;let Nt=null,dt=null,rt;if(oe==0||oe==-1)for(rt=Ie;Nt==null&&rt-- >0;)X.has(wt[rt])||(Nt=rt);if(oe==0||oe==1)for(rt=Ie;dt==null&&rt++<wt.length;)X.has(wt[rt])||(dt=rt);if(Nt!=null||dt!=null)if(Ye){let vn=Nt==null?-1/0:O(Ft[Nt],z,Ze,0),In=dt==null?1/0:O(Ft[dt],z,Ze,0),or=yt-vn,Vt=In-yt;or<=Vt?or<=qe&&(Be=Nt):Vt<=qe&&(Be=dt)}else Be=dt==null?Nt:Nt==null?dt:Ie-Nt<=dt-Ie?Nt:dt}else Ye&&ar(yt-O(Ft[Ie],z,Ze,0))>qe&&(Be=null);return Be}}const di=V=>{ne.event=V};ne.idxs=J,ne._lock=!1;let Cn=ne.points;Cn.show=zt(Cn.show),Cn.size=zt(Cn.size),Cn.stroke=zt(Cn.stroke),Cn.width=zt(Cn.width),Cn.fill=zt(Cn.fill);const ur=r.focus=tr({},n.focus||{alpha:.3},ne.focus),pi=ur.prox>=0,kn=pi&&Cn.one;let _n=[],br=[],fi=[];function go(V,X){let ie=Cn.show(r,X);if(ie instanceof HTMLElement)return xi(ie,Pk),xi(ie,V.class),uo(ie,-10,-10,mt,je),i.insertBefore(ie,_n[X]),ie}function mo(V,X){if(f==1||X>0){let ie=f==1&&$[V.scale].time,oe=V.value;V.value=ie?sm(oe)?km(N,Cm(oe,B)):oe||Z:oe||ZA,V.label=V.label||(ie?UA:jA)}if(kn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||dS||nA,V.fillTo=zt(V.fillTo||rS),V.pxAlign=+Qt(V.pxAlign,s),V.pxRound=zm(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=JA(Hr(1,V.width),1),oe=V.points=tr({},{size:ie,width:Hr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:pS,_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(le){let ie=Wt(V,X);Me.splice(X,0,ie[0]),Xe.splice(X,0,ie[1]),he.values.push(null)}if(se){J.splice(X,0,null);let ie=null;kn?X==0&&(ie=go(V,X)):X>0&&(ie=go(V,X)),_n.splice(X,0,ie),br.splice(X,0,0),fi.splice(X,0,0)}tt("addSeries",X)}function Jo(V,X){X=X??x.length,V=f==1?vh(V,X,Im,Fm):vh(V,X,{},Dm),x.splice(X,0,V),mo(x[X],X)}r.addSeries=Jo;function Xr(V){if(x.splice(V,1),le){he.values.splice(V,1),Xe.splice(V,1);let X=Me.splice(V,1)[0];Ln(null,X.firstChild),X.remove()}se&&(J.splice(V,1),_n.splice(V,1)[0].remove(),br.splice(V,1),fi.splice(V,1)),tt("delSeries",V)}r.delSeries=Xr;const gi=[!1,!1,!1,!1];function Fr(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=$[V.scale];oe==null&&(V.scale=ie?x[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),Qo(V.incrs)&&V.incrs.forEach(Ie=>{!Xo.has(Ie)&&Xo.set(Ie,im(Ie))}),V.incrs=zt(V.incrs||(oe.distr==2?AA:ge?b==1?$A:MA:Ms)),V.splits=zt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?uh:oe.distr==4?KA:qA)),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 xe=V.values;V.values=Qo(xe)&&!Qo(xe[0])?zt(xe):ge?Qo(xe)?xm(N,wm(xe,B)):sm(xe)?RA(N,xe):xe||K:xe||VA,V.filter=zt(V.filter||(oe.distr>=3&&oe.log==10?XA:oe.distr==3&&oe.log==2?QA:em)),V.font=nv(V.font),V.labelFont=nv(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&&(gi[X]=!0,V._el=Oi(Ok,u))}}function Ot(V,X,ie,oe){let[ge,xe,Ie,Pe]=ie,Be=X%2,qe=0;return Be==0&&(Pe||xe)&&(qe=X==0&&!ge||X==2&&!Ie?lr(Mm.size/3):0),Be==1&&(ge||Ie)&&(qe=X==1&&!xe||X==3&&!Pe?lr(Lm.size/2):0),qe}const To=r.padding=(n.padding||[Ot,Ot,Ot,Ot]).map(V=>zt(Qt(V,Ot))),wr=r._padding=To.map((V,X)=>V(r,X,gi,0));let ce,ze=null,Fe=null;const St=f==1?x[0].idxs:null;let Gt=null,Ht=!1;function xr(V,X){if(t=V??[],r.data=r._data=t,f==2){ce=0;for(let ie=1;ie<x.length;ie++)ce+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Gt=t[0],ce=Gt.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(ce);for(let ge=0;ge<ce;ge++)oe[ge]=ge}r._data=t=ie}if(io(!0),tt("setData"),P==2&&(Gr=!0),X!==!1){let ie=z;ie.auto(r,Ht)?hr():rr(C,ie.min,ie.max),Ai=Ai||ne.left>=0,Bn=!0,bo()}}r.setData=xr;function hr(){Ht=!0;let V,X;f==1&&(ce>0?(ze=St[0]=0,Fe=St[1]=ce-1,V=t[0][ze],X=t[0][Fe],P==2?(V=ze,X=Fe):V==X&&(P==3?[V,X]=Zl(V,V,z.log,!1):P==4?[V,X]=Qu(V,V,z.log,!1):z.time?X=V+lr(86400/b):[V,X]=Jl(V,X,Zu,!0))):(ze=St[0]=V=null,Fe=St[1]=X=null)),rr(C,V,X)}let zn,Cr,mn,no,Pr,es,Ns,Ds,ts,dr;function Fs(V,X,ie,oe,ge,xe){V??(V=Lg),ie??(ie=nh),oe??(oe="butt"),ge??(ge=Lg),xe??(xe="round"),V!=zn&&(l.strokeStyle=zn=V),ge!=Cr&&(l.fillStyle=Cr=ge),X!=mn&&(l.lineWidth=mn=X),xe!=Pr&&(l.lineJoin=Pr=xe),oe!=es&&(l.lineCap=es=oe),ie!=no&&l.setLineDash(no=ie)}function Mo(V,X,ie,oe){X!=Cr&&(l.fillStyle=Cr=X),V!=Ns&&(l.font=Ns=V),ie!=Ds&&(l.textAlign=Ds=ie),oe!=ts&&(l.textBaseline=ts=oe)}function ns(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,Ht)&&(X==null||X.min==null)){let xe=Qt(ze,0),Ie=Qt(Fe,oe.length-1),Pe=ie.min==null?Xk(oe,xe,Ie,ge,V.distr==3):[ie.min,ie.max];V.min=Zi(V.min,ie.min=Pe[0]),V.max=Hr(V.max,ie.max=Pe[1])}}const rs={min:null,max:null};function vo(){for(let oe in $){let ge=$[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,Ht))&&(A[oe]=rs)}for(let oe in $){let ge=$[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=rs)}A[C]!=null&&io(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let xe=V[oe]=ua($[oe],oA);if(ge.min!=null)tr(xe,ge);else if(oe!=C||f==2)if(ce==0&&xe.from==null){let Ie=xe.range(r,null,null,oe);xe.min=Ie[0],xe.max=Ie[1]}else xe.min=pn,xe.max=-pn}}if(ce>0){x.forEach((oe,ge)=>{if(f==1){let xe=oe.scale,Ie=A[xe];if(Ie==null)return;let Pe=V[xe];if(ge==0){let Be=Pe.range(r,Pe.min,Pe.max,xe);Pe.min=Be[0],Pe.max=Be[1],ze=Qi(Pe.min,t[0]),Fe=Qi(Pe.max,t[0]),Fe-ze>1&&(t[0][ze]<Pe.min&&ze++,t[0][Fe]>Pe.max&&Fe--),oe.min=Gt[ze],oe.max=Gt[Fe]}else oe.show&&oe.auto&&ns(Pe,Ie,oe,t[ge],oe.sorted);oe.idxs[0]=ze,oe.idxs[1]=Fe}else if(ge>0&&oe.show&&oe.auto){let[xe,Ie]=oe.facets,Pe=xe.scale,Be=Ie.scale,[qe,Ye]=t[ge],Ze=V[Pe],yt=V[Be];Ze!=null&&ns(Ze,A[Pe],xe,qe,xe.sorted),yt!=null&&ns(yt,A[Be],Ie,Ye,Ie.sorted),oe.min=Ie.min,oe.max=Ie.max}});for(let oe in V){let ge=V[oe],xe=A[oe];if(ge.from==null&&(xe==null||xe.min==null)){let Ie=ge.range(r,ge.min==pn?null:ge.min,ge.max==-pn?null:ge.max,oe);ge.min=Ie[0],ge.max=Ie[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let xe=V[ge.from];if(xe.min==null)ge.min=ge.max=null;else{let Ie=ge.range(r,xe.min,xe.max,oe);ge.min=Ie[0],ge.max=Ie[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],xe=$[oe];if(xe.min!=ge.min||xe.max!=ge.max){xe.min=ge.min,xe.max=ge.max;let Ie=xe.distr;xe._min=Ie==3?So(xe.min):Ie==4?eh(xe.min,xe.asinh):Ie==100?xe.fwd(xe.min):xe.min,xe._max=Ie==3?So(xe.max):Ie==4?eh(xe.max,xe.asinh):Ie==100?xe.fwd(xe.max):xe.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,ge)=>{f==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Gr=!0,tt("setScale",oe);se&&ne.left>=0&&(Ai=Bn=!0)}for(let oe in A)A[oe]=null}function Ps(V){let X=th(ze-1,0,ce-1),ie=th(Fe+1,0,ce-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<ce-1;)ie++;return[X,ie]}function ba(){if(ce>0){let V=x.some(X=>X._focus)&&dr!=ur.alpha;V&&(l.globalAlpha=dr=ur.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(is(ie,!1),is(ie,!0),X._paths==null)){let oe=dr;dr!=X.alpha&&(l.globalAlpha=dr=X.alpha);let ge=f==2?[0,t[ie][0].length-1]:Ps(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),dr!=oe&&(l.globalAlpha=dr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=dr;dr!=X.alpha&&(l.globalAlpha=dr=X.alpha),X._paths!=null&&os(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,xe=X.points.show(r,ie,ze,Fe,ge),Ie=X.points.filter(r,ie,xe,ge);(xe||Ie)&&(X.points._paths=X.points.paths(r,ie,ze,Fe,Ie),os(ie,!0))}dr!=oe&&(l.globalAlpha=dr=oe),tt("drawSeries",ie)}}),V&&(l.globalAlpha=dr=1)}}function is(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function os(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:ge,clip:xe,flags:Ie,_stroke:Pe=ie._stroke,_fill:Be=ie._fill,_width:qe=ie.width}=ie._paths;qe=fn(qe*en,3);let Ye=null,Ze=qe%2/2;X&&Be==null&&(Be=qe>0?"#fff":Pe);let yt=ie.pxAlign==1&&Ze>0;if(yt&&l.translate(Ze,Ze),!X){let Ft=Wn-qe/2,wt=Nn-qe/2,Nt=Kt+qe,dt=ln+qe;Ye=new Path2D,Ye.rect(Ft,wt,Nt,dt)}X?Io(Pe,qe,ie.dash,ie.cap,Be,oe,ge,Ie,xe):Ws(V,Pe,qe,ie.dash,ie.cap,Be,oe,ge,Ie,Ye,xe),yt&&l.translate(-Ze,-Ze)}function Ws(V,X,ie,oe,ge,xe,Ie,Pe,Be,qe,Ye){let Ze=!1;Be!=0&&k.forEach((yt,Ft)=>{if(yt.series[0]==V){let wt=x[yt.series[1]],Nt=t[yt.series[1]],dt=(wt._paths||Ya).band;Qo(dt)&&(dt=yt.dir==1?dt[0]:dt[1]);let rt,vn=null;wt.show&&dt&&Zk(Nt,ze,Fe)?(vn=yt.fill(r,Ft)||xe,rt=wt._paths.clip):dt=null,Io(X,ie,oe,ge,vn,Ie,Pe,Be,qe,Ye,rt,dt),Ze=!0}}),Ze||Io(X,ie,oe,ge,xe,Ie,Pe,Be,qe,Ye)}const ss=da|dh;function Io(V,X,ie,oe,ge,xe,Ie,Pe,Be,qe,Ye,Ze){Fs(V,X,ie,oe,ge),(Be||qe||Ze)&&(l.save(),Be&&l.clip(Be),qe&&l.clip(qe)),Ze?(Pe&ss)==ss?(l.clip(Ze),Ye&&l.clip(Ye),pr(ge,Ie),Fi(V,xe,X)):Pe&dh?(pr(ge,Ie),l.clip(Ze),Fi(V,xe,X)):Pe&da&&(l.save(),l.clip(Ze),Ye&&l.clip(Ye),pr(ge,Ie),l.restore(),Fi(V,xe,X)):(pr(ge,Ie),Fi(V,xe,X)),(Be||qe||Ze)&&l.restore()}function Fi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{l.strokeStyle=zn=ge,l.stroke(oe)}):X!=null&&V&&l.stroke(X))}function pr(V,X){X instanceof Map?X.forEach((ie,oe)=>{l.fillStyle=Cr=oe,l.fill(ie)}):X!=null&&V&&l.fill(X)}function yo(V,X,ie,oe){let ge=R[V],xe;if(oe<=0)xe=[0,0];else{let Ie=ge._space=ge.space(r,V,X,ie,oe),Pe=ge._incrs=ge.incrs(r,V,X,ie,oe,Ie);xe=bS(X,ie,Pe,oe,Ie)}return ge._found=xe}function ro(V,X,ie,oe,ge,xe,Ie,Pe,Be,qe){let Ye=Ie%2/2;s==1&&l.translate(Ye,Ye),Fs(Pe,Ie,Be,qe,Pe),l.beginPath();let Ze,yt,Ft,wt,Nt=ge+(oe==0||oe==3?-xe:xe);ie==0?(yt=ge,wt=Nt):(Ze=ge,Ft=Nt);for(let dt=0;dt<V.length;dt++)X[dt]!=null&&(ie==0?Ze=Ft=V[dt]:yt=wt=V[dt],l.moveTo(Ze,yt),l.lineTo(Ft,wt));l.stroke(),s==1&&l.translate(-Ye,-Ye)}function wa(V){let X=!0;return R.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,io(!1));return}else ie._show||(X=!1,ie._show=!0,io(!1));let xe=ie.side,Ie=xe%2,{min:Pe,max:Be}=ge,[qe,Ye]=yo(oe,Pe,Be,Ie==0?mt:je);if(Ye==0)return;let Ze=ge.distr==2,yt=ie._splits=ie.splits(r,oe,Pe,Be,qe,Ye,Ze),Ft=ge.distr==2?yt.map(rt=>Gt[rt]):yt,wt=ge.distr==2?Gt[yt[1]]-Gt[yt[0]]:qe,Nt=ie._values=ie.values(r,ie.filter(r,Ft,oe,Ye,wt),oe,Ye,wt);ie._rotate=xe==2?ie.rotate(r,Nt,oe,Ye):0;let dt=ie._size;ie._size=Ni(ie.size(r,Nt,oe,V)),dt!=null&&ie._size!=dt&&(X=!1)}),X}function ul(V){let X=!0;return To.forEach((ie,oe)=>{let ge=ie(r,oe,gi,V);ge!=wr[oe]&&(X=!1),wr[oe]=ge}),X}function Eo(){for(let V=0;V<R.length;V++){let X=R[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,xe,Ie=X.stroke(r,V),Pe=ie==0||ie==3?-1:1,[Be,qe]=X._found;if(X.label!=null){let dn=X.labelGap*Pe,$r=lr((X._lpos+dn)*en);Mo(X.labelFont[0],Ie,"center",ie==2?qa:Rg),l.save(),oe==1?(ge=xe=0,l.translate($r,lr(Nn+ln/2)),l.rotate((ie==3?-ec:ec)/2)):(ge=lr(Wn+Kt/2),xe=$r);let Do=Zg(X.label)?X.label(r,V,Be,qe):X.label;l.fillText(Do,ge,xe),l.restore()}if(qe==0)continue;let Ye=$[X.scale],Ze=oe==0?Kt:ln,yt=oe==0?Wn:Nn,Ft=X._splits,wt=Ye.distr==2?Ft.map(dn=>Gt[dn]):Ft,Nt=Ye.distr==2?Gt[Ft[1]]-Gt[Ft[0]]:Be,dt=X.ticks,rt=X.border,vn=dt.show?dt.size:0,In=lr(vn*en),or=lr((X.alignTo==2?X._size-vn-X.gap:X.gap)*en),Vt=X._rotate*-ec/180,fe=p(X._pos*en),_e=(In+or)*Pe,Ce=fe+_e;xe=oe==0?Ce:0,ge=oe==1?Ce:0;let Ue=X.font[0],ut=X.align==1?oa:X.align==2?zu:Vt>0?oa:Vt<0?zu:oe==0?"center":ie==3?zu:oa,_t=Vt||oe==1?"middle":ie==2?qa:Rg;Mo(Ue,Ie,ut,_t);let Xt=X.font[1]*X.lineGap,It=Ft.map(dn=>p(w(dn,Ye,Ze,yt))),Jr=X._values;for(let dn=0;dn<Jr.length;dn++){let $r=Jr[dn];if($r!=null){oe==0?ge=It[dn]:xe=It[dn],$r=""+$r;let Do=$r.indexOf(`
|
|
1490
|
+
`)==-1?[$r]:$r.split(/\n/gm);for(let Vn=0;Vn<Do.length;Vn++){let zs=Do[Vn];Vt?(l.save(),l.translate(ge,xe+Vn*Xt),l.rotate(Vt),l.fillText(zs,0,0),l.restore()):l.fillText(zs,ge,xe+Vn*Xt)}}}dt.show&&ro(It,dt.filter(r,wt,V,qe,Nt),oe,ie,fe,In,fn(dt.width*en,3),dt.stroke(r,V),dt.dash,dt.cap);let Hi=X.grid;Hi.show&&ro(It,Hi.filter(r,wt,V,qe,Nt),oe,oe==0?2:1,oe==0?Nn:Wn,oe==0?ln:Kt,fn(Hi.width*en,3),Hi.stroke(r,V),Hi.dash,Hi.cap),rt.show&&ro([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nn:Wn,oe==1?ln:Kt,fn(rt.width*en,3),rt.stroke(r,V),rt.dash,rt.cap)}tt("drawAxes")}function io(V){x.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 Ro=!1,as=!1,Lo=[];function xa(){as=!1;for(let V=0;V<Lo.length;V++)tt(...Lo[V]);Lo.length=0}function bo(){Ro||(dA(Ca),Ro=!0)}function We(V,X=!1){Ro=!0,as=X,V(r),Ca(),X&&Lo.length>0&&queueMicrotask(xa)}r.batch=We;function Ca(){if(Dr&&(vo(),Dr=!1),Gr&&(Yr(),Gr=!1),Kr){if(wn(c,oa,Lt),wn(c,qa,Zt),wn(c,Ua,mt),wn(c,Va,je),wn(i,oa,Lt),wn(i,qa,Zt),wn(i,Ua,mt),wn(i,Va,je),wn(u,Ua,Xn),wn(u,Va,Tr),a.width=lr(Xn*en),a.height=lr(Tr*en),R.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let xe=ge===3||ge===0?ie:0,Ie=ge%2==1;wn(V,Ie?"left":"top",oe-xe),wn(V,Ie?"width":"height",ie),wn(V,Ie?"top":"left",Ie?Zt:Lt),wn(V,Ie?"height":"width",Ie?je:mt),Gu(V,Ss)}else xi(V,Ss)}),zn=Cr=mn=Pr=es=Ns=Ds=ts=no=null,dr=1,W(!0),Lt!=On||Zt!=yr||mt!=cr||je!=gn){io(!1);let V=mt/cr,X=je/gn;if(se&&!Ai&&ne.left>=0){ne.left*=V,ne.top*=X,Si&&uo(Si,lr(ne.left),0,mt,je),Qn&&uo(Qn,0,lr(ne.top),mt,je);for(let ie=0;ie<_n.length;ie++){let oe=_n[ie];oe!=null&&(br[ie]*=V,fi[ie]*=X,uo(oe,Ni(br[ie]),Ni(fi[ie]),mt,je))}}if(vt.show&&!ci&&vt.left>=0&&vt.width>0){vt.left*=V,vt.width*=V,vt.top*=X,vt.height*=X;for(let ie in Y)wn(Qr,ie,vt[ie])}On=Lt,yr=Zt,cr=mt,gn=je}tt("setSize"),Kr=!1}Xn>0&&Tr>0&&(l.clearRect(0,0,a.width,a.height),tt("drawClear"),D.forEach(V=>V()),tt("draw")),vt.show&&ci&&(hn(vt),ci=!1),se&&Ai&&(S(null,!0,!1),Ai=!1),he.show&&he.live&&Bn&&(y(),Bn=!1),h||(h=!0,r.status=1,tt("ready")),Ht=!1,Ro=!1}r.redraw=(V,X)=>{Gr=X||!1,V!==!1?rr(C,z.min,z.max):bo()};function Ne(V,X){let ie=$[V];if(ie.from==null){if(ce==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(ce>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&ce>0&&(X.min=Qi(X.min,t[0]),X.max=Qi(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,Dr=!0,bo()}}r.setScale=Ne;let Dn,Oo,Si,Qn,ka,No,Pi,wo,nn,Jt,rn,jt,Wi=!1;const Hn=ne.drag;let He=Hn.x,yn=Hn.y;se&&(ne.x&&(Dn=Oi(Dk,i)),ne.y&&(Oo=Oi(Fk,i)),z.ori==0?(Si=Dn,Qn=Oo):(Si=Oo,Qn=Dn),rn=ne.left,jt=ne.top);const vt=r.select=tr({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Qr=vt.show?Oi(Nk,vt.over?i:c):null;function hn(V,X){if(vt.show){for(let ie in V)vt[ie]=V[ie],ie in Y&&wn(Qr,ie,V[ie]);X!==!1&&tt("setSelect")}}r.setSelect=hn;function An(V){if(x[V].show)le&&Gu(Me[V],Ss);else if(le&&xi(Me[V],Ss),se){let X=kn?_n[0]:_n[V];X!=null&&uo(X,-10,-10,mt,je)}}function rr(V,X,ie){Ne(V,{min:X,max:ie})}function Zr(V,X,ie,oe){X.focus!=null&&kr(V),X.show!=null&&x.forEach((ge,xe)=>{xe>0&&(V==xe||V==null)&&(ge.show=X.show,An(xe),f==2?(rr(ge.facets[0].scale,null,null),rr(ge.facets[1].scale,null,null)):rr(ge.scale,null,null),bo())}),ie!==!1&&tt("setSeries",V,X),oe&&$t("setSeries",r,V,X)}r.setSeries=Zr;function Bi(V,X){tr(k[V],X)}function jn(V,X){V.fill=zt(V.fill||null),V.dir=Qt(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function mi(V){V==null?k.length=0:k.splice(V,1)}r.addBand=jn,r.setBand=Bi,r.delBand=mi;function ls(V,X){x[V].alpha=X,se&&_n[V]!=null&&(_n[V].style.opacity=X),le&&Me[V]&&(Me[V].style.opacity=X)}let Un,$i,_i;const zi={focus:!0};function kr(V){if(V!=_i){let X=V==null,ie=ur.alpha!=1;x.forEach((oe,ge)=>{if(f==1||ge>0){let xe=X||ge==0||ge==V;oe._focus=X?null:xe,ie&&ls(ge,xe?1:ur.alpha)}}),_i=V,ie&&bo()}}le&&pi&&un(Dg,me,V=>{ne._lock||(di(V),_i!=null&&Zr(null,zi,!0,ct.setSeries))});function Ar(V,X,ie){let oe=$[X];ie&&(V=V/en-(oe.ori==1?Zt:Lt));let ge=mt;oe.ori==1&&(ge=je,V=ge-V),oe.dir==-1&&(V=ge-V);let xe=oe._min,Ie=oe._max,Pe=V/ge,Be=xe+(Ie-xe)*Pe,qe=oe.distr;return qe==3?la(10,Be):qe==4?eA(Be,oe.asinh):qe==100?oe.bwd(Be):Be}function Mr(V,X){let ie=Ar(V,C,X);return Qi(ie,t[0],ze,Fe)}r.valToIdx=V=>Qi(V,t[0]),r.posToIdx=Mr,r.posToVal=Ar,r.valToPos=(V,X,ie)=>$[X].ori==0?g(V,$[X],ie?Kt:mt,ie?Wn:0):m(V,$[X],ie?ln:je,ie?Nn:0),r.setCursor=(V,X,ie)=>{rn=V.left,jt=V.top,S(null,X,ie)};function Bs(V,X){wn(Qr,oa,vt.left=V),wn(Qr,Ua,vt.width=X)}function Ir(V,X){wn(Qr,qa,vt.top=V),wn(Qr,Va,vt.height=X)}let Wr=z.ori==0?Bs:Ir,Ti=z.ori==1?Bs:Ir;function Mi(){if(le&&he.live)for(let V=f==2?1:0;V<x.length;V++){if(V==0&&at)continue;let X=he.values[V],ie=0;for(let oe in X)Xe[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{J[oe]=ie}):iA(V.idx)||J.fill(V.idx),he.idx=J[0]),le&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||f==1&&!at)&&T(ie,J[ie]);Mi()}Bn=!1,X!==!1&&tt("setLegend")}r.setLegend=y;function T(V,X){let ie=x[V],oe=V==0&&P==2?Gt:t[V],ge;at?ge=ie.values(r,V,X)??et:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?et:{_:ge}),he.values[V]=ge}function S(V,X,ie){nn=rn,Jt=jt,[rn,jt]=ne.move(r,rn,jt),ne.left=rn,ne.top=jt,se&&(Si&&uo(Si,lr(rn),0,mt,je),Qn&&uo(Qn,0,lr(jt),mt,je));let oe,ge=ze>Fe;Un=pn,$i=null;let xe=z.ori==0?mt:je,Ie=z.ori==1?mt:je;if(rn<0||ce==0||ge){oe=ne.idx=null;for(let Pe=0;Pe<x.length;Pe++){let Be=_n[Pe];Be!=null&&uo(Be,-10,-10,mt,je)}pi&&Zr(null,zi,!0,V==null&&ct.setSeries),he.live&&(J.fill(oe),Bn=!0)}else{let Pe,Be,qe;f==1&&(Pe=z.ori==0?rn:jt,Be=Ar(Pe,C),oe=ne.idx=Qi(Be,t[0],ze,Fe),qe=O(t[0][oe],z,xe,0));let Ye=-10,Ze=-10,yt=0,Ft=0,wt=!0,Nt="",dt="";for(let rt=f==2?1:0;rt<x.length;rt++){let vn=x[rt],In=J[rt],or=In==null?null:f==1?t[rt][In]:t[rt][1][In],Vt=ne.dataIdx(r,rt,oe,Be),fe=Vt==null?null:f==1?t[rt][Vt]:t[rt][1][Vt];if(Bn=Bn||fe!=or||Vt!=In,J[rt]=Vt,rt>0&&vn.show){let _e=Vt==null?-10:Vt==oe?qe:O(f==1?t[0][Vt]:t[rt][0][Vt],z,xe,0),Ce=fe==null?-10:_(fe,f==1?$[vn.scale]:$[vn.facets[1].scale],Ie,0);if(pi&&fe!=null){let Ue=z.ori==1?rn:jt,ut=ar(ur.dist(r,rt,Vt,Ce,Ue));if(ut<Un){let _t=ur.bias;if(_t!=0){let Xt=Ar(Ue,vn.scale),It=fe>=0?1:-1,Jr=Xt>=0?1:-1;Jr==It&&(Jr==1?_t==1?fe>=Xt:fe<=Xt:_t==1?fe<=Xt:fe>=Xt)&&(Un=ut,$i=rt)}else Un=ut,$i=rt}}if(Bn||kn){let Ue,ut;z.ori==0?(Ue=_e,ut=Ce):(Ue=Ce,ut=_e);let _t,Xt,It,Jr,Hi,dn,$r=!0,Do=Cn.bbox;if(Do!=null){$r=!1;let Vn=Do(r,rt);It=Vn.left,Jr=Vn.top,_t=Vn.width,Xt=Vn.height}else It=Ue,Jr=ut,_t=Xt=Cn.size(r,rt);if(dn=Cn.fill(r,rt),Hi=Cn.stroke(r,rt),kn)rt==$i&&Un<=ur.prox&&(Ye=It,Ze=Jr,yt=_t,Ft=Xt,wt=$r,Nt=dn,dt=Hi);else{let Vn=_n[rt];Vn!=null&&(br[rt]=It,fi[rt]=Jr,jg(Vn,_t,Xt,$r),zg(Vn,dn,Hi),uo(Vn,Ni(It),Ni(Jr),mt,je))}}}}if(kn){let rt=ur.prox,vn=_i==null?Un<=rt:Un>rt||$i!=_i;if(Bn||vn){let In=_n[0];In!=null&&(br[0]=Ye,fi[0]=Ze,jg(In,yt,Ft,wt),zg(In,Nt,dt),uo(In,Ni(Ye),Ni(Ze),mt,je))}}}if(vt.show&&Wi)if(V!=null){let[Pe,Be]=ct.scales,[qe,Ye]=ct.match,[Ze,yt]=V.cursor.sync.scales,Ft=V.cursor.drag;if(He=Ft._x,yn=Ft._y,He||yn){let{left:wt,top:Nt,width:dt,height:rt}=V.select,vn=V.scales[Ze].ori,In=V.posToVal,or,Vt,fe,_e,Ce,Ue=Pe!=null&&qe(Pe,Ze),ut=Be!=null&&Ye(Be,yt);Ue&&He?(vn==0?(or=wt,Vt=dt):(or=Nt,Vt=rt),fe=$[Pe],_e=O(In(or,Ze),fe,xe,0),Ce=O(In(or+Vt,Ze),fe,xe,0),Wr(Zi(_e,Ce),ar(Ce-_e))):Wr(0,xe),ut&&yn?(vn==1?(or=wt,Vt=dt):(or=Nt,Vt=rt),fe=$[Be],_e=_(In(or,yt),fe,Ie,0),Ce=_(In(or+Vt,yt),fe,Ie,0),Ti(Zi(_e,Ce),ar(Ce-_e))):Ti(0,Ie)}else Q()}else{let Pe=ar(nn-ka),Be=ar(Jt-No);if(z.ori==1){let yt=Pe;Pe=Be,Be=yt}He=Hn.x&&Pe>=Hn.dist,yn=Hn.y&&Be>=Hn.dist;let qe=Hn.uni;qe!=null?He&&yn&&(He=Pe>=qe,yn=Be>=qe,!He&&!yn&&(Be>Pe?yn=!0:He=!0)):Hn.x&&Hn.y&&(He||yn)&&(He=yn=!0);let Ye,Ze;He&&(z.ori==0?(Ye=Pi,Ze=rn):(Ye=wo,Ze=jt),Wr(Zi(Ye,Ze),ar(Ze-Ye)),yn||Ti(0,Ie)),yn&&(z.ori==1?(Ye=Pi,Ze=rn):(Ye=wo,Ze=jt),Ti(Zi(Ye,Ze),ar(Ze-Ye)),He||Wr(0,xe)),!He&&!yn&&(Wr(0,0),Ti(0,0))}if(Hn._x=He,Hn._y=yn,V==null){if(ie){if(Tn!=null){let[Pe,Be]=ct.scales;ct.values[0]=Pe!=null?Ar(z.ori==0?rn:jt,Pe):null,ct.values[1]=Be!=null?Ar(z.ori==1?rn:jt,Be):null}$t(ju,r,rn,jt,mt,je,oe)}if(pi){let Pe=ie&&ct.setSeries,Be=ur.prox;_i==null?Un<=Be&&Zr($i,zi,!0,Pe):Un>Be?Zr(null,zi,!0,Pe):$i!=_i&&Zr($i,zi,!0,Pe)}}Bn&&(he.idx=oe,y()),X!==!1&&tt("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&W(!1),F}});function W(V=!1){V?F=null:(F=i.getBoundingClientRect(),tt("syncRect",F))}function H(V,X,ie,oe,ge,xe,Ie){ne._lock||Wi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,xe,Ie,!1,V!=null),V!=null?S(null,!0,!0):S(X,!0,!1))}function q(V,X,ie,oe,ge,xe,Ie,Pe,Be){if(F==null&&W(!1),di(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){rn=-10,jt=-10;return}let[qe,Ye]=ct.scales,Ze=X.cursor.sync,[yt,Ft]=Ze.values,[wt,Nt]=Ze.scales,[dt,rt]=ct.match,vn=X.axes[0].side%2==1,In=z.ori==0?mt:je,or=z.ori==1?mt:je,Vt=vn?xe:ge,fe=vn?ge:xe,_e=vn?oe:ie,Ce=vn?ie:oe;if(wt!=null?ie=dt(qe,wt)?w(yt,$[qe],In,0):-10:ie=In*(_e/Vt),Nt!=null?oe=rt(Ye,Nt)?w(Ft,$[Ye],or,0):-10:oe=or*(Ce/fe),z.ori==1){let Ue=ie;ie=oe,oe=Ue}}Be&&(X==null||X.cursor.event.type==ju)&&((ie<=1||ie>=mt-1)&&(ie=Ts(ie,mt)),(oe<=1||oe>=je-1)&&(oe=Ts(oe,je))),Pe?(ka=ie,No=oe,[Pi,wo]=ne.move(r,ie,oe)):(rn=ie,jt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){hn(Y,!1)}let re,ae,be,ke;function ve(V,X,ie,oe,ge,xe,Ie){Wi=!0,He=yn=Hn._x=Hn._y=!1,q(V,X,ie,oe,ge,xe,Ie,!0,!1),V!=null&&(un(Uu,qu,we,!1),$t(Og,r,Pi,wo,mt,je,null));let{left:Pe,top:Be,width:qe,height:Ye}=vt;re=Pe,ae=Be,be=qe,ke=Ye}function we(V,X,ie,oe,ge,xe,Ie){Wi=Hn._x=Hn._y=!1,q(V,X,ie,oe,ge,xe,Ie,!1,!0);let{left:Pe,top:Be,width:qe,height:Ye}=vt,Ze=qe>0||Ye>0,yt=re!=Pe||ae!=Be||be!=qe||ke!=Ye;if(Ze&&yt&&hn(vt),Hn.setScale&&Ze&&yt){let Ft=Pe,wt=qe,Nt=Be,dt=Ye;if(z.ori==1&&(Ft=Be,wt=Ye,Nt=Pe,dt=qe),He&&rr(C,Ar(Ft,C),Ar(Ft+wt,C)),yn)for(let rt in $){let vn=$[rt];rt!=C&&vn.from==null&&vn.min!=pn&&rr(rt,Ar(Nt+dt,rt),Ar(Nt,rt))}Q()}else ne.lock&&(ne._lock=!ne._lock,S(X,!0,V!=null));V!=null&&(Ln(Uu,qu),$t(Uu,r,rn,jt,mt,je,null))}function Oe(V,X,ie,oe,ge,xe,Ie){if(ne._lock)return;di(V);let Pe=Wi;if(Wi){let Be=!0,qe=!0,Ye=10,Ze,yt;z.ori==0?(Ze=He,yt=yn):(Ze=yn,yt=He),Ze&&yt&&(Be=rn<=Ye||rn>=mt-Ye,qe=jt<=Ye||jt>=je-Ye),Ze&&Be&&(rn=rn<Pi?0:mt),yt&&qe&&(jt=jt<wo?0:je),S(null,!0,!0),Wi=!1}rn=-10,jt=-10,J.fill(null),S(null,!0,!0),Pe&&(Wi=Pe)}function Le(V,X,ie,oe,ge,xe,Ie){ne._lock||(di(V),hr(),Q(),V!=null&&$t(Fg,r,rn,jt,mt,je,null))}function Ve(){R.forEach(wS),to(r.width,r.height,!0)}$s(Yl,aa,Ve);const st={};st.mousedown=ve,st.mousemove=H,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=ct.match[2];ie=ge(r,X,ie),ie!=-1&&Zr(ie,oe,!0,!1)},se&&(un(Og,i,ve),un(ju,i,H),un(Ng,i,V=>{di(V),W(!1)}),un(Dg,i,Oe),un(Fg,i,Le),mh.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function tt(V,X,ie){as?Lo.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 bn=(V,X,ie)=>ie,ct=tr({key:null,setSeries:!1,filters:{pub:tm,sub:tm},scales:[C,x[1]?x[1].scale:null],match:[nm,nm,bn],values:[null,null]},ne.sync);ct.match.length==2&&ct.match.push(bn),ne.sync=ct;const Tn=ct.key,bt=Bm(Tn);function $t(V,X,ie,oe,ge,xe,Ie){ct.filters.pub(V,X,ie,oe,ge,xe,Ie)&&bt.pub(V,X,ie,oe,ge,xe,Ie)}bt.sub(r);function ir(V,X,ie,oe,ge,xe,Ie){ct.filters.sub(V,X,ie,oe,ge,xe,Ie)&&st[V](null,X,ie,oe,ge,xe,Ie)}r.pub=ir;function Sr(){bt.unsub(r),mh.delete(r),vr.clear(),Xu(Yl,aa,Ve),d.remove(),me==null||me.remove(),tt("destroy")}r.destroy=Sr;function Mn(){tt("init",n,t),xr(t||n.data,!1),A[C]?Ne(C,A[C]):hr(),ci=vt.show&&(vt.width>0||vt.height>0),Ai=Bn=!0,to(n.width,n.height)}return x.forEach(mo),R.forEach(Fr),e?e instanceof HTMLElement?(e.appendChild(d),Mn()):e(r,Mn):Mn(),r}Or.assign=tr,Or.fmtNum=Ju,Or.rangeNum=Jl,Or.rangeLog=Zl,Or.rangeAsinh=Qu,Or.orient=Is,Or.pxRatio=en,Or.join=hA,Or.fmtDate=rh,Or.tzDate=CA,Or.sync=Bm;{Or.addGap=iS,Or.clipGaps=sc;let n=Or.paths={points:Km};n.linear=Ym,n.stepped=aS,n.bars=lS,n.spline=uS}var rv,iv;function xS(){return iv||(iv=1,rv=function(n,t,e,r,f){var g,m;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(g=r+(f-r>>>1),m=+e(n[g],t,g,n),m<0)r=g+1;else if(m>0)f=g-1;else return g;return~r}),rv}var CS=xS();const fD=gr("b",El(CS));var yh,ov;function kS(){if(ov)return yh;ov=1;function n(t,e,r){var f=-1,g=t.length;e<0&&(e=-e>g?0:g+e),r=r>g?g:r,r<0&&(r+=g),g=e>r?0:r-e>>>0,e>>>=0;for(var m=Array(g);++f<g;)m[f]=t[f+e];return m}return yh=n,yh}var bh,sv;function AS(){if(sv)return bh;sv=1;var n=kS();function t(e,r,f){var g=e.length;return f=f===void 0?g:f,!r&&f>=g?e:n(e,r,f)}return bh=t,bh}var wh,av;function lv(){if(av)return wh;av=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,g="\\ufe0e\\ufe0f",m="\\u200d",w=RegExp("["+m+n+f+g+"]");function h(d){return w.test(d)}return wh=h,wh}var xh,cv;function SS(){if(cv)return xh;cv=1;function n(t){return t.split("")}return xh=n,xh}var Ch,uv;function $S(){if(uv)return Ch;uv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,g="\\ufe0e\\ufe0f",m="["+n+"]",w="["+f+"]",h="\\ud83c[\\udffb-\\udfff]",d="(?:"+w+"|"+h+")",a="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",i=d+"?",s="["+g+"]?",p="(?:"+c+"(?:"+[a,l,u].join("|")+")"+s+i+")*",b=s+i+p,x="(?:"+[a+w+"?",w,l,u,m].join("|")+")",R=RegExp(h+"(?="+h+")|"+x+b,"g");function $(k){return k.match(R)||[]}return Ch=$,Ch}var kh,hv;function _S(){if(hv)return kh;hv=1;var n=SS(),t=lv(),e=$S();function r(f){return t(f)?e(f):n(f)}return kh=r,kh}var Ah,dv;function TS(){if(dv)return Ah;dv=1;var n=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo;return Ah=n,Ah}var Sh,pv;function MS(){if(pv)return Sh;pv=1;var n=TS(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Sh=e,Sh}var $h,fv;function _h(){if(fv)return $h;fv=1;var n=MS(),t=n.Symbol;return $h=t,$h}var Th,gv;function IS(){if(gv)return Th;gv=1;function n(t,e){for(var r=-1,f=t==null?0:t.length,g=Array(f);++r<f;)g[r]=e(t[r],r,t);return g}return Th=n,Th}var Mh,mv;function ES(){if(mv)return Mh;mv=1;var n=Array.isArray;return Mh=n,Mh}var Ih,vv;function RS(){if(vv)return Ih;vv=1;var n=_h(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,f=n?n.toStringTag:void 0;function g(m){var w=e.call(m,f),h=m[f];try{m[f]=void 0;var d=!0}catch{}var a=r.call(m);return d&&(w?m[f]=h:delete m[f]),a}return Ih=g,Ih}var Eh,yv;function LS(){if(yv)return Eh;yv=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return Eh=e,Eh}var Rh,bv;function OS(){if(bv)return Rh;bv=1;var n=_h(),t=RS(),e=LS(),r="[object Null]",f="[object Undefined]",g=n?n.toStringTag:void 0;function m(w){return w==null?w===void 0?f:r:g&&g in Object(w)?t(w):e(w)}return Rh=m,Rh}var Lh,wv;function NS(){if(wv)return Lh;wv=1;function n(t){return t!=null&&typeof t=="object"}return Lh=n,Lh}var Oh,xv;function DS(){if(xv)return Oh;xv=1;var n=OS(),t=NS(),e="[object Symbol]";function r(f){return typeof f=="symbol"||t(f)&&n(f)==e}return Oh=r,Oh}var Nh,Cv;function FS(){if(Cv)return Nh;Cv=1;var n=_h(),t=IS(),e=ES(),r=DS(),f=n?n.prototype:void 0,g=f?f.toString:void 0;function m(w){if(typeof w=="string")return w;if(e(w))return t(w,m)+"";if(r(w))return g?g.call(w):"";var h=w+"";return h=="0"&&1/w==-1/0?"-0":h}return Nh=m,Nh}var Dh,kv;function uc(){if(kv)return Dh;kv=1;var n=FS();function t(e){return e==null?"":n(e)}return Dh=t,Dh}var Fh,Av;function PS(){if(Av)return Fh;Av=1;var n=AS(),t=lv(),e=_S(),r=uc();function f(g){return function(m){m=r(m);var w=t(m)?e(m):void 0,h=w?w[0]:m.charAt(0),d=w?n(w,1).join(""):m.slice(1);return h[g]()+d}}return Fh=f,Fh}var Ph,Sv;function $v(){if(Sv)return Ph;Sv=1;var n=PS(),t=n("toUpperCase");return Ph=t,Ph}var WS=$v();const BS=El(WS);var Wh,_v;function zS(){if(_v)return Wh;_v=1;var n=uc(),t=$v();function e(r){return t(n(r).toLowerCase())}return Wh=e,Wh}var Bh,Tv;function HS(){if(Tv)return Bh;Tv=1;function n(t,e,r,f){var g=-1,m=t==null?0:t.length;for(f&&m&&(r=t[++g]);++g<m;)r=e(r,t[g],g,t);return r}return Bh=n,Bh}var zh,Mv;function jS(){if(Mv)return zh;Mv=1;function n(t){return function(e){return t==null?void 0:t[e]}}return zh=n,zh}var Hh,Iv;function US(){if(Iv)return Hh;Iv=1;var n=jS(),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 Hh=e,Hh}var jh,Ev;function VS(){if(Ev)return jh;Ev=1;var n=US(),t=uc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",g="\\u20d0-\\u20ff",m=r+f+g,w="["+m+"]",h=RegExp(w,"g");function d(a){return a=t(a),a&&a.replace(e,n).replace(h,"")}return jh=d,jh}var Uh,Rv;function qS(){if(Rv)return Uh;Rv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Uh=t,Uh}var Vh,Lv;function KS(){if(Lv)return Vh;Lv=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 Vh=t,Vh}var qh,Ov;function GS(){if(Ov)return qh;Ov=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=t+e+r,g="\\u2700-\\u27bf",m="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",a=" \\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",l="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",c=w+h+d+a,i="['’]",s="["+c+"]",p="["+f+"]",b="\\d+",x="["+g+"]",R="["+m+"]",$="[^"+n+c+b+g+m+l+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+p+"|"+k+")",L="[^"+n+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+l+"]",z="\\u200d",P="(?:"+R+"|"+$+")",O="(?:"+I+"|"+$+")",_="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+z+"(?:"+[L,D,E].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J=B+N+U,he="(?:"+[x,D,E].join("|")+")"+J,ne=RegExp([I+"?"+R+"+"+_+"(?="+[s,I,"$"].join("|")+")",O+"+"+A+"(?="+[s,I+P,"$"].join("|")+")",I+"?"+P+"+"+_,I+"+"+A,Z,K,b,he].join("|"),"g");function le(se){return se.match(ne)||[]}return qh=le,qh}var Kh,Nv;function YS(){if(Nv)return Kh;Nv=1;var n=qS(),t=KS(),e=uc(),r=GS();function f(g,m,w){return g=e(g),m=w?void 0:m,m===void 0?t(g)?r(g):n(g):g.match(m)||[]}return Kh=f,Kh}var Gh,Dv;function XS(){if(Dv)return Gh;Dv=1;var n=HS(),t=VS(),e=YS(),r="['’]",f=RegExp(r,"g");function g(m){return function(w){return n(e(t(w).replace(f,"")),m,"")}}return Gh=g,Gh}var Yh,Fv;function QS(){if(Fv)return Yh;Fv=1;var n=zS(),t=XS(),e=t(function(r,f,g){return f=f.toLowerCase(),r+(g?n(f):f)});return Yh=e,Yh}var ZS=QS();const JS=El(ZS),e$=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-C59wpWWk-5d6de568f002ea772832.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-tKqIV461-ba72286a428f0f68656b.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-BdlMR_1A-d484d91e5283308f215b.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-C2JVmh3p-49daa0253608de160e27.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-BRbdw1fu-3625418ae440746302bf.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-C8T_w03p-d2dac704c7379f25847d.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-C1w2vSsG-e887ee93bef8fcdd358c.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-BMv2SmEq-81450ac0ffaf42c8e1ec.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-LEBZQ3DR-c0222a17e9d20a9869ab.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-Q6UdEanF-7b08256544f077dcc079.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-BhvBCDoS-8916aed5a39175b96fd5.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-EaASC9TU-94aa31bcbe6389f7767a.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-C3bjQwrp-1b462ea14525223f22ce.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-CmruSbJy-9fc0f473ca413085ce2b.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-CcUxRlJ2-e03e17bd4513c9d9ad3b.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-DHL7pbgW-d0c7568af71cd4f8584b.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-Lk5K0wTL-64b964a951ec67019446.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-D3Q5IUQg-4fb92ace64f29e5d46c7.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-D7bUUqfG-accea9c10a0ff8a7e5e2.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-DZcIetQh-61329664a4e219cc5a14.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-Df7vTYZj-a05adca77b96d0544878.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-wHbhv08x-21b7be4e444b366e6a43.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-BehwzOCR-bfd1094145ad2e941cba.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-DJKR8ikj-2288f4ddfdf435551821.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-D4Qzq894-587e9884e8b7f2879481.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-CwCOklZG-3015375c059d67c36c3b.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-DW8Q7BTX-8c5527de3b3987d6be11.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-DgNX7tK2-4b72ab8e1e5281266028.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-DAEBW0hU-b5d73d394034826076a3.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-Dok-of6n-cb473c41d4dc7750b3a8.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-CQ0xCUFU-b5e1bf103748278c3cd4.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-DzQNEDF7-c4549366ef070d44d1ff.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-zkoAz9SQ-bdc703454411704f3be5.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-dez316Rk-945c0f00ee487c38e62b.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-D-IPNDVg-e29e279cc8b816adce1b.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-CicnZgjt-803eef751bad0442139b.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-D3qN6GTr-ed7fdf901dfff9591f88.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-CLilcPBe-82a0ae263ae1375dc1e3.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-Dsy01RJ--465784e9f79249ed0069.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-BNcVGNj1-cdf2ada37cdcc7a79215.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-DhcoIdNf-a56903dc8d0ba1af9d4f.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-BypuPvE7-7ba1388ef86970c54881.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-DNQgHoNO-a04506ab18dd80c381c9.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-BHwyScCG-9ecca9c9af90afef4709.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-CFxXXTm7-54a8981fbbb4471b3e22.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-C0lRpRrp-e7e4a8662887d78a9273.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-CeeBOYOt-217021007f409319eb23.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-DoA2b3YU-c339e8d511d0927c73ed.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-Dj4DV74o-17adc3864df6436a849a.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-DAQDQ0UM-7942c9489f0faa671c0b.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-Ct0JlY9s-a92d140755d608d9d0fb.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-QaBYsiZz-76f64999ca7dad3de153.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-CFToRM7w-96cd8b9c9028feb61344.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-BG7naMYx-6efe71cd444f3033cfae.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-CChK2Lmm-de950ebfe0403e604bec.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-C8iN5DJK-79b0d446e5438d64309c.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-CXwUSWrP-32cc45316e2b9b5a8f8c.js"),void 0)}),t$=Object.entries(e$).reduce((n,[t,e])=>{t=t.split("/").pop();const r=BS(JS(t.replace(/\.\w+$/,"")));return{...n,[r]:Sp(e)}},{}),gD=gr("U",{components:t$});function Pv(n,t){return function(){return n.apply(t,arguments)}}const{toString:n$}=Object.prototype,{getPrototypeOf:Xh}=Object,{iterator:hc,toStringTag:Wv}=Symbol,dc=(n=>t=>{const e=n$.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ji=n=>(n=n.toLowerCase(),t=>dc(t)===n),pc=n=>t=>typeof t===n,{isArray:ga}=Array,ma=pc("undefined");function Za(n){return n!==null&&!ma(n)&&n.constructor!==null&&!ma(n.constructor)&&ai(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Bv=Ji("ArrayBuffer");function r$(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Bv(n.buffer),t}const i$=pc("string"),ai=pc("function"),zv=pc("number"),Ja=n=>n!==null&&typeof n=="object",o$=n=>n===!0||n===!1,fc=n=>{if(dc(n)!=="object")return!1;const t=Xh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Wv in n)&&!(hc in n)},s$=n=>{if(!Ja(n)||Za(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},a$=Ji("Date"),l$=Ji("File"),c$=Ji("Blob"),u$=Ji("FileList"),h$=n=>Ja(n)&&ai(n.pipe),d$=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||ai(n.append)&&((t=dc(n))==="formdata"||t==="object"&&ai(n.toString)&&n.toString()==="[object FormData]"))},p$=Ji("URLSearchParams"),[f$,g$,m$,v$]=["ReadableStream","Request","Response","Headers"].map(Ji),y$=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function el(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,f;if(typeof n!="object"&&(n=[n]),ga(n))for(r=0,f=n.length;r<f;r++)t.call(null,n[r],r,n);else{if(Za(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),m=g.length;let w;for(r=0;r<m;r++)w=g[r],t.call(null,n[w],w,n)}}function Hv(n,t){if(Za(n))return null;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 Es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jv=n=>!ma(n)&&n!==Es;function Qh(){const{caseless:n,skipUndefined:t}=jv(this)&&this||{},e={},r=(f,g)=>{const m=n&&Hv(e,g)||g;fc(e[m])&&fc(f)?e[m]=Qh(e[m],f):fc(f)?e[m]=Qh({},f):ga(f)?e[m]=f.slice():(!t||!ma(f))&&(e[m]=f)};for(let f=0,g=arguments.length;f<g;f++)arguments[f]&&el(arguments[f],r);return e}const b$=(n,t,e,{allOwnKeys:r}={})=>(el(t,(f,g)=>{e&&ai(f)?n[g]=Pv(f,e):n[g]=f},{allOwnKeys:r}),n),w$=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),x$=(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)},C$=(n,t,e,r)=>{let f,g,m;const w={};if(t=t||{},n==null)return t;do{for(f=Object.getOwnPropertyNames(n),g=f.length;g-- >0;)m=f[g],(!r||r(m,n,t))&&!w[m]&&(t[m]=n[m],w[m]=!0);n=e!==!1&&Xh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},k$=(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},A$=n=>{if(!n)return null;if(ga(n))return n;let t=n.length;if(!zv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},S$=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Xh(Uint8Array)),$$=(n,t)=>{const e=(n&&n[hc]).call(n);let r;for(;(r=e.next())&&!r.done;){const f=r.value;t.call(n,f[0],f[1])}},_$=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},T$=Ji("HTMLFormElement"),M$=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Uv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),I$=Ji("RegExp"),Vv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};el(e,(f,g)=>{let m;(m=t(f,g,n))!==!1&&(r[g]=m||f)}),Object.defineProperties(n,r)},E$=n=>{Vv(n,(t,e)=>{if(ai(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(ai(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+"'")})}})},R$=(n,t)=>{const e={},r=f=>{f.forEach(g=>{e[g]=!0})};return ga(n)?r(n):r(String(n).split(t)),e},L$=()=>{},O$=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function N$(n){return!!(n&&ai(n.append)&&n[Wv]==="FormData"&&n[hc])}const D$=n=>{const t=new Array(10),e=(r,f)=>{if(Ja(r)){if(t.indexOf(r)>=0)return;if(Za(r))return r;if(!("toJSON"in r)){t[f]=r;const g=ga(r)?[]:{};return el(r,(m,w)=>{const h=e(m,f+1);!ma(h)&&(g[w]=h)}),t[f]=void 0,g}}return r};return e(n,0)},F$=Ji("AsyncFunction"),P$=n=>n&&(Ja(n)||ai(n))&&ai(n.then)&&ai(n.catch),qv=((n,t)=>n?setImmediate:t?((e,r)=>(Es.addEventListener("message",({source:f,data:g})=>{f===Es&&g===e&&r.length&&r.shift()()},!1),f=>{r.push(f),Es.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ai(Es.postMessage)),W$=typeof queueMicrotask<"u"?queueMicrotask.bind(Es):typeof process<"u"&&process.nextTick||qv,B$=n=>n!=null&&ai(n[hc]),Se={isArray:ga,isArrayBuffer:Bv,isBuffer:Za,isFormData:d$,isArrayBufferView:r$,isString:i$,isNumber:zv,isBoolean:o$,isObject:Ja,isPlainObject:fc,isEmptyObject:s$,isReadableStream:f$,isRequest:g$,isResponse:m$,isHeaders:v$,isUndefined:ma,isDate:a$,isFile:l$,isBlob:c$,isRegExp:I$,isFunction:ai,isStream:h$,isURLSearchParams:p$,isTypedArray:S$,isFileList:u$,forEach:el,merge:Qh,extend:b$,trim:y$,stripBOM:w$,inherits:x$,toFlatObject:C$,kindOf:dc,kindOfTest:Ji,endsWith:k$,toArray:A$,forEachEntry:$$,matchAll:_$,isHTMLForm:T$,hasOwnProperty:Uv,hasOwnProp:Uv,reduceDescriptors:Vv,freezeMethods:E$,toObjectSet:R$,toCamelCase:M$,noop:L$,toFiniteNumber:O$,findKey:Hv,global:Es,isContextDefined:jv,isSpecCompliantForm:N$,toJSONObject:D$,isAsyncFn:F$,isThenable:P$,setImmediate:qv,asap:W$,isIterable:B$};function At(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(At,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 Kv=At.prototype,Gv={};["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=>{Gv[n]={value:n}}),Object.defineProperties(At,Gv),Object.defineProperty(Kv,"isAxiosError",{value:!0}),At.from=(n,t,e,r,f,g)=>{const m=Object.create(Kv);Se.toFlatObject(n,m,function(d){return d!==Error.prototype},d=>d!=="isAxiosError");const w=n&&n.message?n.message:"Error",h=t==null&&n?n.code:t;return At.call(m,w,h,e,r,f),n&&m.cause==null&&Object.defineProperty(m,"cause",{value:n,configurable:!0}),m.name=n&&n.name||"Error",g&&Object.assign(m,g),m};const z$=null;function Zh(n){return Se.isPlainObject(n)||Se.isArray(n)}function Yv(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Xv(n,t,e){return n?n.concat(t).map(function(r,f){return r=Yv(r),!e&&f?"["+r+"]":r}).join(e?".":""):t}function H$(n){return Se.isArray(n)&&!n.some(Zh)}const j$=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function gc(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(c,i){return!Se.isUndefined(i[c])});const r=e.metaTokens,f=e.visitor||d,g=e.dots,m=e.indexes,w=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Se.isDate(c))return c.toISOString();if(Se.isBoolean(c))return c.toString();if(!w&&Se.isBlob(c))throw new At("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(c)||Se.isTypedArray(c)?w&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function d(c,i,s){let p=c;if(c&&!s&&typeof c=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Se.isArray(c)&&H$(c)||(Se.isFileList(c)||Se.endsWith(i,"[]"))&&(p=Se.toArray(c)))return i=Yv(i),p.forEach(function(b,x){!(Se.isUndefined(b)||b===null)&&t.append(m===!0?Xv([i],x,g):m===null?i:i+"[]",h(b))}),!1}return Zh(c)?!0:(t.append(Xv(s,i,g),h(c)),!1)}const a=[],l=Object.assign(j$,{defaultVisitor:d,convertValue:h,isVisitable:Zh});function u(c,i){if(!Se.isUndefined(c)){if(a.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));a.push(c),Se.forEach(c,function(s,p){(!(Se.isUndefined(s)||s===null)&&f.call(t,s,Se.isString(p)?p.trim():p,i,l))===!0&&u(s,i?i.concat(p):[p])}),a.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Qv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Jh(n,t){this._pairs=[],n&&gc(n,this,t)}const Zv=Jh.prototype;Zv.append=function(n,t){this._pairs.push([n,t])},Zv.toString=function(n){const t=n?function(e){return n.call(this,e,Qv)}:Qv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function U$(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Jv(n,t,e){if(!t)return n;const r=e&&e.encode||U$;Se.isFunction(e)&&(e={serialize:e});const f=e&&e.serialize;let g;if(f?g=f(t,e):g=Se.isURLSearchParams(t)?t.toString():new Jh(t,e).toString(r),g){const m=n.indexOf("#");m!==-1&&(n=n.slice(0,m)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}let ey=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){Se.forEach(this.handlers,function(e){e!==null&&t(e)})}};const ty={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},V$=typeof URLSearchParams<"u"?URLSearchParams:Jh,q$=typeof FormData<"u"?FormData:null,K$=typeof Blob<"u"?Blob:null,G$={isBrowser:!0,classes:{URLSearchParams:V$,FormData:q$,Blob:K$},protocols:["http","https","file","blob","url","data"]},ed=typeof window<"u"&&typeof document<"u",td=typeof navigator=="object"&&navigator||void 0,Y$=ed&&(!td||["ReactNative","NativeScript","NS"].indexOf(td.product)<0),X$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Q$=ed&&window.location.href||"http://localhost",Z$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ed,hasStandardBrowserEnv:Y$,hasStandardBrowserWebWorkerEnv:X$,navigator:td,origin:Q$},Symbol.toStringTag,{value:"Module"})),Nr={...Z$,...G$};function J$(n,t){return gc(n,new Nr.classes.URLSearchParams,{visitor:function(e,r,f,g){return Nr.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function e_(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t_(n){const t={},e=Object.keys(n);let r;const f=e.length;let g;for(r=0;r<f;r++)g=e[r],t[g]=n[g];return t}function ny(n){function t(e,r,f,g){let m=e[g++];if(m==="__proto__")return!0;const w=Number.isFinite(+m),h=g>=e.length;return m=!m&&Se.isArray(f)?f.length:m,h?(Se.hasOwnProp(f,m)?f[m]=[f[m],r]:f[m]=r,!w):((!f[m]||!Se.isObject(f[m]))&&(f[m]=[]),t(e,r,f[m],g)&&Se.isArray(f[m])&&(f[m]=t_(f[m])),!w)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,f)=>{t(e_(r),f,e,0)}),e}return null}function n_(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 tl={transitional:ty,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(ny(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 g;if(f){if(e.indexOf("application/x-www-form-urlencoded")>-1)return J$(n,this.formSerializer).toString();if((g=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return gc(g?{"files[]":n}:n,m&&new m,this.formSerializer)}}return f||r?(t.setContentType("application/json",!1),n_(n)):n}],transformResponse:[function(n){const t=this.transitional||tl.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,this.parseReviver)}catch(g){if(f)throw g.name==="SyntaxError"?At.from(g,At.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nr.classes.FormData,Blob:Nr.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=>{tl.headers[n]={}});const r_=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"]),i_=n=>{const t={};let e,r,f;return n&&n.split(`
|
|
1491
|
+
`).forEach(function(g){f=g.indexOf(":"),e=g.substring(0,f).trim().toLowerCase(),r=g.substring(f+1).trim(),!(!e||t[e]&&r_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},ry=Symbol("internals");function nl(n){return n&&String(n).trim().toLowerCase()}function mc(n){return n===!1||n==null?n:Se.isArray(n)?n.map(mc):String(n)}function o_(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 s_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function nd(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 a_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function l_(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(f,g,m){return this[r].call(this,t,f,g,m)},configurable:!0})})}let li=class{constructor(t){t&&this.set(t)}set(t,e,r){const f=this;function g(w,h,d){const a=nl(h);if(!a)throw new Error("header name must be a non-empty string");const l=Se.findKey(f,a);(!l||f[l]===void 0||d===!0||d===void 0&&f[l]!==!1)&&(f[l||h]=mc(w))}const m=(w,h)=>Se.forEach(w,(d,a)=>g(d,a,h));if(Se.isPlainObject(t)||t instanceof this.constructor)m(t,e);else if(Se.isString(t)&&(t=t.trim())&&!s_(t))m(i_(t),e);else if(Se.isObject(t)&&Se.isIterable(t)){let w={},h,d;for(const a of t){if(!Se.isArray(a))throw TypeError("Object iterator must return a key-value pair");w[d=a[0]]=(h=w[d])?Se.isArray(h)?[...h,a[1]]:[h,a[1]]:a[1]}m(w,e)}else t!=null&&g(e,t,r);return this}get(t,e){if(t=nl(t),t){const r=Se.findKey(this,t);if(r){const f=this[r];if(!e)return f;if(e===!0)return o_(f);if(Se.isFunction(e))return e.call(this,f,r);if(Se.isRegExp(e))return e.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=nl(t),t){const r=Se.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||nd(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let f=!1;function g(m){if(m=nl(m),m){const w=Se.findKey(r,m);w&&(!e||nd(r,r[w],w,e))&&(delete r[w],f=!0)}}return Se.isArray(t)?t.forEach(g):g(t),f}clear(t){const e=Object.keys(this);let r=e.length,f=!1;for(;r--;){const g=e[r];(!t||nd(this,this[g],g,t,!0))&&(delete this[g],f=!0)}return f}normalize(t){const e=this,r={};return Se.forEach(this,(f,g)=>{const m=Se.findKey(r,g);if(m){e[m]=mc(f),delete e[g];return}const w=t?a_(g):String(g).trim();w!==g&&delete e[g],e[w]=mc(f),r[w]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Se.forEach(this,(r,f)=>{r!=null&&r!==!1&&(e[f]=t&&Se.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(`
|
|
1492
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}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[ry]=this[ry]={accessors:{}}).accessors,r=this.prototype;function f(g){const m=nl(g);e[m]||(l_(r,g),e[m]=!0)}return Se.isArray(t)?t.forEach(f):f(t),this}};li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(li.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(li);function rd(n,t){const e=this||tl,r=t||e,f=li.from(r.headers);let g=r.data;return Se.forEach(n,function(m){g=m.call(e,g,f.normalize(),t?t.status:void 0)}),f.normalize(),g}function iy(n){return!!(n&&n.__CANCEL__)}function va(n,t,e){At.call(this,n??"canceled",At.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(va,At,{__CANCEL__:!0});function oy(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new At("Request failed with status code "+e.status,[At.ERR_BAD_REQUEST,At.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function c_(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function u_(n,t){n=n||10;const e=new Array(n),r=new Array(n);let f=0,g=0,m;return t=t!==void 0?t:1e3,function(w){const h=Date.now(),d=r[g];m||(m=h),e[f]=w,r[f]=h;let a=g,l=0;for(;a!==f;)l+=e[a++],a=a%n;if(f=(f+1)%n,f===g&&(g=(g+1)%n),h-m<t)return;const u=d&&h-d;return u?Math.round(l*1e3/u):void 0}}function h_(n,t){let e=0,r=1e3/t,f,g;const m=(w,h=Date.now())=>{e=h,f=null,g&&(clearTimeout(g),g=null),n(...w)};return[(...w)=>{const h=Date.now(),d=h-e;d>=r?m(w,h):(f=w,g||(g=setTimeout(()=>{g=null,m(f)},r-d)))},()=>f&&m(f)]}const vc=(n,t,e=3)=>{let r=0;const f=u_(50,250);return h_(g=>{const m=g.loaded,w=g.lengthComputable?g.total:void 0,h=m-r,d=f(h),a=m<=w;r=m;const l={loaded:m,total:w,progress:w?m/w:void 0,bytes:h,rate:d||void 0,estimated:d&&w&&a?(w-m)/d:void 0,event:g,lengthComputable:w!=null,[t?"download":"upload"]:!0};n(l)},e)},sy=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},ay=n=>(...t)=>Se.asap(()=>n(...t)),d_=Nr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Nr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Nr.origin),Nr.navigator&&/(msie|trident)/i.test(Nr.navigator.userAgent)):()=>!0,p_=Nr.hasStandardBrowserEnv?{write(n,t,e,r,f,g,m){if(typeof document>"u")return;const w=[`${n}=${encodeURIComponent(t)}`];Se.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),Se.isString(r)&&w.push(`path=${r}`),Se.isString(f)&&w.push(`domain=${f}`),g===!0&&w.push("secure"),Se.isString(m)&&w.push(`SameSite=${m}`),document.cookie=w.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function f_(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function g_(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ly(n,t,e){let r=!f_(t);return n&&(r||e==!1)?g_(n,t):t}const cy=n=>n instanceof li?{...n}:n;function Rs(n,t){t=t||{};const e={};function r(d,a,l,u){return Se.isPlainObject(d)&&Se.isPlainObject(a)?Se.merge.call({caseless:u},d,a):Se.isPlainObject(a)?Se.merge({},a):Se.isArray(a)?a.slice():a}function f(d,a,l,u){if(Se.isUndefined(a)){if(!Se.isUndefined(d))return r(void 0,d,l,u)}else return r(d,a,l,u)}function g(d,a){if(!Se.isUndefined(a))return r(void 0,a)}function m(d,a){if(Se.isUndefined(a)){if(!Se.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(l in t)return r(d,a);if(l in n)return r(void 0,d)}const h={url:g,method:g,data:g,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:w,headers:(d,a,l)=>f(cy(d),cy(a),l,!0)};return Se.forEach(Object.keys({...n,...t}),function(d){const a=h[d]||f,l=a(n[d],t[d],d);Se.isUndefined(l)&&a!==w||(e[d]=l)}),e}const uy=n=>{const t=Rs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:g,headers:m,auth:w}=t;if(t.headers=m=li.from(m),t.url=Jv(ly(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),w&&m.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):""))),Se.isFormData(e)){if(Nr.hasStandardBrowserEnv||Nr.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(Se.isFunction(e.getHeaders)){const h=e.getHeaders(),d=["content-type","content-length"];Object.entries(h).forEach(([a,l])=>{d.includes(a.toLowerCase())&&m.set(a,l)})}}if(Nr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&d_(t.url))){const h=f&&g&&p_.read(g);h&&m.set(f,h)}return t},m_=typeof XMLHttpRequest<"u",v_=m_&&function(n){return new Promise(function(t,e){const r=uy(n);let f=r.data;const g=li.from(r.headers).normalize();let{responseType:m,onUploadProgress:w,onDownloadProgress:h}=r,d,a,l,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function p(){if(!s)return;const x=li.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),R={data:!m||m==="text"||m==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:n,request:s};oy(function($){t($),i()},function($){e($),i()},R),s=null}"onloadend"in s?s.onloadend=p:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(p)},s.onabort=function(){s&&(e(new At("Request aborted",At.ECONNABORTED,n,s)),s=null)},s.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new At(R,At.ERR_NETWORK,n,s);$.event=x||null,e($),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||ty;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new At(x,R.clarifyTimeoutError?At.ETIMEDOUT:At.ECONNABORTED,n,s)),s=null},f===void 0&&g.setContentType(null),"setRequestHeader"in s&&Se.forEach(g.toJSON(),function(x,R){s.setRequestHeader(R,x)}),Se.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),m&&m!=="json"&&(s.responseType=r.responseType),h&&([l,c]=vc(h,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,u]=vc(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new va(null,n,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=c_(r.url);if(b&&Nr.protocols.indexOf(b)===-1){e(new At("Unsupported protocol "+b+":",At.ERR_BAD_REQUEST,n));return}s.send(f||null)})},y_=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,f;const g=function(d){if(!f){f=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof At?a:new va(a instanceof Error?a.message:a))}};let m=t&&setTimeout(()=>{m=null,g(new At(`timeout ${t} of ms exceeded`,At.ETIMEDOUT))},t);const w=()=>{n&&(m&&clearTimeout(m),m=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(g):d.removeEventListener("abort",g)}),n=null)};n.forEach(d=>d.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(w),h}},b_=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},w_=async function*(n,t){for await(const e of x_(n))yield*b_(e,t)},x_=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()}},hy=(n,t,e,r)=>{const f=w_(n,t);let g=0,m,w=h=>{m||(m=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:a}=await f.next();if(d){w(),h.close();return}let l=a.byteLength;if(e){let u=g+=l;e(u)}h.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(h){return w(h),f.return()}},{highWaterMark:2})},dy=64*1024,{isFunction:yc}=Se,C_=(({Request:n,Response:t})=>({Request:n,Response:t}))(Se.global),{ReadableStream:py,TextEncoder:fy}=Se.global,gy=(n,...t)=>{try{return!!n(...t)}catch{return!1}},k_=n=>{n=Se.merge.call({skipUndefined:!0},C_,n);const{fetch:t,Request:e,Response:r}=n,f=t?yc(t):typeof fetch=="function",g=yc(e),m=yc(r);if(!f)return!1;const w=f&&yc(py),h=f&&(typeof fy=="function"?(i=>s=>i.encode(s))(new fy):async i=>new Uint8Array(await new e(i).arrayBuffer())),d=g&&w&&gy(()=>{let i=!1;const s=new e(Nr.origin,{body:new py,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!s}),a=m&&w&&gy(()=>Se.isReadableStream(new r("").body)),l={stream:a&&(i=>i.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!l[i]&&(l[i]=(s,p)=>{let b=s&&s[i];if(b)return b.call(s);throw new At(`Response type '${i}' is not supported`,At.ERR_NOT_SUPPORT,p)})});const u=async i=>{if(i==null)return 0;if(Se.isBlob(i))return i.size;if(Se.isSpecCompliantForm(i))return(await new e(Nr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(i)||Se.isArrayBuffer(i))return i.byteLength;if(Se.isURLSearchParams(i)&&(i=i+""),Se.isString(i))return(await h(i)).byteLength},c=async(i,s)=>Se.toFiniteNumber(i.getContentLength())??u(s);return async i=>{let{url:s,method:p,data:b,signal:x,cancelToken:R,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:L,headers:D,withCredentials:E="same-origin",fetchOptions:I}=uy(i),z=t||fetch;L=L?(L+"").toLowerCase():"text";let P=y_([x,R&&R.toAbortSignal()],$),O=null;const _=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let A;try{if(C&&d&&p!=="get"&&p!=="head"&&(A=await c(D,b))!==0){let J=new e(s,{method:"POST",body:b,duplex:"half"}),he;if(Se.isFormData(b)&&(he=J.headers.get("content-type"))&&D.setContentType(he),J.body){const[ne,le]=sy(A,vc(ay(C)));b=hy(J.body,dy,ne,le)}}Se.isString(E)||(E=E?"include":"omit");const N=g&&"credentials"in e.prototype,B={...I,signal:P,method:p.toUpperCase(),headers:D.normalize().toJSON(),body:b,duplex:"half",credentials:N?E:void 0};O=g&&new e(s,B);let U=await(g?z(O,I):z(s,B));const K=a&&(L==="stream"||L==="response");if(a&&(k||K&&_)){const J={};["status","statusText","headers"].forEach(se=>{J[se]=U[se]});const he=Se.toFiniteNumber(U.headers.get("content-length")),[ne,le]=k&&sy(he,vc(ay(k),!0))||[];U=new r(hy(U.body,dy,ne,()=>{le&&le(),_&&_()}),J)}L=L||"text";let Z=await l[Se.findKey(l,L)||"text"](U,i);return!K&&_&&_(),await new Promise((J,he)=>{oy(J,he,{data:Z,headers:li.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:O})})}catch(N){throw _&&_(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new At("Network Error",At.ERR_NETWORK,i,O),{cause:N.cause||N}):At.from(N,N&&N.code,i,O)}}},A_=new Map,my=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:f}=t,g=[r,f,e];let m=g.length,w=m,h,d,a=A_;for(;w--;)h=g[w],d=a.get(h),d===void 0&&a.set(h,d=w?new Map:k_(t)),a=d;return d};my();const id={http:z$,xhr:v_,fetch:{get:my}};Se.forEach(id,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const vy=n=>`- ${n}`,S_=n=>Se.isFunction(n)||n===null||n===!1;function $_(n,t){n=Se.isArray(n)?n:[n];const{length:e}=n;let r,f;const g={};for(let m=0;m<e;m++){r=n[m];let w;if(f=r,!S_(r)&&(f=id[(w=String(r)).toLowerCase()],f===void 0))throw new At(`Unknown adapter '${w}'`);if(f&&(Se.isFunction(f)||(f=f.get(t))))break;g[w||"#"+m]=f}if(!f){const m=Object.entries(g).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?m.length>1?`since :
|
|
1493
|
+
`+m.map(vy).join(`
|
|
1494
|
+
`):" "+vy(m[0]):"as no adapter specified";throw new At("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return f}const yy={getAdapter:$_,adapters:id};function od(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new va(null,n)}function by(n){return od(n),n.headers=li.from(n.headers),n.data=rd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),yy.getAdapter(n.adapter||tl.adapter,n)(n).then(function(t){return od(n),t.data=rd.call(n,n.transformResponse,t),t.headers=li.from(t.headers),t},function(t){return iy(t)||(od(n),t&&t.response&&(t.response.data=rd.call(n,n.transformResponse,t.response),t.response.headers=li.from(t.response.headers))),Promise.reject(t)})}const wy="1.13.1",bc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{bc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const xy={};bc.transitional=function(n,t,e){function r(f,g){return"[Axios v"+wy+"] Transitional option '"+f+"'"+g+(e?". "+e:"")}return(f,g,m)=>{if(n===!1)throw new At(r(g," has been removed"+(t?" in "+t:"")),At.ERR_DEPRECATED);return t&&!xy[g]&&(xy[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(f,g,m):!0}},bc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function __(n,t,e){if(typeof n!="object")throw new At("options must be an object",At.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let f=r.length;for(;f-- >0;){const g=r[f],m=t[g];if(m){const w=n[g],h=w===void 0||m(w,g,n);if(h!==!0)throw new At("option "+g+" must be "+h,At.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new At("Unknown option "+g,At.ERR_BAD_OPTION)}}const wc={assertOptions:__,validators:bc},ho=wc.validators;let Ls=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ey,response:new ey}}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 g=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?g&&!String(r.stack).endsWith(g.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
1495
|
+
`+g):r.stack=g}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Rs(this.defaults,e);const{transitional:r,paramsSerializer:f,headers:g}=e;r!==void 0&&wc.assertOptions(r,{silentJSONParsing:ho.transitional(ho.boolean),forcedJSONParsing:ho.transitional(ho.boolean),clarifyTimeoutError:ho.transitional(ho.boolean)},!1),f!=null&&(Se.isFunction(f)?e.paramsSerializer={serialize:f}:wc.assertOptions(f,{encode:ho.function,serialize:ho.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),wc.assertOptions(e,{baseUrl:ho.spelling("baseURL"),withXsrfToken:ho.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let m=g&&Se.merge(g.common,g[e.method]);g&&Se.forEach(["delete","get","head","post","put","patch","common"],i=>{delete g[i]}),e.headers=li.concat(m,g);const w=[];let h=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(e)===!1||(h=h&&i.synchronous,w.unshift(i.fulfilled,i.rejected))});const d=[];this.interceptors.response.forEach(function(i){d.push(i.fulfilled,i.rejected)});let a,l=0,u;if(!h){const i=[by.bind(this),void 0];for(i.unshift(...w),i.push(...d),u=i.length,a=Promise.resolve(e);l<u;)a=a.then(i[l++],i[l++]);return a}u=w.length;let c=e;for(;l<u;){const i=w[l++],s=w[l++];try{c=i(c)}catch(p){s.call(this,p);break}}try{a=by.call(this,c)}catch(i){return Promise.reject(i)}for(l=0,u=d.length;l<u;)a=a.then(d[l++],d[l++]);return a}getUri(t){t=Rs(this.defaults,t);const e=ly(t.baseURL,t.url,t.allowAbsoluteUrls);return Jv(e,t.params,t.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){Ls.prototype[n]=function(t,e){return this.request(Rs(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,f,g){return this.request(Rs(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}Ls.prototype[n]=t(),Ls.prototype[n+"Form"]=t(!0)});let T_=class ow{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 g=r._listeners.length;for(;g-- >0;)r._listeners[g](f);r._listeners=null}),this.promise.then=f=>{let g;const m=new Promise(w=>{r.subscribe(w),g=w}).then(f);return m.cancel=function(){r.unsubscribe(g)},m},t(function(f,g,m){r.reason||(r.reason=new va(f,g,m),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 ow(function(e){t=e}),cancel:t}}};function M_(n){return function(t){return n.apply(null,t)}}function I_(n){return Se.isObject(n)&&n.isAxiosError===!0}const sd={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(sd).forEach(([n,t])=>{sd[t]=n});function Cy(n){const t=new Ls(n),e=Pv(Ls.prototype.request,t);return Se.extend(e,Ls.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Cy(Rs(n,r))},e}const nr=gr("w",Cy(tl));nr.Axios=Ls,nr.CanceledError=va,nr.CancelToken=T_,nr.isCancel=iy,nr.VERSION=wy,nr.toFormData=gc,nr.AxiosError=At,nr.Cancel=nr.CanceledError,nr.all=function(n){return Promise.all(n)},nr.spread=M_,nr.isAxiosError=I_,nr.mergeConfig=Rs,nr.AxiosHeaders=li,nr.formToJSON=n=>ny(Se.isHTMLForm(n)?new FormData(n):n),nr.getAdapter=yy.getAdapter,nr.HttpStatusCode=sd,nr.default=nr;const{Axios:mD,AxiosError:vD,CanceledError:yD,isCancel:bD,CancelToken:wD,VERSION:xD,all:CD,Cancel:kD,isAxiosError:AD,spread:SD,toFormData:$D,AxiosHeaders:_D,HttpStatusCode:TD,formToJSON:MD,getAdapter:ID,mergeConfig:ED}=nr;function ky(){return Object.assign({},Zs())}function E_(n,t,e){const r=Sn(n,void 0);return r.setTime(r.getTime()+t*Ml),r}function R_(n,t){const e=()=>er(void 0,NaN),r=D_(n);let f;if(r.date){const h=F_(r.date,2);f=P_(h.restDateString,h.year)}if(!f||isNaN(+f))return e();const g=+f;let m=0,w;if(r.time&&(m=W_(r.time),isNaN(m)))return e();if(r.timezone){if(w=B_(r.timezone),isNaN(w))return e()}else{const h=new Date(g+m),d=Sn(0,void 0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return Sn(g+m+w,void 0)}const xc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},L_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,O_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,N_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function D_(n){const t={},e=n.split(xc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],xc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(xc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const f=xc.timezone.exec(r);f?(t.time=r.replace(f[1],""),t.timezone=f[1]):t.time=r}return t}function F_(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,g=r[2]?parseInt(r[2]):null;return{year:g===null?f:g*100,restDateString:n.slice((r[1]||r[2]).length)}}function P_(n,t){if(t===null)return new Date(NaN);const e=n.match(L_);if(!e)return new Date(NaN);const r=!!e[4],f=rl(e[1]),g=rl(e[2])-1,m=rl(e[3]),w=rl(e[4]),h=rl(e[5])-1;if(r)return V_(t,w,h)?z_(t,w,h):new Date(NaN);{const d=new Date(0);return!j_(t,g,m)||!U_(t,f)?new Date(NaN):(d.setUTCFullYear(t,g,Math.max(f,m)),d)}}function rl(n){return n?parseInt(n):1}function W_(n){const t=n.match(O_);if(!t)return NaN;const e=ad(t[1]),r=ad(t[2]),f=ad(t[3]);return q_(e,r,f)?e*gu+r*Ml+f*1e3:NaN}function ad(n){return n&&parseFloat(n.replace(",","."))||0}function B_(n){if(n==="Z")return 0;const t=n.match(N_);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),f=t[3]&&parseInt(t[3])||0;return K_(r,f)?e*(r*gu+f*Ml):NaN}function z_(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const f=r.getUTCDay()||7,g=(t-1)*7+e+1-f;return r.setUTCDate(r.getUTCDate()+g),r}const H_=[31,null,31,30,31,30,31,31,30,31,30,31];function Ay(n){return n%400===0||n%4===0&&n%100!==0}function j_(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(H_[t]||(Ay(n)?29:28))}function U_(n,t){return t>=1&&t<=(Ay(n)?366:365)}function V_(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function q_(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function K_(n,t){return t>=0&&t<=59}function G_(n,t,e){return E_(n,-t)}function Sy(n,t,e){const r=ky(),f=Q_(n,e.timeZone,e.locale??r.locale);return"formatToParts"in f?Y_(f,t):X_(f,t)}function Y_(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 X_(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function Q_(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function Z_(n,t){const e=rT(t);return"formatToParts"in e?eT(e,n):tT(e,n)}const J_={year:0,month:1,day:2,hour:3,minute:4,second:5};function eT(n,t){try{const e=n.formatToParts(t),r=[];for(let f=0;f<e.length;f++){const g=J_[e[f].type];g!==void 0&&(r[g]=parseInt(e[f].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function tT(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 ld={},$y=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")),nT=$y==="06/25/2014, 00:00:00"||$y==="06/25/2014 00:00:00";function rT(n){return ld[n]||(ld[n]=nT?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"})),ld[n]}function _y(n,t,e,r,f,g,m){const w=new Date(0);return w.setUTCFullYear(n,t,e),w.setUTCHours(r,f,g,m),w}const Ty=36e5,iT=6e4,cd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ud(n,t,e){if(!n)return 0;let r=cd.timezoneZ.exec(n);if(r)return 0;let f,g;if(r=cd.timezoneHH.exec(n),r)return f=parseInt(r[1],10),My(f)?-(f*Ty):NaN;if(r=cd.timezoneHHMM.exec(n),r){f=parseInt(r[2],10);const m=parseInt(r[3],10);return My(f,m)?(g=Math.abs(f)*Ty+m*iT,r[1]==="+"?-g:g):NaN}if(aT(n)){t=new Date(t||Date.now());const m=e?t:oT(t),w=hd(m,n);return-(e?w:sT(t,w,n))}return NaN}function oT(n){return _y(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function hd(n,t){const e=Z_(n,t),r=_y(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let f=n.getTime();const g=f%1e3;return f-=g>=0?g:1e3+g,r-f}function sT(n,t,e){let r=n.getTime()-t;const f=hd(new Date(r),e);if(t===f)return t;r-=f-t;const g=hd(new Date(r),e);return f===g?f:Math.max(f,g)}function My(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Iy={};function aT(n){if(Iy[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Iy[n]=!0,!0}catch{return!1}}const lT=60*1e3,cT={X:function(n,t,e){const r=dd(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Ey(r);case"XXXX":case"XX":return ya(r);case"XXXXX":case"XXX":default:return ya(r,":")}},x:function(n,t,e){const r=dd(e.timeZone,n);switch(t){case"x":return Ey(r);case"xxxx":case"xx":return ya(r);case"xxxxx":case"xxx":default:return ya(r,":")}},O:function(n,t,e){const r=dd(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+uT(r,":");case"OOOO":default:return"GMT"+ya(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Sy("short",n,e);case"zzzz":default:return Sy("long",n,e)}}};function dd(n,t){const e=n?ud(n,t,!0)/lT:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Cc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ya(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=Cc(Math.floor(r/60),2),g=Cc(Math.floor(r%60),2);return e+f+t+g}function Ey(n,t){return n%60===0?(n>0?"-":"+")+Cc(Math.abs(n)/60,2):ya(n,t)}function uT(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),f=Math.floor(r/60),g=r%60;return g===0?e+String(f):e+String(f)+t+Cc(g,2)}function Ry(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 hT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pd=36e5,Ly=6e4,dT=2,jr={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:hT};function Oy(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?dT: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=pT(n),{year:f,restDateString:g}=fT(r.date,e),m=gT(g,f);if(m===null||isNaN(m.getTime()))return new Date(NaN);if(m){const w=m.getTime();let h=0,d;if(r.time&&(h=mT(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=ud(r.timeZone||t.timeZone,new Date(w+h)),isNaN(d))return new Date(NaN)}else d=Ry(new Date(w+h)),d=Ry(new Date(w+h+d));return new Date(w+h+d)}else return new Date(NaN)}function pT(n){const t={};let e=jr.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=jr.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const f=jr.timeZone.exec(r);f?(t.time=r.replace(f[1],""),t.timeZone=f[1].trim()):t.time=r}return t}function fT(n,t){if(n){const e=jr.YYY[t],r=jr.YYYYY[t];let f=jr.YYYY.exec(n)||r.exec(n);if(f){const g=f[1];return{year:parseInt(g,10),restDateString:n.slice(g.length)}}if(f=jr.YY.exec(n)||e.exec(n),f){const g=f[1];return{year:parseInt(g,10)*100,restDateString:n.slice(g.length)}}}return{year:null}}function gT(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 g=jr.MM.exec(n);if(g)return e=new Date(0),r=parseInt(g[1],10)-1,Fy(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(g=jr.DDD.exec(n),g){e=new Date(0);const m=parseInt(g[1],10);return bT(t,m)?(e.setUTCFullYear(t,0,m),e):new Date(NaN)}if(g=jr.MMDD.exec(n),g){e=new Date(0),r=parseInt(g[1],10)-1;const m=parseInt(g[2],10);return Fy(t,r,m)?(e.setUTCFullYear(t,r,m),e):new Date(NaN)}if(g=jr.Www.exec(n),g)return f=parseInt(g[1],10)-1,Py(f)?Ny(t,f):new Date(NaN);if(g=jr.WwwD.exec(n),g){f=parseInt(g[1],10)-1;const m=parseInt(g[2],10)-1;return Py(f,m)?Ny(t,f,m):new Date(NaN)}return null}function mT(n){let t,e,r=jr.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),fd(t)?t%24*pd:NaN;if(r=jr.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),fd(t,e)?t%24*pd+e*Ly:NaN;if(r=jr.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return fd(t,e,f)?t%24*pd+e*Ly+f*1e3:NaN}return null}function Ny(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const f=r.getUTCDay()||7,g=t*7+e+1-f;return r.setUTCDate(r.getUTCDate()+g),r}const vT=[31,28,31,30,31,30,31,31,30,31,30,31],yT=[31,29,31,30,31,30,31,31,30,31,30,31];function Dy(n){return n%400===0||n%4===0&&n%100!==0}function Fy(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=Dy(n);if(r&&e>yT[t]||!r&&e>vT[t])return!1}return!0}function bT(n,t){if(t<1)return!1;const e=Dy(n);return!(e&&t>366||!e&&t>365)}function Py(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function fd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const wT=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function xT(n,t,e={}){t=String(t);const r=t.match(wT);if(r){const f=Oy(e.originalDate||n,e);t=r.reduce(function(g,m){if(m[0]==="'")return g;const w=g.indexOf(m),h=g[w-1]==="'",d=g.replace(m,"'"+cT[m[0]](f,m,e)+"'");return h?d.substring(0,w-1)+d.substring(w+1):d},t)}return ys(n,t,e)}function CT(n,t,e){n=Oy(n,e);const r=ud(t,n,!0),f=new Date(n.getTime()-r),g=new Date(0);return g.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),g.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),g}function kc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},xT(CT(n,t,{timeZone:r.timeZone}),e,r)}const Ac="yyyy-MM-dd",Wy="HH:mm:ss.SSS",By="HH:mm:ss",Sc=`${Ac} ${Wy}`,zy=`${Ac} ${By}`,RD=gr("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return ys(!t||t==="local"?G_(n,n.getTimezoneOffset()):n,Sc)},formatDateTime(n,t){return!t||t==="local"?ys(n,Sc):kc(n,t,Sc)},formatDateTimeHMS(n,t){return!t||t==="local"?ys(n,zy):kc(n,t,zy)},formatDate:function(n,t){return!t||t==="local"?ys(n,Ac):kc(n,this.timeZone,Ac)},formatTime:function(n,t,e=Wy){return!t||t==="local"?ys(n,e):kc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,By)},formatTimestamp(n,t){return this.formatDateTime(R_(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 kT=Object.defineProperty,AT=(n,t,e)=>t in n?kT(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>AT(n,typeof t!="symbol"?t+"":t,e);function gd(n,t,e){const r=Sn(n,e==null?void 0:e.in);return isNaN(t)?er((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function ST(n,t){const e=Sn(n,void 0).getDay();return e===0?7:e}function $T(n,t){const e=_T(t)?new t(0):er(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function _T(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const TT=10;let Hy=class{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}},MT=class extends Hy{constructor(t,e,r,f,g){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=f,g&&(this.subPriority=g)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}};class IT extends Hy{constructor(t,e){super(),Je(this,"priority",TT),Je(this,"subPriority",-1),this.context=t||(r=>er(e,r))}set(t,e){return e.timestampIsSet?t:er(t,$T(t,this.context))}}class tn{run(t,e,r,f){const g=this.parse(t,e,r,f);return g?{setter:new MT(g.value,this.validate,this.set,this.priority,this.subPriority),rest:g.rest}:null}validate(t,e,r){return!0}}class ET extends tn{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 Gn={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}/},po={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 Yn(n,t){return n&&{value:t(n.value),rest:n.rest}}function Rn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function fo(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,g=e[3]?parseInt(e[3],10):0,m=e[5]?parseInt(e[5],10):0;return{value:r*(f*gu+g*Ml+m*kw),rest:t.slice(e[0].length)}}function jy(n){return Rn(Gn.anyDigitsSigned,n)}function Pn(n,t){switch(n){case 1:return Rn(Gn.singleDigit,t);case 2:return Rn(Gn.twoDigits,t);case 3:return Rn(Gn.threeDigits,t);case 4:return Rn(Gn.fourDigits,t);default:return Rn(new RegExp("^\\d{1,"+n+"}"),t)}}function Uy(n,t){switch(n){case 1:return Rn(Gn.singleDigitSigned,t);case 2:return Rn(Gn.twoDigitsSigned,t);case 3:return Rn(Gn.threeDigitsSigned,t);case 4:return Rn(Gn.fourDigitsSigned,t);default:return Rn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function md(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 Vy(n,t){const e=t>0,r=e?t:1-t;let f;if(r<=50)f=n||100;else{const g=r+50,m=Math.trunc(g/100)*100,w=n>=g%100;f=n+m-(w?100:0)}return e?f:1-f}function qy(n){return n%400===0||n%4===0&&n%100!==0}let RT=class extends tn{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=g=>({year:g,isTwoDigitYear:e==="yy"});switch(e){case"y":return Yn(Pn(4,t),f);case"yo":return Yn(r.ordinalNumber(t,{unit:"year"}),f);default:return Yn(Pn(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 m=Vy(r.year,f);return t.setFullYear(m,0,1),t.setHours(0,0,0,0),t}const g=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(g,0,1),t.setHours(0,0,0,0),t}};class LT extends tn{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=g=>({year:g,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Yn(Pn(4,t),f);case"Yo":return Yn(r.ordinalNumber(t,{unit:"year"}),f);default:return Yn(Pn(e.length,t),f)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,f){const g=vu(t,f);if(r.isTwoDigitYear){const w=Vy(r.year,g);return t.setFullYear(w,0,f.firstWeekContainsDate),t.setHours(0,0,0,0),Ko(t,f)}const m=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(m,0,f.firstWeekContainsDate),t.setHours(0,0,0,0),Ko(t,f)}}class OT extends tn{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=er(t,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Js(f)}}let NT=class extends tn{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}};class DT extends tn{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 Pn(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 FT extends tn{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 Pn(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}}let PT=class extends tn{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=g=>g-1;switch(e){case"M":return Yn(Rn(Gn.month,t),f);case"MM":return Yn(Pn(2,t),f);case"Mo":return Yn(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}},WT=class extends tn{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=g=>g-1;switch(e){case"L":return Yn(Rn(Gn.month,t),f);case"LL":return Yn(Pn(2,t),f);case"Lo":return Yn(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 BT(n,t,e){const r=Sn(n,e==null?void 0:e.in),f=Yp(r,e)-t;return r.setDate(r.getDate()-f*7),Sn(r,e==null?void 0:e.in)}let zT=class extends tn{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 Rn(Gn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Pn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,f){return Ko(BT(t,r,f),f)}};function HT(n,t,e){const r=Sn(n,void 0),f=Gp(r)-t;return r.setDate(r.getDate()-f*7),r}class jT extends tn{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 Rn(Gn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Pn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Js(HT(t,r))}}const UT=[31,28,31,30,31,30,31,31,30,31,30,31],VT=[31,29,31,30,31,30,31,31,30,31,30,31];class qT extends tn{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 Rn(Gn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Pn(e.length,t)}}validate(t,e){const r=t.getFullYear(),f=qy(r),g=t.getMonth();return f?e>=1&&e<=VT[g]:e>=1&&e<=UT[g]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}let KT=class extends tn{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 Rn(Gn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Pn(e.length,t)}}validate(t,e){const r=t.getFullYear();return qy(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 vd(n,t,e){var r,f,g,m;const w=Zs(),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)??w.weekStartsOn??((m=(g=w.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,d=Sn(n,e==null?void 0:e.in),a=d.getDay(),l=(t%7+7)%7,u=7-h,c=t<0||t>6?t-(a+u)%7:(l+u)%7-(a+u)%7;return gd(d,c,e)}class GT extends tn{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=vd(t,r,f),t.setHours(0,0,0,0),t}}class YT extends tn{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 g=m=>{const w=Math.floor((m-1)/7)*7;return(m+f.weekStartsOn+6)%7+w};switch(e){case"e":case"ee":return Yn(Pn(e.length,t),g);case"eo":return Yn(r.ordinalNumber(t,{unit:"day"}),g);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=vd(t,r,f),t.setHours(0,0,0,0),t}}let XT=class extends tn{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 g=m=>{const w=Math.floor((m-1)/7)*7;return(m+f.weekStartsOn+6)%7+w};switch(e){case"c":case"cc":return Yn(Pn(e.length,t),g);case"co":return Yn(r.ordinalNumber(t,{unit:"day"}),g);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=vd(t,r,f),t.setHours(0,0,0,0),t}};function QT(n,t,e){const r=Sn(n,void 0),f=ST(r),g=t-f;return gd(r,g,e)}let ZT=class extends tn{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=g=>g===0?7:g;switch(e){case"i":case"ii":return Pn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Yn(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 Yn(r.day(t,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Yn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Yn(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=QT(t,r),t.setHours(0,0,0,0),t}};class JT extends tn{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(md(r),0,0,0),t}}class eM extends tn{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(md(r),0,0,0),t}}let tM=class extends tn{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(md(r),0,0,0),t}};class nM extends tn{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return Rn(Gn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Pn(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 rM extends tn{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 Rn(Gn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Pn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class iM extends tn{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return Rn(Gn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Pn(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 oM extends tn{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 Rn(Gn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Pn(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 sM extends tn{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return Rn(Gn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Pn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class aM extends tn{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return Rn(Gn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Pn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class lM extends tn{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 Yn(Pn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class cM extends tn{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return fo(po.basicOptionalMinutes,t);case"XX":return fo(po.basic,t);case"XXXX":return fo(po.basicOptionalSeconds,t);case"XXXXX":return fo(po.extendedOptionalSeconds,t);case"XXX":default:return fo(po.extended,t)}}set(t,e,r){return e.timestampIsSet?t:er(t,t.getTime()-Il(t)-r)}}class uM extends tn{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return fo(po.basicOptionalMinutes,t);case"xx":return fo(po.basic,t);case"xxxx":return fo(po.basicOptionalSeconds,t);case"xxxxx":return fo(po.extendedOptionalSeconds,t);case"xxx":default:return fo(po.extended,t)}}set(t,e,r){return e.timestampIsSet?t:er(t,t.getTime()-Il(t)-r)}}class hM extends tn{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return jy(t)}set(t,e,r){return[er(t,r*1e3),{timestampIsSet:!0}]}}class dM extends tn{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return jy(t)}set(t,e,r){return[er(t,r),{timestampIsSet:!0}]}}const pM={G:new ET,y:new RT,Y:new LT,R:new OT,u:new NT,Q:new DT,q:new FT,M:new PT,L:new WT,w:new zT,I:new jT,d:new qT,D:new KT,E:new GT,e:new YT,c:new XT,i:new ZT,a:new JT,b:new eM,B:new tM,h:new nM,H:new rM,K:new iM,k:new oM,m:new sM,s:new aM,S:new lM,X:new cM,x:new uM,t:new hM,T:new dM},fM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mM=/^'([^]*?)'?$/,vM=/''/g,yM=/\S/,bM=/[a-zA-Z]/;function wM(n,t,e,r){var f,g,m,w;const h=()=>er(e,NaN),d=ky(),a=d.locale??Kp,l=d.firstWeekContainsDate??((g=(f=d.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,u=d.weekStartsOn??((w=(m=d.locale)==null?void 0:m.options)==null?void 0:w.weekStartsOn)??0;if(!t)return n?h():Sn(e,void 0);const c={firstWeekContainsDate:l,weekStartsOn:u,locale:a},i=[new IT(void 0,e)],s=t.match(gM).map($=>{const k=$[0];if(k in yu){const C=yu[k];return C($,a.formatLong)}return $}).join("").match(fM),p=[];for(let $ of s){nf($)&&bu($,t,n),tf($)&&bu($,t,n);const k=$[0],C=pM[k];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const E=p.find(I=>L.includes(I.token)||I.token===k);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);p.push({token:k,fullToken:$});const D=C.run(n,$,a.match,c);if(!D)return h();i.push(D.setter),n=D.rest}else{if(k.match(bM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if($==="''"?$="'":k==="'"&&($=xM($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&yM.test(n))return h();const b=i.map($=>$.priority).sort(($,k)=>k-$).filter(($,k,C)=>C.indexOf($)===k).map($=>i.filter(k=>k.priority===$).sort((k,C)=>C.subPriority-k.subPriority)).map($=>$[0]);let x=Sn(e,void 0);if(isNaN(+x))return h();const R={};for(const $ of b){if(!$.validate(x,c))return h();const k=$.set(x,R,c);Array.isArray(k)?(x=k[0],Object.assign(R,k[1])):x=k}return x}function xM(n){return n.match(mM)[1].replace(vM,"'")}const CM="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=",kM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return CM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=IM.indexOf(Ky[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 AM(n,t,e,r,f,g){return En(),ri("div",{style:Ra(g.iconStyle)},null,4)}const SM=qo(kM,[["render",AM]]),$M={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function _M(n,t,e,r,f,g){const m=xt("rux-icon");return En(),lo(m,{size:e.size,icon:e.icon,style:Ra(g.colorStyle)},null,8,["size","icon","style"])}const TM=qo($M,[["render",_M],["__scopeId","data-v-9af48e85"]]),Ky={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"},yd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},MM=function(n){const t="#000000",e="#ffffff",r=yd[Ky[n]];if(r){const f=+`0x${r.slice(1,3)}`,g=+`0x${r.slice(3,5)}`,m=+`0x${r.slice(5,7)}`;if((f*299+g*587+m*114)/1e3>128)return t}return e},IM=Object.keys(yd),EM={astro:{component:n=>Xs(TM,{...n})},"astro-status":{component:n=>Xs(SM,{...n,status:n.icon})}},RM={extras:{component:n=>Xs(Cw,{...n})}},LD=gr("p",{data:{configKey:"",dontSaveDefaultConfig:!1},methods:{loadDefaultConfig:function(){return localStorage[`${this.configKey}__default`]?JSON.parse(localStorage[`${this.configKey}__default`]):{}},saveDefaultConfig:function(n){this.dontSaveDefaultConfig!==!0&&(localStorage[`${this.configKey}__default`]=JSON.stringify(n))},openConfigBase:function(n,t=!1,e=null){new As().load_config(this.configKey,n).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:n}),e&&e(JSON.parse(r)),t||this.$route.fullPath.includes(n)||this.$router.push({query:{config:n}})):this.$notify.caution({title:"Unknown configuration",body:n})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${n}`,body:r})})},saveConfigBase:function(n,t){new As().save_config(this.configKey,n,JSON.stringify(t)).then(()=>{this.$notify.normal({title:"Saved configuration",body:n})}).catch(e=>{e&&this.$notify.serious({title:`Error saving configuration: ${n}`,body:e})})},resetConfigBase:function(){localStorage.removeItem(`${this.configKey}__default`);const n={...this.$route.query};delete n.config,this.$router.replace({query:n})}}}),LM={props:{configKey:String,modelValue:Boolean},data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},mounted(){let n=-1;new As().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(n),1),new As().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},OM={class:"mt-4 pa-3"},NM=["textContent"];function DM(n,t,e,r,f,g){const m=xt("v-spacer"),w=xt("v-toolbar"),h=xt("v-text-field"),d=xt("v-row"),a=xt("v-btn"),l=xt("v-data-table"),u=xt("v-card-text"),c=xt("v-card-actions"),i=xt("v-card"),s=xt("v-dialog");return En(),lo(s,{modelValue:g.show,"onUpdate:modelValue":t[4]||(t[4]=p=>g.show=p),persistent:"",width:"600",onKeydown:$l(g.cancel,["esc"])},{default:Rt(()=>[ht(i,null,{default:Rt(()=>[mr("form",{onSubmit:t[3]||(t[3]=Qs((...p)=>g.success&&g.success(...p),["prevent"]))},[ht(w,{height:"24"},{default:Rt(()=>[ht(m),t[5]||(t[5]=mr("span",null,"Open Configuration",-1)),ht(m)]),_:1}),ht(u,null,{default:Rt(()=>[mr("div",OM,[ht(d,{dense:""},{default:Rt(()=>[ht(h,{modelValue:f.search,"onUpdate:modelValue":t[0]||(t[0]=p=>f.search=p),label:"Search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ht(l,{modelValue:f.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=p=>f.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:f.search,headers:f.headers,items:f.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(p,b)=>g.selectRow(b))},{"item.actions":Rt(({item:p})=>[ht(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>g.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ht(d,{dense:""},{default:Rt(()=>[_l(mr("span",{class:"ma-2 text-red",textContent:ii(g.error)},null,8,NM),[[Tl,g.error]])]),_:1})])]),_:1}),ht(c,{class:"px-2"},{default:Rt(()=>[ht(m),ht(a,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:g.cancel},{default:Rt(()=>[...t[6]||(t[6]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),ht(a,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!g.error,onClick:Qs(g.success,["prevent"])},{default:Rt(()=>[...t[7]||(t[7]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const OD=gr("g",qo(LM,[["render",DM]])),FM={props:{configKey:String,modelValue:Boolean},data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.configName?null:"Config must have a name"},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{selectedItem:function(n){n&&(this.configName=n.config)}},mounted(){let n=-1;new As().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(n),1),new As().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},PM={class:"mt-4 pa-3"},WM=["textContent"];function BM(n,t,e,r,f,g){const m=xt("v-spacer"),w=xt("v-toolbar"),h=xt("v-text-field"),d=xt("v-row"),a=xt("v-btn"),l=xt("v-data-table"),u=xt("v-card-text"),c=xt("v-card-actions"),i=xt("v-card"),s=xt("v-dialog");return En(),lo(s,{modelValue:g.show,"onUpdate:modelValue":t[5]||(t[5]=p=>g.show=p),persistent:"",width:"600",onKeydown:$l(g.cancel,["esc"])},{default:Rt(()=>[ht(i,null,{default:Rt(()=>[mr("form",{onSubmit:t[4]||(t[4]=Qs((...p)=>g.success&&g.success(...p),["prevent"]))},[ht(w,{height:"24"},{default:Rt(()=>[ht(m),t[6]||(t[6]=mr("span",null,"Save Configuration",-1)),ht(m)]),_:1}),ht(u,null,{default:Rt(()=>[mr("div",PM,[ht(d,{dense:""},{default:Rt(()=>[ht(h,{modelValue:f.search,"onUpdate:modelValue":t[0]||(t[0]=p=>f.search=p),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ht(l,{modelValue:f.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=p=>f.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:f.search,headers:f.headers,items:f.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(p,b)=>g.selectRow(b))},{"item.actions":Rt(({item:p})=>[ht(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>g.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ht(d,{dense:""},{default:Rt(()=>[ht(h,{modelValue:f.configName,"onUpdate:modelValue":t[3]||(t[3]=p=>f.configName=p),"hide-details":"",autofocus:"",disabled:!!g.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),ht(d,{dense:""},{default:Rt(()=>[_l(mr("span",{class:"ma-2 text-red",textContent:ii(g.error)},null,8,WM),[[Tl,g.error]])]),_:1})])]),_:1}),ht(c,{class:"px-2"},{default:Rt(()=>[ht(m),ht(a,{variant:"outlined",onClick:g.cancel},{default:Rt(()=>[...t[7]||(t[7]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),ht(a,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!g.error,onClick:Qs(g.success,["prevent"])},{default:Rt(()=>[...t[8]||(t[8]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const ND=gr("a",qo(FM,[["render",BM]])),zM=50,HM=2e3,Gy="single-spa:app-change",jM={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Gy,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},HM)},unmounted(){window.removeEventListener(Gy,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=pu().length>0,pu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},zM)}}},UM={class:"mx-1"},VM={key:1,class:"d-flex justify-center align-center"};function qM(n,t,e,r,f,g){const m=xt("v-card-title"),w=xt("v-card-text"),h=xt("v-card"),d=xt("v-progress-circular");return En(),ri(Sl,null,[f.show?(En(),lo(h,{key:0},{default:Rt(()=>[ht(m,null,{default:Rt(()=>[...t[0]||(t[0]=[Rr(" 404 Not Found ",-1)])]),_:1}),ht(w,{class:"d-flex align-center mt-3"},{default:Rt(()=>[t[1]||(t[1]=Rr(" The requested URL ",-1)),mr("code",UM,ii(n.$route.fullPath),1),t[2]||(t[2]=Rr(" was not routable. ",-1)),t[3]||(t[3]=mr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ao("",!0),g.showSpinner?(En(),ri("div",VM,[ht(d,{indeterminate:""})])):Ao("",!0)],64)}const Yy=[{path:"/",name:"DataExtractor",component:()=>ot(()=>it.import("./DataExtractor-30e5cbdd510e7c3709d2.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:qo(jM,[["render",qM]])}];Yy.forEach(Bp);const KM=Np({history:Dp(),routes:Yy});/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:Xy,setPrototypeOf:Qy,isFrozen:GM,getPrototypeOf:YM,getOwnPropertyDescriptor:XM}=Object;let{freeze:Ur,seal:Di,create:bd}=Object,{apply:wd,construct:xd}=typeof Reflect<"u"&&Reflect;Ur||(Ur=function(n){return n}),Di||(Di=function(n){return n}),wd||(wd=function(n,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),f=2;f<e;f++)r[f-2]=arguments[f];return n.apply(t,r)}),xd||(xd=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new n(...e)});const $c=qr(Array.prototype.forEach),QM=qr(Array.prototype.lastIndexOf),Zy=qr(Array.prototype.pop),il=qr(Array.prototype.push),ZM=qr(Array.prototype.splice),_c=qr(String.prototype.toLowerCase),Cd=qr(String.prototype.toString),kd=qr(String.prototype.match),ol=qr(String.prototype.replace),JM=qr(String.prototype.indexOf),eI=qr(String.prototype.trim),eo=qr(Object.prototype.hasOwnProperty),Vr=qr(RegExp.prototype.test),sl=tI(TypeError);function qr(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),f=1;f<e;f++)r[f-1]=arguments[f];return wd(n,t,r)}}function tI(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return xd(n,e)}}function Pt(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_c;Qy&&Qy(n,null);let r=t.length;for(;r--;){let f=t[r];if(typeof f=="string"){const g=e(f);g!==f&&(GM(t)||(t[r]=g),f=g)}n[f]=!0}return n}function nI(n){for(let t=0;t<n.length;t++)eo(n,t)||(n[t]=null);return n}function _o(n){const t=bd(null);for(const[e,r]of Xy(n))eo(n,e)&&(Array.isArray(r)?t[e]=nI(r):r&&typeof r=="object"&&r.constructor===Object?t[e]=_o(r):t[e]=r);return t}function al(n,t){for(;n!==null;){const r=XM(n,t);if(r){if(r.get)return qr(r.get);if(typeof r.value=="function")return qr(r.value)}n=YM(n)}function e(){return null}return e}const Jy=Ur(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ad=Ur(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Sd=Ur(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rI=Ur(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$d=Ur(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iI=Ur(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eb=Ur(["#text"]),tb=Ur(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_d=Ur(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nb=Ur(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tc=Ur(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),oI=Di(/\{\{[\w\W]*|[\w\W]*\}\}/gm),sI=Di(/<%[\w\W]*|[\w\W]*%>/gm),aI=Di(/\$\{[\w\W]*/gm),lI=Di(/^data-[\-\w.\u00B7-\uFFFF]+$/),cI=Di(/^aria-[\-\w]+$/),rb=Di(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uI=Di(/^(?:\w+script|data):/i),hI=Di(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ib=Di(/^html$/i),dI=Di(/^[a-z][.\w]*(-[.\w]+)+$/i);var ob=Object.freeze({__proto__:null,ARIA_ATTR:cI,ATTR_WHITESPACE:hI,CUSTOM_ELEMENT:dI,DATA_ATTR:lI,DOCTYPE_NAME:ib,ERB_EXPR:sI,IS_ALLOWED_URI:rb,IS_SCRIPT_OR_DATA:uI,MUSTACHE_EXPR:oI,TMPLIT_EXPR:aI});const ll={element:1,text:3,progressingInstruction:7,comment:8,document:9},pI=function(){return typeof window>"u"?null:window},fI=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const f="dompurify"+(e?"#"+e:"");try{return n.createPolicy(f,{createHTML(g){return g},createScriptURL(g){return g}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},sb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ab(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pI();const t=ce=>ab(ce);if(t.version="3.3.0",t.removed=[],!n||!n.document||n.document.nodeType!==ll.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n;const r=e,f=r.currentScript,{DocumentFragment:g,HTMLTemplateElement:m,Node:w,Element:h,NodeFilter:d,NamedNodeMap:a=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:l,DOMParser:u,trustedTypes:c}=n,i=h.prototype,s=al(i,"cloneNode"),p=al(i,"remove"),b=al(i,"nextSibling"),x=al(i,"childNodes"),R=al(i,"parentNode");if(typeof m=="function"){const ce=e.createElement("template");ce.content&&ce.content.ownerDocument&&(e=ce.content.ownerDocument)}let $,k="";const{implementation:C,createNodeIterator:L,createDocumentFragment:D,getElementsByTagName:E}=e,{importNode:I}=r;let z=sb();t.isSupported=typeof Xy=="function"&&typeof R=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:O,TMPLIT_EXPR:_,DATA_ATTR:A,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:K}=ob;let{IS_ALLOWED_URI:Z}=ob,J=null;const he=Pt({},[...Jy,...Ad,...Sd,...$d,...eb]);let ne=null;const le=Pt({},[...tb,..._d,...nb,...Tc]);let se=Object.seal(bd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,me=null;const $e=Object.seal(bd(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,Me=!0,Xe=!1,Ke=!0,at=!1,et=!0,lt=!1,Yt=!1,xn=!1,Wt=!1,vr=!1,un=!1,Ln=!0,Xn=!1;const Tr="user-content-";let mt=!0,je=!1,Lt={},Zt=null;const On=Pt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let yr=null;const cr=Pt({},["audio","video","img","source","image","track"]);let gn=null;const Wn=Pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nn="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",ln="http://www.w3.org/1999/xhtml";let Dr=ln,Kr=!1,Gr=null;const Ai=Pt({},[Nn,Kt,ln],Cd);let ci=Pt({},["mi","mo","mn","ms","mtext"]),Bn=Pt({},["annotation-xml"]);const to=Pt({},["title","style","font","a","script"]);let ui=null;const Os=["application/xhtml+xml","text/html"],Yr="text/html";let $n=null,hi=null;const Zo=e.createElement("form"),di=function(ce){return ce instanceof RegExp||ce instanceof Function},Cn=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(hi&&hi===ce)){if((!ce||typeof ce!="object")&&(ce={}),ce=_o(ce),ui=Os.indexOf(ce.PARSER_MEDIA_TYPE)===-1?Yr:ce.PARSER_MEDIA_TYPE,$n=ui==="application/xhtml+xml"?Cd:_c,J=eo(ce,"ALLOWED_TAGS")?Pt({},ce.ALLOWED_TAGS,$n):he,ne=eo(ce,"ALLOWED_ATTR")?Pt({},ce.ALLOWED_ATTR,$n):le,Gr=eo(ce,"ALLOWED_NAMESPACES")?Pt({},ce.ALLOWED_NAMESPACES,Cd):Ai,gn=eo(ce,"ADD_URI_SAFE_ATTR")?Pt(_o(Wn),ce.ADD_URI_SAFE_ATTR,$n):Wn,yr=eo(ce,"ADD_DATA_URI_TAGS")?Pt(_o(cr),ce.ADD_DATA_URI_TAGS,$n):cr,Zt=eo(ce,"FORBID_CONTENTS")?Pt({},ce.FORBID_CONTENTS,$n):On,de=eo(ce,"FORBID_TAGS")?Pt({},ce.FORBID_TAGS,$n):_o({}),me=eo(ce,"FORBID_ATTR")?Pt({},ce.FORBID_ATTR,$n):_o({}),Lt=eo(ce,"USE_PROFILES")?ce.USE_PROFILES:!1,Te=ce.ALLOW_ARIA_ATTR!==!1,Me=ce.ALLOW_DATA_ATTR!==!1,Xe=ce.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=ce.SAFE_FOR_TEMPLATES||!1,et=ce.SAFE_FOR_XML!==!1,lt=ce.WHOLE_DOCUMENT||!1,Wt=ce.RETURN_DOM||!1,vr=ce.RETURN_DOM_FRAGMENT||!1,un=ce.RETURN_TRUSTED_TYPE||!1,xn=ce.FORCE_BODY||!1,Ln=ce.SANITIZE_DOM!==!1,Xn=ce.SANITIZE_NAMED_PROPS||!1,mt=ce.KEEP_CONTENT!==!1,je=ce.IN_PLACE||!1,Z=ce.ALLOWED_URI_REGEXP||rb,Dr=ce.NAMESPACE||ln,ci=ce.MATHML_TEXT_INTEGRATION_POINTS||ci,Bn=ce.HTML_INTEGRATION_POINTS||Bn,se=ce.CUSTOM_ELEMENT_HANDLING||{},ce.CUSTOM_ELEMENT_HANDLING&&di(ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ce.CUSTOM_ELEMENT_HANDLING&&di(ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ce.CUSTOM_ELEMENT_HANDLING&&typeof ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),at&&(Me=!1),vr&&(Wt=!0),Lt&&(J=Pt({},eb),ne=[],Lt.html===!0&&(Pt(J,Jy),Pt(ne,tb)),Lt.svg===!0&&(Pt(J,Ad),Pt(ne,_d),Pt(ne,Tc)),Lt.svgFilters===!0&&(Pt(J,Sd),Pt(ne,_d),Pt(ne,Tc)),Lt.mathMl===!0&&(Pt(J,$d),Pt(ne,nb),Pt(ne,Tc))),ce.ADD_TAGS&&(typeof ce.ADD_TAGS=="function"?$e.tagCheck=ce.ADD_TAGS:(J===he&&(J=_o(J)),Pt(J,ce.ADD_TAGS,$n))),ce.ADD_ATTR&&(typeof ce.ADD_ATTR=="function"?$e.attributeCheck=ce.ADD_ATTR:(ne===le&&(ne=_o(ne)),Pt(ne,ce.ADD_ATTR,$n))),ce.ADD_URI_SAFE_ATTR&&Pt(gn,ce.ADD_URI_SAFE_ATTR,$n),ce.FORBID_CONTENTS&&(Zt===On&&(Zt=_o(Zt)),Pt(Zt,ce.FORBID_CONTENTS,$n)),mt&&(J["#text"]=!0),lt&&Pt(J,["html","head","body"]),J.table&&(Pt(J,["tbody"]),delete de.tbody),ce.TRUSTED_TYPES_POLICY){if(typeof ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw sl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=ce.TRUSTED_TYPES_POLICY,k=$.createHTML("")}else $===void 0&&($=fI(c,f)),$!==null&&typeof k=="string"&&(k=$.createHTML(""));Ur&&Ur(ce),hi=ce}},ur=Pt({},[...Ad,...Sd,...rI]),pi=Pt({},[...$d,...iI]),kn=function(ce){let ze=R(ce);(!ze||!ze.tagName)&&(ze={namespaceURI:Dr,tagName:"template"});const Fe=_c(ce.tagName),St=_c(ze.tagName);return Gr[ce.namespaceURI]?ce.namespaceURI===Kt?ze.namespaceURI===ln?Fe==="svg":ze.namespaceURI===Nn?Fe==="svg"&&(St==="annotation-xml"||ci[St]):!!ur[Fe]:ce.namespaceURI===Nn?ze.namespaceURI===ln?Fe==="math":ze.namespaceURI===Kt?Fe==="math"&&Bn[St]:!!pi[Fe]:ce.namespaceURI===ln?ze.namespaceURI===Kt&&!Bn[St]||ze.namespaceURI===Nn&&!ci[St]?!1:!pi[Fe]&&(to[Fe]||!ur[Fe]):!!(ui==="application/xhtml+xml"&&Gr[ce.namespaceURI]):!1},_n=function(ce){il(t.removed,{element:ce});try{R(ce).removeChild(ce)}catch{p(ce)}},br=function(ce,ze){try{il(t.removed,{attribute:ze.getAttributeNode(ce),from:ze})}catch{il(t.removed,{attribute:null,from:ze})}if(ze.removeAttribute(ce),ce==="is")if(Wt||vr)try{_n(ze)}catch{}else try{ze.setAttribute(ce,"")}catch{}},fi=function(ce){let ze=null,Fe=null;if(xn)ce="<remove></remove>"+ce;else{const Ht=kd(ce,/^[\r\n\t ]+/);Fe=Ht&&Ht[0]}ui==="application/xhtml+xml"&&Dr===ln&&(ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ce+"</body></html>");const St=$?$.createHTML(ce):ce;if(Dr===ln)try{ze=new u().parseFromString(St,ui)}catch{}if(!ze||!ze.documentElement){ze=C.createDocument(Dr,"template",null);try{ze.documentElement.innerHTML=Kr?k:St}catch{}}const Gt=ze.body||ze.documentElement;return ce&&Fe&&Gt.insertBefore(e.createTextNode(Fe),Gt.childNodes[0]||null),Dr===ln?E.call(ze,lt?"html":"body")[0]:lt?ze.documentElement:Gt},go=function(ce){return L.call(ce.ownerDocument||ce,ce,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},mo=function(ce){return ce instanceof l&&(typeof ce.nodeName!="string"||typeof ce.textContent!="string"||typeof ce.removeChild!="function"||!(ce.attributes instanceof a)||typeof ce.removeAttribute!="function"||typeof ce.setAttribute!="function"||typeof ce.namespaceURI!="string"||typeof ce.insertBefore!="function"||typeof ce.hasChildNodes!="function")},Jo=function(ce){return typeof w=="function"&&ce instanceof w};function Xr(ce,ze,Fe){$c(ce,St=>{St.call(t,ze,Fe,hi)})}const gi=function(ce){let ze=null;if(Xr(z.beforeSanitizeElements,ce,null),mo(ce))return _n(ce),!0;const Fe=$n(ce.nodeName);if(Xr(z.uponSanitizeElement,ce,{tagName:Fe,allowedTags:J}),et&&ce.hasChildNodes()&&!Jo(ce.firstElementChild)&&Vr(/<[/\w!]/g,ce.innerHTML)&&Vr(/<[/\w!]/g,ce.textContent)||ce.nodeType===ll.progressingInstruction||et&&ce.nodeType===ll.comment&&Vr(/<[/\w]/g,ce.data))return _n(ce),!0;if(!($e.tagCheck instanceof Function&&$e.tagCheck(Fe))&&(!J[Fe]||de[Fe])){if(!de[Fe]&&Ot(Fe)&&(se.tagNameCheck instanceof RegExp&&Vr(se.tagNameCheck,Fe)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Fe)))return!1;if(mt&&!Zt[Fe]){const St=R(ce)||ce.parentNode,Gt=x(ce)||ce.childNodes;if(Gt&&St){const Ht=Gt.length;for(let xr=Ht-1;xr>=0;--xr){const hr=s(Gt[xr],!0);hr.__removalCount=(ce.__removalCount||0)+1,St.insertBefore(hr,b(ce))}}}return _n(ce),!0}return ce instanceof h&&!kn(ce)||(Fe==="noscript"||Fe==="noembed"||Fe==="noframes")&&Vr(/<\/no(script|embed|frames)/i,ce.innerHTML)?(_n(ce),!0):(at&&ce.nodeType===ll.text&&(ze=ce.textContent,$c([P,O,_],St=>{ze=ol(ze,St," ")}),ce.textContent!==ze&&(il(t.removed,{element:ce.cloneNode()}),ce.textContent=ze)),Xr(z.afterSanitizeElements,ce,null),!1)},Fr=function(ce,ze,Fe){if(Ln&&(ze==="id"||ze==="name")&&(Fe in e||Fe in Zo))return!1;if(!(Me&&!me[ze]&&Vr(A,ze))&&!(Te&&Vr(N,ze))&&!($e.attributeCheck instanceof Function&&$e.attributeCheck(ze,ce))){if(!ne[ze]||me[ze]){if(!(Ot(ce)&&(se.tagNameCheck instanceof RegExp&&Vr(se.tagNameCheck,ce)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ce))&&(se.attributeNameCheck instanceof RegExp&&Vr(se.attributeNameCheck,ze)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(ze,ce))||ze==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&Vr(se.tagNameCheck,Fe)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Fe))))return!1}else if(!gn[ze]&&!Vr(Z,ol(Fe,U,""))&&!((ze==="src"||ze==="xlink:href"||ze==="href")&&ce!=="script"&&JM(Fe,"data:")===0&&yr[ce])&&!(Xe&&!Vr(B,ol(Fe,U,"")))&&Fe)return!1}return!0},Ot=function(ce){return ce!=="annotation-xml"&&kd(ce,K)},To=function(ce){Xr(z.beforeSanitizeAttributes,ce,null);const{attributes:ze}=ce;if(!ze||mo(ce))return;const Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let St=ze.length;for(;St--;){const Gt=ze[St],{name:Ht,namespaceURI:xr,value:hr}=Gt,zn=$n(Ht),Cr=hr;let mn=Ht==="value"?Cr:eI(Cr);if(Fe.attrName=zn,Fe.attrValue=mn,Fe.keepAttr=!0,Fe.forceKeepAttr=void 0,Xr(z.uponSanitizeAttribute,ce,Fe),mn=Fe.attrValue,Xn&&(zn==="id"||zn==="name")&&(br(Ht,ce),mn=Tr+mn),et&&Vr(/((--!?|])>)|<\/(style|title|textarea)/i,mn)){br(Ht,ce);continue}if(zn==="attributename"&&kd(mn,"href")){br(Ht,ce);continue}if(Fe.forceKeepAttr)continue;if(!Fe.keepAttr){br(Ht,ce);continue}if(!Ke&&Vr(/\/>/i,mn)){br(Ht,ce);continue}at&&$c([P,O,_],Pr=>{mn=ol(mn,Pr," ")});const no=$n(ce.nodeName);if(!Fr(no,zn,mn)){br(Ht,ce);continue}if($&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!xr)switch(c.getAttributeType(no,zn)){case"TrustedHTML":{mn=$.createHTML(mn);break}case"TrustedScriptURL":{mn=$.createScriptURL(mn);break}}if(mn!==Cr)try{xr?ce.setAttributeNS(xr,Ht,mn):ce.setAttribute(Ht,mn),mo(ce)?_n(ce):Zy(t.removed)}catch{br(Ht,ce)}}Xr(z.afterSanitizeAttributes,ce,null)},wr=function ce(ze){let Fe=null;const St=go(ze);for(Xr(z.beforeSanitizeShadowDOM,ze,null);Fe=St.nextNode();)Xr(z.uponSanitizeShadowNode,Fe,null),gi(Fe),To(Fe),Fe.content instanceof g&&ce(Fe.content);Xr(z.afterSanitizeShadowDOM,ze,null)};return t.sanitize=function(ce){let ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=null,St=null,Gt=null,Ht=null;if(Kr=!ce,Kr&&(ce="<!-->"),typeof ce!="string"&&!Jo(ce))if(typeof ce.toString=="function"){if(ce=ce.toString(),typeof ce!="string")throw sl("dirty is not a string, aborting")}else throw sl("toString is not a function");if(!t.isSupported)return ce;if(Yt||Cn(ze),t.removed=[],typeof ce=="string"&&(je=!1),je){if(ce.nodeName){const zn=$n(ce.nodeName);if(!J[zn]||de[zn])throw sl("root node is forbidden and cannot be sanitized in-place")}}else if(ce instanceof w)Fe=fi("<!---->"),St=Fe.ownerDocument.importNode(ce,!0),St.nodeType===ll.element&&St.nodeName==="BODY"||St.nodeName==="HTML"?Fe=St:Fe.appendChild(St);else{if(!Wt&&!at&&!lt&&ce.indexOf("<")===-1)return $&&un?$.createHTML(ce):ce;if(Fe=fi(ce),!Fe)return Wt?null:un?k:""}Fe&&xn&&_n(Fe.firstChild);const xr=go(je?ce:Fe);for(;Gt=xr.nextNode();)gi(Gt),To(Gt),Gt.content instanceof g&&wr(Gt.content);if(je)return ce;if(Wt){if(vr)for(Ht=D.call(Fe.ownerDocument);Fe.firstChild;)Ht.appendChild(Fe.firstChild);else Ht=Fe;return(ne.shadowroot||ne.shadowrootmode)&&(Ht=I.call(r,Ht,!0)),Ht}let hr=lt?Fe.outerHTML:Fe.innerHTML;return lt&&J["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&Vr(ib,Fe.ownerDocument.doctype.name)&&(hr="<!DOCTYPE "+Fe.ownerDocument.doctype.name+`>
|
|
1496
|
+
`+hr),at&&$c([P,O,_],zn=>{hr=ol(hr,zn," ")}),$&&un?$.createHTML(hr):hr},t.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(ce),Yt=!0},t.clearConfig=function(){hi=null,Yt=!1},t.isValidAttribute=function(ce,ze,Fe){hi||Cn({});const St=$n(ce),Gt=$n(ze);return Fr(St,Gt,Fe)},t.addHook=function(ce,ze){typeof ze=="function"&&il(z[ce],ze)},t.removeHook=function(ce,ze){if(ze!==void 0){const Fe=QM(z[ce],ze);return Fe===-1?void 0:ZM(z[ce],Fe,1)[0]}return Zy(z[ce])},t.removeHooks=function(ce){z[ce]=[]},t.removeAllHooks=function(){z=sb()},t}var gI=ab();const mI={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"}},vI={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()}`},sanitizedText:function(){return gI.sanitize(this.params.text)}},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=""}}},yI=["innerHTML"],bI={key:2},wI={key:3,class:"validate mt-4"};function xI(n,t,e,r,f,g){const m=xt("v-spacer"),w=xt("v-toolbar"),h=xt("v-icon"),d=xt("v-text-field"),a=xt("v-card-text"),l=xt("v-btn"),u=xt("v-card-actions"),c=xt("v-card"),i=xt("v-dialog"),s=xt("v-app");return En(),lo(s,null,{default:Rt(()=>[ht(i,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=p=>n.show=p),persistent:"",width:"600",onKeydown:$l(g.cancel,["esc"])},{default:Rt(()=>[ht(c,null,{default:Rt(()=>[ht(w,{height:"24"},{default:Rt(()=>[ht(m),mr("span",null,ii(n.params.title),1),ht(m)]),_:1}),ht(a,{class:"mt-4 pa-3"},{default:Rt(()=>[n.params.validateText?(En(),lo(h,{key:0,class:"mr-2"},{default:Rt(()=>[...t[2]||(t[2]=[Rr(" mdi-alert ",-1)])]),_:1})):Ao("",!0),n.params.html?(En(),ri("span",{key:1,innerHTML:g.sanitizedText},null,8,yI)):(En(),ri("span",bI,ii(g.sanitizedText),1)),n.params.validateText?(En(),ri("div",wI,[Rr(" Enter "+ii(n.params.validateText)+" to confirm! ",1),ht(d,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=p=>n.validationText=p),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ao("",!0)]),_:1}),ht(u,{class:"px-2"},{default:Rt(()=>[ht(m),n.params.cancelText?(En(),lo(l,{key:0,variant:"outlined","data-test":g.dataTestCancel,onClick:g.cancel},{default:Rt(()=>[Rr(ii(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ao("",!0),ht(l,{variant:"flat",color:n.params.okClass,"data-test":g.dataTestOk,onClick:g.ok},{default:Rt(()=>[Rr(ii(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const CI=qo(vI,[["render",xI],["__scopeId","data-v-016d2acf"]]);class kI{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(CI);t.use(Md);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:g,cancelText:m,html:w}){return this.mount(),new Promise((h,d)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:f,validateText:g,cancelText:m,html:w},h,d)})}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:g="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:g,validateText:r,cancelText:f,html:!1})}}const AI={install(n,t){const e=new kI;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},SI={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`
|
|
1497
|
+
--toast-bg-color:${yd[this.toastNotification.level]};
|
|
1498
|
+
--toast-fg-color:${MM(this.toastNotification.level)};
|
|
1499
|
+
`},contentStyle:function(){return`
|
|
1500
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
|
1501
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
|
1502
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
|
1503
|
+
`}},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}}},$I={key:0,class:"text-subtitle-1 mr-1 notification-text"},_I={key:1,class:"text-body-2 notification-text"},TI={key:2,class:"text-body-2 notification-text"};function MI(n,t,e,r,f,g){const m=xt("v-icon"),w=xt("v-spacer"),h=xt("v-btn"),d=xt("v-sheet"),a=xt("v-slide-y-transition");return En(),lo(a,null,{default:Rt(()=>[_l(ht(d,{style:Ra(g.toastStyle),class:"toast-notification",onClick:g.expand},{default:Rt(()=>[ht(m,{class:"mr-1 notification-text"},{default:Rt(()=>[Rr(ii(g.toastNotificationIcon),1)]),_:1}),mr("div",{class:"toast-content",style:Ra(g.contentStyle)},[n.toastNotification.title?(En(),ri("span",$I,[n.toastNotification.body||n.toastNotification.message?(En(),ri(Sl,{key:0},[Rr(ii(n.toastNotification.title)+": ",1)],64)):(En(),ri(Sl,{key:1},[Rr(ii(n.toastNotification.title),1)],64))])):Ao("",!0),n.toastNotification.body?(En(),ri("span",_I,ii(n.toastNotification.body),1)):Ao("",!0),n.toastNotification.message?(En(),ri("span",TI,ii(n.toastNotification.message),1)):Ao("",!0)],4),ht(w),ht(h,{variant:"text",class:"notification-text",onClick:Qs(g.hide,["stop"])},{default:Rt(()=>[...t[0]||(t[0]=[Rr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Tl,n.showToast]])]),_:1})}const II=qo(SI,[["render",MI],["__scopeId","data-v-84833581"]]);class EI{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=du(II);t.use(Md);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:g,duration:m,type:w="alert",logToConsole:h=!1,saveToHistory:d=!0}){this.mount(),h&&console.log(f?`${g.toUpperCase()} - ${f}`:`${g.toUpperCase()} - ${e}: ${r}`),d&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:f,level:g}),this[t]({title:e,body:r,message:f,level:g,duration:m,type:w})}toast({title:t,body:e,message:r,level:f,duration:g,type:m}){this.$root.toast({title:t,body:e,message:r,level:f,type:m},g)}critical({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}caution({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}off({title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:f,duration:g,logToConsole:m,saveToHistory:w})}}const RI={install(n,t){const e=new EI(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},lb=100,cb=Fp({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory(n,t){n.notifyHistory.length>=lb&&(n.notifyHistory.length=lb-1),n.notifyHistory.unshift(t)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,t){Object.assign(n.namedWidgets,t)},clearNamedWidget(n,t){delete n.namedWidgets[t]},playback(n,t){Object.assign(n.playback,t)}},modules:{}});function LI(n){_p(`Vuetify: ${n}`)}function ub(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function OI(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function hb(){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 g=n[f],m=t[f];if(ub(g)&&ub(m)){r[f]=hb(g,m,e);continue}if(e&&Array.isArray(g)&&Array.isArray(m)){r[f]=e(g,m);continue}r[f]=m}return r}function cl(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(cl.cache.has(n))return cl.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return cl.cache.set(n,t),t}cl.cache=new Map;function db(n,t){return e=>Object.keys(n).reduce((r,f)=>{const g=typeof n[f]=="object"&&n[f]!=null&&!Array.isArray(n[f])?n[f]:{type:n[f]};return e&&f in e?r[f]={...g,default:e[f]}:r[f]=g,t&&!r[f].source&&(r[f].source=t),r},{})}function pb(n,t){const e=Rp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function NI(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pb("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const Td=Symbol.for("vuetify:defaults");function fb(){const n=Tp(Td);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function DI(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[cl(t)]<"u")}function FI(){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]:fb();const r=pb("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const f=hu(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),g=new Proxy(n,{get(h,d){var a,l,u,c;const i=Reflect.get(h,d);if(d==="class"||d==="style")return[(a=f.value)==null?void 0:a[d],i].filter(b=>b!=null);if(DI(r.vnode,d))return i;const s=(l=f.value)==null?void 0:l[d];if(s!==void 0)return s;const p=(c=(u=e.value)==null?void 0:u.global)==null?void 0:c[d];return p!==void 0?p:i}}),m=Mp();Ip(()=>{if(f.value){const h=Object.entries(f.value).filter(d=>{let[a]=d;return a.startsWith(a[0].toUpperCase())});m.value=h.length?Object.fromEntries(h):void 0}else m.value=void 0});function w(){const h=NI(Td,r);Lp(Td,hu(()=>m.value?hb((h==null?void 0:h.value)??{},m.value):h==null?void 0:h.value))}return{props:g,provideSubDefaults:w}}function Mc(n){if(n._setup=n._setup??n.setup,!n.name)return LI("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=db(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return OI(e,t)},n.props._as=String,n.setup=function(e,r){const f=fb();if(!f.value)return n._setup(e,r);const{props:g,provideSubDefaults:m}=FI(e,e._as??n.name,f),w=n._setup(g,r);return m(),w}}return n}function PI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?Mc:$p)(t)}const WI=[String,Function,Object,Array],Ic=db({icon:{type:WI},tag:{type:[String,Object,Function],required:!0}},"icon");PI()({name:"VComponentIcon",props:Ic(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return ht(n.tag,null,{default:()=>{var f;return[n.icon?ht(r,null,null):(f=e.default)==null?void 0:f.call(e)]}})}}}),Mc({name:"VSvgIcon",inheritAttrs:!1,props:Ic(),setup(n,t){let{attrs:e}=t;return()=>ht(n.tag,Op(e,{style:null}),{default:()=>[mr("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)?mr("path",{d:r[0],"fill-opacity":r[1]},null):mr("path",{d:r},null)):mr("path",{d:n.icon},null)])]})}}),Mc({name:"VLigatureIcon",props:Ic(),setup(n){return()=>ht(n.tag,null,{default:()=>[n.icon]})}});const BI=Mc({name:"VClassIcon",props:Ic(),setup(n){return()=>ht(n.tag,{class:Ep(n.icon)},null)}}),zI={component:n=>Xs(BI,{...n,class:"mdi"})},Md=Pp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:mI}},icons:{defaultSet:"mdi",sets:{mdi:zI,...EM,...RM}}}),Id=lw({createApp:du,appOptions:{render(){return Xs(mw,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(KM),n.use(cb),n.use(Md),n.use(AI),n.use(RI,{store:cb})}}),FD=gr("e",Id.bootstrap),PD=gr("m",Id.mount),WD=gr("u",Id.unmount)}}});
|