openc3-cosmos-tool-tablemanager 7.4.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/tools/tablemanager/{ArrayWidget-CIDdZjk3-3d456b86878c045f0d1d.js → ArrayWidget-9OSo49r--15f0c6ee609dd2e7acf7.js} +2 -2
  3. data/tools/tablemanager/{ArrayplotWidget-BfO1atvG-58a18d102627a8592c71.js → ArrayplotWidget-D5C_WTX2-d9551b6536cf93fea8d6.js} +1 -1
  4. data/tools/tablemanager/{BarColumn-CHX_3ye3-7ccabfde58c0374e6864.js → BarColumn-CvHnnifr-3447e4df90e81d8d52bb.js} +1 -1
  5. data/tools/tablemanager/{BlockWidget-DSbunlY_-e002a11e1cdbfc7f4057.js → BlockWidget-DuEDZ4dJ-d02d17ac12a76a1eead3.js} +2 -2
  6. data/tools/tablemanager/{ButtonWidget-BB4ZOCI8-9b0d9028322747e1e741.js → ButtonWidget-CZIUtd9z-2cb1e24f34b883fc28f0.js} +1 -1
  7. data/tools/tablemanager/{CanvasWidget-DsyMt7xW-0f925f00e079062ef340.js → CanvasWidget-C4-pXiKY-778ab562504820d71140.js} +1 -1
  8. data/tools/tablemanager/CanvasdotWidget-Bh0HHx67-9334939465a7df436c30.js +1 -0
  9. data/tools/tablemanager/{CanvasimageWidget-DY1DDf0a-21443c767e1928db9abd.js → CanvasimageWidget-Bu5NmsDs-9b1a8510f094cd0378b5.js} +1 -1
  10. data/tools/tablemanager/{CanvasimagevalueWidget-0lc2cCPV-11a2c8acf1145f1a20d6.js → CanvasimagevalueWidget-Dv8dQrnj-79c5001f658c86253a43.js} +1 -1
  11. data/tools/tablemanager/CanvaslabelWidget-68IeeM3a-9d4ce78e712f8bc7d1f8.js +1 -0
  12. data/tools/tablemanager/{CanvaslabelvalueWidget-Cf_dcDW2-7f7d5be31da99a05644f.js → CanvaslabelvalueWidget-C6j_A4z6-0d0534e4749365f37a33.js} +1 -1
  13. data/tools/tablemanager/{CanvaslineWidget-jg2ozQ0N-8a8f83212719c84e2005.js → CanvaslineWidget-BgQ6wLDv-eb8681a83f7823c3ca3f.js} +1 -1
  14. data/tools/tablemanager/{CanvaslinevalueWidget-CKpjqlKA-8ec169a3639fce3b7642.js → CanvaslinevalueWidget-C6-HkTJp-0c0a81707daa50b20b9b.js} +1 -1
  15. data/tools/tablemanager/{CheckbuttonWidget-BWXinMaT-0283a85cfe85fb13461f.js → CheckbuttonWidget-DJmT73t9-5201fab99a575afa217a.js} +1 -1
  16. data/tools/tablemanager/{ComboboxWidget-BzKkyRDT-83919823b21b54ef38e6.js → ComboboxWidget-vTtsjxRm-05e9d125b97d7a82e255.js} +1 -1
  17. data/tools/tablemanager/DateWidget-BjKIDtsf-a7c3b47e6febb0ab2a95.js +1 -0
  18. data/tools/tablemanager/{DetailsDialog-CLPj0nP0-365d9d3e130590b5ffc6.js → DetailsDialog-S1nw1d0h-1761970659adf7afed91.js} +1 -1
  19. data/tools/tablemanager/{DynamicWidget-yna_ejyc-13c7ad60497919503da1.js → DynamicWidget-yna_ejyc-dbde16c7adf17f697f08.js} +1 -1
  20. data/tools/tablemanager/{FilechecksumWidget-DqNThsOX-3c53bd9a770a50346a95.js → FilechecksumWidget-obppYSP4-bf72bd952e6555565983.js} +1 -1
  21. data/tools/tablemanager/{FiledisplayWidget-BRhhiVEs-2f0a046d5e1ec07bec05.js → FiledisplayWidget-BstroKFo-ab39aede57c77cffc59e.js} +1 -1
  22. data/tools/tablemanager/{FormatvalueWidget-pEjAh0h2-9309df32eb560ba3cf3b.js → FormatvalueWidget-MJIJg6Bf-239dd8e45b24e8ff89d5.js} +1 -1
  23. data/tools/tablemanager/Graph-BL-czUPp-1aa09efedec8ea514b59.js +1 -0
  24. data/tools/tablemanager/{GraphWidget-BZjBkefj-94fdb931e21c3eb88447.js → GraphWidget-C8KRp-QN-8fd8daa00778ec448307.js} +1 -1
  25. data/tools/tablemanager/{HorizontalWidget-Brag6E4y-61cf029d3f3457fe7d1d.js → HorizontalWidget-Cn9qnYVh-7fc941fa86502633c93b.js} +1 -1
  26. data/tools/tablemanager/{HorizontalboxWidget-BnkH4cVq-d4e1a6cb8e3e6377f076.js → HorizontalboxWidget-gz8uYYFZ-ec9133099e85b940dfff.js} +1 -1
  27. data/tools/tablemanager/HorizontallineWidget-CrDua5-L-a5ca042af4afa96fb271.js +1 -0
  28. data/tools/tablemanager/{IframeWidget-Ciu5u58E-40895fac48619c381bf3.js → IframeWidget-CtS7MjKL-f25b744ad00030d36bc4.js} +1 -1
  29. data/tools/tablemanager/ImageLoader-Vpn27aUN-0d7c201cdde9446e1294.js +1 -0
  30. data/tools/tablemanager/{ImageviewerWidget-vWMGPveb-bc5e1ba60a1f9e4667cf.js → ImageviewerWidget-Kmzt8wuP-38f617facfe3163e0540.js} +1 -1
  31. data/tools/tablemanager/{LabelWidget-DVp0CmFH-8067086869d9aba91261.js → LabelWidget-DIZpHxYX-f79fa51a02adeb34ea27.js} +1 -1
  32. data/tools/tablemanager/LabelledWidget-CGxDI8XZ-13ae7060655bea1e7721.js +1 -0
  33. data/tools/tablemanager/LabelprogressbarWidget-CXOc5p8G-dbbd02aec439d7536240.js +1 -0
  34. data/tools/tablemanager/LabelsparklineWidget-B_LuqFcA-8fb032d473f95add4a78.js +1 -0
  35. data/tools/tablemanager/LabelvalueWidget--G4wHMZL-06d376e7a31f6618bbff.js +1 -0
  36. data/tools/tablemanager/{LabelvaluedescWidget-c5BUCRxB-66e00c16c09b7587da1c.js → LabelvaluedescWidget-DqLK0wvi-783aa42cd48635db341f.js} +1 -1
  37. data/tools/tablemanager/{LabelvaluelimitsbarWidget-DBKZLpXJ-5db8842d404e5c638680.js → LabelvaluelimitsbarWidget-BWOQJkLP-b113a9a7f9b15f2989dc.js} +1 -1
  38. data/tools/tablemanager/LabelvaluelimitscolumnWidget-BfF73Y2F-8d1ec1d2b6c4f94252dd.js +1 -0
  39. data/tools/tablemanager/LabelvaluerangebarWidget-CKsFRW6t-9605273563a7feeb1889.js +1 -0
  40. data/tools/tablemanager/{Layout-Df-lJgpB-262ccc75e7609f60b583.js → Layout-CGL1JfeU-f37605a14e69e29532e7.js} +1 -1
  41. data/tools/tablemanager/{LedWidget-C97EJXBo-4ea685513fee83dd9732.js → LedWidget-DrAJ8_fN-8d01ecb6df21e2761f69.js} +1 -1
  42. data/tools/tablemanager/{LimitsBar-DNV39okL-3c0c95101783d95a40f4.js → LimitsBar-CxPzG0Zv-5a5327231babf0874b27.js} +1 -1
  43. data/tools/tablemanager/{LimitsbarWidget-BIO6xztx-4d2c1371095565476999.js → LimitsbarWidget-1IayV5D7-8c80dfad614b19b6fb49.js} +1 -1
  44. data/tools/tablemanager/{LimitscolorWidget-BGrNA65J-3b00cef23b3790434db9.js → LimitscolorWidget-C7LY3BQ7-3565617131c900283d55.js} +1 -1
  45. data/tools/tablemanager/{LimitscolumnWidget-Bw6EXJs9-7d999ccca30a9b0a55f1.js → LimitscolumnWidget-JhIc5Sjl-9c2e6b8a72595b695ba6.js} +1 -1
  46. data/tools/tablemanager/LinegraphWidget-BaROxuUn-15179f2d4add58e313ab.js +1 -0
  47. data/tools/tablemanager/{MatrixbycolumnsWidget-C33-g7kK-c7de3d1b8679aba22b90.js → MatrixbycolumnsWidget-i0gGPMOV-e67305e8543241175300.js} +1 -1
  48. data/tools/tablemanager/{OpenC3TimePicker-cOr0aOVn-49536c5ea49488f3e752.js → OpenC3TimePicker-DDTLwTEw-2846f70a54c404d41394.js} +1 -1
  49. data/tools/tablemanager/{ProgressbarWidget-DqfSMI10-cafd068196958841e23e.js → ProgressbarWidget-QxEq8C4A-69c742d7e5b462892e85.js} +1 -1
  50. data/tools/tablemanager/{RadiobuttonWidget-CSQeEacF-d6463b0ad411e64dd683.js → RadiobuttonWidget-DYf3qvBq-2a9bd12c4cdd061adf51.js} +1 -1
  51. data/tools/tablemanager/RadiogroupWidget-C0b_ckej-7634b998978efeddc266.js +1 -0
  52. data/tools/tablemanager/{RangebarWidget-CJSUof1--b0d47e5f54f9c407f79a.js → RangebarWidget-DcSEHktI-aaa148d3a3afca2d5f9a.js} +1 -1
  53. data/tools/tablemanager/{RollupWidget-C977Lkcx-12bc4119507e8da2b447.js → RollupWidget-AVS4drYX-8a62066dec922a413c42.js} +1 -1
  54. data/tools/tablemanager/{ScrollwindowWidget-BFxz61oW-18b2ad9102c388cb52a4.js → ScrollwindowWidget-Dpf3BScA-b44f82a74e8ae3ecdb0f.js} +1 -1
  55. data/tools/tablemanager/{SignalWidget-BT6AcbBx-93ebd7ce32db6f50f2a0.js → SignalWidget-Q1YtPsNw-a84815d984cf394605ec.js} +1 -1
  56. data/tools/tablemanager/SpacerWidget-DGEOqhu_-850bf6476c003142779f.js +1 -0
  57. data/tools/tablemanager/SparklineWidget-DbNWbNzY-36aa6e804523cc2ecc5a.js +1 -0
  58. data/tools/tablemanager/TabbookWidget-CrkPPZIF-2d473b0f1995c46fafb9.js +1 -0
  59. data/tools/tablemanager/TableManager-8b04ea028c333295b337.js +16 -0
  60. data/tools/tablemanager/TextboxWidget-CfQEzaRr-219d37ed0d8cd1cb8b13.js +1 -0
  61. data/tools/tablemanager/TextfieldWidget-BQL8dOTg-331783b1d384fe948fd5.js +1 -0
  62. data/tools/tablemanager/{TimeWidget-BTaXBxVm-44f3c0a51a22f9d3894d.js → TimeWidget-DiE_oc7J-44fd9195cb6e71101e89.js} +1 -1
  63. data/tools/tablemanager/TitleWidget-C5a_ZsqM-2396fbf868359df63e77.js +1 -0
  64. data/tools/tablemanager/VWidget-D4ipW0SF-41740de5165634ad2357.js +1 -0
  65. data/tools/tablemanager/ValueWidget-9JNo-Sk8-ce6de648c290b396b11f.js +1 -0
  66. data/tools/tablemanager/{ValuelimitsbarWidget-CqRkPwWS-4371f34ec5df13570c3c.js → ValuelimitsbarWidget-CqiFVnaT-df98be46622621079dff.js} +1 -1
  67. data/tools/tablemanager/ValuelimitscolumnWidget-DWDFVRNg-5e781288bcc6f71fafc2.js +1 -0
  68. data/tools/tablemanager/ValuerangebarWidget-BAVMrD0L-831272b3b2fce07512c2.js +1 -0
  69. data/tools/tablemanager/{VerticalWidget-CoJiy2TT-323f2d1c115ee53f0548.js → VerticalWidget-Dw0j42K2-7bb3ed93472e1c238aff.js} +1 -1
  70. data/tools/tablemanager/{VerticalboxWidget-BD5Eq3BH-7cb5910868a2c335cf65.js → VerticalboxWidget-xusQtXo0-f05e9ada6ac664ccc1b0.js} +1 -1
  71. data/tools/tablemanager/{Widget-ClRi417b-4840d840a29c7183f214.js → Widget-Dy-YgkeU-2c96085cda6c2fbbe9e8.js} +1 -1
  72. data/tools/tablemanager/main-3c97f07cff18342b565e.js +1491 -0
  73. data/tools/tablemanager/main.js +1 -1
  74. metadata +72 -72
  75. data/tools/tablemanager/CanvasdotWidget-BZpkCAoH-a35996d5f3308a108b0c.js +0 -1
  76. data/tools/tablemanager/CanvaslabelWidget-C6TDW9WO-4f886584c71cbcf0e604.js +0 -1
  77. data/tools/tablemanager/DateWidget-qUbLzQsX-758ae8da877991efcd80.js +0 -1
  78. data/tools/tablemanager/Graph-GVQZltap-57ac29b4ccc3557d2600.js +0 -1
  79. data/tools/tablemanager/HorizontallineWidget-k7fL4EPN-8cd3cca6b7ba4af83580.js +0 -1
  80. data/tools/tablemanager/ImageLoader-DH5e4lg8-d35cfbffcdf316573927.js +0 -1
  81. data/tools/tablemanager/LabelledWidget-1DeE1-6G-3b18f33223c7c1768426.js +0 -1
  82. data/tools/tablemanager/LabelprogressbarWidget-DME-BrZe-9da8d98c2108318a795e.js +0 -1
  83. data/tools/tablemanager/LabelsparklineWidget-4iDHGnPL-3561daee5e6c25c80b86.js +0 -1
  84. data/tools/tablemanager/LabelvalueWidget-C6NQSHTb-635124dc5b6c88f27875.js +0 -1
  85. data/tools/tablemanager/LabelvaluelimitscolumnWidget-NdEu06go-feed26414158f1babbb1.js +0 -1
  86. data/tools/tablemanager/LabelvaluerangebarWidget-CL5HLK0t-80f4d832eb0071f18471.js +0 -1
  87. data/tools/tablemanager/LinegraphWidget-Drf9tTPN-68eb1da25e220788df81.js +0 -1
  88. data/tools/tablemanager/RadiogroupWidget-DlQN9z-Z-97a21f6fbcca5e17941c.js +0 -1
  89. data/tools/tablemanager/SpacerWidget-B_f09KAi-c2420619ab4528b2bdd1.js +0 -1
  90. data/tools/tablemanager/SparklineWidget-Bji9DILO-c5bf2bbe580cb0f4deba.js +0 -1
  91. data/tools/tablemanager/TabbookWidget-B74U8t2i-7f95e56de419a4c5ad46.js +0 -1
  92. data/tools/tablemanager/TableManager-92fe66fe52775564c13e.js +0 -16
  93. data/tools/tablemanager/TextboxWidget-CbKE9aSW-0511057cee29e2056835.js +0 -1
  94. data/tools/tablemanager/TextfieldWidget-CpdmfNk5-137ed699deb4b5d896c7.js +0 -1
  95. data/tools/tablemanager/TitleWidget-ulO_gdVY-7e3621358cb59b109134.js +0 -1
  96. data/tools/tablemanager/VWidget-C4VLQ7-b-6e0c7bced9c086b4b9c2.js +0 -1
  97. data/tools/tablemanager/ValueWidget-B3-Jjoux-fa607809a9626b514025.js +0 -1
  98. data/tools/tablemanager/ValuelimitscolumnWidget-CF4CN14a-cdc27f85cb9c09b2c895.js +0 -1
  99. data/tools/tablemanager/ValuerangebarWidget-DJtrknKH-d38c7021808d30874276.js +0 -1
  100. data/tools/tablemanager/main-e41b7aa8f8baeaf00ba2.js +0 -1491
@@ -0,0 +1,1491 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(ur,pt){"use strict";var wr,_t,hr,En,Ke,Xt,yt,Fg,jg,To,Zn,Er,Eo,Gr,qr,Wg,Wi,nn,gt,wi,Hg,Tl,Qs,Lt,ai,Pa,zc,El,Ls,Ht,za,Bc,Ug,Zs,Ml,Ba,Vg,cs,Bh,Gg,qg,Yg,Xs,Fh,Kg,Jg,Qg,dr,Zg,sn,jh,Xg,xi,em,Il,Fc,Fa,tm,Wh,nm,rm,im,om,Hh,sm;return{setters:[lt=>{wr=lt.resolveComponent,_t=lt.openBlock,hr=lt.createBlock,En=lt.withCtx,Ke=lt.createVNode,Xt=lt.createElementBlock,yt=lt.createElementVNode,Fg=lt.useCssVars,jg=lt.defineAsyncComponent,To=lt.h,Zn=lt.normalizeStyle,Er=lt.Fragment,Eo=lt.createTextVNode,Gr=lt.toDisplayString,qr=lt.createCommentVNode,Wg=lt.toRefs,Wi=lt.shallowRef,nn=lt.ref,gt=lt.computed,wi=lt.watch,Hg=lt.onBeforeMount,Tl=lt.nextTick,Qs=lt.onBeforeUnmount,Lt=lt.toRef,ai=lt.watchEffect,Pa=lt.isVNode,zc=lt.TransitionGroup,El=lt.Transition,Ls=lt.defineComponent,Ht=lt.unref,za=lt.provide,Bc=lt.isRef,Ug=lt.getCurrentInstance,Zs=lt.inject,Ml=lt.reactive,Ba=lt.onMounted,Vg=lt.onUpdated,cs=lt.toValue,Bh=lt.onScopeDispose,Gg=lt.readonly,qg=lt.toRaw,Yg=lt.useId,Xs=lt.resolveDynamicComponent,Fh=lt.capitalize,Kg=lt.camelize,Jg=lt.markRaw,Qg=lt.warn,dr=lt.mergeProps,Zg=lt.effectScope,sn=lt.normalizeClass,jh=lt.createApp,Xg=lt.withKeys,xi=lt.renderSlot,em=lt.useAttrs,Il=lt.renderList,Fc=lt.normalizeProps,Fa=lt.withDirectives,tm=lt.Text,Wh=lt.vShow},lt=>{nm=lt.createRouter,rm=lt.createWebHistory},lt=>{im=lt.defineStore,om=lt.createPinia},lt=>{Hh=lt.getMountedApps},lt=>{sm=lt.createVuetify}],execute:(function(){ur({B:Fv,D:qa,F:sv,G:qv,H:jv,J:li,K:Yv,S:yd,Z:Kv,c:Vl,d:Bv,l:Jr,n:$0,o:Ga,s:qo,v:wd});var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function am(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),t.push.apply(t,r)}return t}function ea(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?am(Object(t),!0).forEach((function(r){lk(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):am(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function lk(e,n,t){return(n=(function(r){var c=(function(h,g){if(ta(h)!=="object"||h===null)return h;var v=h[Symbol.toPrimitive];if(v!==void 0){var s=v.call(h,g);if(ta(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(h)})(r,"string");return ta(c)==="symbol"?c:String(c)})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ta(e){return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ta(e)}(function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var n=function(t){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,c=String(t),h=c.length,g=-1,v="",s=c.charCodeAt(0);++g<h;)(r=c.charCodeAt(g))!=0?v+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&s==45?"\\"+r.toString(16)+" ":g==0&&h==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+c.charAt(g):c.charAt(g):v+="�";return v};e.CSS||(e.CSS={}),e.CSS.escape=n})(lt);var ck={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function uk(e){if(ta(e)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=ea(ea({},ck),e);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.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(ta(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var t={};return{bootstrap:hk.bind(null,n,t),mount:dk.bind(null,n,t),unmount:pk.bind(null,n,t),update:fk.bind(null,n,t)}}function hk(e){return e.loadRootComponent?e.loadRootComponent().then((function(n){return e.rootComponent=n})):Promise.resolve()}function dk(e,n,t){var r={};return Promise.resolve().then((function(){return(function(c,h){return typeof c.appOptions=="function"?c.appOptions(h):Promise.resolve(ea({},c.appOptions))})(e,t).then((function(c){var h;if(t.domElement&&!c.el&&(c.el=t.domElement),c.el)if(typeof c.el=="string"){if(!(h=document.querySelector(c.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(c.el))}else(h=c.el).id||(h.id="single-spa-application:".concat(t.name)),c.el="#".concat(CSS.escape(h.id));else{var g="single-spa-application:".concat(t.name);c.el="#".concat(CSS.escape(g)),(h=document.getElementById(g))||((h=document.createElement("div")).id=g,document.body.appendChild(h))}if(!e.replaceMode&&(c.el=c.el+" .single-spa-container",!h.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",h.appendChild(v)}r.domEl=h,c.render||c.template||!e.rootComponent||(c.render=function(f){return f(e.rootComponent)}),c.data||(c.data={});var s=c.data;if(c.data=function(){return ea(ea({},typeof s=="function"?s.call(this,this):s),t)},e.createApp){if(r.vueInstance=e.createApp(c),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return r.root=r.vueInstance.mount(c.el),n[t.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(c.el)}else if(r.vueInstance=new e.Vue(c),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return n[t.name]=r,r.vueInstance}));return n[t.name]=r,r.vueInstance}))}))}function fk(e,n,t){return Promise.resolve().then((function(){var r=n[t.name],c=ea(ea({},e.appOptions.data||{}),t),h=r.root||r.vueInstance;for(var g in c)h[g]=c[g]}))}function pk(e,n,t){return Promise.resolve().then((function(){var r=n[t.name];e.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 gk=ur("_",(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t}),mk={};function vk(e,n){const t=wr("router-view"),r=wr("v-app");return _t(),hr(r,{id:"innerapp"},{default:En(()=>[Ke(t)]),_:1})}const yk=gk(mk,[["render",vk]]),HW="modulepreload",UW=function(e){return"/"+e},VW={},mt=function(n,t,r){let c=Promise.resolve();function h(g){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=g,window.dispatchEvent(v),!v.defaultPrevented)throw g}return c.then(g=>{for(const v of g||[])v.status==="rejected"&&h(v.reason);return n().catch(h)})},lm=function(e){e.name!=="NotFound"&&(e.path=`/tools/tablemanager/${e.path.replace(/^\//,"")}`),e.children?.forEach(lm)},ja=ur("g",(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t}),bk="/icons/customIcons.svg",Uh={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return bk+"#"+this.icon}}},cm=()=>{Fg(e=>({v4ccb3d08:e.color}))},um=Uh.setup;Uh.setup=um?(e,n)=>(cm(),um(e,n)):cm;const wk={class:"cosmos-custom-icon"},xk={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Ck=["href"];function kk(e,n,t,r,c,h){return _t(),Xt("span",wk,[(_t(),Xt("svg",xk,[yt("use",{href:h.iconSrc},null,8,Ck)]))])}const _k=ja(Uh,[["render",kk],["__scopeId","data-v-54b83b01"]]);function hm(e,n){return function(){return e.apply(n,arguments)}}const{toString:Ak}=Object.prototype,{getPrototypeOf:Os}=Object,{iterator:Rl,toStringTag:dm}=Symbol,Ll=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),fm=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),pm=(e,n,t)=>e===Object.prototype||!t&&n===null,$k=e=>{if(!Object.isExtensible(e))return!1;const n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&n.push(...Object.getOwnPropertySymbols(e)),n.every(t=>{if(fm(t))return!1;const r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&r.writable===!0})},Ol=(e,n)=>{let t=e;const r=[];for(;t!=null;){if(r.indexOf(t)!==-1)return!1;r.push(t);const c=Os(t);if(pm(t,c,t===e))return!1;if(Ll(t,n))return!0;t=c}return!1},Sk=(e,n)=>e!=null&&Ol(e,n)?e[n]:void 0,Tk=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const n=Os(e);if(n===null&&$k(e))return e;const t=Object.create(null),r=Object.create(null),c=[];let h=e;for(;h!=null&&c.indexOf(h)===-1;){c.push(h);const g=h===e?n:Os(h);if(pm(h,g,h===e))break;const v=Object.getOwnPropertyNames(h);Object.getOwnPropertySymbols&&v.push(...Object.getOwnPropertySymbols(h));for(const s of v)fm(s)||Ll(r,s)||(t[s]=e[s],r[s]=!0);h=g}return t},Vh=(e=>n=>{const t=Ak.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),so=e=>(e=e.toLowerCase(),n=>Vh(n)===e),jc=e=>n=>typeof n===e,{isArray:na}=Array,ra=jc("undefined");function Wa(e){return e!==null&&!ra(e)&&e.constructor!==null&&!ra(e.constructor)&&Ci(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gm=so("ArrayBuffer");function Ek(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&gm(e.buffer),n}const Mk=jc("string"),Ci=jc("function"),mm=jc("number"),Ha=e=>e!==null&&typeof e=="object",Ik=e=>e===!0||e===!1,Wc=e=>{if(!Ha(e))return!1;const n=Os(e);return(n===null||n===Object.prototype||Os(n)===null)&&!Ol(e,dm)&&!Ol(e,Rl)},Rk=e=>{if(!Ha(e)||Wa(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Lk=so("Date"),Ok=so("File"),Nk=e=>!!(e&&typeof e.uri<"u"),Dk=e=>e&&typeof e.getParts<"u",Pk=so("Blob"),zk=so("FileList"),Bk=so("Set"),Fk=e=>Ha(e)&&Ci(e.pipe);function jk(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const vm=jk(),ym=typeof vm.FormData<"u"?vm.FormData:void 0,Wk=e=>{if(!e)return!1;if(ym&&e instanceof ym)return!0;const n=Os(e);if(!n||n===Object.prototype||!Ci(e.append))return!1;const t=Vh(e);return t==="formdata"||t==="object"&&Ci(e.toString)&&e.toString()==="[object FormData]"},Hk=so("URLSearchParams"),[Uk,Vk,Gk,qk]=["ReadableStream","Request","Response","Headers"].map(so),Yk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nl(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,c;if(typeof e!="object"&&(e=[e]),na(e))for(r=0,c=e.length;r<c;r++)n.call(null,e[r],r,e);else{if(Wa(e))return;const h=t?Object.getOwnPropertyNames(e):Object.keys(e),g=h.length;let v;for(r=0;r<g;r++)v=h[r],n.call(null,e[v],v,e)}}function bm(e,n){if(Wa(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,c;for(;r-- >0;)if(c=t[r],n===c.toLowerCase())return c;return null}const ia=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wm=e=>!ra(e)&&e!==ia;function Gh(...e){const{caseless:n,skipUndefined:t}=wm(this)&&this||{},r={},c=(h,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&bm(r,g)||g,s=Ll(r,v)?r[v]:void 0;Wc(s)&&Wc(h)?r[v]=Gh(s,h):Wc(h)?r[v]=Gh({},h):na(h)?r[v]=h.slice():(!t||!ra(h))&&(r[v]=h)};for(let h=0,g=e.length;h<g;h++){const v=e[h];if(!v||Wa(v)||(Nl(v,c),typeof v!="object"||na(v)))continue;const s=Object.getOwnPropertySymbols(v);for(let f=0;f<s.length;f++){const a=s[f];s_.call(v,a)&&c(v[a],a)}}return r}const Kk=(e,n,t,{allOwnKeys:r}={})=>(Nl(n,(c,h)=>{t&&Ci(c)?Object.defineProperty(e,h,{__proto__:null,value:hm(c,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,h,{__proto__:null,value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Jk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qk=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},Zk=(e,n,t,r)=>{let c,h,g;const v={};if(n=n||{},e==null)return n;do{for(c=Object.getOwnPropertyNames(e),h=c.length;h-- >0;)g=c[h],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&Os(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},Xk=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},e_=e=>{if(!e)return null;if(na(e))return e;let n=e.length;if(!mm(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},t_=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Os(Uint8Array)),n_=(e,n)=>{const t=(e&&e[Rl]).call(e);let r;for(;(r=t.next())&&!r.done;){const c=r.value;n.call(e,c[0],c[1])}},r_=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},i_=so("HTMLFormElement"),o_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:s_}=Object.prototype,a_=so("RegExp"),xm=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Nl(t,(c,h)=>{let g;(g=n(c,h,e))!==!1&&(r[h]=g||c)}),Object.defineProperties(e,r)},l_=e=>{xm(e,(n,t)=>{if(Ci(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];if(Ci(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},c_=(e,n)=>{const t={},r=c=>{c.forEach(h=>{t[h]=!0})};return na(e)?r(e):r(String(e).split(n)),t},u_=()=>{},h_=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function d_(e){return!!(e&&Ci(e.append)&&e[dm]==="FormData"&&e[Rl])}const f_=e=>{const n=new WeakSet,t=r=>{if(Ha(r)){if(n.has(r))return;if(Wa(r))return r;if(!("toJSON"in r)){n.add(r);let c;if(Bk(r)){c=[];for(const h of r){const g=t(h);!ra(g)&&c.push(g)}}else c=na(r)?[]:{},Nl(r,(h,g)=>{const v=t(h);!ra(v)&&(c[g]=v)});return n.delete(r),c}}return r};return t(e)},p_=so("AsyncFunction"),g_=e=>e&&(Ha(e)||Ci(e))&&Ci(e.then)&&Ci(e.catch),Cm=((e,n)=>e?setImmediate:n?((t,r)=>(ia.addEventListener("message",({source:c,data:h})=>{c===ia&&h===t&&r.length&&r.shift()()},!1),c=>{r.push(c),ia.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ci(ia.postMessage)),m_=typeof queueMicrotask<"u"?queueMicrotask.bind(ia):typeof process<"u"&&process.nextTick||Cm,km=e=>e!=null&&Ci(e[Rl]),v_=e=>e!=null&&Ol(e,Rl)&&km(e),me={isArray:na,isArrayBuffer:gm,isBuffer:Wa,isFormData:Wk,isArrayBufferView:Ek,isString:Mk,isNumber:mm,isBoolean:Ik,isObject:Ha,isPlainObject:Wc,isEmptyObject:Rk,isReadableStream:Uk,isRequest:Vk,isResponse:Gk,isHeaders:qk,isUndefined:ra,isDate:Lk,isFile:Ok,isReactNativeBlob:Nk,isReactNative:Dk,isBlob:Pk,isRegExp:a_,isFunction:Ci,isStream:Fk,isURLSearchParams:Hk,isTypedArray:t_,isFileList:zk,forEach:Nl,merge:Gh,extend:Kk,trim:Yk,stripBOM:Jk,inherits:Qk,toFlatObject:Zk,kindOf:Vh,kindOfTest:so,endsWith:Xk,toArray:e_,forEachEntry:n_,matchAll:r_,isHTMLForm:i_,hasOwnProperty:Ll,hasOwnProp:Ll,hasOwnInPrototypeChain:Ol,getSafeProp:Sk,toSafeFlatObject:Tk,reduceDescriptors:xm,freezeMethods:l_,toObjectSet:c_,toCamelCase:o_,noop:u_,toFiniteNumber:h_,findKey:bm,global:ia,isContextDefined:wm,isSpecCompliantForm:d_,toJSONObject:f_,isAsyncFn:p_,isThenable:g_,setImmediate:Cm,asap:m_,isIterable:km,isSafeIterable:v_},y_=me.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"]),b_=e=>{const n={};let t,r,c;return e&&e.split(`
2
+ `).forEach(function(h){c=h.indexOf(":"),t=h.substring(0,c).trim().toLowerCase(),r=h.substring(c+1).trim();const g=me.hasOwnProp(n,t);!t||g&&me.hasOwnProp(y_,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function w_(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const x_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),C_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qh(e,n){return me.isArray(e)?e.map(t=>qh(t,n)):w_(String(e).replace(n,""))}const k_=e=>qh(e,x_),__=e=>qh(e,C_);function _m(e){const n=Object.create(null);return me.forEach(e.toJSON(),(t,r)=>{n[r]=__(t)}),n}const Am=Symbol("internals");function Dl(e){return e&&String(e).trim().toLowerCase()}function Hc(e){return e===!1||e==null?e:me.isArray(e)?e.map(Hc):k_(String(e))}function A_(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const $_=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Yh(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function S_(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const c=e.charCodeAt(r);if(c===34||c===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function T_(e){const n=Object.create(null),t=String(e);let r=0,c=!1,h=!1;function g(v){const s=Yh(t.slice(r,v)),f=s.indexOf("=");if(f<1)return;const a=Yh(s.slice(0,f));if(!$_.test(a))return;const l=a.toLowerCase();if(l==="__proto__"||l==="constructor"||l==="prototype")return;const u=Yh(s.slice(f+1));n[l]=S_(u)}for(let v=0;v<t.length;v++){const s=t.charCodeAt(v);c?h?h=!1:s===92?h=!0:s===34&&(c=!1):s===34?c=!0:(s===44||s===59)&&(g(v),r=v+1)}return g(t.length),n}const E_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Kh(e,n,t,r,c){if(me.isFunction(r))return r.call(this,n,t);if(c&&(n=t),!!me.isString(n)){if(me.isString(r))return n.indexOf(r)!==-1;if(me.isRegExp(r))return r.test(n)}}function M_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function I_(e,n){const t=me.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(c,h,g){return this[r].call(this,n,c,h,g)},configurable:!0})})}let Yr=class{constructor(n){n&&this.set(n)}set(n,t,r){const c=this;function h(v,s,f){const a=Dl(s);if(!a)return;const l=me.findKey(c,a);(!l||c[l]===void 0||f===!0||f===void 0&&c[l]!==!1)&&(c[l||s]=Hc(v))}const g=(v,s)=>me.forEach(v,(f,a)=>h(f,a,s));if(me.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(me.isString(n)&&(n=n.trim())&&!E_(n))g(b_(n),t);else if(me.isObject(n)&&me.isSafeIterable(n)){let v=Object.create(null),s,f;for(const a of n){if(!me.isArray(a))throw new TypeError("Object iterator must return a key-value pair");f=a[0],me.hasOwnProp(v,f)?(s=v[f],v[f]=me.isArray(s)?[...s,a[1]]:[s,a[1]]):v[f]=a[1]}g(v,t)}else n!=null&&h(t,n,r);return this}get(n,t){if(n=Dl(n),n){const r=me.findKey(this,n);if(r){const c=this[r];if(!t)return c;if(t===!0)return A_(c);if(me.isFunction(t))return t.call(this,c,r);if(me.isRegExp(t))return t.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Dl(n),n){const r=me.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||Kh(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let c=!1;function h(g){if(g=Dl(g),g){const v=me.findKey(r,g);v&&(!t||Kh(r,r[v],v,t))&&(delete r[v],c=!0)}}return me.isArray(n)?n.forEach(h):h(n),c}clear(n){const t=Object.keys(this);let r=t.length,c=!1;for(;r--;){const h=t[r];(!n||Kh(this,this[h],h,n,!0))&&(delete this[h],c=!0)}return c}normalize(n){const t=this,r={};return me.forEach(this,(c,h)=>{const g=me.findKey(r,h);if(g){t[g]=Hc(c),delete t[h];return}const v=n?M_(h):String(h).trim();v!==h&&delete t[h],t[v]=Hc(c),r[v]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return me.forEach(this,(r,c)=>{r!=null&&r!==!1&&(t[c]=n&&me.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
3
+ `)}getSetCookie(){const n=this.get("set-cookie");return me.isArray(n)?n:n==null||n===!1?[]:[n]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static parseParameters(n){return T_(n)}static concat(n,...t){const r=new this(n);return t.forEach(c=>r.set(c)),r}static accessor(n){const t=(this[Am]=this[Am]={accessors:{}}).accessors,r=this.prototype;function c(h){const g=Dl(h);t[g]||(I_(r,h),t[g]=!0)}return me.isArray(n)?n.forEach(c):c(n),this}};Yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),me.reduceDescriptors(Yr.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),me.freezeMethods(Yr);const Uc="[REDACTED ****]";function R_(e){if(me.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(me.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function L_(e,n){const t=new Set(n.map(h=>String(h).toLowerCase())),r=[],c=h=>{if(h===null||typeof h!="object"||me.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof Yr&&(h=h.toJSON()),r.push(h);let g;if(me.isArray(h))g=[],h.forEach((v,s)=>{const f=c(v);me.isUndefined(f)||(g[s]=f)});else{if(!me.isPlainObject(h)&&R_(h))return r.pop(),h;g=Object.create(null);for(const[v,s]of Object.entries(h)){const f=t.has(v.toLowerCase())?Uc:c(s);me.isUndefined(f)||(g[v]=f)}}return r.pop(),g};return c(e)}function $m(e){try{return String(e)}catch{return""}}function O_(e){return e.errors.map(n=>{try{return n&&n.message?$m(n.message):$m(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let tt=class ik extends Error{static from(n,t,r,c,h,g){let v=n.message;!v&&me.isArray(n.errors)&&n.errors.length&&(v=O_(n));const s=new ik(v,t||n.code,r,c,h);return Object.defineProperty(s,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),s.name=n.name,n.status!=null&&s.status==null&&(s.status=n.status),g&&Object.assign(s,g),s}constructor(n,t,r,c,h){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),c&&(this.request=c),h&&(this.response=h,this.status=h.status)}toJSON(){const n=this.config,t=n&&me.hasOwnProp(n,"redact")?n.redact:void 0,r=me.isArray(t)&&t.length>0?L_(n,t):me.toJSONObject(n);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:r,code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",tt.ERR_BAD_OPTION="ERR_BAD_OPTION",tt.ECONNABORTED="ECONNABORTED",tt.ETIMEDOUT="ETIMEDOUT",tt.ECONNREFUSED="ECONNREFUSED",tt.ERR_NETWORK="ERR_NETWORK",tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",tt.ERR_DEPRECATED="ERR_DEPRECATED",tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",tt.ERR_CANCELED="ERR_CANCELED",tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",tt.ERR_INVALID_URL="ERR_INVALID_URL",tt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const N_=null,Sm=100;function Jh(e){return me.isPlainObject(e)||me.isArray(e)}function Tm(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function Qh(e,n,t){return e?e.concat(n).map(function(r,c){return r=Tm(r),!t&&c?"["+r+"]":r}).join(t?".":""):n}function D_(e){return me.isArray(e)&&!e.some(Jh)}const P_=me.toFlatObject(me,{},null,function(e){return/^is[A-Z]/.test(e)});function Vc(e,n,t){if(!me.isObject(e))throw new TypeError("target must be an object");n=n||new FormData;const r=(x,R)=>{const T=me.getSafeProp(t,x);return me.isUndefined(T)?R:T},c=r("metaTokens",!0),h=r("visitor")||p,g=r("dots",!1),v=r("indexes",!1),s=r("Blob")||typeof Blob<"u"&&Blob,f=r("maxDepth",Sm),a=s&&me.isSpecCompliantForm(n),l=[];if(!me.isFunction(h))throw new TypeError("visitor must be a function");function u(x){if(x===null)return"";if(me.isDate(x))return x.toISOString();if(me.isBoolean(x))return x.toString();if(!a&&me.isBlob(x))throw new tt("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(x)||me.isTypedArray(x)){if(a&&typeof s=="function")return new s([x]);throw new tt("Blob is not supported. Use a Buffer instead.",tt.ERR_NOT_SUPPORT)}return x}function d(x){if(x>f)throw new tt("Object is too deeply nested ("+x+" levels). Max depth: "+f,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function o(x,R){if(f===1/0)return JSON.stringify(x);const T=[];return JSON.stringify(x,function(_,C){if(!me.isObject(C))return C;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(C),d(R+T.length-1),C})}function p(x,R,T){let _=x;if(me.isReactNative(n)&&me.isReactNativeBlob(x))return n.append(Qh(T,R,g),u(x)),!1;if(x&&!T&&typeof x=="object"){if(me.endsWith(R,"{}"))R=c?R:R.slice(0,-2),x=o(x,1);else if(me.isArray(x)&&D_(x)||(me.isFileList(x)||me.endsWith(R,"[]"))&&(_=me.toArray(x)))return R=Tm(R),_.forEach(function(C,P){!(me.isUndefined(C)||C===null)&&n.append(v===!0?Qh([R],P,g):v===null?R:R+"[]",u(C))}),!1}return Jh(x)?!0:(n.append(Qh(T,R,g),u(x)),!1)}const m=Object.assign(P_,{defaultVisitor:p,convertValue:u,isVisitable:Jh});function w(x,R,T=0){if(!me.isUndefined(x)){if(d(T),l.indexOf(x)!==-1)throw new Error("Circular reference detected in "+R.join("."));l.push(x),me.forEach(x,function(_,C){(!(me.isUndefined(_)||_===null)&&h.call(n,_,me.isString(C)?C.trim():C,R,m))===!0&&w(_,R?R.concat(C):[C],T+1)}),l.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return w(e),n}function Em(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function Zh(e,n){this._pairs=[],e&&Vc(e,this,n)}const Mm=Zh.prototype;Mm.append=function(e,n){this._pairs.push([e,n])},Mm.toString=function(e){const n=e?t=>e.call(this,t,Em):Em;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function z_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Im(e,n,t){if(!n)return e;e=e||"";const r=me.isFunction(t)?{serialize:t}:t,c=me.getSafeProp(r,"encode")||z_,h=me.getSafeProp(r,"serialize");let g;if(h?g=h(n,r):g=me.isURLSearchParams(n)?n.toString():new Zh(n,r).toString(c),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}const Pl=Symbol("internals");function Rm(e){return e?e.length:0}function Lm(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function zl(e,n){const t=e.handlers,r=Rm(t);t!==n.handlersRef?(n.handlersRef=t,n.handlerEntries.clear()):r!==n.handlersLength&&(r?n.handlerEntries.forEach(function(c,h){t[c.index]!==c.handler&&n.handlerEntries.delete(h)}):n.handlerEntries.clear()),n.handlersLength=r}let Om=class{constructor(){this.handlers=[],this[Pl]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(n,t,r){const c={fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},h=this[Pl];this.handlers==null&&(this.handlers=[]),zl(this,h);const g=h.nextId++;return this.handlers.push(c),h.handlerEntries.set(g,{handler:c,index:this.handlers.length-1}),h.handlersLength=this.handlers.length,g}eject(n){const t=this[Pl];zl(this,t);const r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(Lm(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],zl(this,this[Pl]))}forEach(n){const t=this[Pl];zl(this,t),t.iterationDepth++;try{me.forEach(this.handlers,function(r){r!==null&&n(r)})}finally{--t.iterationDepth||(zl(this,t),Lm(this.handlers),t.handlersLength=Rm(this.handlers))}}};const Xh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},B_=typeof URLSearchParams<"u"?URLSearchParams:Zh,F_=typeof FormData<"u"?FormData:null,j_=typeof Blob<"u"?Blob:null,W_={isBrowser:!0,classes:{URLSearchParams:B_,FormData:F_,Blob:j_},protocols:["http","https","file","blob","url","data"]},ed=typeof window<"u"&&typeof document<"u",td=typeof navigator=="object"&&navigator||void 0,H_=ed&&(!td||["ReactNative","NativeScript","NS"].indexOf(td.product)<0),U_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",V_=ed&&window.location.href||"http://localhost",G_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ed,hasStandardBrowserEnv:H_,hasStandardBrowserWebWorkerEnv:U_,navigator:td,origin:V_},Symbol.toStringTag,{value:"Module"})),Mr={...G_,...W_};function q_(e,n){return Vc(e,new Mr.classes.URLSearchParams,{visitor:function(t,r,c,h){return Mr.isNode&&me.isBuffer(t)?(this.append(r,t.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...n})}const Nm=Sm;function Dm(e){if(e>Nm)throw new tt("FormData field is too deeply nested ("+e+" levels). Max depth: "+Nm,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Y_(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)Dm(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function K_(e){const n={},t=Object.keys(e);let r;const c=t.length;let h;for(r=0;r<c;r++)h=t[r],n[h]=e[h];return n}function Pm(e){function n(t,r,c,h){Dm(h);let g=t[h++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),s=h>=t.length;return g=!g&&me.isArray(c)?c.length:g,s?(me.hasOwnProp(c,g)?c[g]=me.isArray(c[g])?c[g].concat(r):[c[g],r]:c[g]=r,!v):((!me.hasOwnProp(c,g)||!me.isObject(c[g]))&&(c[g]=[]),n(t,r,c[g],h)&&me.isArray(c[g])&&(c[g]=K_(c[g])),!v)}if(me.isFormData(e)&&me.isFunction(e.entries)){const t={};return me.forEachEntry(e,(r,c)=>{n(Y_(r),c,t,0)}),t}return null}const zm=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ua=(e,n)=>e!=null&&me.hasOwnProp(e,n)?e[n]:void 0;function J_(e,n,t){if(me.isString(e))try{return(n||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const Bl={transitional:Xh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,c=me.isObject(e);if(c&&me.isHTMLForm(e)&&(e=new FormData(e)),me.isFormData(e))return r?JSON.stringify(Pm(e)):e;if(me.isArrayBuffer(e)||me.isBuffer(e)||me.isStream(e)||me.isFile(e)||me.isBlob(e)||me.isReadableStream(e))return e;if(me.isArrayBufferView(e))return e.buffer;if(me.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let h;if(c){const g=Ua(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return q_(e,g).toString();if((h=me.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=Ua(this,"env"),s=v&&v.FormData;return Vc(h?{"files[]":e}:e,s&&new s,g)}}return c||r?(n.setContentType("application/json",!1),J_(e)):e}],transformResponse:[function(e){const n=Ua(this,"transitional")||Bl.transitional,t=n&&n.forcedJSONParsing,r=Ua(this,"responseType"),c=r==="json";if(me.isResponse(e)||me.isReadableStream(e))return e;if(e&&me.isString(e)&&(t&&!r||c)){const h=!(n&&n.silentJSONParsing)&&c;try{return JSON.parse(e,Ua(this,"parseReviver"))}catch(g){if(h)throw g.name==="SyntaxError"?tt.from(g,tt.ERR_BAD_RESPONSE,this,null,Ua(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mr.classes.FormData,Blob:Mr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(zm,e=>{Bl.headers[e]={}});function nd(e,n){const t=this||Bl,r=n||t,c=Yr.from(r.headers);let h=r.data;return me.forEach(e,function(g){h=g.call(t,h,c.normalize(),n?n.status:void 0)}),c.normalize(),h}function Bm(e){return!!(e&&e.__CANCEL__)}let Fl=class extends tt{constructor(n,t,r){super(n??"canceled",tt.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Fm(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new tt("Request failed with status code "+t.status,t.status>=400&&t.status<500?tt.ERR_BAD_REQUEST:tt.ERR_BAD_RESPONSE,t.config,t.request,t))}const Q_=/[\t\n\r]/g;function jm(e){if(typeof e!="string")return e;let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n).replace(Q_,"")}function rd(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function Z_(e,n){e=e||10;const t=new Array(e),r=new Array(e);let c=0,h=0,g;return n=n!==void 0?n:1e3,function(v){const s=Date.now(),f=r[h];g||(g=s),t[c]=v,r[c]=s;let a=h,l=0;for(;a!==c;)l+=t[a++],a=a%e;if(c=(c+1)%e,c===h&&(h=(h+1)%e),s-g<n)return;const u=f&&s-f;return u?Math.round(l*1e3/u):void 0}}function X_(e,n){let t=0,r=1e3/n,c,h;const g=(v,s=Date.now())=>{t=s,c=null,h&&(clearTimeout(h),h=null),e(...v)};return[(...v)=>{const s=Date.now(),f=s-t;f>=r?g(v,s):(c=v,h||(h=setTimeout(()=>{h=null,g(c)},r-f)))},()=>c&&g(c),(...v)=>g(v)]}const Gc=(e,n,t=3)=>{let r=0;const c=Z_(50,250);return X_(h=>{if(!h||!me.isNumber(h.loaded))return;const g=h.loaded,v=h.lengthComputable?h.total:void 0,s=Math.max(0,v!=null?Math.min(g,v):g),f=Math.max(0,s-r),a=c(f);r=Math.max(r,s);const l={loaded:s,total:v,progress:v?s/v:void 0,bytes:f,rate:a||void 0,estimated:a&&v?(v-s)/a:void 0,event:h,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(l)},t)},Wm=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Hm=(e,n=me.asap)=>(...t)=>n(()=>e(...t)),eA=Mr.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Mr.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,tA=Mr.hasStandardBrowserEnv?{write(e,n,t,r,c,h,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];me.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),me.isString(r)&&v.push(`path=${r}`),me.isString(c)&&v.push(`domain=${c}`),h===!0&&v.push("secure"),me.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),c=r.indexOf("=");if(c!==-1&&r.slice(0,c)===e)try{return decodeURIComponent(r.slice(c+1))}catch{return r.slice(c+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rA(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const iA=/^https?:(?!\/\/)/i;function oA(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${Uc}`)}function sA(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Uc}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Uc}`);return t===-1?r:`${r}#${oA(n.slice(t+1))}`}function Um(e,n){if(typeof e=="string"){const t=jm(e);if(iA.test(t))throw new tt(`Invalid URL ${JSON.stringify(sA(t))}: missing "//" after protocol`,tt.ERR_INVALID_URL,n)}}function Vm(e,n,t,r){Um(n,r);let c=!nA(n);return e&&(c||t===!1)?(Um(e,r),rA(e,n)):n}const Gm=e=>e instanceof Yr?{...e}:e,aA=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function oa(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,l,u,d){return me.isPlainObject(a)&&me.isPlainObject(l)?me.merge.call({caseless:d},a,l):me.isPlainObject(l)?me.merge({},l):me.isArray(l)?l.slice():l}function c(a,l,u,d){if(me.isUndefined(l)){if(!me.isUndefined(a))return r(void 0,a,u,d)}else return r(a,l,u,d)}function h(a,l){if(!me.isUndefined(l))return r(void 0,l)}function g(a,l){if(me.isUndefined(l)){if(!me.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function v(a){const l=me.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!me.isUndefined(l))if(me.isPlainObject(l)){if(me.hasOwnProp(l,a))return l[a]}else return;const u=me.hasOwnProp(e,"transitional")?e.transitional:void 0;if(me.isPlainObject(u)&&me.hasOwnProp(u,a))return u[a]}function s(a,l,u){if(me.hasOwnProp(n,u))return r(a,l);if(me.hasOwnProp(e,u))return r(void 0,a)}const f={url:h,method:h,data:h,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutErrorMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:s,headers:(a,l,u)=>c(Gm(a),Gm(l),u,!0)};return me.forEach(aA({...e,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=me.hasOwnProp(f,a)?f[a]:c,u=me.hasOwnProp(e,a)?e[a]:void 0,d=me.hasOwnProp(n,a)?n[a]:void 0,o=l(u,d,a);me.isUndefined(o)&&l!==s||(t[a]=o)}),me.hasOwnProp(n,"validateStatus")&&me.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(me.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const lA=["content-type","content-length"];function cA(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,c])=>{lA.includes(r.toLowerCase())&&e.set(r,c)})}const uA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function qm(e){const n=oa({},e),t=u=>me.hasOwnProp(n,u)?n[u]:void 0,r=t("data");let c=t("withXSRFToken");const h=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const s=t("auth"),f=t("baseURL"),a=t("allowAbsoluteUrls"),l=t("url");if(n.headers=v=Yr.from(v),n.url=Im(Vm(f,l,a,n),t("params"),t("paramsSerializer")),s){const u=me.getSafeProp(s,"username")||"",d=me.getSafeProp(s,"password")||"";try{v.set("Authorization","Basic "+btoa(u+":"+(d?uA(d):"")))}catch(o){throw tt.from(o,tt.ERR_BAD_OPTION_VALUE,e)}}if(me.isFormData(r)){const u=me.getSafeProp(r,"getHeaders");Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv||me.isReactNative(r)?v.setContentType(void 0):me.isFunction(u)&&cA(v,u.call(r),t("formDataHeaderPolicy"))}if(Mr.hasStandardBrowserEnv&&(me.isFunction(c)&&(c=c(n)),c===!0||c==null&&eA(n.url))){const u=h&&g&&tA.read(g);u&&v.set(h,u)}return n}const hA=typeof XMLHttpRequest<"u",dA=hA&&function(e){return new Promise(function(n,t){const r=qm(e);let c=r.data;const h=Yr.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:s}=r,f,a,l,u,d,o;function p(){u&&u(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function w(R){if(!m)return;if(m.status===0&&(rd(jm(r.url))||rd(Mr.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){t(new tt("Request aborted",tt.ECONNABORTED,e,m)),p(),m=null;return}try{R?o&&o(R):d&&d()}catch(C){setTimeout(()=>{throw C})}if(!m)return;const T=Yr.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!g||g==="text"||g==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};Fm(function(C){n(C),p()},function(C){t(C),p()},_),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(w)},m.onabort=function(){m&&(t(new tt("Request aborted",tt.ECONNABORTED,e,m)),p(),m=null)},m.onerror=function(R){const T=R&&R.message?R.message:"Network Error",_=new tt(T,tt.ERR_NETWORK,e,m);_.event=R||null,t(_),p(),m=null},m.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Xh;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),t(new tt(R,T.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,m)),p(),m=null},c===void 0&&h.setContentType(null),"setRequestHeader"in m&&me.forEach(_m(h),function(R,T){m.setRequestHeader(T,R)}),me.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),g&&g!=="json"&&(m.responseType=r.responseType),s&&([l,d,o]=Gc(s,!0),m.addEventListener("progress",l)),v&&m.upload&&([a,u]=Gc(v),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=R=>{m&&(t(!R||R.type?new Fl(null,e,m):R),m.abort(),p(),m=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const x=rd(r.url);if(x&&!Mr.protocols.includes(x)){t(new tt("Unsupported protocol "+x+":",tt.ERR_BAD_REQUEST,e)),p();return}m.send(c||null)})},fA=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const c=function(s){if(!r){r=!0,g();const f=s instanceof Error?s:this.reason;t.abort(f instanceof tt?f:new Fl(f instanceof Error?f.message:f))}};let h=n&&setTimeout(()=>{h=null,c(new tt(`timeout of ${n}ms exceeded`,tt.ETIMEDOUT))},n);const g=()=>{e&&(h&&clearTimeout(h),h=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(c):s.removeEventListener("abort",c)}),e=null)};e.forEach(s=>{if(!r){if(s.aborted){c.call(s);return}s.addEventListener("abort",c,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>me.asap(g),v},pA=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,c;for(;r<t;)c=r+n,yield e.slice(r,c),r=c},gA=async function*(e,n){for await(const t of mA(e))yield*pA(t,n)},mA=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Ym=(e,n,t,r)=>{const c=gA(e,n);let h=0,g,v=s=>{g||(g=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:f,value:a}=await c.next();if(f){v(),s.close();return}let l=a.byteLength;if(t){let u=h+=l;t(u)}s.enqueue(new Uint8Array(a))}catch(f){throw v(f),f}},cancel(s){return v(s),c.return()}},{highWaterMark:2})},Km=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Jm=(e,n,t)=>n+2<t&&Km(e.charCodeAt(n+1))&&Km(e.charCodeAt(n+2)),Qm=e=>e<=57?e-48:(e&223)-55,vA=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,yA=e=>e===9||e===10||e===12||e===13||e===32,bA=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},wA=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},xA=e=>{const n=e.length;let t=0,r=0,c=!1;for(let h=0;h<n;h++){let g=e.charCodeAt(h);if(g===37&&Jm(e,h,n)&&(g=Qm(e.charCodeAt(h+1))*16+Qm(e.charCodeAt(h+2)),h+=2),!yA(g)){if(g===61){r++;continue}if(!vA(g)||r>0){c=!0;continue}t++}}return c||r>2||r>0&&(t+r)%4!==0||t%4===1?wA(e):bA(t)},CA=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),c=e.slice(t+1);if(/;base64/i.test(r))return n(c);let h=0;for(let g=0,v=c.length;g<v;g++){const s=c.charCodeAt(g);if(s===37&&Jm(c,g,v))h+=1,g+=2;else if(s<128)h+=1;else if(s<2048)h+=2;else if(s>=55296&&s<=56319&&g+1<v){const f=c.charCodeAt(g+1);f>=56320&&f<=57343?(h+=4,g++):h+=3}else h+=3}return h};function kA(e){const n=typeof e=="string"?e.indexOf("#"):-1;return CA(n===-1?e:e.slice(0,n),xA)}const id="1.20.0",Zm=64*1024,_A={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:qc}=me,AA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),Xm=e=>{if(!me.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},ev=(e,...n)=>{try{return!!e(...n)}catch{return!1}},$A=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},SA=e=>{const n=me.global!==void 0&&me.global!==null?me.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=me.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:c,Request:h,Response:g}=e,v=c?qc(c):typeof fetch=="function",s=qc(h),f=qc(g);if(!v)return!1;const a=v&&qc(t),l=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=s&&a&&ev(()=>{let w=!1;const x=new h(Mr.origin,{body:new t,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),d=f&&a&&ev(()=>me.isReadableStream(new g("").body)),o={stream:d&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let T=x&&x[w];if(T)return T.call(x);throw new tt(`Response type '${w}' is not supported`,tt.ERR_NOT_SUPPORT,R)})});const p=async w=>{if(w==null)return 0;if(me.isBlob(w))return w.size;if(me.isSpecCompliantForm(w))return(await new h(Mr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(me.isArrayBufferView(w)||me.isArrayBuffer(w))return w.byteLength;if(me.isURLSearchParams(w)&&(w=w+""),me.isString(w))return(await l(w)).byteLength},m=async(w,x)=>me.toFiniteNumber(w.getContentLength())??p(x);return async w=>{let{url:x,method:R,data:T,signal:_,cancelToken:C,timeout:P,onDownloadProgress:O,onUploadProgress:E,responseType:k,headers:B,withCredentials:N="same-origin",fetchOptions:I,maxContentLength:$,maxBodyLength:A,maxRedirects:D}=qm(w);const j=me.isNumber($)&&$>-1,U=me.isNumber(A)&&A>-1,q=ee=>me.hasOwnProp(w,ee)?w[ee]:void 0;let Q=c||fetch;k=k?(k+"").toLowerCase():"text";let re=fA([_,C&&C.toAbortSignal()],P),le=null;const ne=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let ue,he=null;const oe=()=>new tt("Request body larger than maxBodyLength limit",tt.ERR_BAD_REQUEST,w,le);try{let ee;const ye=q("auth");if(ye){const Me=me.getSafeProp(ye,"username")||"",xt=me.getSafeProp(ye,"password")||"";ee={username:Me,password:xt}}if($A(x)){const Me=new URL(x,Mr.origin);if(!ee&&(Me.username||Me.password)){const xt=Xm(Me.username),St=Xm(Me.password);ee={username:xt,password:St}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ee&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(AA((ee.username||"")+":"+(ee.password||""))))),j&&typeof x=="string"&&x.startsWith("data:")&&kA(x)>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le);if(U&&R!=="get"&&R!=="head"){const Me=await p(T);if(typeof Me=="number"&&isFinite(Me)&&(ue=Me,Me>A))throw oe()}const we=U&&(me.isReadableStream(T)||me.isStream(T)),Ae=(Me,xt,St)=>Ym(Me,Zm,Vt=>{if(U&&Vt>A)throw he=oe();xt&&xt(Vt)},St);if(u&&R!=="get"&&R!=="head"&&(E||we)){if(ue=ue??await m(B,T),ue!==0||we){let Me=new h(x,{method:"POST",body:T,duplex:"half"}),xt;if(me.isFormData(T)&&(xt=Me.headers.get("content-type"))&&B.setContentType(xt),Me.body){const[St,Vt]=E&&Wm(ue,Gc(Hm(E)))||[];T=Ae(Me.body,St,Vt)}}}else if(we&&!s&&a&&R!=="get"&&R!=="head")T=Ae(T);else if(we&&s&&!u&&R!=="get"&&R!=="head")throw new tt("Stream request bodies are not supported by the current fetch implementation",tt.ERR_NOT_SUPPORT,w,le);me.isString(N)||(N=N?"include":"omit");const Je=s&&"credentials"in h.prototype;if(me.isFormData(T)){const Me=B.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&B.delete("content-type")}B.set("User-Agent","axios/"+id,!1);const ze=I==null?I:Object.assign(Object.create(null),I);ze&&(delete ze.body,delete ze.headers,delete ze.method,delete ze.signal,delete ze.duplex,delete ze.credentials);const qe=Object.assign(Object.create(null),ze,{signal:re,method:R.toUpperCase(),headers:_m(B.normalize()),body:T,duplex:"half",credentials:Je?N:void 0});s&&(me.forEach(_A,(Me,xt)=>{qe[xt]===void 0&&(qe[xt]=Me)}),qe.signal===void 0&&(qe.signal=null),qe.body===void 0&&(qe.body=null)),D===0&&(qe.redirect="manual",ze&&(ze.redirect="manual")),le=s&&new h(x,qe);let Ze=await(s?Q(le,ze):Q(x,qe));const at=Yr.from(Ze.headers);if(j){const Me=me.toFiniteNumber(at.getContentLength());if(Me!=null&&Me>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le)}const ct=d&&(k==="stream"||k==="response");if(d&&Ze.body&&(O||j||ct&&ne)){const Me={};["status","statusText","headers"].forEach(ft=>{Me[ft]=Ze[ft]});const xt=me.toFiniteNumber(at.getContentLength()),[St,Vt]=O&&Wm(xt,Gc(Hm(O),!0))||[];let un=0;const An=ft=>{if(j&&(un=ft,un>$))throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le);St&&St(ft)};Ze=new g(Ym(Ze.body,Zm,An,()=>{Vt&&Vt(),ne&&ne()}),Me)}k=k||"text";let Ft=await o[me.findKey(o,k)||"text"](Ze,w);if(j&&!d&&!ct){let Me;if(Ft!=null&&(typeof Ft.byteLength=="number"?Me=Ft.byteLength:typeof Ft.size=="number"?Me=Ft.size:typeof Ft=="string"&&(Me=typeof r=="function"?new r().encode(Ft).byteLength:Ft.length)),typeof Me=="number"&&Me>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le)}return!ct&&ne&&ne(),await new Promise((Me,xt)=>{Fm(Me,xt,{data:Ft,headers:Yr.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:w,request:le})})}catch(ee){if(ne&&ne(),re&&re.aborted&&re.reason instanceof tt){const ye=re.reason;throw ye.config=w,le&&(ye.request=le),ee!==ye&&Object.defineProperty(ye,"cause",{__proto__:null,value:ee,writable:!0,enumerable:!1,configurable:!0}),ye}if(he)throw le&&!he.request&&(he.request=le),he;if(ee instanceof tt)throw le&&!ee.request&&(ee.request=le),ee;if(ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)){const ye=new tt("Network Error",tt.ERR_NETWORK,w,le,ee&&ee.response);throw Object.defineProperty(ye,"cause",{__proto__:null,value:ee.cause||ee,writable:!0,enumerable:!1,configurable:!0}),ye}throw tt.from(ee,ee&&ee.code,w,le,ee&&ee.response)}}},TA=new Map,tv=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:c}=n,h=[r,c,t];let g=h.length,v=g,s,f,a=TA;for(;v--;)s=h[v],f=a.get(s),f===void 0&&a.set(s,f=v?new Map:SA(n)),a=f;return f};tv();const od={http:N_,xhr:dA,fetch:{get:tv}};me.forEach(od,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const nv=e=>`- ${e}`,EA=e=>me.isFunction(e)||e===null||e===!1;function MA(e,n){e=me.isArray(e)?e:[e];const{length:t}=e;let r,c;const h={};for(let g=0;g<t;g++){r=e[g];let v;if(c=r,!EA(r)&&(c=od[(v=String(r)).toLowerCase()],c===void 0))throw new tt(`Unknown adapter '${v}'`);if(c&&(me.isFunction(c)||(c=c.get(n))))break;h[v||"#"+g]=c}if(!c){const g=Object.entries(h).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
4
+ `+g.map(nv).join(`
5
+ `):" "+nv(g[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+v,tt.ERR_NOT_SUPPORT)}return c}const rv={getAdapter:MA,adapters:od};function sd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fl(null,e)}function ad(e){const n=me.toSafeFlatObject(e);return sd(n),n.headers=Yr.from(me.getSafeProp(n,"headers")),n.data=nd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),rv.getAdapter(n.adapter||Bl.adapter,n)(n).then(function(t){sd(n),n.response=t;try{t.data=nd.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Yr.from(t.headers),t},function(t){if(!Bm(t)&&(sd(n),t&&t.response)){n.response=t.response;try{t.response.data=nd.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Yr.from(t.response.headers)}return Promise.reject(t)})}const Yc={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Yc[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const iv={};Yc.transitional=function(e,n,t){function r(c,h){return"[Axios v"+id+"] Transitional option '"+c+"'"+h+(t?". "+t:"")}return(c,h,g)=>{if(e===!1)throw new tt(r(h," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!iv[h]&&(iv[h]=!0,console.warn(r(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,h,g):!0}},Yc.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function IA(e,n,t){if(typeof e!="object"||e===null)throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let c=r.length;for(;c-- >0;){const h=r[c],g=Object.prototype.hasOwnProperty.call(n,h)?n[h]:void 0;if(g){const v=e[h],s=v===void 0||g(v,h,e);if(s!==!0)throw new tt("option "+h+" must be "+s,tt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new tt("Unknown option "+h,tt.ERR_BAD_OPTION)}}const Kc={assertOptions:IA,validators:Yc},Kr=Kc.validators;let sa=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Om,response:new Om}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error)try{let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const h=c.stack;let g="";if(typeof h=="string"){const v=h.indexOf(`
6
+ `);g=v===-1?"":h.slice(v+1)}if(!r.stack)r.stack=g;else if(g){const v=g.indexOf(`
7
+ `),s=v===-1?-1:g.indexOf(`
8
+ `,v+1),f=s===-1?"":g.slice(s+1);String(r.stack).endsWith(f)||(r.stack+=`
9
+ `+g)}}catch{}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=oa(this.defaults,t);const{transitional:r,paramsSerializer:c,headers:h}=t;r!==void 0&&Kc.assertOptions(r,{silentJSONParsing:Kr.transitional(Kr.boolean),forcedJSONParsing:Kr.transitional(Kr.boolean),clarifyTimeoutError:Kr.transitional(Kr.boolean),legacyInterceptorReqResOrdering:Kr.transitional(Kr.boolean),advertiseZstdAcceptEncoding:Kr.transitional(Kr.boolean),validateStatusUndefinedResolves:Kr.transitional(Kr.boolean)},!1),c!=null&&(me.isFunction(c)?t.paramsSerializer={serialize:c}:Kc.assertOptions(c,{encode:Kr.function,serialize:Kr.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Kc.assertOptions(t,{baseUrl:Kr.spelling("baseURL"),withXsrfToken:Kr.spelling("withXSRFToken")},!0),t.method=(me.getSafeProp(t,"method")||me.getSafeProp(this.defaults,"method")||"get").toLowerCase();let g=h&&me.merge(h.common,h[t.method]);h&&me.forEach(zm.concat("common"),o=>{delete h[o]}),t.headers=Yr.concat(g,h);const v=[];let s=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(t)===!1)return;s=s&&o.synchronous;const p=t.transitional||Xh;p&&p.legacyInterceptorReqResOrdering?v.unshift(o.fulfilled,o.rejected):v.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let a,l=0,u;if(!s){const o=[ad.bind(this),void 0];for(o.unshift(...v),o.push(...f),u=o.length,a=Promise.resolve(t);l<u;)a=a.then(o[l++],o[l++]);return a}u=v.length;let d=t;for(;l<u;){const o=v[l++],p=v[l++];try{d=o?o(d):d}catch(m){if(!p){a=Promise.reject(m);break}try{const w=p.call(this,m);me.isThenable(w)&&(a=Promise.resolve(w).then(()=>ad.call(this,d)))}catch(w){a=Promise.reject(w)}break}}if(!a)try{a=ad.call(this,d)}catch(o){a=Promise.reject(o)}for(l=0,u=f.length;l<u;)a=a.then(f[l++],f[l++]);return a}getUri(n){n=oa(this.defaults,n);const t=Vm(n.baseURL,n.url,n.allowAbsoluteUrls,n);return Im(t,n.params,n.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(e){sa.prototype[e]=function(n,t){return this.request(oa(t||{},{method:e,url:n,data:t&&me.hasOwnProp(t,"data")?t.data:void 0}))}}),me.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,c,h){return this.request(oa(h||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:c}))}}sa.prototype[e]=n(),e!=="query"&&(sa.prototype[e+"Form"]=n(!0))});let RA=class ok{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(c){t=c});const r=this;this.promise.then(c=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](c);r._listeners=null}),this.promise.then=c=>{let h;const g=new Promise(v=>{r.subscribe(v),h=v}).then(c);return g.cancel=function(){r.unsubscribe(h)},g},n(function(c,h,g){r.reason||(r.reason=new Fl(c,h,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new ok(function(t){n=t}),cancel:n}}};function LA(e){return function(n){return e.apply(null,n)}}function OA(e){return me.isObject(e)&&e.isAxiosError===!0}const Jc={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Jc).forEach(([e,n])=>{Jc[n]===void 0&&(Jc[n]=e)});function ov(e){const n=new sa(e),t=hm(sa.prototype.request,n);return me.extend(t,sa.prototype,n,{allOwnKeys:!0}),me.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return ov(oa(e,r))},t}const sr=ov(Bl);sr.Axios=sa,sr.CanceledError=Fl,sr.CancelToken=RA,sr.isCancel=Bm,sr.VERSION=id,sr.toFormData=Vc,sr.AxiosError=tt,sr.Cancel=sr.CanceledError,sr.all=function(e){return Promise.all(e)},sr.spread=LA,sr.isAxiosError=OA,sr.mergeConfig=oa,sr.AxiosHeaders=Yr,sr.formToJSON=e=>Pm(me.isHTMLForm(e)?new FormData(e):e),sr.getAdapter=rv.getAdapter,sr.HttpStatusCode=Jc,sr.default=sr;const{Axios:GW,AxiosError:qW,CanceledError:YW,isCancel:KW,CancelToken:JW,VERSION:QW,all:ZW,Cancel:XW,isAxiosError:e3,spread:t3,toFormData:n3,AxiosHeaders:r3,HttpStatusCode:i3,formToJSON:o3,getAdapter:s3,mergeConfig:a3,create:l3}=sr;function jl(e){return e?.name==="AuthRequiredError"}const NA=new Set(["OpenC3::AuthError","OpenC3::ForbiddenError"]);function DA(e){return e?.response?.status===401||e?.status===401||NA.has(e?.name)}function sv(e){!jl(e)&&!DA(e)&&console.error(e)}let av=class extends Error{constructor(n="Authentication required"){super(n),this.name="AuthRequiredError"}};globalThis.__openc3AuthRejectionHandler||(globalThis.__openc3AuthRejectionHandler=!0,globalThis.addEventListener?.("unhandledrejection",e=>{jl(e.reason)&&e.preventDefault()}));let lv=!1;function cv(){lv||(lv=!0,OpenC3Auth.login())}async function ld(){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch(e){throw jl(e)?e:(cv(),new av(e?.message))}if(!localStorage.openc3Token)throw cv(),new av}const uv=200,cd=sr.create({baseURL:location.origin,timeout:6e4,params:{}});cd.interceptors.response.use(e=>e,e=>{if(e.response){if(e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);if(e.response.status===401)return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(h){h&&OpenC3Auth.setTokens()}).catch(sv),Promise.reject(e);const n=e.response?.data?.error?.data?.class;if(n==="HazardousError"||n==="CriticalCmdError")return Promise.reject(e);let t=`HTTP ${e.response.status} - `;e.response?.statusText&&(t+=`${e.response.statusText} `);const r=e.response?.config?.data;typeof r=="string"&&r.length>0&&(r.length>uv?t+=`${r.slice(0,uv)}... `:t+=`${r} `),e.response?.data?.message?t+=`${e.response.data.message}`:e.response?.data?.exception?t+=`${e.response.data.exception}`:e.response?.data?.error?.message?(e.response.data.error.class&&(t+=`${e.response.data.error.class} `),t+=`${e.response.data.error.message}`):t+=`${e.response?.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:t}),e}else throw e});const Qc=async function(e,n,{data:t,params:r={},headers:c,noAuth:h=!1,optionalAuth:g=!1,noScope:v=!1,onUploadProgress:s=!1,responseType:f}={}){if(!h)if(g){try{await ld()}catch(a){if(!jl(a))throw a}localStorage.openc3Token&&(c.Authorization=localStorage.openc3Token)}else await ld(),c.Authorization=localStorage.openc3Token;return c.manual=!0,!v&&!r.scope&&(r.scope=window.openc3Scope),cd({method:e,url:n,data:t,params:r,headers:c,onUploadProgress:s,responseType:f})},ud={Accept:"application/json"},hv={...ud,"Content-Type":"application/json"},c3=ur("E",{get:function(e,{params:n,headers:t=ud,noScope:r,noAuth:c,optionalAuth:h,onUploadProgress:g,responseType:v}={}){return Qc("get",e,{params:n,headers:t,noScope:r,noAuth:c,optionalAuth:h,onUploadProgress:g,responseType:v})},put:function(e,{data:n,params:t,headers:r=hv,noScope:c,noAuth:h,onUploadProgress:g}={}){return Qc("put",e,{data:n,params:t,headers:r,noScope:c,noAuth:h,onUploadProgress:g})},post:function(e,{data:n,params:t,headers:r=hv,noScope:c,noAuth:h,onUploadProgress:g,responseType:v}={}){return Qc("post",e,{data:n,params:t,headers:r,noScope:c,noAuth:h,onUploadProgress:g,responseType:v})},delete:function(e,{params:n,headers:t=ud,noScope:r,noAuth:c,onUploadProgress:h}={}){return Qc("delete",e,{params:n,headers:t,noScope:r,noAuth:c,onUploadProgress:h})}});let Zc=()=>({emit(e,...n){for(let t=this.events[e]||[],r=0,c=t.length;r<c;r++)t[r](...n)},events:{},on(e,n){return(this.events[e]||=[]).push(n),()=>{this.events[e]=this.events[e]?.filter(t=>n!==t)}}}),Wl=class extends Error{constructor(n,t){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=t,this.name="ReasonError"}},hd=class extends Wl{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}},PA=class extends Wl{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}},Mo=class extends Wl{constructor(n,t){t?super(n,t):super("Disconnected",n),this.name="DisconnectedError"}},zA=class extends Mo{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}};function dv(e){return e?`{${Object.keys(e).sort().filter(n=>e[n]!==void 0).map(n=>{let t=JSON.stringify(e[n]);return`${JSON.stringify(n)}:${t}`}).join(",")}}`:""}let BA=class{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,t){if(!this._info)return this._info={id:String(n),info:t},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((t,{id:r,info:c})=>(t[r]=c,t),{})}};const aa=Symbol("state");let fv=class{constructor(n={}){this.emitter=Zc(),this.params=Object.freeze(n),this.presence=new BA(this),this.initialConnect=!0,this[aa]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=dv({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[aa]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[aa]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[aa]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[aa]="connected";let n=!0,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[aa]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[aa]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,t)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(n,t){this.emit("message",n,t)}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}emit(n,...t){return this.emitter.emit(n,...t)}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((n,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(c=>c()),n()})),r.push(this.on("close",c=>{r.forEach(h=>h()),t(c||new Wl("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}},FA=class{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let t=this.channels.indexOf(n);t>-1&&this.channels.splice(t,1)}notify(n,...t){this.state=n==="restored"?"connected":n,t.length===1?this.channels.forEach(r=>r[n](t[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let t=this._pendings[0];return!t||t.intent!==n?Promise.resolve():t.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(n){this._checkIntent(n);let t,r={promise:new Promise(h=>{t=h}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},c=this._pendingTop;return this._pendings.push(r),c&&await c.promise,this.gvl&&await this.gvl.acquire(r,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let t=this._pendingTop;return!t||t.acquired||t.intent!==n?!1:(this._pendings.pop(),t.canceled=!0,!0)}},jA=class{constructor(){this.queue=[]}async acquire(n,t){t==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}},WA=class{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new jA),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:t,unsubscribe:r}){let c=this._subscriptions[n]=new FA(n);return c.remoteId=this._localToRemote[n],c.subscriber=t,c.unsubscriber=r,c.gvl=this.glv,c}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,t){this._localToRemote[n]=t;let r=this.get(n);r&&(r.remoteId=t)}},HA=class{constructor(n={}){this.subscriptions=new WA(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,t){this._remoteToLocal[t]=n,this.subscriptions.storeRemoteId(n,t),this.flush(t)}unsubscribe(n){let t=this.subscriptions.get(n);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,t,r){let c=this._remoteToLocal[n];if(!c){this._pendingMessages.push([n,t,r]);return}let h=this.subscriptions.get(c);h&&h.channels.forEach(g=>{g.receive(t,r)})}notify(n,t,r){let c=this._remoteToLocal[n];if(!c)return;let h=this.subscriptions.get(c);h&&h.channels.forEach(g=>g.emit(t,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let t=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}};const pv={debug:0,info:1,warn:2,error:3};let gv=class{constructor(n){this.level=n||"warn"}log(n,t,r){pv[n]<pv[this.level]||this.writeLogEntry(n,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,t){this.log("debug",n,t)}info(n,t){this.log("info",n,t)}warn(n,t){this.log("warn",n,t)}error(n,t){this.log("error",n,t)}},Hl=class extends gv{writeLogEntry(){}},UA=class{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}},VA=0,mv=class{constructor(n={}){let{logger:t}=n;this.logger=t||new Hl,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,t){let r={channel:n};t&&Object.assign(r,t);let c=dv(r);if(this.pendingUnsubscriptions[c]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,c),new Promise(v=>{setTimeout(()=>{v(this.subscribe(n,t))},g)})}if(this.pendingSubscriptions[c])return this.logger.warn("subscription is already pending, skipping",c),Promise.reject(Error("Already subscribing"));let h=this.subscribeRetryInterval;return new Promise((g,v)=>{let s=++VA;this.pendingSubscriptions[c]={resolve:g,reject:v,id:s},this.cable.send(this.buildSubscribeRequest(c)),this.maybeRetrySubscribe(s,c,h)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,t,r){setTimeout(()=>{let c=this.pendingSubscriptions[t];c&&c.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(n,t,r))},r)}maybeExpireSubscribe(n,t,r){setTimeout(()=>{let c=this.pendingSubscriptions[t];c&&c.id===n&&(delete this.pendingSubscriptions[t],c.reject(new PA(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,t,r){return t==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=t,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,t){return this.cable.send({command:"whisper",identifier:n,data:t}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:c,reason:h,reconnect:g}=n;if(t==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="welcome"){let v=n.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(t==="disconnect"){let v=new Mo(h);this.reset(v),g===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(t==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(t==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new hd)):this.logger.error("subscription not found",{type:t,identifier:r})}if(c)return{identifier:r,message:c};this.logger.warn(`unknown message type: ${t}`,{message:n})}reset(n){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const vv=()=>Date.now()/1e3|0;let GA=class extends mv{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=vv()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let t in this.pendingPresence)this.pendingPresence[t].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:c}=n;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(t==="reject_subscription")return super.receive(n);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(t==="ping")return this.restoreSince&&(this.restoreSince=vv()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(t==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let h=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of h)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(h)}return this.cable.connected(this.sessionId)}if(t==="presence"){let h=c.type;if(h==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(c))}else if(h==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:c}}if(c){let h=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:c,meta:h}}this.logger.warn(`unknown message type: ${t}`,{message:n})}perform(n,t,r){switch(t){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,t,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let t=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(t.history=r,this.pendingHistory[n]=!0);let c=this.presenceInfo[n];return c&&(t.presence=c),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let t={},r=!1;if(this.subscriptionStreams[n])for(let c of this.subscriptionStreams[n]){let h=this.streamsPositions[c];h&&(r=!0,t[c]=h)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(n,t,r,c){if(!(!t||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(t),this.streamsPositions[t]={epoch:r,offset:c},{stream:t,epoch:r,offset:c}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,t){return this.presenceInfo[n]=t,this.cable.send({command:"join",identifier:n,presence:t}),Promise.resolve()}async leave(n,t){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:t}),Promise.resolve()}presence(n,t){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,c)=>{this.pendingPresence[n]={resolve:r,reject:c},this.cable.send({command:"presence",identifier:n,data:t})})}},qA=class extends Wl{constructor(){super("No connection","closed"),this.name="NoConnectionError"}},yv=class extends fv{static identifier="__ghost__";constructor(n,t){super(t),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const YA="$pubsub";let bv=class extends fv{static identifier=YA;async perform(n,t){if(n.startsWith("$"))return super.perform(n,t);throw Error("not implemented")}};const la=Symbol("state");let KA=class{constructor({transport:n,protocol:t,encoder:r,logger:c,lazy:h,hubOptions:g,performFailures:v,transportConfigurator:s}){this.emitter=Zc(),this.transport=n,this.encoder=r,this.logger=c||new Hl,this.protocol=t,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new HA(g||{}),this[la]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=s,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,h===!1&&this.connect().catch(()=>{})}get state(){return this[la]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[la]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(r){this.handleClose(r)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[la]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Mo("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[la]="connected",this.hub.subscriptions.all().forEach(c=>{n&&c.remoteId&&n.includes(c.remoteId)?c.notify("restored"):(c.notify("disconnected",new Mo("recovery_failed")),this._resubscribe(c))});let t=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:r})}notify(n,t,r){t&&typeof t!="string"&&(r=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:r}):this.emit("info",{type:n,data:r})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Mo(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[la]="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 Mo?n:new Mo(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[la]="closed";let r=t||new Mo("cable_closed");this.hub.subscriptions.all().forEach(c=>c.notify("disconnected",r)),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 r=this.protocol.receive(t);if(r){this.logger.debug("processed incoming message",r);let{type:c,identifier:h,message:g,meta:v}=r;c?this.hub.notify(h,c,g):this.hub.transmit(h,g,v)}}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 bv({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new bv({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let r,c;return typeof n=="string"&&(c=n,n=yv),r=c?new n(c,t):new n(t),this.subscribe(r)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let r=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:c=>this._subscribe(c,n.channelId,n.params),unsubscribe:c=>this._unsubscribe(c)});return r.add(n),r.intent==="subscribed"&&r.state==="connected"&&n.connected(),r.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,r){let c=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:c});return}this.logger.debug("acquiring subscribe lock",{identifier:c});let h=await n.acquire("subscribed");if(h.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:c}),h.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:c}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),h.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:c}),h.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:c}),n.notify("connected"),h.release();return}let g={identifier:t,params:r};this.logger.debug("subscribing",g);try{let v=await this.protocol.subscribe(t,r);this.hub.subscribe(c,v),this.logger.debug("subscribed",{...g,remoteId:v}),n.notify("connected")}catch(v){if(v){if(v instanceof hd&&this.logger.warn("rejected",g),v instanceof Mo){this.logger.debug("disconnected during subscription; will retry on connect",g),h.release();return}this.logger.error("failed to subscribe",{error:v,...g})}n.close(v),this.hub.unsubscribe(c)}h.release()}unsubscribe(n){let t=n.identifier,r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);r.remove(n),n.closed(),r.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let r=await n.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),r.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}),r.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),r.release();return}let c=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:c}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),r.release();return}try{await this.protocol.unsubscribe(c),this.logger.debug("unsubscribed remotely",{id:t})}catch(h){h&&(h instanceof Mo?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:h}):this.logger.error("unsubscribe failed",{id:t,error:h}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",r.release()}async perform(n,t,r){if(this.performFailures==="throw")return this._perform(n,t,r);try{return await this._perform(n,t,r)}catch(c){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:c});return}}async _perform(n,t,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new qA;let c=this.hub.subscriptions.get(n);if(!c)throw Error(`Subscription not found: ${n}`);if(await c.pending("subscribed"),c.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let h=c.remoteId,g={id:h,action:t,payload:r};this.logger.debug("perform",g);try{let v=await this.protocol.perform(h,t,r);return v&&this.logger.debug("perform result",{message:v,request:g}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:g}),v}}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(c=>c()),n()})),r.push(this.on("close",c=>{r.forEach(h=>h()),t(c)})),r.push(this.on("disconnect",c=>{r.forEach(h=>h()),t(c)}))}),this._pendingConnect)}};const JA={maxMissingPings:2,maxReconnectAttempts:1/0},Va=()=>Date.now(),wv=(e,n)=>{n=n||{};let{backoffRate:t,jitterRatio:r,maxInterval:c}=n;return t=t||2,r===void 0&&(r=.5),h=>{let g=e*t**h,v=g*t,s=g+(v-g)*Math.random(),f=2*(Math.random()-.5)*r;return s=s*(1+f),c&&c<s&&(s=c),s}};let xv=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},JA,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 Hl,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Va()}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=Va(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Va(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Va(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Va()})),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=Va()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new zA))}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)}},QA=class{constructor(n,t={}){this.transports=n,this.transport=null,this.emitter=Zc(),this.unbind=[],this.logger=t.logger||new Hl}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let t=this.transports[n];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}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(n,t){this.transports.forEach(r=>{r.setParam(n,t)})}setToken(n,t){this.transports.forEach(r=>{r.setToken(n,t)})}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}},ZA=class{constructor(n,t={}){this.url=n;let r=t.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=Zc();let{format:c,subprotocol:h,authStrategy:g}=t;this.format=c||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=h}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((t,r)=>{let c=[];c.push(this.once("open",()=>{c.forEach(h=>h()),t()})),c.push(this.once("close",()=>{c.forEach(h=>h()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,t){let r=new URL(this.url);r.searchParams.set(n,t);let c=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(c)}setToken(n,t="jid"){if(this.authStrategy==="param")this.setParam(t,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(c=>c.toLowerCase()===r)||r,this.connectionOptions.headers[r]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let t=n.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},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")}},XA=class{constructor(n){this.channel=n}notify(n,...t){typeof this[n]=="function"&&this[n](...t)}perform(n,t={}){this.channel.perform(n,t)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}},e$=class extends yv{constructor(n,t,r){super(n,t),this.subscription=new XA(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:c})=>this.subscription.notify("connected",{reconnected:c})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",c=>this.subscription.notify("received",c)),this.on("close",c=>{c&&c instanceof hd?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}},t$=class{constructor(n){this.cable=n}create(n,t){let r,c;typeof n=="object"?(r=n.channel,delete n.channel,c=n):(r=n,c={});let h=new e$(r,c,t);return h.subscription.notify("initialized"),this.cable.subscribe(h),h.subscription}findAll(n){return this.cable.hub.channels.filter(t=>t.identifier===n).map(t=>t.subscription)}},n$=class{constructor(n){this.cable=n,this.subscriptions=new t$(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const Cv={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function r$(e,n){if(typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),n=n||{},!e&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},Cv,n);let{protocol:t,websocketImplementation:r,websocketFormat:c,websocketOptions:h,websocketAuthStrategy:g,fallbacks:v,logLevel:s,logger:f,transport:a,encoder:l,lazy:u,monitor:d,pingInterval:o,reconnectStrategy:p,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:R,historyTimestamp:T,protocolOptions:_,concurrentSubscribes:C,performFailures:P,transportConfigurator:O,auth:E}=n;if(f=f||new Hl(s),typeof t=="string"){x=x||t;let N=t.substring(0,t.lastIndexOf("-")),I=t.substring(t.lastIndexOf("-")+1);if(_=_||{},N==="actioncable-v1")t=new mv({logger:f,..._});else if(N==="actioncable-v1-ext")t=new GA({logger:f,historyTimestamp:T,..._});else throw Error(`Protocol is not supported yet: ${t}`);if(I==="json")l=l||new UA,c=c||"text";else if(I==="msgpack"){if(c="binary",!l)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(I==="protobuf"){if(c=c||"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: ${t}`)}if(!t)throw Error("Protocol must be specified");a=a||new ZA(e,{websocketImplementation:r,websocketOptions:h,subprotocol:x,authStrategy:g,format:c}),v&&(a=new QA([a,...v],{logger:f})),E&&E.token&&a.setToken(E.token,E.param||"jid"),p=p||wv(o),d!==!1&&(d=d||new xv({pingInterval:o,reconnectStrategy:p,maxMissingPings:m,maxReconnectAttempts:w,logger:f}));let k={concurrentSubscribes:C},B=new KA({protocol:t,transport:a,encoder:l,logger:f,lazy:u,hubOptions:k,performFailures:P,transportConfigurator:O});return d&&(d.watch(B),B.monitor=d),R&&i$(B,async()=>{try{await R(a)}catch(N){return f.error("Failed to refresh authentication token: "+N),!1}return B.connect().catch(()=>{}),!0}),B}function i$(e,n){let t=!1;e.on("connect",()=>t=!1),e.on("close",async r=>{if(r){if(t){e.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await n())}})}let o$=class extends gv{writeLogEntry(n,t,r){r?console[n](t,r):console[n](t)}},s$=class extends xv{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},t=c=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:c})},r=()=>this.disconnect(new Mo("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}};const a$=["cable","action-cable"],l$="/cable",Xc=(e,n)=>{for(let t of a$){let r=e.head.querySelector(`meta[name='${t}-${n}']`);if(r)return r.getAttribute("content")}},kv=e=>e.match(/wss?:\/\//)?e:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${e}`:e,c$=()=>{if(typeof document<"u"&&document.head){let e=Xc(document,"url");if(e)return kv(e)}return kv(l$)},u$=()=>{if(typeof document<"u"&&document.head){let e=Xc(document,"history-timestamp");if(e)return e|0}},h$=()=>{if(typeof document<"u"&&document.head)return Xc(document,"token")},d$=()=>{if(typeof document<"u"&&document.head)return Xc(document,"token-param")};function f$(e,n){typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),e=e||c$(),n=n||{},n.historyTimestamp||=u$();let t=h$();if(t){let f=d$();n.auth=Object.assign({token:t,param:f},n.auth||{})}n=Object.assign({},Cv,n);let{logLevel:r,logger:c,pingInterval:h,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:s}=n;return c=n.logger=n.logger||new o$(r),g=n.reconnectStrategy=n.reconnectStrategy||wv(h),n.monitor!==!1&&(n.monitor=n.monitor||new s$({pingInterval:h,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:s,logger:c})),r$(e,n)}function p$(e,n){let t=f$(e,n);return new n$(t)}const g$=1e3,_v="/openc3-api/cable",m$=6e4,v$="__openc3_cable__";let y$=class{constructor(n,t,r,c,h){this._cable=n,this._channel=t,this._scope=r,this._callbacks=c,this._additionalOptions=h,this._subscription=null,this._unsubscribed=!1,this._heartbeat=null}get identifier(){return this._subscription?.identifier}perform(n,t){return this._unsubscribed?Promise.resolve():this._subscription?.perform(n,t)}send(n){return this._unsubscribed?Promise.resolve():this._subscription?.send(n)}unsubscribe(){return this._unsubscribed=!0,this._stopHeartbeat(),this._cable._forget(this),this._subscription?.unsubscribe()}_subscribe(n){this._unsubscribed||(this._subscription=n.subscriptions.create({channel:this._channel,token:localStorage.openc3Token,...this._cable._heartbeatInterval?{heartbeat:!0}:{},...this._additionalOptions},{...this._callbacks,received:t=>{if(t?.[v$]==="resubscribe"){this._cable._scheduleRecovery();return}this._callbacks.received?.(t)},disconnected:t=>{this._unsubscribed||(t?.allowReconnect===!1&&this._cable._scheduleRecovery(),this._callbacks.disconnected?.(t))}}),this._startHeartbeat())}_startHeartbeat(){const n=this._cable._heartbeatInterval;!n||this._heartbeat||(this._heartbeat=setInterval(()=>{if(this._unsubscribed){this._stopHeartbeat();return}Promise.resolve().then(()=>this._subscription?.perform("heartbeat",{})).catch(()=>{})},n))}_stopHeartbeat(){this._heartbeat&&(clearInterval(this._heartbeat),this._heartbeat=null)}};ur("x",class{constructor(n=_v,{heartbeatInterval:t=n===_v?m$:0}={}){this._cable=null,this._url=n,this._heartbeatInterval=t,this._subscriptions=new Set,this._recovery=null}disconnect(){this._cancelRecovery(),this._subscriptions.forEach(n=>{n._unsubscribed=!0,n._stopHeartbeat()}),this._subscriptions.clear(),this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,t,r={},c={}){const h=new y$(this,n,t,r,c);return this._subscriptions.add(h),this._resubscribe(h).then(()=>h)}_resubscribe(n){if(this._cable==null){const t=new URL(this._url,document.baseURI);t.searchParams.set("scope",n._scope),this._cable=p$(t.href)}return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this._cable&&n._subscribe(this._cable)}).catch(t=>{if(!jl(t))throw t})}_scheduleRecovery(){this._recovery||(this._recovery=setTimeout(()=>{const n=[...this._subscriptions];this._cable&&(this._cable.cable.disconnect(),this._cable=null),n.reduce((t,r)=>t.then(()=>this._resubscribe(r)),Promise.resolve()).catch(t=>console.error("failed to recover cable",t)).finally(()=>{this._recovery=null})},g$))}_cancelRecovery(){this._recovery&&(clearTimeout(this._recovery),this._recovery=null)}_forget(n){this._subscriptions.delete(n),this._subscriptions.size===0&&this._cancelRecovery()}recordPing(){}}),ur("i",class{constructor(n,t,r="",c=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=t,this.usage=r,this.url=c}});function eu(e){return b$.test(e)}const b$=/^-?[0-9]+$/;function Av(e){return w$.test(e)}const w$=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function $v(e,n){if(eu(e))return Number.isSafeInteger(Number.parseInt(e,10));const t=Number.parseFloat(e);if(Number.isInteger(t)&&!Number.isSafeInteger(t))return!1;const r=String(t);if(e===r)return!0;const c=Sv(e),h=Sv(r);return!!(c===h||n?.approx===!0&&h.length>=14&&c.startsWith(h.substring(0,14)))}let Ul=(function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e})({});function x$(e){if($v(e,{approx:!1}))return;if(eu(e))return Ul.truncate_integer;const n=Number.parseFloat(e);return Number.isFinite(n)?n===0?Ul.underflow:Ul.truncate_float:Ul.overflow}function Sv(e){const{start:n,end:t}=C$(e),r=e.substring(n,t),c=r.indexOf(".");return c===-1?r:r.substring(0,c)+r.substring(c+1)}function C$(e){let n=0;for(e[0]==="-"&&n++;e[n]==="0"||e[n]===".";)n++;let t=e.lastIndexOf("e");for(t===-1&&(t=e.lastIndexOf("E")),t===-1&&(t=e.length);(e[t-1]==="0"||e[t-1]===".")&&t>n;)t--;return{start:n,end:t}}const Tv=Symbol.for("lossless-json.LosslessNumber");let k$=class{value;isLosslessNumber=!0;get[Tv](){return!0}constructor(n){if(!Av(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=x$(this.value);if(n===void 0||n===Ul.truncate_float)return Number.parseFloat(this.value);if(eu(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function Ev(e){return e!==null&&typeof e=="object"&&e[Tv]===!0}function _$(e){return new k$(e)}function A$(e,n){return dd({"":e},"",e,n)}function dd(e,n,t,r){return Array.isArray(t)?r.call(e,n,S$(t,r)):t&&typeof t=="object"&&!Ev(t)?r.call(e,n,$$(t,r)):r.call(e,n,t)}function $$(e,n){for(const t of Object.keys(e)){const r=dd(e,t,e[t],n);r!==void 0?e[t]=r:delete e[t]}return e}function S$(e,n){for(let t=0;t<e.length;t++){const r=dd(e,String(t),e[t],n);r===void 0?delete e[t]:e[t]=r}return e}function T$(e,n,t){const r=typeof t=="function"?{parseNumber:t}:t,c=r?.parseNumber??_$,h=r?.onDuplicateKey??P;let g=0;const v=a();return w(v),R(),n?A$(v,n):v;function s(){if(e.charCodeAt(g)===O$){g++,u();const j={};let U=!0;for(;g<e.length&&e.charCodeAt(g)!==Rv;){U?U=!1:(p(),u());const q=g,Q=d();if(Q===void 0){C();return}u(),m();const re=a();if(re===void 0){N();return}if(Object.prototype.hasOwnProperty.call(j,Q)&&!fd(re,j[Q])){const le=h({key:Q,position:q+1,oldValue:j[Q],newValue:re});le!==void 0&&Mv(j,Q,le)}else Mv(j,Q,re)}return e.charCodeAt(g)!==Rv&&O(),g++,j}}function f(){if(e.charCodeAt(g)===N$){g++,u();const j=[];let U=!0;for(;g<e.length&&e.charCodeAt(g)!==Lv;){U?U=!1:p();const q=a();x(q),j.push(q)}return e.charCodeAt(g)!==Lv&&E(),g++,j}}function a(){u();const j=d()??o()??s()??f()??l("true",!0)??l("false",!1)??l("null",null);return u(),j}function l(j,U){if(e.slice(g,g+j.length)===j)return g+=j.length,U}function u(){for(;E$(e.charCodeAt(g));)g++}function d(){if(e.charCodeAt(g)===pd){g++;let j="";for(;g<e.length&&e.charCodeAt(g)!==pd;){if(e.charCodeAt(g)===L$){const U=e[g+1],q=R$[U];q!==void 0?(j+=q,g++):U==="u"?tu(e.charCodeAt(g+2))&&tu(e.charCodeAt(g+3))&&tu(e.charCodeAt(g+4))&&tu(e.charCodeAt(g+5))?(j+=String.fromCharCode(Number.parseInt(e.slice(g+2,g+6),16)),g+=5):I(g):B(g)}else I$(e.charCodeAt(g))?j+=e[g]:k(e[g]);g++}return _(),g++,j}}function o(){const j=g;if(e.charCodeAt(g)===Ov&&(g++,T(j)),e.charCodeAt(g)===gd)g++;else if(M$(e.charCodeAt(g)))for(g++;nu(e.charCodeAt(g));)g++;else return;if(e.charCodeAt(g)===H$)for(g++,T(j);nu(e.charCodeAt(g));)g++;if(e.charCodeAt(g)===Y$||e.charCodeAt(g)===q$)for(g++,(e.charCodeAt(g)===Ov||e.charCodeAt(g)===F$)&&g++,T(j);nu(e.charCodeAt(g));)g++;if(g>j)return c(e.slice(j,g))}function p(){if(e.charCodeAt(g)!==W$)throw new SyntaxError(`Comma ',' expected after value ${D()}`);g++}function m(){if(e.charCodeAt(g)!==U$)throw new SyntaxError(`Colon ':' expected after property name ${D()}`);g++}function w(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${D()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${D()}`)}function R(){if(g<e.length)throw new SyntaxError(`Expected end of input ${D()}`)}function T(j){if(!nu(e.charCodeAt(g))){const U=e.slice(j,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${D()}`)}}function _(){if(e.charCodeAt(g)!==pd)throw new SyntaxError(`End of string '"' expected ${D()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${D()}`)}function P({key:j,position:U}){throw new SyntaxError(`Duplicate key '${j}' encountered at position ${U}`)}function O(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${D()}`)}function E(){throw new SyntaxError(`Array item or end of array ']' expected ${D()}`)}function k(j){throw new SyntaxError(`Invalid character '${j}' ${$()}`)}function B(j){const U=e.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function N(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function I(j){const U=e.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${g}`}function A(){return g<e.length?`but got '${e[g]}'`:"but reached end of input"}function D(){return`${A()} ${$()}`}}function Mv(e,n,t){n==="__proto__"?Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0}):e[n]=t}function E$(e){return e===D$||e===P$||e===z$||e===B$}function tu(e){return e>=gd&&e<=md||e>=V$&&e<=K$||e>=G$&&e<=J$}function nu(e){return e>=gd&&e<=md}function M$(e){return e>=j$&&e<=md}function I$(e){return e>=32&&e<=1114111}function fd(e,n){return e===n?!0:Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every((t,r)=>fd(t,n[r])):Iv(e)&&Iv(n)?[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>fd(e[t],n[t])):!1}function Iv(e){return typeof e=="object"&&e!==null}const R$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},L$=92,O$=123,Rv=125,N$=91,Lv=93,D$=32,P$=10,z$=9,B$=13,pd=34,F$=43,Ov=45,gd=48,j$=49,md=57,W$=44,H$=46,U$=58,V$=65,G$=97,q$=69,Y$=101,K$=70,J$=102;function Q$(e,n,t,r){return c(e);function c(s,f){if(Array.isArray(r)){const a=r.find(l=>l.test(s));if(a){const l=a.stringify(s);if(typeof l!="string"||!Av(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 s=="boolean"||typeof s=="number"||typeof s=="string"||s===null||s instanceof Date||s instanceof Boolean||s instanceof Number||s instanceof String)return JSON.stringify(s);if(Ev(s)||typeof s=="bigint")return s.toString();if(Array.isArray(s))return h(s);if(s&&typeof s=="object")return g(s)}function h(s,f){if(s.length===0)return"[]";let a="[";for(let l=0;l<s.length;l++){const u=s[l];if(typeof u<"u"&&typeof u!="function"){const d=c(u);a+=d===void 0?"null":d}else a+="null";l<s.length-1&&(a+=",")}return a+="]",a}function g(s,f){if(typeof s.toJSON=="function")return c(s.toJSON());const a=Array.isArray(n)?[...new Set(n.map(String))]:Object.keys(s);if(a.length===0)return"{}";let l=!0,u="{";for(const d of a){const o=s[d];if(v(d,o)){const p=c(o);if(p===void 0)continue;l?l=!1:u+=",";const m=JSON.stringify(d);u+=`${m}:`,u+=p}}return u+="}",u}function v(s,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function Z$(e){return eu(e)&&!$v(e)?BigInt(e):Number.parseFloat(e)}ur("P",class{id=1;constructor(){}async exec(n,t,r={},c={},h=6e4){await ld(),this.id=this.id+1;try{return r.scope=window.openc3Scope,c.manual=!0,(await cd.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...c},timeout:h,transformRequest:[(g,v)=>Q$(g)],transformResponse:[g=>{try{return T$(g,void 0,Z$)}catch{const v=typeof g=="string"?g.substring(0,200):String(g),s=new Error(`Server returned non-JSON response: ${v}`);throw s.name="ServerError",s}}]})).data.result}catch(g){let v=new Error;throw g.response?(v.name=g.response.data.error.data.class,v.message=g.response.data.error.data.message,v.object=g.response.data.error):g.request?(v.name="Request error",v.message="Request error, no response received"):v=g,v}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(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(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,t,r,c,h){return this.exec("map_target_to_interface",[n,t],{cmd_only:r,tlm_only:c,unmap_old:h})}unmap_target_from_interface(n,t,r,c){return this.exec("unmap_target_from_interface",[n,t],{cmd_only:r,tlm_only:c})}connect_interface(n,...t){return t.length>0?this.exec("connect_interface",[n,...t]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,t,...r){return this.exec("interface_cmd",[n,t,...r])}interface_target_enable(n,t,r=!1,c=!1){return this.exec("interface_target_enable",[n,t],{cmd_only:r,tlm_only:c})}interface_target_disable(n,t,r=!1,c=!1){return this.exec("interface_target_disable",[n,t],{cmd_only:r,tlm_only:c})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,t,r,c,h){return this.exec("map_target_to_router",[n,t],{cmd_only:r,tlm_only:c,unmap_old:h})}unmap_target_from_router(n,t,r,c){return this.exec("unmap_target_from_router",[n,t],{cmd_only:r,tlm_only:c})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,t,r=!1,c=!1){return this.exec("router_target_enable",[n,t],{cmd_only:r,tlm_only:c})}router_target_disable(n,t,r=!1,c=!1){return this.exec("router_target_disable",[n,t],{cmd_only:r,tlm_only:c})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,t,r){return this.exec("get_item",[n,t,r])}get_param(n,t,r){return this.exec("get_param",[n,t,r])}get_parameter(n,t,r){return this.get_param(n,t,r)}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}delete_limits_set(n){return this.exec("delete_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.get_target_names()}get_tlm(n,t){return this.exec("get_tlm",[n,t])}get_telemetry(n,t){return this.get_tlm(n,t)}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.get_all_tlm(n)}get_all_tlm_names(n,t=!1){return this.exec("get_all_tlm_names",[n],{hidden:t})}get_all_telemetry_names(n){return this.get_all_tlm_names(n)}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,t,r,c=30){const h=await this.exec("get_tlm_packet",[n,t],{type:r,stale_time:c});if(h!=null){let g=h.length,v=null;for(let s=0;s<g;s++)v=this.decode_openc3_type(h[s][1]),v!==null&&(h[s][1]=v)}return h}get_packet_derived_items(n,t){return this.exec("get_packet_derived_items",[n,t])}get_tlm_buffer(n,t){return this.exec("get_tlm_buffer",[n,t])}get_tlm_available(n,t={},r={}){return this.exec("get_tlm_available",[n],t,r)}async get_tlm_values(n,t=30,r=null,c=null,h=null,g={}){let v={stale_time:t};r!==null&&(v.cache_timeout=r),c!==null&&(v.start_time=c.toISOString()),h!==null&&(v.end_time=h.toISOString());const s=await this.exec("get_tlm_values",[n],v,g,1e4);if(s&&s.length>0){let f=s.length,a=null;for(let l=0;l<f;l++)a=this.decode_openc3_type(s[l][0]),a!==null&&(s[l][0]=a)}return s}get_limits(n,t,r){return this.exec("get_limits",[n,t,r])}async tlm(n,t,r,c="CONVERTED"){let h=null;if(t===void 0)h=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(t))h=await this.exec("tlm",[n],{type:t});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else h=await this.exec("tlm",[n,t,r],{type:c});let g=this.decode_openc3_type(h);return g!==null&&(h=g),h}async inject_tlm(n,t,r=null,c="CONVERTED",h=!1){await this.exec("inject_tlm",[n,t,r],{type:c,stored:h})}set_tlm(n,t,r,c){return this.exec("set_tlm",[n,t,r],{type:c})}override_tlm(n,t,r,c){return this.exec("override_tlm",[n,t,r],{type:c})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,t,r,c){return this.exec("normalize_tlm",[n,t,r],{type:c})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.get_all_cmds(n)}get_all_cmd_names(n,t=!1){return this.exec("get_all_cmd_names",[n],{hidden:t})}get_all_command_names(n){return this.get_all_cmd_names(n)}get_cmd(n,t){return this.exec("get_cmd",[n,t])}get_command(n,t){return this.get_cmd(n,t)}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,t,r,c="CONVERTED"){return this.exec("get_cmd_value",[n,t,r,c])}get_cmd_buffer(n,t){return this.exec("get_cmd_buffer",[n,t])}_cmd(n,t,r,c,h,g={}){let v=null;for(let s in c)Object.prototype.hasOwnProperty.call(c,s)&&(v=this.encode_openc3_type(c[s]),v!==null&&(c[s]=v));return this.exec(n,[t,r,c],g,h)}get_cmd_hazardous(n,t,r,c={}){return t===void 0?this.exec("get_cmd_hazardous",n,{},c):this._cmd("get_cmd_hazardous",n,t,r,c)}cmd(n,t,r,c={},h={}){return t===void 0?this.exec("cmd",n,h,c):this._cmd("cmd",n,t,r,c,h)}cmd_no_range_check(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_no_range_check",n,h,c):this._cmd("cmd_no_range_check",n,t,r,c,h)}cmd_raw(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_raw",n,h,c):this._cmd("cmd_raw",n,t,r,c,h)}cmd_raw_no_range_check(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_raw_no_range_check",n,h,c):this._cmd("cmd_raw_no_range_check",n,t,r,c,h)}cmd_no_hazardous_check(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_no_hazardous_check",n,h,c):this._cmd("cmd_no_hazardous_check",n,t,r,c,h)}cmd_no_checks(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_no_checks",n,h,c):this._cmd("cmd_no_checks",n,t,r,c,h)}cmd_raw_no_hazardous_check(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",n,h,c):this._cmd("cmd_raw_no_hazardous_check",n,t,r,c,h)}cmd_raw_no_checks(n,t,r,c={},h={}){return t===void 0?this.exec("cmd_raw_no_checks",n,h,c):this._cmd("cmd_raw_no_checks",n,t,r,c,h)}build_cmd(n,t,r,c={},h={}){return t===void 0?this.exec("build_cmd",n,h,c):this._cmd("build_cmd",n,t,r,c,h)}build_command(n,t,r,c={},h={}){return this.build_cmd(n,t,r,c,h)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,t){return this.exec("send_raw",[n,t])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,t){return this.exec("load_config",[n,t])}save_config(n,t,r){return this.exec("save_config",[n,t,r])}delete_config(n,t){return this.exec("delete_config",[n,t])}enable_limits(n,t,r){return this.exec("enable_limits",[n,t,r])}disable_limits(n,t,r){return this.exec("disable_limits",[n,t,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,t){return this.exec("get_setting",[n],t)}get_settings(n,t){return this.exec("get_settings",n,t)}set_setting(n,t){return this.exec("set_setting",[n,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,t){return this.set_setting(n,t)}get_metrics(n=!1){return this.exec("get_metrics",[],{detailed:n})}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const t=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",t),c=new Uint8Array(r);return Array.from(c).map(h=>h.toString(16).padStart(2,"0")).join("")}}});const Nv=6048e5,X$=864e5,ru=6e4,vd=36e5,eS=1e3,Dv=Symbol.for("constructDateFrom");ur({a:ru,C:vd,k:eS});function qo(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&Dv in e?e[Dv](n):e instanceof Date?new e.constructor(n):new Date(n)}function li(e,n){return qo(n||e,e)}let tS={};function Ga(){return tS}function qa(e,n){const t=Ga(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,c=li(e,n?.in),h=c.getDay(),g=(h<r?7:0)+h-r;return c.setDate(c.getDate()-g),c.setHours(0,0,0,0),c}function Vl(e,n){return qa(e,{...n,weekStartsOn:1})}function Pv(e,n){const t=li(e,n?.in),r=t.getFullYear(),c=qo(t,0);c.setFullYear(r+1,0,4),c.setHours(0,0,0,0);const h=Vl(c),g=qo(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const v=Vl(g);return t.getTime()>=h.getTime()?r+1:t.getTime()>=v.getTime()?r:r-1}function yd(e){const n=li(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function nS(e,...n){const t=qo.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function zv(e,n){const t=li(e,n?.in);return t.setHours(0,0,0,0),t}function rS(e,n,t){const[r,c]=nS(t?.in,e,n),h=zv(r),g=zv(c),v=+h-yd(h),s=+g-yd(g);return Math.round((v-s)/X$)}function iS(e,n){const t=Pv(e,n),r=qo(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Vl(r)}function oS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Bv(e){return!(!oS(e)&&typeof e!="number"||isNaN(+li(e)))}function sS(e,n){const t=li(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const aS={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"}},lS=(e,n,t)=>{let r;const c=aS[e];return typeof c=="string"?r=c:n===1?r=c.one:r=c.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function bd(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const cS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dS={date:bd({formats:cS,defaultWidth:"full"}),time:bd({formats:uS,defaultWidth:"full"}),dateTime:bd({formats:hS,defaultWidth:"full"})},fS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pS=(e,n,t,r)=>fS[e];function Gl(e){return(n,t)=>{const r=t?.context?String(t.context):"standalone";let c;if(r==="formatting"&&e.formattingValues){const g=e.defaultFormattingWidth||e.defaultWidth,v=t?.width?String(t.width):g;c=e.formattingValues[v]||e.formattingValues[g]}else{const g=e.defaultWidth,v=t?.width?String(t.width):e.defaultWidth;c=e.values[v]||e.values[g]}const h=e.argumentCallback?e.argumentCallback(n):n;return c[h]}}const gS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vS={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"]},yS={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"]},bS={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"}},wS={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"}},xS=(e,n)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},CS={ordinalNumber:xS,era:Gl({values:gS,defaultWidth:"wide"}),quarter:Gl({values:mS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gl({values:vS,defaultWidth:"wide"}),day:Gl({values:yS,defaultWidth:"wide"}),dayPeriod:Gl({values:bS,defaultWidth:"wide",formattingValues:wS,defaultFormattingWidth:"wide"})};function ql(e){return(n,t={})=>{const r=t.width,c=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],h=n.match(c);if(!h)return null;const g=h[0],v=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(v)?_S(v,l=>l.test(g)):kS(v,l=>l.test(g));let f;f=e.valueCallback?e.valueCallback(s):s,f=t.valueCallback?t.valueCallback(f):f;const a=n.slice(g.length);return{value:f,rest:a}}}function kS(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function _S(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function AS(e){return(n,t={})=>{const r=n.match(e.matchPattern);if(!r)return null;const c=r[0],h=n.match(e.parsePattern);if(!h)return null;let g=e.valueCallback?e.valueCallback(h[0]):h[0];g=t.valueCallback?t.valueCallback(g):g;const v=n.slice(c.length);return{value:g,rest:v}}}const $S=/^(\d+)(th|st|nd|rd)?/i,SS=/\d+/i,TS={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},ES={any:[/^b/i,/^(a|c)/i]},MS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IS={any:[/1/i,/2/i,/3/i,/4/i]},RS={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},LS={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]},OS={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},NS={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]},DS={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},PS={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}},zS={ordinalNumber:AS({matchPattern:$S,parsePattern:SS,valueCallback:e=>parseInt(e,10)}),era:ql({matchPatterns:TS,defaultMatchWidth:"wide",parsePatterns:ES,defaultParseWidth:"any"}),quarter:ql({matchPatterns:MS,defaultMatchWidth:"wide",parsePatterns:IS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ql({matchPatterns:RS,defaultMatchWidth:"wide",parsePatterns:LS,defaultParseWidth:"any"}),day:ql({matchPatterns:OS,defaultMatchWidth:"wide",parsePatterns:NS,defaultParseWidth:"any"}),dayPeriod:ql({matchPatterns:DS,defaultMatchWidth:"any",parsePatterns:PS,defaultParseWidth:"any"})},BS=ur("$",{code:"en-US",formatDistance:lS,formatLong:dS,formatRelative:pS,localize:CS,match:zS,options:{weekStartsOn:0,firstWeekContainsDate:1}});function FS(e,n){const t=li(e,n?.in);return rS(t,sS(t))+1}function Fv(e,n){const t=li(e,n?.in),r=+Vl(t)-+iS(t);return Math.round(r/Nv)+1}function wd(e,n){const t=li(e,n?.in),r=t.getFullYear(),c=Ga(),h=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??c.firstWeekContainsDate??c.locale?.options?.firstWeekContainsDate??1,g=qo(n?.in||e,0);g.setFullYear(r+1,0,h),g.setHours(0,0,0,0);const v=qa(g,n),s=qo(n?.in||e,0);s.setFullYear(r,0,h),s.setHours(0,0,0,0);const f=qa(s,n);return+t>=+v?r+1:+t>=+f?r:r-1}function jS(e,n){const t=Ga(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,c=wd(e,n),h=qo(n?.in||e,0);return h.setFullYear(c,0,r),h.setHours(0,0,0,0),qa(h,n)}function jv(e,n){const t=li(e,n?.in),r=+qa(t,n)-+jS(t,n);return Math.round(r/Nv)+1}function _n(e,n){const t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}const Ns={y(e,n){const t=e.getFullYear(),r=t>0?t:1-t;return _n(n==="yy"?r%100:r,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):_n(t+1,2)},d(e,n){return _n(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(e,n){return _n(e.getHours()%12||12,n.length)},H(e,n){return _n(e.getHours(),n.length)},m(e,n){return _n(e.getMinutes(),n.length)},s(e,n){return _n(e.getSeconds(),n.length)},S(e,n){const t=n.length,r=e.getMilliseconds(),c=Math.trunc(r*Math.pow(10,t-3));return _n(c,n.length)}},Ya={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wv={G:function(e,n,t){const r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const r=e.getFullYear(),c=r>0?r:1-r;return t.ordinalNumber(c,{unit:"year"})}return Ns.y(e,n)},Y:function(e,n,t,r){const c=wd(e,r),h=c>0?c:1-c;if(n==="YY"){const g=h%100;return _n(g,2)}return n==="Yo"?t.ordinalNumber(h,{unit:"year"}):_n(h,n.length)},R:function(e,n){const t=Pv(e);return _n(t,n.length)},u:function(e,n){const t=e.getFullYear();return _n(t,n.length)},Q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return _n(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return _n(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){const r=e.getMonth();switch(n){case"M":case"MM":return Ns.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){const r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return _n(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){const c=jv(e,r);return n==="wo"?t.ordinalNumber(c,{unit:"week"}):_n(c,n.length)},I:function(e,n,t){const r=Fv(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):_n(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):Ns.d(e,n)},D:function(e,n,t){const r=FS(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):_n(r,n.length)},E:function(e,n,t){const r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){const c=e.getDay(),h=(c-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(h);case"ee":return _n(h,2);case"eo":return t.ordinalNumber(h,{unit:"day"});case"eee":return t.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(c,{width:"short",context:"formatting"});default:return t.day(c,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){const c=e.getDay(),h=(c-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(h);case"cc":return _n(h,n.length);case"co":return t.ordinalNumber(h,{unit:"day"});case"ccc":return t.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(c,{width:"narrow",context:"standalone"});case"cccccc":return t.day(c,{width:"short",context:"standalone"});default:return t.day(c,{width:"wide",context:"standalone"})}},i:function(e,n,t){const r=e.getDay(),c=r===0?7:r;switch(n){case"i":return String(c);case"ii":return _n(c,n.length);case"io":return t.ordinalNumber(c,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){const r=e.getHours();let c;switch(r===12?c=Ya.noon:r===0?c=Ya.midnight:c=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(c,{width:"narrow",context:"formatting"});default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(e,n,t){const r=e.getHours();let c;switch(r>=17?c=Ya.evening:r>=12?c=Ya.afternoon:r>=4?c=Ya.morning:c=Ya.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(c,{width:"narrow",context:"formatting"});default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Ns.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):Ns.H(e,n)},K:function(e,n,t){const r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):_n(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):_n(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ns.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):Ns.s(e,n)},S:function(e,n){return Ns.S(e,n)},X:function(e,n,t){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Uv(r);case"XXXX":case"XX":return ca(r);default:return ca(r,":")}},x:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"x":return Uv(r);case"xxxx":case"xx":return ca(r);default:return ca(r,":")}},O:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Hv(r,":");default:return"GMT"+ca(r,":")}},z:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Hv(r,":");default:return"GMT"+ca(r,":")}},t:function(e,n,t){const r=Math.trunc(+e/1e3);return _n(r,n.length)},T:function(e,n,t){return _n(+e,n.length)}};function Hv(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=Math.trunc(r/60),h=r%60;return h===0?t+String(c):t+String(c)+n+_n(h,2)}function Uv(e,n){return e%60===0?(e>0?"-":"+")+_n(Math.abs(e)/60,2):ca(e,n)}function ca(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=_n(Math.trunc(r/60),2),h=_n(r%60,2);return t+c+n+h}const Vv=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},Gv=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},WS=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],r=t[1],c=t[2];if(!c)return Vv(e,n);let h;switch(r){case"P":h=n.dateTime({width:"short"});break;case"PP":h=n.dateTime({width:"medium"});break;case"PPP":h=n.dateTime({width:"long"});break;default:h=n.dateTime({width:"full"});break}return h.replace("{{date}}",Vv(r,n)).replace("{{time}}",Gv(c,n))},HS=ur("b",{p:Gv,P:WS}),US=/^D+$/,VS=/^Y+$/,GS=["D","DD","YY","YYYY"];function qv(e){return US.test(e)}function Yv(e){return VS.test(e)}function Kv(e,n,t){const r=qS(e,n,t);if(console.warn(r),GS.includes(e))throw new RangeError(r)}function qS(e,n,t){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const YS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JS=/^'([^]*?)'?$/,QS=/''/g,ZS=/[a-zA-Z]/;function ua(e,n,t){const r=Ga(),c=t?.locale??r.locale??BS,h=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=li(e,t?.in);if(!Bv(v))throw new RangeError("Invalid time value");let s=n.match(KS).map(a=>{const l=a[0];if(l==="p"||l==="P"){const u=HS[l];return u(a,c.formatLong)}return a}).join("").match(YS).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const l=a[0];if(l==="'")return{isToken:!1,value:XS(a)};if(Wv[l])return{isToken:!0,value:a};if(l.match(ZS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:a}});c.localize.preprocessor&&(s=c.localize.preprocessor(v,s));const f={firstWeekContainsDate:h,weekStartsOn:g,locale:c};return s.map(a=>{if(!a.isToken)return a.value;const l=a.value;(!t?.useAdditionalWeekYearTokens&&Yv(l)||!t?.useAdditionalDayOfYearTokens&&qv(l))&&Kv(l,n,String(e));const u=Wv[l[0]];return u(v,l,c.localize,f)}).join("")}function XS(e){const n=e.match(JS);return n?n[1].replace(QS,"'"):e}var Ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jv={exports:{}},Qv;function eT(){return Qv||(Qv=1,(function(e,n){(function(){var t="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var c=function(a,l,u){if(typeof a!="string"){c.original?c.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=l),c.modules[a]||(c.payloads[a]=u,c.modules[a]=null)};c.modules={},c.payloads={};var h=function(a,l,u){if(typeof l=="string"){var d=s(a,l);if(d!=null)return u&&u(),d}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var o=[],p=0,m=l.length;p<m;++p){var w=s(a,l[p]);if(w==null&&g.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},g=function(a,l){var u=h("",a,l);return u==null&&g.original?g.original.apply(this,arguments):u},v=function(a,l){if(l.indexOf("!")!==-1){var u=l.split("!");return v(a,u[0])+"!"+v(a,u[1])}if(l.charAt(0)=="."){var d=a.split("/").slice(0,-1).join("/");for(l=d+"/"+l;l.indexOf(".")!==-1&&o!=l;){var o=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},s=function(a,l){l=v(a,l);var u=c.modules[l];if(!u){if(u=c.payloads[l],typeof u=="function"){var d={},o={id:l,uri:"",exports:d,packaged:!0},p=function(w,x){return h(l,w,x)},m=u(p,d,o);d=m||o.exports,c.modules[l]=d,delete c.payloads[l]}u=c.modules[l]=d||u}return u};function f(a){var l=r;r[a]||(r[a]={}),l=r[a],(!l.define||!l.define.packaged)&&(c.original=l.define,l.define=c,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(g.original=l.require,l.require=g,l.require.packaged=!0)}f(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,r,c){function h(g,v,s){Object.defineProperty(g,v,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||h(String.prototype,"startsWith",function(g,v){return v=v||0,this.lastIndexOf(g,v)===v}),String.prototype.endsWith||h(String.prototype,"endsWith",function(g,v){var s=this;(v===void 0||v>s.length)&&(v=s.length),v-=g.length;var f=s.indexOf(g,v);return f!==-1&&f===v}),String.prototype.repeat||h(String.prototype,"repeat",function(g){for(var v="",s=this;g>0;)g&1&&(v+=s),(g>>=1)&&(s+=s);return v}),String.prototype.includes||h(String.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(g),s=1;s<arguments.length;s++){var f=arguments[s];f!=null&&Object.keys(f).forEach(function(a){v[a]=f[a]})}return v}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(v){return g[v]})}),Array.prototype.find||h(Array.prototype,"find",function(g){for(var v=this.length,s=arguments[1],f=0;f<v;f++){var a=this[f];if(g.call(s,a,f,this))return a}}),Array.prototype.findIndex||h(Array.prototype,"findIndex",function(g){for(var v=this.length,s=arguments[1],f=0;f<v;f++){var a=this[f];if(g.call(s,a,f,this))return f}}),Array.prototype.includes||h(Array.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Array.prototype.fill||h(Array.prototype,"fill",function(g){for(var v=this,s=v.length>>>0,f=arguments[1],a=f>>0,l=a<0?Math.max(s+a,0):Math.min(a,s),u=arguments[2],d=u===void 0?s:u>>0,o=d<0?Math.max(s+d,0):Math.min(d,s);l<o;)v[l]=g,l++;return v}),Array.of||h(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,r,c){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,r,c){r.deepCopy=function h(g){if(typeof g!="object"||!g)return g;var v;if(Array.isArray(g)){v=[];for(var s=0;s<g.length;s++)v[s]=h(g[s]);return v}if(Object.prototype.toString.call(g)!=="[object Object]")return g;v={};for(var s in g)v[s]=h(g[s]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,r,c){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,s){for(var f="";s>0;)s&1&&(f+=v),(s>>=1)&&(v+=v);return f};var h=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(h,"")},r.stringTrimRight=function(v){return v.replace(g,"")},r.copyObject=function(v){var s={};for(var f in v)s[f]=v[f];return s},r.copyArray=function(v){for(var s=[],f=0,a=v.length;f<a;f++)v[f]&&typeof v[f]=="object"?s[f]=this.copyObject(v[f]):s[f]=v[f];return s},r.deepCopy=t("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var s={},f=0;f<v.length;f++)s[v[f]]=1;return s},r.createMap=function(v){var s=Object.create(null);for(var f in v)s[f]=v[f];return s},r.arrayRemove=function(v,s){for(var f=0;f<=v.length;f++)s===v[f]&&v.splice(f,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(v,s){var f=[];return v.replace(s,function(a){f.push({offset:arguments[arguments.length-2],length:a.length})}),f},r.deferredCall=function(v){var s=null,f=function(){s=null,v()},a=function(l){return a.cancel(),s=setTimeout(f,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),v(),a},a.cancel=function(){return clearTimeout(s),s=null,a},a.isPending=function(){return s},a},r.delayedCall=function(v,s){var f=null,a=function(){f=null,v()},l=function(u){f==null&&(f=setTimeout(a,u||s))};return l.delay=function(u){f&&clearTimeout(f),f=setTimeout(a,u||s)},l.schedule=l,l.call=function(){this.cancel(),v()},l.cancel=function(){f&&clearTimeout(f),f=null},l.isPending=function(){return f},l},r.sleep=function(v){return new Promise(function(s){setTimeout(s,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,s,f){return f&&v.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,r,c){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 h=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),v=h.userAgent||"",s=h.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!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(t,r,c){var h=t("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function u(d,o,p){if(typeof d=="string"&&d){var m=document.createTextNode(d);return o&&o.appendChild(m),m}if(!Array.isArray(d))return d&&d.appendChild&&o&&o.appendChild(d),d;if(typeof d[0]!="string"||!d[0]){for(var w=[],x=0;x<d.length;x++){var R=u(d[x],o,p);R&&w.push(R)}return w}var T=document.createElement(d[0]),_=d[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<d.length;x++)u(d[x],T,p);return C==2&&Object.keys(_).forEach(function(P){var O=_[P];P==="class"?T.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||P=="value"||P[0]=="$"?T[P]=O:P==="ref"?p&&(p[O]=T):P==="style"?typeof O=="string"&&(T.style.cssText=O):O!=null&&T.setAttribute(P,O)}),o&&o.appendChild(T),T},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,d){return document.createElementNS?document.createElementNS(d||g,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,d){var o=d?d.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var d=u?u.ownerDocument:document;return d.createDocumentFragment()},r.hasCssClass=function(u,d){var o=(u.className+"").split(/\s+/g);return o.indexOf(d)!==-1},r.addCssClass=function(u,d){r.hasCssClass(u,d)||(u.className+=" "+d)},r.removeCssClass=function(u,d){for(var o=u.className.split(/\s+/g);;){var p=o.indexOf(d);if(p==-1)break;o.splice(p,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,d){for(var o=u.className.split(/\s+/g),p=!0;;){var m=o.indexOf(d);if(m==-1)break;p=!1,o.splice(m,1)}return p&&o.push(d),u.className=o.join(" "),p},r.setCssClass=function(u,d,o){o?r.addCssClass(u,d):r.removeCssClass(u,d)},r.hasCssString=function(u,d){var o=0,p;if(d=d||document,p=d.querySelectorAll("style")){for(;o<p.length;)if(p[o++].id===u)return!0}},r.removeElementById=function(u,d){d=d||document,d.getElementById(u)&&d.getElementById(u).remove()};var v,s=[];r.useStrictCSP=function(u){v=u,u==!1?f():s||(s=[])};function f(){var u=s;s=null,u&&u.forEach(function(d){a(d[0],d[1])})}function a(u,d,o){if(!(typeof document>"u")){if(s){if(o)f();else if(o===!1)return s.push([u,d])}if(!v){var p=o;!o||!o.getRootNode?p=document:(p=o.getRootNode(),(!p||p==o)&&(p=document));var m=p.ownerDocument||p;if(d&&r.hasCssString(d,p))return null;d&&(u+=`
11
+ /*# sourceURL=ace/css/`+d+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(u)),d&&(w.id=d),p==m&&(p=r.getDocumentHead(m)),p.insertBefore(w,p.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(u,d){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(d))},r.$fixPositionBug=function(u){var d=u.getBoundingClientRect();if(u.style.left){var o=parseFloat(u.style.left),p=+d.left;Math.abs(o-p)>1&&(u.style.left=2*o-p+"px")}if(u.style.right){var o=parseFloat(u.style.right),p=window.innerWidth-d.right;Math.abs(o-p)>1&&(u.style.right=2*o-p+"px")}if(u.style.top){var o=parseFloat(u.style.top),p=+d.top;Math.abs(o-p)>1&&(u.style.top=2*o-p+"px")}if(u.style.bottom){var o=parseFloat(u.style.bottom),p=window.innerHeight-d.bottom;Math.abs(o-p)>1&&(u.style.bottom=2*o-p+"px")}},r.scrollbarWidth=function(u){var d=r.createElement("ace_inner");d.style.width="100%",d.style.minWidth="0px",d.style.height="200px",d.style.display="block";var o=r.createElement("ace_outer"),p=o.style;p.position="absolute",p.left="-10000px",p.overflow="hidden",p.width="200px",p.minWidth="0px",p.height="150px",p.display="block",o.appendChild(d);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=d.offsetWidth;p.overflow="scroll";var x=d.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(u,d){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,d,o){u[d]!==o&&(u[d]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=h.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,h.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),!h.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,d,o){u.style.transform="translate("+Math.round(d)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,d,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(d)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,r,c){var h=t("./dom");r.get=function(g,v){var s=new XMLHttpRequest;s.open("GET",g,!0),s.onreadystatechange=function(){s.readyState===4&&v(s.responseText)},s.send(null)},r.loadScript=function(g,v){var s=h.getDocumentHead(),f=document.createElement("script");f.src=g,s.appendChild(f),f.onload=f.onreadystatechange=function(a,l){(l||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,l||v())}},r.qualifyURL=function(g){var v=document.createElement("a");return v.href=g,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,r,c){r.inherits=function(h,g){h.super_=g,h.prototype=Object.create(g.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(h,g){for(var v in g)h[v]=g[v];return h},r.implement=function(h,g){r.mixin(h,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,r,c){var h={},g=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};h._emit=h._dispatchEvent=function(s,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[s]||[],l=this._defaultHandlers[s];if(!(!a.length&&!l)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=s),f.stopPropagation||(f.stopPropagation=g),f.preventDefault||(f.preventDefault=v),a=a.slice();for(var u=0;u<a.length&&(a[u](f,this),!f.propagationStopped);u++);if(l&&!f.defaultPrevented)return l(f,this)}},h._signal=function(s,f){var a=(this._eventRegistry||{})[s];if(a){a=a.slice();for(var l=0;l<a.length;l++)a[l](f,this)}},h.once=function(s,f){var a=this;if(this.on(s,function l(){a.off(s,l),f.apply(null,arguments)}),!f)return new Promise(function(l){f=l})},h.setDefaultHandler=function(s,f){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[s]){var l=a[s],u=a._disabled_[s];u||(a._disabled_[s]=u=[]),u.push(l);var d=u.indexOf(f);d!=-1&&u.splice(d,1)}a[s]=f},h.removeDefaultHandler=function(s,f){var a=this._defaultHandlers;if(a){var l=a._disabled_[s];if(a[s]==f)l&&this.setDefaultHandler(s,l.pop());else if(l){var u=l.indexOf(f);u!=-1&&l.splice(u,1)}}},h.on=h.addEventListener=function(s,f,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[s];return l||(l=this._eventRegistry[s]=[]),l.indexOf(f)==-1&&l[a?"unshift":"push"](f),f},h.off=h.removeListener=h.removeEventListener=function(s,f){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[s];if(a){var l=a.indexOf(f);l!==-1&&a.splice(l,1)}},h.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},r.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,r,c){r.reportError=function(h,g){var v=new Error(h);v.data=g,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,r,c){var h={"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=h}),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(t,r,c){"no use strict";var h=t("./oop"),g=t("./event_emitter").EventEmitter,v=t("./report_error").reportError,s=t("./default_english_messages").defaultEnglishMessages,f={setOptions:function(o){Object.keys(o).forEach(function(p){this.setOption(p,o[p])},this)},getOptions:function(o){var p={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){p[w]=this.getOption(w)},this),p},setOption:function(o,p){if(this["$"+o]!==p){var m=this.$options[o];if(!m)return a('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,p);m.handlesSet||(this["$"+o]=p),m&&m.set&&m.set.call(this,p)}},getOption:function(o){var p=this.$options[o];return p?p.forwardTo?this[p.forwardTo]&&this[p.forwardTo].getOption(o):p&&p.get?p.get.call(this):this["$"+o]:a('misspelled option "'+o+'"')}};function a(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,u,d=(function(){function o(){this.$defaultOptions={},l=s,u="dollarSigns"}return o.prototype.defineOptions=function(p,m,w){return p.$options||(this.$defaultOptions[m]=p.$options={}),Object.keys(w).forEach(function(x){var R=w[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),p.$options[R.name]=R,"initialValue"in R&&(p["$"+R.name]=R.initialValue)}),h.implement(p,f),this},o.prototype.resetOptions=function(p){Object.keys(p.$options).forEach(function(m){var w=p.$options[m];"value"in w&&p.setOption(m,w.value)})},o.prototype.setDefaultValue=function(p,m,w){if(!p){for(p in this.$defaultOptions)if(this.$defaultOptions[p][m])break;if(!this.$defaultOptions[p][m])return!1}var x=this.$defaultOptions[p]||(this.$defaultOptions[p]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(p,m){Object.keys(m).forEach(function(w){this.setDefaultValue(p,w,m[w])},this)},o.prototype.setMessages=function(p,m){l=p,m&&m.placeholders&&(u=m.placeholders)},o.prototype.nls=function(p,m,w){l[p]||(a("No message found for the key '"+p+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+m+"'."),l[m]||a("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=l[p]||l[m]||m;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,T){return T=="$"?"$":w[T]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,T){return w[T]}))),x},o})();d.prototype.warn=a,d.prototype.reportError=v,h.implement(d.prototype,g),r.AppConfig=d}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,r,c){c.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,r,c){r.isDark=!1,r.cssClass="ace-tm",r.cssText=t("./textmate-css"),r.$id="ace/theme/textmate";var h=t("../lib/dom");h.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(t,r,c){"no use strict";var h=t("./lib/lang"),g=t("./lib/net"),v=t("./lib/dom"),s=t("./lib/app_config").AppConfig;c.exports=r=new s;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(d){if(!f.hasOwnProperty(d))throw new Error("Unknown config key: "+d);return f[d]},r.set=function(d,o){if(f.hasOwnProperty(d))f[d]=o;else if(this.setDefaultValue("",d,o)==!1)throw new Error("Unknown config key: "+d);d=="useStrictCSP"&&v.useStrictCSP(o)},r.all=function(){return h.copyObject(f)},r.$modes={},r.moduleUrl=function(d,o){if(f.$moduleUrls[d])return f.$moduleUrls[d];var p=d.split("/");o=o||p[p.length-2]||"";var m=o=="snippets"?"/":"-",w=p[p.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&p.length>1&&(w=p[p.length-2]);var R=f[o+"Path"];return R==null?R=f.basePath:m=="/"&&(o=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+o+m+w+this.get("suffix")},r.setModuleUrl=function(d,o){return f.$moduleUrls[d]=o};var a=function(d,o){if(d==="ace/theme/textmate"||d==="./theme/textmate")return o(null,t("./theme/textmate"));if(l)return l(d,o);console.error("loader is not configured")},l;r.setLoader=function(d){l=d},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(d,o){var p;if(Array.isArray(d))var m=d[0],w=d[1];else if(typeof d=="string")var w=d;var x=function(R){if(R&&!r.$loading[w])return o&&o(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){a(w,function(_,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var P=r.$loading[w];r.$loading[w]=null,P.forEach(function(O){O&&O(C)})})};if(!r.get("packaged"))return T();g.loadScript(r.moduleUrl(w,m),T),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?x(R.default):x(R)});else{try{p=this.$require(w)}catch{}x(p||r.$loaded[w])}},r.$require=function(d){if(typeof c.require=="function"){var o="require";return c[o](d)}},r.setModuleLoader=function(d,o){r.dynamicModules[d]=o};var u=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.45.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,r,c){t("./lib/fixoldbrowsers");var h=t("./config");h.setLoader(function(f,a){t([f],function(l){a(null,l)})});var g=(function(){return this||typeof window<"u"&&window})();c.exports=function(f){h.init=v,h.$require=t,f.require=t},v(!0);function v(f){if(!(!g||!g.document)){h.set("packaged",f||t.packaged||c.packaged||g.define&&(void 0).packaged);var a={},l="",u=document.currentScript||document._currentScript,d=u&&u.ownerDocument||document;u&&u.src&&(l=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=d.getElementsByTagName("script"),p=0;p<o.length;p++){var m=o[p],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,R=0,T=x.length;R<T;R++){var _=x[R];_.name.indexOf("data-ace-")===0&&(a[s(_.name.replace(/^data-ace-/,""))]=_.value)}var C=w.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 P in a)typeof a[P]<"u"&&h.set(P,a[P])}}function s(f){return f.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,r,c){var h=(function(){function g(v,s,f,a){this.start={row:v,column:s},this.end={row:f,column:a}}return g.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(v,s){return this.compare(v,s)==0},g.prototype.compareRange=function(v){var s,f=v.end,a=v.start;return s=this.compare(f.row,f.column),s==1?(s=this.compare(a.row,a.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(a.row,a.column),s==-1?-1:s==1?42:0)},g.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},g.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},g.prototype.intersects=function(v){var s=this.compareRange(v);return s==-1||s==0||s==1},g.prototype.isEnd=function(v,s){return this.end.row==v&&this.end.column==s},g.prototype.isStart=function(v,s){return this.start.row==v&&this.start.column==s},g.prototype.setStart=function(v,s){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=s)},g.prototype.setEnd=function(v,s){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=s)},g.prototype.inside=function(v,s){return this.compare(v,s)==0?!(this.isEnd(v,s)||this.isStart(v,s)):!1},g.prototype.insideStart=function(v,s){return this.compare(v,s)==0?!this.isEnd(v,s):!1},g.prototype.insideEnd=function(v,s){return this.compare(v,s)==0?!this.isStart(v,s):!1},g.prototype.compare=function(v,s){return!this.isMultiLine()&&v===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?s>=this.start.column?0:-1:this.end.row===v?s<=this.end.column?0:1:0},g.prototype.compareStart=function(v,s){return this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},g.prototype.compareEnd=function(v,s){return this.end.row==v&&this.end.column==s?1:this.compare(v,s)},g.prototype.compareInside=function(v,s){return this.end.row==v&&this.end.column==s?1:this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},g.prototype.clipRows=function(v,s){if(this.end.row>s)var f={row:s+1,column:0};else if(this.end.row<v)var f={row:v,column:0};if(this.start.row>s)var a={row:s+1,column:0};else if(this.start.row<v)var a={row:v,column:0};return g.fromPoints(a||this.start,f||this.end)},g.prototype.extend=function(v,s){var f=this.compare(v,s);if(f==0)return this;if(f==-1)var a={row:v,column:s};else var l={row:v,column:s};return g.fromPoints(a||this.start,l||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(v){var s=v.documentToScreenPosition(this.start),f=v.documentToScreenPosition(this.end);return new g(s.row,s.column,f.row,f.column)},g.prototype.moveBy=function(v,s){this.start.row+=v,this.start.column+=s,this.end.row+=v,this.end.column+=s},g})();h.fromPoints=function(g,v){return new h(g.row,g.column,v.row,v.column)},h.comparePoints=function(g,v){return g.row-v.row||g.column-v.column},r.Range=h}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,r,c){for(var h=t("./oop"),g={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:"*"}},v={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},s=0;s<10;s++)v["Digit"+s]=48+s,v["Numpad"+s]=96+s,g.PRINTABLE_KEYS[48+s]=""+s,g.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var f=String.fromCharCode(s+32);v["Key"+f.toUpperCase()]=s,g.PRINTABLE_KEYS[s]=f}for(var s=1;s<13;s++)v["F"+s]=111+s,g.FUNCTION_KEYS[111+s]="F"+s;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var l in a)v[l]=v[l+"Left"]=v[l+"Right"]=a[l];r.$codeToKeyCode=v,g.PRINTABLE_KEYS[173]="-";for(var u in g.FUNCTION_KEYS){var d=g.FUNCTION_KEYS[u].toLowerCase();g[d]=parseInt(u,10)}for(var u in g.PRINTABLE_KEYS){var d=g.PRINTABLE_KEYS[u].toLowerCase();g[d]=parseInt(u,10)}h.mixin(g,g.MODIFIER_KEYS),h.mixin(g,g.PRINTABLE_KEYS),h.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],p=Math.pow(2,o.length);p--;)g.KEY_MODS[p]=o.filter(function(m){return p&g.KEY_MODS[m]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",h.mixin(r,g),r.default=r,r.keyCodeToString=function(o){var p=g[o];return typeof p!="string"&&(p=String.fromCharCode(o)),p.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,c){var h=t("./keys"),g=t("./useragent"),v=null,s=0,f;function a(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function l(){return f==null&&a(),f}function u(R,T,_){this.elem=R,this.type=T,this.callback=_}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=r.addListener=function(R,T,_,C){R.addEventListener(T,_,l()),C&&C.$toDestroy.push(new u(R,T,_))},o=r.removeListener=function(R,T,_){R.removeEventListener(T,_,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"||g.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,T,_){var C=R&&R.ownerDocument||document;function P(O){T&&T(O),_&&_(O),o(C,"mousemove",T),o(C,"mouseup",P),o(C,"dragstart",P)}return d(C,"mousemove",T),d(C,"mouseup",P),d(C,"dragstart",P),P},r.addMouseWheelListener=function(R,T,_){d(R,"wheel",function(C){var P=.15,O=C.deltaX||0,E=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=O*P,C.wheelY=E*P;break;case C.DOM_DELTA_LINE:var k=15;C.wheelX=O*k,C.wheelY=E*k;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=O*B,C.wheelY=E*B;break}T(C)},_)},r.addMultiMouseDownListener=function(R,T,_,C,P){var O=0,E,k,B,N={2:"dblclick",3:"tripleclick",4:"quadclick"};function I($){if(r.getButton($)!==0?O=0:$.detail>1?(O++,O>4&&(O=1)):O=1,g.isIE){var A=Math.abs($.clientX-E)>5||Math.abs($.clientY-k)>5;(!B||A)&&(O=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},T[O-1]||600),O==1&&(E=$.clientX,k=$.clientY)}if($._clicks=O,_[C]("mousedown",$),O>4)O=0;else if(O>1)return _[C](N[O],$)}Array.isArray(R)||(R=[R]),R.forEach(function($){d($,"mousedown",I,P)})};function p(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return h.KEY_MODS[p(R)]};function m(R,T,_){var C=p(T);if(!_&&T.code&&(_=h.$codeToKeyCode[T.code]||_),!g.isMac&&v){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(_===18||_===17){var P=T.location;if(_===17&&P===1)v[_]==1&&(s=T.timeStamp);else if(_===18&&C===3&&P===2){var O=T.timeStamp-s;O<50&&(v.altGr=!0)}}}if(_ in h.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&T.location===3&&(R(T,C,-_),T.defaultPrevented))){if(g.isChromeOS&&C&8){if(R(T,C,_),T.defaultPrevented)return;C&=-9}return!C&&!(_ in h.FUNCTION_KEYS)&&!(_ in h.PRINTABLE_KEYS)?!1:R(T,C,_)}}r.addCommandKeyListener=function(R,T,_){var C=null;d(R,"keydown",function(P){v[P.keyCode]=(v[P.keyCode]||0)+1;var O=m(T,P,P.keyCode);return C=P.defaultPrevented,O},_),d(R,"keypress",function(P){C&&(P.ctrlKey||P.altKey||P.shiftKey||P.metaKey)&&(r.stopEvent(P),C=null)},_),d(R,"keyup",function(P){v[P.keyCode]=null},_),v||(w(),d(window,"focus",w))};function w(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(R,T){T=T||window;var _="zero-timeout-message-"+x++,C=function(P){P.data==_&&(r.stopPropagation(P),o(T,"message",C),R())};d(T,"message",C),T.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,T){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):R()},T)},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(t,r,c){var h;c.exports={lineMode:!1,pasteCancelled:function(){return h&&h>Date.now()-50?!0:h=!1},cancel:function(){h=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(t,r,c){var h=t("../lib/event"),g=t("../config").nls,v=t("../lib/useragent"),s=t("../lib/dom"),f=t("../lib/lang"),a=t("../clipboard"),l=v.isChrome<18,u=v.isIE,d=v.isChrome>63,o=400,p=t("../lib/keys"),m=p.KEY_MODS,w=v.isIOS,x=w?/\s/:/\n/,R=v.isMobile,T=(function(){function _(C,P){var O=this;this.host=P,this.text=s.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"}),h.addListener(this.text,"blur",function(E){O.ignoreFocusEvents||(P.onBlur(E),O.$isFocused=!1)},P),h.addListener(this.text,"focus",function(E){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}P.onFocus(E),v.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},P),this.$focusScroll=!1,P.on("beforeEndOperation",function(){var E=P.curOp,k=E&&E.command&&E.command.name;if(k!="insertstring"){var B=k&&(E.docChanged||E.selectionChanged);O.inComposition&&B&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.resetSelection()}}),P.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&P.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,h.addCommandKeyListener(this.text,function(E,k,B){if(!O.inComposition)return P.onCommandKey(E,k,B)},P),h.addListener(this.text,"select",this.onSelect.bind(this),P),h.addListener(this.text,"input",this.onInput.bind(this),P),h.addListener(this.text,"cut",this.onCut.bind(this),P),h.addListener(this.text,"copy",this.onCopy.bind(this),P),h.addListener(this.text,"paste",this.onPaste.bind(this),P),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&h.addListener(C,"keydown",function(E){if(!(v.isMac&&!E.metaKey||!E.ctrlKey))switch(E.keyCode){case 67:O.onCopy(E);break;case 86:O.onPaste(E);break;case 88:O.onCut(E);break}},P),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),h.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),P),h.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),P),h.addListener(this.text,"keyup",this.onKeyup.bind(this),P),h.addListener(this.text,"keydown",this.syncComposition.bind(this),P),h.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),P),this.closeTimeout,h.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),P),h.addListener(this.text,"mousedown",function(E){E.preventDefault(),O.onContextMenuClose()},P),h.addListener(P.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),P),h.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),P),w&&this.addIosSelectionHandler(C,P,this.text)}return _.prototype.addIosSelectionHandler=function(C,P,O){var E=this,k=null,B=!1;O.addEventListener("keydown",function(I){k&&clearTimeout(k),B=!0},!0),O.addEventListener("keyup",function(I){k=setTimeout(function(){B=!1},100)},!0);var N=function(I){if(document.activeElement===O&&!(B||E.inComposition||P.$mouseHandler.isMousePressed)&&!E.copied){var $=O.selectionStart,A=O.selectionEnd,D=null,j=0;if($==0?D=p.up:$==1?D=p.home:A>E.lastSelectionEnd&&E.lastValue[A]==`
170
+ `?D=p.end:$<E.lastSelectionStart&&E.lastValue[$-1]==" "?(D=p.left,j=m.option):$<E.lastSelectionStart||$==E.lastSelectionStart&&E.lastSelectionEnd!=E.lastSelectionStart&&$==A?D=p.left:A>E.lastSelectionEnd&&E.lastValue.slice(0,A).split(`
171
+ `).length>2?D=p.down:A>E.lastSelectionEnd&&E.lastValue[A-1]==" "?(D=p.right,j=m.option):(A>E.lastSelectionEnd||A==E.lastSelectionEnd&&E.lastSelectionEnd!=E.lastSelectionStart&&$==A)&&(D=p.right),$!==A&&(j|=m.shift),D){var U=P.onCommandKey({},j,D);if(!U&&P.commands){D=p.keyCodeToString(D);var q=P.commands.findKeyCommand(j,D);q&&P.execCommand(q)}E.lastSelectionStart=$,E.lastSelectionEnd=A,E.resetSelection("")}}};document.addEventListener("selectionchange",N),P.on("destroy",function(){document.removeEventListener("selectionchange",N)})},_.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)},_.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},_.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()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.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 P=this.host.getSelectionRange();P.end.row=P.start.row,P.end.column=P.start.column,this.inComposition.markerRange=P,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()))}},_.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)}}},_.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())},_.prototype.onCut=function(C){this.doCopy(C,!0)},_.prototype.onCopy=function(C){this.doCopy(C,!1)},_.prototype.onPaste=function(C){var P=this.handleClipboardData(C);a.pasteCancelled()||(typeof P=="string"?(P&&this.host.onPaste(P,C),v.isIE&&setTimeout(this.resetSelection),h.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,P){var O=this,E=this.host.getCopyText();if(!E)return h.preventDefault(C);this.handleClipboardData(C,E)?(w&&(this.resetSelection(E),this.copied=E,setTimeout(function(){O.copied=!1},10)),P?this.host.onCut():this.host.onCopy(),h.preventDefault(C)):(this.copied=!0,this.text.value=E,this.text.select(),setTimeout(function(){O.copied=!1,O.resetSelection(),P?O.host.onCut():O.host.onCopy()}))},_.prototype.handleClipboardData=function(C,P,O){var E=C.clipboardData||window.clipboardData;if(!(!E||l)){var k=u||O?"Text":"text/plain";try{return P?E.setData(k,P)!==!1:E.getData(k)}catch(B){if(!O)return this.handleClipboardData(B,P,!0)}}},_.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 P=this.text.value,O=this.sendText(P,!0);(P.length>o+100||x.test(O)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.prototype.sendText=function(C,P){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var O=this.text.selectionStart,E=this.text.selectionEnd,k=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,N=C,I=C.length-O,$=C.length-E,A=0;k>0&&this.lastValue[A]==C[A];)A++,k--;for(N=N.slice(A),A=1;B>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,B--;I-=A-1,$-=A-1;var D=N.length-A+1;if(D<0&&(k=-D,D=0),N=N.slice(0,D),!P&&!N&&!I&&!k&&!B&&!$)return"";this.sendingText=!0;var j=!1;return v.isAndroid&&N==". "&&(N=" ",j=!0),N&&!k&&!B&&!I&&!$||this.commandMode?this.host.onTextInput(N):this.host.onTextInput(N,{extendLeft:k,extendRight:B,restoreStart:I,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=O,this.lastSelectionEnd=E,this.lastRestoreEnd=$,j?`
172
+ `:N},_.prototype.onSelect=function(C){var P=this;if(!this.inComposition){var O=function(E){return E.selectionStart===0&&E.selectionEnd>=P.lastValue.length&&E.value===P.lastValue&&P.lastValue&&E.selectionEnd!==P.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var P=`
173
+ ab`+C+`cde fg
174
+ `;P!=this.text.value&&(this.text.value=this.lastValue=P);var O=4,E=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=E)&&this.text.setSelectionRange(O,E),this.lastSelectionStart=O,this.lastSelectionEnd=E}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var P=0,O=0,E="",k=function(q,Q){for(var re=Q,le=1;le<=q-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)re+=C.host.session.getLine(q-le).length+1;return re};if(this.host.session){var B=this.host.selection,N=B.getRange(),I=B.cursor.row;I===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):I===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(I<this.rowStart-1||I>this.rowEnd+1)&&(this.rowStart=I>this.numberOfExtraLines?I-this.numberOfExtraLines:0,this.rowEnd=I>this.numberOfExtraLines?I+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],A=this.rowStart;A<=this.rowEnd;A++)$.push(this.host.session.getLine(A));if(E=$.join(`
175
+ `),P=k(N.start.row,N.start.column),O=k(N.end.row,N.end.column),N.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);P=N.start.row<this.rowStart-1?0:P,O+=D.length+1,E=D+`
176
+ `+E}else if(N.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);O=N.end.row>this.rowEnd+1?j.length:N.end.column,O+=E.length+1,E=E+`
177
+ `+j}else R&&I>0&&(E=`
178
+ `+E,O+=1,P+=1);E.length>o&&(P<o&&O<o?E=E.slice(0,o):(E=`
179
+ `,P==O?P=O=0:(P=0,O=1)));var U=E+`
180
+
181
+ `;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!=O||this.lastSelectionStart!=P||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(P,O),this.lastSelectionStart=P,this.lastSelectionEnd=O}catch{}this.inComposition=!1}},_.prototype.setHost=function(C){this.host=C},_.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},_.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var P=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[P+1])}this.text.setAttribute("aria-label",C)},_.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",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||d||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var P=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var O=this.text.getBoundingClientRect().top!=0}catch{return}var E=[];if(O)for(var k=this.text.parentElement;k&&k.nodeType==1;)E.push(k),k.setAttribute("ace_nocontext","true"),!k.parentElement&&k.getRootNode?k=k.getRootNode().host:k=k.parentElement;this.text.focus({preventScroll:!0}),O&&E.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=P)},0)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(C){this.inputHandler=C},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},_.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},_.prototype.setCopyWithEmptySelection=function(C){},_.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},_.prototype.moveToMouse=function(C,P){var O=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(P?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var E=this.host.container.getBoundingClientRect(),k=s.computedStyle(this.host.container),B=E.top+(parseInt(k.borderTopWidth)||0),N=E.left+(parseInt(k.borderLeftWidth)||0),I=E.bottom-B-this.text.clientHeight-2,$=function(A){s.translate(O.text,A.clientX-N-2,Math.min(A.clientY-B-2,I))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&h.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=T,r.$setUserAgentForTests=function(_,C){R=_,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,c){var h=t("../lib/useragent"),g=0,v=550,s=(function(){function l(u){u.$clickSelection=null;var d=u.editor;d.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),d.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),d.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),d.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),d.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(p){u[p]=this[p]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return l.prototype.onMouseDown=function(u){var d=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var p=this.editor,m=u.getButton();if(m!==0){var w=p.getSelectionRange(),x=w.isEmpty();(x||m==1)&&p.selection.moveToPosition(o),m==2&&(p.textInput.onContextMenu(u.domEvent),h.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),d&&!p.isFocused()&&(p.focus(),this.$focusTimeout&&!this.$clickSelection&&!p.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},l.prototype.startSelect=function(u,d){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):d||o.selection.moveToPosition(u),d||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var u,d=this.editor,o=d.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var p=this.$clickSelection.comparePoint(o);if(p==-1)u=this.$clickSelection.end;else if(p==1)u=this.$clickSelection.start;else{var m=a(this.$clickSelection,o,d.session);o=m.cursor,u=m.anchor}d.selection.setSelectionAnchor(u.row,u.column)}d.selection.selectToPosition(o),d.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(u){var d,o=this.editor,p=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[u](p.row,p.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)d=this.$clickSelection.end,(m.end.row!=p.row||m.end.column!=p.column)&&(p=m.start);else if(x==1&&w>=0)d=this.$clickSelection.start,(m.start.row!=p.row||m.start.column!=p.column)&&(p=m.end);else if(w==-1&&x==1)p=m.end,d=m.start;else{var R=a(this.$clickSelection,p,o.session);p=R.cursor,d=R.anchor}o.selection.setSelectionAnchor(d.row,d.column)}o.selection.selectToPosition(p),o.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var u=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),d=Date.now();(u>g||d-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(u){var d=u.getDocumentPosition(),o=this.editor,p=o.session,m=p.getBracketRange(d);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(d.row,d.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},l.prototype.onTripleClick=function(u){var d=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var p=o.getSelectionRange();p.isMultiLine()&&p.contains(d.row,d.column)?(this.$clickSelection=o.selection.getLineRange(p.start.row),this.$clickSelection.end=o.selection.getLineRange(p.end.row).end):this.$clickSelection=o.selection.getLineRange(d.row),this.select()},l.prototype.onQuadClick=function(u){var d=this.editor;d.selectAll(),this.$clickSelection=d.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 d=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,p=u.domEvent.timeStamp,m=p-o.t,w=m?u.wheelX/m:o.vx,x=m?u.wheelY/m:o.vy;m<v&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var R=Math.abs(w/x),T=!1;if(R>=1&&d.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(T=!0),R<=1&&d.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(T=!0),T)o.allowed=p;else if(p-o.allowed<v){var _=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);_?(T=!0,o.allowed=p):o.allowed=0}if(o.t=p,o.vx=w,o.vy=x,T)return d.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},l})();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,r.DefaultHandlers=s;function f(l,u,d,o){return Math.sqrt(Math.pow(d-l,2)+Math.pow(o-u,2))}function a(l,u,d){if(l.start.row==l.end.row)var o=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 o=3*u.column-2*d.getLine(l.start.row).length;else var o=2*u.row-l.start.row-l.end.row;return o<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(t,r,c){var h=t("../lib/event"),g=t("../lib/useragent"),v=(function(){function s(f,a){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=a,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return s.prototype.stopPropagation=function(){h.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){h.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(f,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-l},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,a=f.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},s.prototype.getButton=function(){return h.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,c){r.preventParentScroll=function(h){h.stopPropagation();var g=h.currentTarget,v=g.scrollHeight>g.clientHeight;v||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,c){var h=this&&this.__extends||(function(){var p=function(m,w){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(x[T]=R[T])},p(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");p(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),g=this&&this.__values||function(p){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&p[m],x=0;if(w)return w.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&x>=p.length&&(p=void 0),{value:p&&p[x++],done:!p}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("./lib/dom");t("./lib/event");var s=t("./range").Range,f=t("./lib/scroll").preventParentScroll,a="ace_tooltip",l=(function(){function p(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return p.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(m){this.getElement().textContent=m},p.prototype.setHtml=function(m){this.getElement().innerHTML=m},p.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},p.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},p.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},p.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p})(),u=(function(){function p(){this.popups=[]}return p.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},p.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},p.prototype.updatePopups=function(){var m,w,x,R;this.popups.sort(function(N,I){return I.priority-N.priority});var T=[];try{for(var _=g(this.popups),C=_.next();!C.done;C=_.next()){var P=C.value,O=!0;try{for(var E=(x=void 0,g(T)),k=E.next();!k.done;k=E.next()){var B=k.value;if(this.doPopupsOverlap(B,P)){O=!1;break}}}catch(N){x={error:N}}finally{try{k&&!k.done&&(R=E.return)&&R.call(E)}finally{if(x)throw x.error}}O?T.push(P):P.hide()}}catch(N){m={error:N}}finally{try{C&&!C.done&&(w=_.return)&&w.call(_)}finally{if(m)throw m.error}}},p.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},p})(),d=new u;r.popupManager=d,r.Tooltip=l;var o=(function(p){h(m,p);function m(w){w===void 0&&(w=document.body);var x=p.call(this,w)||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",f),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,R=w.getDocumentPosition(),T=x.session.getLine(R.row);if(R.column==T.length){var _=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,R,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=w.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=s.fromPoints(x.start,x.end);var C=_.textToScreenCoordinates(x.start.row,x.start.column),P=_.scroller.getBoundingClientRect();C.pageX<P.left&&(C.pageX=P.left);var O=this.getElement();O.innerHTML="",O.appendChild(R),O.style.maxHeight="",O.style.display="block",this.$setPosition(w,C,!0,x),v.$fixPositionBug(O)}},m.prototype.$setPosition=function(w,x,R,T){var _=10;R&&this.addMarker(T,w.session);var C=w.renderer,P=this.getElement(),O=P.offsetHeight,E=P.offsetWidth,k=x.pageY,B=x.pageX,N=window.innerHeight-k-C.lineHeight,I=this.$shouldPlaceAbove(O,k,N-_);P.style.maxHeight=(I?k:N)-_+"px",P.style.top=I?"":k+C.lineHeight+"px",P.style.bottom=I?window.innerHeight-k+"px":"",P.style.left=Math.min(B,window.innerWidth-E-_)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,R){return!(x-w<0&&x<R)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m})(l);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,c){var h=this&&this.__extends||(function(){var o=function(p,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(p,m);function w(){this.constructor=p}p.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=this&&this.__values||function(o){var p=typeof Symbol=="function"&&Symbol.iterator,m=p&&o[p],w=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&w>=o.length&&(o=void 0),{value:o&&o[w++],done:!o}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("../lib/dom"),s=t("./mouse_event").MouseEvent,f=t("../tooltip").HoverTooltip,a=t("../config").nls,l=t("../range").Range;function u(o){var p=o.editor,m=p.renderer.$gutterLayer;o.$tooltip=new d(p),o.$tooltip.addToEditor(p),o.$tooltip.setDataProvider(function(w,x){var R=w.getDocumentPosition().row;o.$tooltip.showTooltip(R)}),o.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var R=w.getDocumentPosition().row,T=p.session.selection;if(w.getShiftKey())T.selectTo(R,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();o.$clickSelection=p.selection.getLineRange(R)}return o.setState("selectByLines"),o.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=u;var d=(function(o){h(p,o);function p(m){var w=o.call(this,m.container)||this;w.id="gt"+ ++p.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return p.prototype.onDomMouseMove=function(m){var w=new s(m,this.editor);this.onMouseMove(w,this.editor)},p.prototype.onDomMouseOut=function(m){var w=new s(m,this.editor);this.onMouseOut(w)},p.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,m)},p.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,m)},p.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(p,"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}),p.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,R=x.$annotations[m],T;R?T={displayText:Array.from(R.displayText),type:Array.from(R.type)}:T={displayText:[],type:[]};var _=x.session.getFoldLine(m);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},P={error:1,security:2,warning:3,info:4,hint:5},O,E=m+1;E<=_.end.row;E++)if(x.$annotations[E])for(var k=0;k<x.$annotations[E].text.length;k++){var B=x.$annotations[E].type[k];C[B].push(x.$annotations[E].text[k]),(!O||P[B]<P[O])&&(O=B)}if(["error","security","warning"].includes(O)){var N="".concat(p.annotationsToSummaryString(C)," in folded code.");T.displayText.push(N),T.type.push(O+"_fold")}}if(T.displayText.length===0)return this.hide();for(var I={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<T.displayText.length;E++){var A=v.createElement("span"),D=v.createElement("span");(w=D.classList).add.apply(w,["ace_".concat(T.type[E]),$]),D.setAttribute("aria-label","".concat(p.annotationLabels[T.type[E].replace("_fold","")].singular)),D.setAttribute("role","img"),D.appendChild(v.createTextNode(" ")),A.appendChild(D),A.appendChild(v.createTextNode(T.displayText[E])),A.appendChild(v.createElement("br")),I[T.type[E].replace("_fold","")].push(A)}var j=v.createElement("span");I.error.forEach(function(Q){return j.appendChild(Q)}),I.security.forEach(function(Q){return j.appendChild(Q)}),I.warning.forEach(function(Q){return j.appendChild(Q)}),I.info.forEach(function(Q){return j.appendChild(Q)}),I.hint.forEach(function(Q){return j.appendChild(Q)}),j.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var q=l.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,q,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},p.prototype.$setPosition=function(m,w,x,R){var T=this.$findCellByRow(R.start.row);if(T){var _=T&&T.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var P=C.getBoundingClientRect();if(P){var O={pageX:P.right,pageY:P.top};return o.prototype.$setPosition.call(this,m,O,!1,R)}}}},p.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},p.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},p.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},p.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,m)}},p.annotationsToSummaryString=function(m){var w,x,R=[],T=["error","security","warning","info","hint"];try{for(var _=g(T),C=_.next();!C.done;C=_.next()){var P=C.value;if(m[P].length){var O=m[P].length===1?p.annotationLabels[P].singular:p.annotationLabels[P].plural;R.push("".concat(m[P].length," ").concat(O))}}}catch(E){w={error:E}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(w)throw w.error}}return R.join(", ")},p.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},p})(f);d.$uid=0,r.GutterTooltip=d}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,c){var h=t("../lib/dom"),g=t("../lib/event"),v=t("../lib/useragent"),s=200,f=200,a=5;function l(d){var o=d.editor,p=h.createElement("div");p.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",p.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){d[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(d));var w=o.container,x,R,T,_,C,P,O=0,E,k,B,N,I;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ue=this;return setTimeout(function(){ue.startSelect(),ue.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var he=ne.dataTransfer;he.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(p),he.setDragImage&&he.setDragImage(p,0,0),setTimeout(function(){o.container.removeChild(p)}),he.clearData(),he.setData("Text",o.session.getTextRange()),k=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,k=!1,this.setState(null),!o.getReadOnly()){var ue=ne.dataTransfer.dropEffect;!E&&ue=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!re(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,x||j(),O++,ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!re(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,x||(j(),O++),q!==null&&(q=null),ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&x)return U(),E=null,g.preventDefault(ne)},this.onDrop=function(ne){if(P){var ue=ne.dataTransfer;if(k)switch(E){case"move":C.contains(P.row,P.column)?C={start:P,end:P}:C=o.moveText(C,P);break;case"copy":C=o.moveText(C,P,!0);break}else{var he=ue.getData("Text");C={start:P,end:o.session.insert(P,he)},o.focus(),E=null}return U(),g.preventDefault(ne)}},g.addListener(w,"dragstart",this.onDragStart.bind(d),o),g.addListener(w,"dragend",this.onDragEnd.bind(d),o),g.addListener(w,"dragenter",this.onDragEnter.bind(d),o),g.addListener(w,"dragover",this.onDragOver.bind(d),o),g.addListener(w,"dragleave",this.onDragLeave.bind(d),o),g.addListener(w,"drop",this.onDrop.bind(d),o);function $(ne,ue){var he=Date.now(),oe=!ue||ne.row!=ue.row,ee=!ue||ne.column!=ue.column;if(!N||oe||ee)o.moveCursorToPosition(ne),N=he,I={x:R,y:T};else{var ye=u(I.x,I.y,R,T);ye>a?N=null:he-N>=f&&(o.renderer.scrollCursorIntoView(),N=null)}}function A(ne,ue){var he=Date.now(),oe=o.renderer.layerConfig.lineHeight,ee=o.renderer.layerConfig.characterWidth,ye=o.renderer.scroller.getBoundingClientRect(),we={x:{left:R-ye.left,right:ye.right-R},y:{top:T-ye.top,bottom:ye.bottom-T}},Ae=Math.min(we.x.left,we.x.right),Je=Math.min(we.y.top,we.y.bottom),ze={row:ne.row,column:ne.column};Ae/ee<=2&&(ze.column+=we.x.left<we.x.right?-3:2),Je/oe<=1&&(ze.row+=we.y.top<we.y.bottom?-1:1);var qe=ne.row!=ze.row,Ze=ne.column!=ze.column,at=!ue||ne.row!=ue.row;qe||Ze&&!at?B?he-B>=s&&o.renderer.scrollCursorIntoView(ze):B=he:B=null}function D(){var ne=P;P=o.renderer.screenToTextCoordinates(R,T),$(P,ne),A(P,ne)}function j(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),D(),_=setInterval(D,20),O=0,g.addListener(document,"mousemove",Q)}function U(){clearInterval(_),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!k&&o.$resetCursorStyle(),C=null,P=null,O=0,B=null,N=null,g.removeListener(document,"mousemove",Q)}var q=null;function Q(){q==null&&(q=setTimeout(function(){q!=null&&x&&U()},20))}function re(ne){var ue=ne.types;return!ue||Array.prototype.some.call(ue,function(he){return he=="text/plain"||he=="Text"})}function le(ne){var ue=["copy","copymove","all","uninitialized"],he=["move","copymove","linkmove","all","uninitialized"],oe=v.isMac?ne.altKey:ne.ctrlKey,ee="uninitialized";try{ee=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var ye="none";return oe&&ue.indexOf(ee)>=0?ye="copy":he.indexOf(ee)>=0?ye="move":ue.indexOf(ee)>=0&&(ye="copy"),ye}}(function(){this.dragWait=function(){var d=Date.now()-this.mousedownEvent.time;d>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var d=this.editor.container;d.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(d){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var d=this.editor,o=d.container;o.draggable=!0,d.renderer.$cursorLayer.setBlinking(!1),d.setStyle("ace_dragging");var p=v.isWin?"default":"move";d.renderer.setCursorStyle(p),this.setState("dragReady")},this.onMouseDrag=function(d){var o=this.editor.container;if(v.isIE&&this.state=="dragReady"){var p=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);p>3&&o.dragDrop()}if(this.state==="dragWait"){var p=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);p>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(d){if(this.$dragEnabled){this.mousedownEvent=d;var o=this.editor,p=d.inSelection(),m=d.getButton(),w=d.domEvent.detail||1;if(w===1&&m===0&&p){if(d.editor.inMultiSelectMode&&(d.getAccelKey()||d.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=d.domEvent.target||d.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var R=o.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(d,this.onMouseDrag.bind(this)),d.defaultPrevented=!0}}}}).call(l.prototype);function u(d,o,p,m){return Math.sqrt(Math.pow(p-d,2)+Math.pow(m-o,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,c){var h=t("./mouse_event").MouseEvent,g=t("../lib/event"),v=t("../lib/dom");r.addTouchListeners=function(s,f){var a="scroll",l,u,d,o,p,m,w=0,x,R=0,T=0,_=0,C,P;function O(){var $=window.navigator&&window.navigator.clipboard,A=!1,D=function(){var q=f.getCopyText(),Q=f.session.getUndoManager().hasUndo();P.replaceChild(v.buildDom(A?["span",!q&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),P.firstChild)},j=function(q){return f.commands.canExecute(q,f)},U=function(q){var Q=q.target.getAttribute("action");if(Q=="more"||!A)return A=!A,D();Q=="paste"?$.readText().then(function(re){f.execCommand(Q,re)}):Q&&((Q=="cut"||Q=="copy")&&($?$.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(Q)),P.firstChild.style.display="none",A=!1,Q!="openCommandPalette"&&f.focus()};P=v.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container),P.addEventListener("touchstart",function(q){a="menu",q.stopPropagation(),q.preventDefault(),f.textInput.focus()}),P.addEventListener("touchend",function(q){q.stopPropagation(),q.preventDefault(),U(q)})}function E(){if(!f.getOption("enableMobileMenu")){P&&k();return}P||O();var $=f.selection.cursor,A=f.renderer.textToScreenCoordinates($.row,$.column),D=f.renderer.textToScreenCoordinates(0,0).pageX,j=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();P.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(P.style.left="",P.style.right="10px"):(P.style.right="",P.style.left=D+j-U.left+"px"),P.style.display="",P.firstChild.style.display="none",f.on("input",k)}function k($){P&&(P.style.display="none"),f.off("input",k)}function B(){p=null,clearTimeout(p);var $=f.selection.getRange(),A=$.contains(x.row,x.column);($.isEmpty()||!A)&&(f.selection.moveToPosition(x),f.selection.selectWord()),a="wait",E()}function N(){p=null,clearTimeout(p),f.selection.moveToPosition(x);var $=R>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);$&&!$.isEmpty()?f.selection.setRange($):f.selection.selectWord(),a="wait"}g.addListener(s,"contextmenu",function($){if(C){var A=f.textInput.getElement();A.focus()}},f),g.addListener(s,"touchstart",function($){var A=$.touches;if(p||A.length>1){clearTimeout(p),p=null,d=-1,a="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var D=f.renderer.layerConfig.lineHeight,j=f.renderer.layerConfig.lineHeight,U=$.timeStamp;o=U;var q=A[0],Q=q.clientX,re=q.clientY;Math.abs(l-Q)+Math.abs(u-re)>D&&(d=-1),l=$.clientX=Q,u=$.clientY=re,T=_=0;var le=new h($,f);if(x=le.getDocumentPosition(),U-d<500&&A.length==1&&!w)R++,$.preventDefault(),$.button=0,N();else{R=0;var ne=f.selection.cursor,ue=f.selection.isEmpty()?ne:f.selection.anchor,he=f.renderer.$cursorLayer.getPixelPosition(ne,!0),oe=f.renderer.$cursorLayer.getPixelPosition(ue,!0),ee=f.renderer.scroller.getBoundingClientRect(),ye=f.renderer.layerConfig.offset,we=f.renderer.scrollLeft,Ae=function(qe,Ze){return qe=qe/j,Ze=Ze/D-.75,qe*qe+Ze*Ze};if($.clientX<ee.left){a="zoom";return}var Je=Ae($.clientX-ee.left-he.left+we,$.clientY-ee.top-he.top+ye),ze=Ae($.clientX-ee.left-oe.left+we,$.clientY-ee.top-oe.top+ye);Je<3.5&&ze<3.5&&(a=Je>ze?"cursor":"anchor"),ze<3.5?a="anchor":Je<3.5?a="cursor":a="scroll",p=setTimeout(B,450)}d=U},f),g.addListener(s,"touchend",function($){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),a=="zoom"?(a="",w=0):p?(f.selection.moveToPosition(x),w=0,E()):a=="scroll"?(I(),k()):E(),clearTimeout(p),p=null},f),g.addListener(s,"touchmove",function($){p&&(clearTimeout(p),p=null);var A=$.touches;if(!(A.length>1||a=="zoom")){var D=A[0],j=l-D.clientX,U=u-D.clientY;if(a=="wait")if(j*j+U*U>4)a="cursor";else return $.preventDefault();l=D.clientX,u=D.clientY,$.clientX=D.clientX,$.clientY=D.clientY;var q=$.timeStamp,Q=q-o;if(o=q,a=="scroll"){var re=new h($,f);re.speed=1,re.wheelX=j,re.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Q!=0&&(T=j/Q,_=U/Q),f._emit("mousewheel",re),re.propagationStopped||(T=_=0)}else{var le=new h($,f),ne=le.getDocumentPosition();a=="cursor"?f.selection.moveCursorToPosition(ne):a=="anchor"&&f.selection.setSelectionAnchor(ne.row,ne.column),f.renderer.scrollCursorIntoView(ne),$.preventDefault()}}},f);function I(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(_)<.01&&(_=0),w<20&&(T=.9*T),w<20&&(_=.9*_);var $=f.session.getScrollTop();f.renderer.scrollBy(10*T,10*_),$==f.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,r,c){var h=t("../lib/event"),g=t("../lib/useragent"),v=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,f=t("./mouse_event").MouseEvent,a=t("./dragdrop_handler").DragdropHandler,l=t("./touch_handler").addTouchListeners,u=t("../config"),d=(function(){function o(p){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=p,new v(this),new s(this),new a(this);var w=function(T){var _=!document.hasFocus||!document.hasFocus()||!p.isFocused()&&document.activeElement==(p.textInput&&p.textInput.getElement());_&&window.focus(),p.focus(),setTimeout(function(){p.isFocused()||p.focus()})},x=p.renderer.getMouseEventTarget();h.addListener(x,"click",this.onMouseEvent.bind(this,"click"),p),h.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),p),h.addMultiMouseDownListener([x,p.renderer.scrollBarV&&p.renderer.scrollBarV.inner,p.renderer.scrollBarH&&p.renderer.scrollBarH.inner,p.textInput&&p.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",p),h.addMouseWheelListener(p.container,this.onMouseWheel.bind(this,"mousewheel"),p),l(p.container,p);var R=p.renderer.$gutter;h.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),p),h.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),p),h.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),p),h.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),p),h.addListener(x,"mousedown",w,p),h.addListener(R,"mousedown",w,p),g.isIE&&p.renderer.scrollBarV&&(h.addListener(p.renderer.scrollBarV.element,"mousedown",w,p),h.addListener(p.renderer.scrollBarH.element,"mousedown",w,p)),p.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=p.renderer.screenToTextCoordinates(T.x,T.y),C=p.session.selection.getRange(),P=p.renderer;P.scroller.style.cursor!="crosshair"&&(!C.isEmpty()&&C.insideStart(_.row,_.column)?P.setCursorStyle("default"):P.setCursorStyle(""))}})}return o.prototype.onMouseEvent=function(p,m){this.editor.session&&this.editor._emit(p,new f(m,this.editor))},o.prototype.onMouseMove=function(p,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(p,new f(m,this.editor))},o.prototype.onMouseWheel=function(p,m){var w=new f(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(p,w)},o.prototype.setState=function(p){this.state=p},o.prototype.captureMouse=function(p,m){this.x=p.x,this.y=p.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,T=!0,_=function(k){if(k){if(g.isWebKit&&!k.which&&R.releaseMouse)return R.releaseMouse();R.x=k.clientX,R.y=k.clientY,m&&m(k),R.mouseEvent=new f(k,R.editor),R.$mouseMoved=!0}},C=function(k){w.off("beforeEndOperation",E),T=!1,w.session&&P(),R[R.state+"End"]&&R[R.state+"End"](k),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,k&&R.onMouseEvent("mouseup",k),w.endOperation()},P=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},O=function(){T&&(P(),h.nextFrame(O))};if(g.isOldIE&&p.domEvent.type=="dblclick")return setTimeout(function(){C(p)});var E=function(k){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",E),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=_,R.releaseMouse=h.capture(this.editor.container,_,C),O()},o.prototype.cancelContextMenu=function(){var p=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",p),m&&m.domEvent&&h.stopEvent(m.domEvent))}).bind(this);setTimeout(p,10),this.editor.on("nativecontextmenu",p)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();d.prototype.releaseMouse=null,u.defineOptions(d.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=d}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,c){var h=t("../lib/dom"),g=(function(){function v(s){s.on("click",function(f){var a=f.getDocumentPosition(),l=s.session,u=l.getFoldAt(a.row,a.column,1);u&&(f.getAccelKey()?l.removeFold(u):l.expandFold(u),f.stop());var d=f.domEvent&&f.domEvent.target;d&&h.hasCssClass(d,"ace_inline_button")&&h.hasCssClass(d,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(f){var a=s.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var l=f.getDocumentPosition().row,u=s.session;u.foldWidgets&&u.foldWidgets[l]&&s.session.onFoldWidgetClick(l,f),s.isFocused()||s.focus(),f.stop()}}),s.on("gutterdblclick",function(f){var a=s.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var l=f.getDocumentPosition().row,u=s.session,d=u.getParentFoldRangeData(l,!0),o=d.range||d.firstRange;if(o){l=o.start.row;var p=u.getFoldAt(l,u.getLine(l).length,1);p?u.removeFold(p):(u.addFold("...",o),s.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}f.stop()}})}return v})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,c){var h=t("../lib/keys"),g=t("../lib/event"),v=(function(){function s(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return s.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},s.prototype.setKeyboardHandler=function(f){var a=this.$handlers;if(a[a.length-1]!=f){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(f,1)}},s.prototype.addKeyboardHandler=function(f,a){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var l=this.$handlers.indexOf(f);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(f):this.$handlers.splice(a,0,f),l==-1&&f.attach&&f.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(f){var a=this.$handlers.indexOf(f);return a==-1?!1:(this.$handlers.splice(a,1),f.detach&&f.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var f=this.$data,a=f.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,f)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(f,a,l,u){for(var d,o=!1,p=this.$editor.commands,m=this.$handlers.length;m--&&(d=this.$handlers[m].handleKeyboard(this.$data,f,a,l,u),!(!(!d||!d.command)&&(d.command=="null"?o=!0:o=p.exec(d.command,this.$editor,d.args,u),o&&u&&f!=-1&&d.passEvent!=!0&&d.command.passEvent!=!0&&g.stopEvent(u),o))););return!o&&f==-1&&(d={command:"insertstring"},o=p.exec("insertstring",this.$editor,a)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",d),o},s.prototype.onCommandKey=function(f,a,l){var u=h.keyCodeToString(l);return this.$callKeyboardHandlers(a,u,l,f)},s.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},s})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,c){var h=0,g=0,v=!1,s=!1,f=!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,d=1,o=0,p=1,m=2,w=3,x=4,R=5,T=6,_=7,C=8,P=9,O=10,E=11,k=12,B=13,N=14,I=15,$=16,A=17,D=18,j=[D,D,D,D,D,D,D,D,D,T,R,T,C,R,D,D,D,D,D,D,D,D,D,D,D,D,D,D,R,R,R,T,C,x,x,E,E,E,x,x,x,x,x,O,P,O,P,P,m,m,m,m,m,m,m,m,m,m,P,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,R,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,P,x,E,E,E,E,x,x,x,x,o,x,x,D,x,x,E,E,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,p,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,B,N,I,$,A,P,E,E,E,E,E,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,P,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 q(ne,ue,he,oe){var ee=h?l:a,ye=null,we=null,Ae=null,Je=0,ze=null,qe=null,Ze=-1,at=null,ct=null,Ft=[];if(!oe)for(at=0,oe=[];at<he;at++)oe[at]=le(ne[at]);for(g=h,v=!1,s=!1,f=!1,ct=0;ct<he;ct++){if(ye=Je,Ft[ct]=we=re(ne,oe,Ft,ct),Je=ee[ye][we],ze=Je&240,Je&=15,ue[ct]=Ae=ee[Je][5],ze>0)if(ze==16){for(at=Ze;at<ct;at++)ue[at]=1;Ze=-1}else Ze=-1;if(qe=ee[Je][6],qe)Ze==-1&&(Ze=ct);else if(Ze>-1){for(at=Ze;at<ct;at++)ue[at]=Ae;Ze=-1}oe[ct]==R&&(ue[ct]=0),g|=Ae}if(f){for(at=0;at<he;at++)if(oe[at]==T){ue[at]=h;for(var Me=at-1;Me>=0&&oe[Me]==C;Me--)ue[Me]=h}}}function Q(ne,ue,he){if(!(g<ne)){if(ne==1&&h==d&&!s){he.reverse();return}for(var oe=he.length,ee=0,ye,we,Ae,Je;ee<oe;){if(ue[ee]>=ne){for(ye=ee+1;ye<oe&&ue[ye]>=ne;)ye++;for(we=ee,Ae=ye-1;we<Ae;we++,Ae--)Je=he[we],he[we]=he[Ae],he[Ae]=Je;ee=ye}ee++}}}function re(ne,ue,he,oe){var ee=ue[oe],ye,we,Ae,Je;switch(ee){case o:case p:v=!1;case x:case w:return ee;case m:return v?w:m;case _:return v=!0,p;case C:return x;case P:return oe<1||oe+1>=ue.length||(ye=he[oe-1])!=m&&ye!=w||(we=ue[oe+1])!=m&&we!=w?x:(v&&(we=w),we==ye?we:x);case O:return ye=oe>0?he[oe-1]:R,ye==m&&oe+1<ue.length&&ue[oe+1]==m?m:x;case E:if(oe>0&&he[oe-1]==m)return m;if(v)return x;for(Je=oe+1,Ae=ue.length;Je<Ae&&ue[Je]==E;)Je++;return Je<Ae&&ue[Je]==m?m:x;case k:for(Ae=ue.length,Je=oe+1;Je<Ae&&ue[Je]==k;)Je++;if(Je<Ae){var ze=ne[oe],qe=ze>=1425&&ze<=2303||ze==64286;if(ye=ue[Je],qe&&(ye==p||ye==_))return p}return oe<1||(ye=ue[oe-1])==R?x:he[oe-1];case R:return v=!1,s=!0,h;case T:return f=!0,x;case B:case N:case $:case A:case I:v=!1;case D:return x}}function le(ne){var ue=ne.charCodeAt(0),he=ue>>8;return he==0?ue>191?o:j[ue]:he==5?/[\u0591-\u05f4]/.test(ne)?p:o:he==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?k:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ue==1642?E:/[\u06f0-\u06f9]/.test(ne)?m:_:he==32&&ue<=8287?U[ue&255]:he==254&&ue>=65136?_:x}r.L=o,r.R=p,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ue,he){if(ne.length<2)return{};var oe=ne.split(""),ee=new Array(oe.length),ye=new Array(oe.length),we=[];h=he?d:u,q(oe,we,oe.length,ue);for(var Ae=0;Ae<ee.length;ee[Ae]=Ae,Ae++);Q(2,we,ee),Q(1,we,ee);for(var Ae=0;Ae<ee.length-1;Ae++)ue[Ae]===w?we[Ae]=r.AN:we[Ae]===p&&(ue[Ae]>_&&ue[Ae]<B||ue[Ae]===x||ue[Ae]===D)?we[Ae]=r.ON_R:Ae>0&&oe[Ae-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(oe[Ae])&&(we[Ae-1]=we[Ae]=r.R_H,Ae++);oe[oe.length-1]===r.DOT&&(we[oe.length-1]=r.B),oe[0]==="‫"&&(we[0]=r.RLE);for(var Ae=0;Ae<ee.length;Ae++)ye[Ae]=we[ee[Ae]];return{logicalFromVisual:ee,bidiLevels:ye}},r.hasBidiCharacters=function(ne,ue){for(var he=!1,oe=0;oe<ne.length;oe++)ue[oe]=le(ne.charAt(oe)),!he&&(ue[oe]==p||ue[oe]==_||ue[oe]==w)&&(he=!0);return he},r.getVisualFromLogicalIdx=function(ne,ue){for(var he=0;he<ue.logicalFromVisual.length;he++)if(ue.logicalFromVisual[he]==ne)return he;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,c){var h=t("./lib/bidiutil");t("./lib/lang");var g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,v=(function(){function s(f){this.session=f,this.bidiMap={},this.currentRow=null,this.bidiUtil=h,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=g.test(f.getValue())}return s.prototype.isBidiRow=function(f,a,l){return!!this.seenBidi},s.prototype.onChange=function(f){this.seenBidi?this.currentRow=null:f.action=="insert"&&g.test(f.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},s.prototype.getDocumentRow=function(){var f=0,a=this.session.$screenRowCache;if(a.length){var l=this.session.$getRowCacheIndex(a,this.currentRow);l>=0&&(f=this.session.$docRowCache[l])}return f},s.prototype.getSplitIndex=function(){var f=0,a=this.session.$screenRowCache;if(a.length)for(var l,u=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-f>0&&(l=this.session.$getRowCacheIndex(a,this.currentRow-f-1),l===u);)u=l,f++;else f=this.currentRow;return f},s.prototype.markAsDirty=function(){this.currentRow=null},s.prototype.setShowInvisibles=function(f){this.showInvisibles=f,this.currentRow=null},s.prototype.setEolChar=function(f){this.EOL=f},s.prototype.setContentWidth=function(f){this.contentWidth=f},s.prototype.isRtlLine=function(f){return this.$isRtl?!0:f!=null?this.session.getLine(f).charAt(0)==this.RLE:this.isRtlDir},s.prototype.setRtlDirection=function(f,a){for(var l=f.getCursorPosition(),u=f.selection.getSelectionAnchor().row;u<=l.row;u++)!a&&f.session.getLine(u).charAt(0)===f.session.$bidiHandler.RLE?f.session.doc.removeInLine(u,0,1):a&&f.session.getLine(u).charAt(0)!==f.session.$bidiHandler.RLE&&f.session.doc.insert({column:0,row:u},f.session.$bidiHandler.RLE)},s})();r.BidiHandler=v}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,r,c){var h=t("./lib/oop"),g=t("./lib/lang"),v=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,f=(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(d){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&d.old.column!=d.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?s.fromPoints(u,u):this.isBackwards()?s.fromPoints(u,l):s.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 d=u?l.end:l.start,o=u?l.start:l.end;this.$setSelection(d.row,d.column,o.row,o.column)},a.prototype.$setSelection=function(l,u,d,o){if(!this.$silent){var p=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,u),this.cursor.setPosition(d,o),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||m)&&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 d=l||this.lead;l=d.row,u=d.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 d=typeof l=="number"?l:this.lead.row,o,p=this.session.getFoldLine(d);return p?(d=p.start.row,o=p.end.row):o=d,u===!0?new s(d,0,o,this.session.getLine(o).length):new s(d,0,o+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,d){var o=l.column,p=l.column+u;return d<0&&(o=l.column-u,p=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(o,p).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 d=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,d,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-d):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 d=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,d,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,d):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var l=this.lead.row,u=this.lead.column,d=this.session.documentToScreenRow(l,u),o=this.session.screenToDocumentPosition(d,0),p=this.session.getDisplayLine(l,null,o.row,o.column),m=p.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},a.prototype.moveCursorLineEnd=function(){var l=this.lead,u=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==u.column){var d=this.session.getLine(u.row);if(u.column==d.length){var o=d.search(/\s+$/);o>0&&(u.column=o)}}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,d=this.doc.getLine(l),o=d.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(l,u,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=d.substring(u)),u>=d.length){this.moveCursorTo(l,d.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(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,d;if(d=this.session.getFoldAt(l,u,-1)){this.moveCursorTo(d.start.row,d.start.column);return}var o=this.session.getFoldStringAt(l,u,-1);o==null&&(o=this.doc.getLine(l).substring(0,u));var p=g.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(u-=this.session.nonTokenRe.lastIndex,p=p.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(p)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},a.prototype.$shortWordEndIndex=function(l){var u=0,d,o=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(l))u=this.session.tokenRe.lastIndex;else{for(;(d=l[u])&&o.test(d);)u++;if(u<1){for(p.lastIndex=0;(d=l[u])&&!p.test(d);)if(p.lastIndex=0,u++,o.test(d))if(u>2){u--;break}else{for(;(d=l[u])&&o.test(d);)u++;if(u>2)break}}}return p.lastIndex=0,u},a.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,u=this.lead.column,d=this.doc.getLine(l),o=d.substring(u),p=this.session.getFoldAt(l,u,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(u==d.length){var m=this.doc.getLength();do l++,o=this.doc.getLine(l);while(l<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(l,u+w)},a.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,u=this.lead.column,d;if(d=this.session.getFoldAt(l,u,-1))return this.moveCursorTo(d.start.row,d.start.column);var o=this.session.getLine(l).substring(0,u);if(u===0){do l--,o=this.doc.getLine(l);while(l>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var p=g.stringReverse(o),m=this.$shortWordEndIndex(p);return this.moveCursorTo(l,u-m)},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 d=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o,p=this.session.$fontMetrics,m=u===0&&l!==0&&p;if(u===0&&(m&&this.$desiredColumn==null&&(o=p.textWidth(d.row,d.column),isFinite(o)&&(this.$desiredColumn=o/p.config.characterWidth)),this.$desiredColumn?d.column=this.$desiredColumn:this.$desiredColumn=d.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var w=this.session.lineWidgets[this.lead.row];l<0?l-=w.rowsAbove||0:l>0&&(l+=w.rowCount-(w.rowsAbove||0))}var x=d.row+l;if(m&&this.$desiredColumn!=null){o=this.$desiredColumn*p.config.characterWidth;var R=p.renderer&&p.renderer.$blockCursor;d.column=p.$pixelToColumn(x,d.column,o,R,!0)}var T=this.session.screenToDocumentPosition(x,d.column);this.moveCursorTo(T.row,T.column+u,u===0)},a.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},a.prototype.moveCursorTo=function(l,u,d){var o=this.session.getFoldAt(l,u,1);o&&(l=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(p.charAt(u))&&p.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,d||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(l,u,d){var o=this.session.screenToDocumentPosition(l,u);this.moveCursorTo(o.row,o.column,d)},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 d=this.getCursor();return s.fromPoints(u,d)}catch{return s.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},a.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(u){var d=u.clone();return d.isBackwards=u.cursor==u.start,d});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 d=s.fromPoints(l[u].start,l[u].end);l[u].isBackwards&&(d.cursor=d.start),this.addRange(d,!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})();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,h.implement(f.prototype,v),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,c){var h=t("./lib/report_error").reportError,g=2e3,v=(function(){function s(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],u=[],d=0,o=this.matchMappings[a]={defaultToken:"text"},p="g",m=[],w=0;w<l.length;w++){var x=l[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&p.indexOf("i")===-1&&(p+="i"),x.unicode&&p.indexOf("u")===-1&&(p+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,T=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||T==1?x.token=x.token[0]:T-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:T-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(T>1?x.onMatch=this.$applyToken:x.onMatch=x.token),T>1&&(/\\\d/.test(x.regex)?R=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+d+1)}):(T=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[d]=w,d+=T,u.push(R),x.onMatch||(x.onMatch=null)}}u.length||(o[0]=0,u.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,p)},this),this.regExps[a]=new RegExp("("+u.join(")|(")+")|($)",p)}}return s.prototype.$setMaxTokenCount=function(f){g=f|0},s.prototype.$applyToken=function(f){var a=this.splitRegex.exec(f).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:f}];for(var u=[],d=0,o=l.length;d<o;d++)a[d]&&(u[u.length]={type:l[d],value:a[d]});return u},s.prototype.$arrayTokens=function(f){if(!f)return[];var a=this.splitRegex.exec(f);if(!a)return"text";for(var l=[],u=this.tokenArray,d=0,o=u.length;d<o;d++)a[d+1]&&(l[l.length]={type:u[d],value:a[d+1]});return l},s.prototype.removeCapturingGroups=function(f){var a=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,u){return u?"(?:":l});return a},s.prototype.createSplitterRegexp=function(f,a){if(f.indexOf("(?=")!=-1){var l=0,u=!1,d={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(C,P,O,E,k,B){return u?u=k!="]":k?u=!0:E?(l==d.stack&&(d.end=B+1,d.stack=-1),l--):O&&(l++,O.length!=1&&(d.stack=l,d.start=B)),C}),d.end!=null&&/^\)*$/.test(f.substr(d.end))&&(f=f.substring(0,d.start)+f.substr(d.end))}for(var o;o=/^(?:\((?:\?:)?)*\(\?<[=!]/.exec(f);){var p=o[0].length-4,m=-1,w=0,x=!1,R=/\\.|[\[\]()]/g;R.lastIndex=p;for(var T;T=R.exec(f);){var _=T[0];if(!(_.length>1)){if(x)x=_!="]";else if(_=="[")x=!0;else if(_=="(")w++;else if(_==")"&&--w==0){m=T.index+1;break}}}if(m==-1)break;f=f.substring(0,p)+f.substr(m)}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(a||"").replace("g",""))},s.prototype.getLineTokens=function(f,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",d=this.states[u];d||(u="start",d=this.states[u]);var o=this.matchMappings[u],p=this.regExps[u];p.lastIndex=0;for(var m,w=[],x=0,R=0,T={type:null,value:""};m=p.exec(f);){var _=o.defaultToken,C=null,P=m[0],O=p.lastIndex;if(O-P.length>x){var E=f.substring(x,O-P.length);T.type==_?T.value+=E:(T.type&&w.push(T),T={type:_,value:E})}for(var k=0;k<m.length-2;k++)if(m[k+1]!==void 0){C=d[o[k]],C.onMatch?_=C.onMatch(P,u,l,f):_=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,l),d=this.states[u],d||(this.reportError("state doesn't exist",u),u="start",d=this.states[u]),o=this.matchMappings[u],x=O,p=this.regExps[u],p.lastIndex=O),C.consumeLineEnd&&(x=O);break}if(P){if(typeof _=="string")(!C||C.merge!==!1)&&T.type===_?T.value+=P:(T.type&&w.push(T),T={type:_,value:P});else if(_){T.type&&w.push(T),T={type:null,value:""};for(var k=0;k<_.length;k++)w.push(_[k])}}if(x==f.length)break;if(x=O,R++>g){for(R>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:f});x<f.length;)T.type&&w.push(T),T={value:f.substring(x,x+=500),type:"overflow"};u="start",l=[];break}}return T.type&&w.push(T),l.length>1&&l[0]!==u&&l.unshift("#tmp",u),{tokens:w,state:l.length?l:u}},s})();v.prototype.reportError=h,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,c){var h=t("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,a){if(!a){for(var l in f)this.$rules[l]=f[l];return}for(var l in f){for(var u=f[l],d=0;d<u.length;d++){var o=u[d];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(a)!==0&&(o.next=a+o.next),o.nextState&&o.nextState.indexOf(a)!==0&&(o.nextState=a+o.nextState))}this.$rules[a+l]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(f,a,l,u,d){var o=typeof f=="function"?new f().getRules():f;if(u)for(var p=0;p<u.length;p++)u[p]=a+u[p];else{u=[];for(var m in o)u.push(a+m)}if(this.addRules(o,a),l)for(var w=Array.prototype[d?"push":"unshift"],p=0;p<u.length;p++)w.apply(this.$rules[u[p]],h(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var v=function(f,a){return(f!="start"||a.length)&&a.unshift(this.nextState,f),this.nextState},s=function(f,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var f=0,a=this.$rules;function l(u){var d=a[u];d.processed=!0;for(var o=0;o<d.length;o++){var p=d[o],m=null;Array.isArray(p)&&(m=p,p={}),!p.regex&&p.start&&(p.regex=p.start,p.next||(p.next=[]),p.next.push({defaultToken:p.token},{token:p.token+".end",regex:p.end||p.start,next:"pop"}),p.token=p.token+".start",p.push=!0);var w=p.next||p.push;if(w&&Array.isArray(w)){var x=p.stateName;x||(x=p.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=f++)),a[x]=w,p.next=x,l(x)}else w=="pop"&&(p.next=s);if(p.push&&(p.nextState=p.next||p.push,p.next=v,delete p.push),p.rules)for(var R in p.rules)a[R]?a[R].push&&a[R].push.apply(a[R],p.rules[R]):a[R]=p.rules[R];var T=typeof p=="string"?p:p.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(C){return a[C]}):m=a[T]),m){var _=[o,1].concat(m);p.noEscape&&(_=_.filter(function(C){return!C.next})),d.splice.apply(d,_),o--}p.keywordMap&&(p.token=this.createKeywordMapper(p.keywordMap,p.defaultToken||"text",p.caseInsensitive),delete p.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(f,a,l,u){var d=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(o){for(var p=f[o],m=p.split(u||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),l&&(x=x.toLowerCase()),d[x]=o}},this),f=null,l?function(o){return d[o.toLowerCase()]||a}:function(o){return d[o]||a}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,c){var h;h=function(){this.$behaviours={}},(function(){this.add=function(g,v,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][v]=s},this.addBehaviours=function(g){for(var v in g)for(var s in g[v])this.add(v,s,g[v][s])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,v){if(typeof g=="function")var s=new g().getBehaviours(v);else var s=g.getBehaviours(v);this.addBehaviours(s)},this.getBehaviours=function(g){if(g){for(var v={},s=0;s<g.length;s++)this.$behaviours[g[s]]&&(v[g[s]]=this.$behaviours[g[s]]);return v}else return this.$behaviours}}).call(h.prototype),r.Behaviour=h}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,c){var h=t("./range").Range,g=(function(){function v(s,f,a){this.$session=s,this.$row=f,this.$rowTokens=s.getTokens(f);var l=s.getTokenAt(f,a);this.$tokenIndex=l?l.index:-1}return v.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]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,f=this.$tokenIndex,a=s[f].start;if(a!==void 0)return a;for(a=0;f>0;)f-=1,a+=s[f].value.length;return a},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new h(this.$row,f,this.$row,f+s.value.length)},v})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,r,c){var h=t("../../lib/oop"),g=t("../behaviour").Behaviour,v=t("../../token_iterator").TokenIterator,s=t("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,u={},d={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return l=u[x];l=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(w,x,R,T){var _=w.end.row-w.start.row;return{text:R+x+T,selection:[0,w.start.column+1,_,w.end.column+(_?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,R,T,_,C){var P=T.getCursorPosition(),O=_.doc.getLine(P.row);if(C=="{"){o(T);var E=T.getSelectionRange(),k=_.doc.getTextRange(E),B=_.getTokenAt(P.row,P.column);if(k!==""&&k!=="{"&&T.getWrapBehavioursEnabled())return p(E,k,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var N=[/tag\-(?:open|name)/,/attribute\-name/];return N.some(function(q){return q.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[P.column-B.start-1]!=="$"?void 0:(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,_))return/[\]\}\)]/.test(O[P.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var I=O.substring(P.column,P.column+1);if(I=="}"){var $=_.$findOpeningBracket("}",{column:P.column+1,row:P.row});if($!==null&&m.isAutoInsertedClosing(P,O,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){o(T);var A="";m.isMaybeInsertedClosing(P,O)&&(A=s.stringRepeat("}",l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var I=O.substring(P.column,P.column+1);if(I==="}"){var D=_.findMatchingBracket({row:P.row,column:P.column+1},"}");if(!D)return null;var j=this.$getIndent(_.getLine(D.row))}else if(A)var j=this.$getIndent(O);else{m.clearMaybeInsertedClosing();return}var U=j+_.getTabString();return{text:`
185
+ `+U+`
186
+ `+j+A,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="{"){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.end.column,C.end.column+1);if(E=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,T,_,C){if(C=="("){o(T);var P=T.getSelectionRange(),O=_.doc.getTextRange(P);if(O!==""&&T.getWrapBehavioursEnabled())return p(P,O,"(",")");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(T);var E=T.getCursorPosition(),k=_.doc.getLine(E.row),B=k.substring(E.column,E.column+1);if(B==")"){var N=_.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(N!==null&&m.isAutoInsertedClosing(E,k,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="("){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,T,_,C){if(C=="["){o(T);var P=T.getSelectionRange(),O=_.doc.getTextRange(P);if(O!==""&&T.getWrapBehavioursEnabled())return p(P,O,"[","]");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(T);var E=T.getCursorPosition(),k=_.doc.getLine(E.row),B=k.substring(E.column,E.column+1);if(B=="]"){var N=_.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(N!==null&&m.isAutoInsertedClosing(E,k,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="["){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,T,_,C){var P=_.$mode.$quotes||d;if(C.length==1&&P[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(T);var O=C,E=T.getSelectionRange(),k=_.doc.getTextRange(E);if(k!==""&&(k.length!=1||!P[k])&&T.getWrapBehavioursEnabled())return p(E,k,O,O);if(!k){var B=T.getCursorPosition(),N=_.doc.getLine(B.row),I=N.substring(B.column-1,B.column),$=N.substring(B.column,B.column+1),A=_.getTokenAt(B.row,B.column),D=_.getTokenAt(B.row,B.column+1);if(I=="\\"&&A&&/escape/.test(A.type))return null;var j=A&&/string|escape/.test(A.type),U=!D||/string|escape/.test(D.type),q;if($==O)q=j!==U,q&&/string\.end/.test(D.type)&&(q=!1);else{if(j&&!U||j&&U)return null;var Q=_.$mode.tokenRe;Q.lastIndex=0;var re=Q.test(I);Q.lastIndex=0;var le=Q.test($),ne=_.$mode.$pairQuotesAfter,ue=ne&&ne[O]&&ne[O].test(I);if(!ue&&re||le||$&&!/[\s;,.})\]\\]/.test($))return null;var he=N[B.column-2];if(I==O&&(he==O||Q.test(he)))return null;q=!0}return{text:q?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,T,_,C){var P=_.$mode.$quotes||d,O=_.doc.getTextRange(C);if(!C.isMultiLine()&&P.hasOwnProperty(O)){o(T);var E=_.doc.getLine(C.start.row),k=E.substring(C.start.column+1,C.start.column+2);if(k==O)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,T,_,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&T.selection.isEmpty()){var P=T.getCursorPosition();if(P.column===0)return;for(var O=_.doc.getLine(P.row),E=_.doc.getLine(P.row+1),k=_.getTokens(P.row),B=0,N=0;N<k.length;N++){B+=k[N].value.length;var I=k[N];if(B>=P.column){if(B===P.column){if(!/\.doc/.test(I.type))return;if(/\*\//.test(I.value)){var $=k[N+1];if(!$||!/\.doc/.test($.type))return}}var A=P.column-(B-I.value.length),D=I.value.indexOf("*/"),j=I.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&A>j&&A<j+3||D!==-1&&j!==-1&&A>=D&&A<=j||!/\.doc/.test(I.type))return;break}}var U=this.$getIndent(O);if(/\s*\*/.test(E))return/^\s*\*/.test(O)?{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(O.substring(0,P.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var R=w.getCursorPosition(),T=new v(x,R.row,R.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",f)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var _=new v(x,R.row,R.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return T.stepForward(),T.getCurrentTokenRow()!==R.row||this.$matchTokenType(T.getCurrentToken()||"text",a)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,R){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isAutoInsertedClosing(T,_,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=T.row,l.autoInsertedLineEnd=R+_.substr(T.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,R){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isMaybeInsertedClosing(T,_)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=T.row,l.maybeInsertedLineStart=_.substr(0,T.column)+R,l.maybeInsertedLineEnd=_.substr(T.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,R){return l.autoInsertedBrackets>0&&w.row===l.autoInsertedRow&&R===l.autoInsertedLineEnd[0]&&x.substr(w.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,x){return l.maybeInsertedBrackets>0&&w.row===l.maybeInsertedRow&&x.substr(w.column)===l.maybeInsertedLineEnd&&x.substr(0,w.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},h.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(t,r,c){for(var h=[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],g=0,v=[],s=0;s<h.length;s+=2)v.push(g+=h[s]),h[s+1]&&v.push(45,g+=h[s+1]);r.wordChars=String.fromCharCode.apply(null,v)}),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(t,r,c){var h=t("../config"),g=t("../tokenizer").Tokenizer,v=t("./text_highlight_rules").TextHighlightRules,s=t("./behaviour/cstyle").CstyleBehaviour,f=t("../unicode"),a=t("../lib/lang"),l=t("../token_iterator").TokenIterator,u=t("../range").Range,d;d=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,p,m,w){var x=p.doc,R=!0,T=!0,_=1/0,C=p.getTabSize(),P=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(a.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var O=a.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),P=p.getUseSoftTabs();var k=function(q,Q){var re=q.match(O);if(re){var le=re[1].length,ne=re[0].length;!$(q,le,ne)&&re[0][ne-1]==" "&&ne--,x.removeInLine(Q,le,ne)}},B=E+" ",N=function(q,Q){(!R||/\S/.test(q))&&($(q,_,_)?x.insertInLine({row:Q,column:_},B):x.insertInLine({row:Q,column:_},E))},I=function(q,Q){return O.test(q)},$=function(q,Q,re){for(var le=0;Q--&&q.charAt(Q)==" ";)le++;if(le%C!=0)return!1;for(var le=0;q.charAt(re++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,A=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+a.escapeRegExp(E)+")"),D=new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"),N=function(ue,he){I(ue,he)||(!R||/\S/.test(ue))&&(x.insertInLine({row:he,column:ue.length},A),x.insertInLine({row:he,column:_},E))},k=function(ue,he){var oe;(oe=ue.match(D))&&x.removeInLine(he,ue.length-oe[0].length,ue.length),(oe=ue.match(O))&&x.removeInLine(he,oe[1].length,oe[0].length)},I=function(ue,he){if(O.test(ue))return!0;for(var oe=p.getTokens(he),ee=0;ee<oe.length;ee++)if(oe[ee].type==="comment")return!0}}function j(q){for(var Q=m;Q<=w;Q++)q(x.getLine(Q),Q)}var U=1/0;j(function(q,Q){var re=q.search(/\S/);re!==-1?(re<_&&(_=re),T&&!I(q,Q)&&(T=!1)):U>q.length&&(U=q.length)}),_==1/0&&(_=U,R=!1,T=!1),P&&_%C!=0&&(_=Math.floor(_/C)*C),j(T?k:N)},this.toggleBlockComment=function(o,p,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new l(p,w.row,w.column),T=R.getCurrentToken();p.selection;var _=p.selection.toOrientedRange(),C,P;if(T&&/comment/.test(T.type)){for(var O,E;T&&/comment/.test(T.type);){var k=T.value.indexOf(x.start);if(k!=-1){var B=R.getCurrentTokenRow(),N=R.getCurrentTokenColumn()+k;O=new u(B,N,B,N+x.start.length);break}T=R.stepBackward()}for(var R=new l(p,w.row,w.column),T=R.getCurrentToken();T&&/comment/.test(T.type);){var k=T.value.indexOf(x.end);if(k!=-1){var B=R.getCurrentTokenRow(),N=R.getCurrentTokenColumn()+k;E=new u(B,N,B,N+x.end.length);break}T=R.stepForward()}E&&p.remove(E),O&&(p.remove(O),C=O.start.row,P=-x.start.length)}else P=x.start.length,C=m.start.row,p.insert(m.end,x.end),p.insert(m.start,x.start);_.start.row==C&&(_.start.column+=P),_.end.row==C&&(_.end.column+=P),p.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,p,m){return this.$getIndent(p)},this.checkOutdent=function(o,p,m){return!1},this.autoOutdent=function(o,p,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var p in o)if(o[p]){var m=o[p],w=m.prototype.$id,x=h.$modes[w];x||(h.$modes[w]=x=new m),h.$modes[p]||(h.$modes[p]=x),this.$embeds.push(p),this.$modes[p]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(P){(function(O){var E=R[P],k=O[E];O[R[P]]=function(){return this.$delegator(E,arguments,k)}})(_)},_=this,p=0;p<R.length;p++)T(p)},this.$delegator=function(o,p,m){var w=p[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],R=this.$modes[x];if(R)return R[o].apply(R,[w[1]].concat([].slice.call(p,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var _=w.split(this.$embeds[T]);if(!_[0]&&_[1]){p[0]=_[1];var R=this.$modes[this.$embeds[T]];return R[o].apply(R,p)}}var C=m.apply(this,p);return m?C:void 0},this.transformAction=function(o,p,m,w,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var T in R)if(R[T][p]){var _=R[T][p].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var p=this.$tokenizer.rules,m=[];for(var w in p)for(var x=p[w],R=0,T=x.length;R<T;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&m.push(x[R].regex);else if(typeof x[R].token=="object"){for(var _=0,C=x[R].token.length;_<C;_++)if(/keyword|support|storage/.test(x[R].token[_])){var w=x[R].regex.match(/\(.+?\)/g)[_];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,p,m,w){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(d.prototype),r.Mode=d}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,r,c){var h=t("./lib/dom"),g=(function(){function v(s){this.session=s,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 v.prototype.getRowLength=function(s){var f;return this.lineWidgets?f=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[s]?1+f:this.$wrapData[s].length+1+f},v.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(s+=f.rowCount)}),s},v.prototype.$onChangeEditor=function(s){this.attach(s.editor)},v.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(s){var f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.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))})}},v.prototype.updateOnFold=function(s,f){var a=f.lineWidgets;if(!(!a||!s.action)){for(var l=s.data,u=l.start.row,d=l.end.row,o=s.action=="add",p=u+1;p<d;p++)a[p]&&(a[p].hidden=o);a[d]&&(o?a[u]?a[d].hidden=o:a[u]=a[d]:(a[u]==a[d]&&(a[u]=void 0),a[d].hidden=o))}},v.prototype.updateOnChange=function(s){var f=this.session.lineWidgets;if(f){var a=s.start.row,l=s.end.row-a;if(l!==0)if(s.action=="remove"){var u=f.splice(a+1,l);!f[a]&&u[u.length-1]&&(f[a]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var d=new Array(l);f[a]&&f[a].column!=null&&s.start.column>f[a].column&&a++,d.unshift(a,0),f.splice.apply(f,d),this.$updateRows()}}},v.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var f=!0;s.forEach(function(a,l){if(a)for(f=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),f&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[s.row];return f&&(s.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},v.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var f=this.editor.renderer;s.html&&!s.el&&(s.el=h.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=h.createElement("div"),s.el.textContent=s.text),s.el&&(h.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&h.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",f.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/f.layerConfig.lineHeight);var a=this.session.getFoldAt(s.row,0);if(s.$fold=a,a){var l=this.session.lineWidgets;s.row==a.end.row&&!l[a.start.row]?l[a.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(s),s},v.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[s.row];if(f==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;f;){if(f.$oldWidget==s){f.$oldWidget=s.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(s){for(var f=this.session.lineWidgets,a=f&&f[s],l=[];a;)l.push(a),a=a.$oldWidget;return l},v.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(s,f){var a=this.session._changedWidgets,l=f.layerConfig;if(!(!a||!a.length)){for(var u=1/0,d=0;d<a.length;d++){var o=a[d];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,f.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/l.characterWidth));var p=o.h/l.lineHeight;o.coverLine&&(p-=this.session.getRowLineCount(o.row),p<0&&(p=0)),o.rowCount!=p&&(o.rowCount=p,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(s,f){var a=f.layerConfig,l=this.session.lineWidgets;if(l){for(var u=Math.min(this.firstRow,a.firstRow),d=Math.max(this.lastRow,a.lastRow,l.length);u>0&&!l[u];)u--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,f.$cursorLayer.config=a;for(var o=u;o<=d;o++){var p=l[o];if(!(!p||!p.el)){if(p.hidden){p.el.style.top=-100-(p.pixelHeight||0)+"px";continue}p._inDocument||(p._inDocument=!0,f.container.appendChild(p.el));var m=f.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;p.coverLine||(m+=a.lineHeight*this.session.getRowLineCount(p.row)),p.el.style.top=m-a.offset+"px";var w=p.coverGutter?0:f.gutterWidth;p.fixedWidth||(w-=f.scrollLeft),p.el.style.left=w+"px",p.fullWidth&&p.screenWidth&&(p.el.style.minWidth=a.width+2*a.padding+"px"),p.fixedWidth?p.el.style.right=f.scrollBar.getWidth()+"px":p.el.style.right=""}}}},v})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,r,c){r.applyDelta=function(h,g,v){var s=g.start.row,f=g.start.column,a=h[s]||"";switch(g.action){case"insert":var l=g.lines;if(l.length===1)h[s]=a.substring(0,f)+g.lines[0]+a.substring(f);else{var u=[s,1].concat(g.lines);h.splice.apply(h,u),h[s]=a.substring(0,f)+h[s],h[s+g.lines.length-1]+=a.substring(f)}break;case"remove":var d=g.end.column,o=g.end.row;s===o?h[s]=a.substring(0,f)+a.substring(d):h.splice(s,o-s+1,a.substring(0,f)+h[o].substring(d));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var h=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function a(l,u,d){this.$onChange=this.onChange.bind(this),this.attach(l),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,d)}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=f(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},a.prototype.setPosition=function(l,u,d){var o;if(d?o={row:l,column:u}:o=this.$clipPositionToDocument(l,u),!(this.row==o.row&&this.column==o.column)){var p={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:p,value:o})}},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 d={};return l>=this.document.getLength()?(d.row=Math.max(0,this.document.getLength()-1),d.column=this.document.getLine(d.row).length):l<0?(d.row=0,d.column=0):(d.row=l,d.column=Math.min(this.document.getLine(d.row).length,Math.max(0,u))),u<0&&(d.column=0),d},a})();v.prototype.$insertRight=!1,h.implement(v.prototype,g);function s(a,l,u){var d=u?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&d}function f(a,l,u){var d=a.action=="insert",o=(d?1:-1)*(a.end.row-a.start.row),p=(d?1:-1)*(a.end.column-a.start.column),m=a.start,w=d?m:a.end;return s(l,m,u)?{row:l.row,column:l.column}:s(w,l,!u)?{row:l.row+o,column:l.column+(l.row==w.row?p:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,r,c){var h=t("./lib/oop"),g=t("./apply_delta").applyDelta,v=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,f=t("./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 d=this.getLength()-1;this.remove(new s(0,0,d,this.getLine(d).length)),this.insert({row:0,column:0},u||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(u,d){return new f(this,u,d)},l.prototype.$detectNewLine=function(u){var d=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=d?d[1]:`
189
+ `,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},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
193
+ `||u=="\r"||u==`
194
+ `},l.prototype.getLine=function(u){return this.$lines[u]||""},l.prototype.getLines=function(u,d){return this.$lines.slice(u,d+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 d;if(u.start.row===u.end.row)d=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{d=this.getLines(u.start.row,u.end.row),d[0]=(d[0]||"").substring(u.start.column);var o=d.length-1;u.end.row-u.start.row==o&&(d[o]=d[o].substring(0,u.end.column))}return d},l.prototype.insertLines=function(u,d){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,d)},l.prototype.removeLines=function(u,d){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,d)},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,d){return this.getLength()<=1&&this.$detectNewLine(d),this.insertMergedLines(u,this.$split(d))},l.prototype.insertInLine=function(u,d){var o=this.clippedPos(u.row,u.column),p=this.pos(u.row,u.column+d.length);return this.applyDelta({start:o,end:p,action:"insert",lines:[d]},!0),this.clonePos(p)},l.prototype.clippedPos=function(u,d){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,d=void 0);var p=this.getLine(u);return d==null&&(d=p.length),d=Math.min(Math.max(d,0),p.length),{row:u,column:d}},l.prototype.clonePos=function(u){return{row:u.row,column:u.column}},l.prototype.pos=function(u,d){return{row:u,column:d}},l.prototype.$clipPosition=function(u){var d=this.getLength();return u.row>=d?(u.row=Math.max(0,d-1),u.column=this.getLine(d-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,d){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(d=d.concat([""]),o=0):(d=[""].concat(d),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},d)},l.prototype.insertMergedLines=function(u,d){var o=this.clippedPos(u.row,u.column),p={row:o.row+d.length-1,column:(d.length==1?o.column:0)+d[d.length-1].length};return this.applyDelta({start:o,end:p,action:"insert",lines:d}),this.clonePos(p)},l.prototype.remove=function(u){var d=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:d,end:o,action:"remove",lines:this.getLinesForRange({start:d,end:o})}),this.clonePos(d)},l.prototype.removeInLine=function(u,d,o){var p=this.clippedPos(u,d),m=this.clippedPos(u,o);return this.applyDelta({start:p,end:m,action:"remove",lines:this.getLinesForRange({start:p,end:m})},!0),this.clonePos(p)},l.prototype.removeFullLines=function(u,d){u=Math.min(Math.max(0,u),this.getLength()-1),d=Math.min(Math.max(0,d),this.getLength()-1);var o=d==this.getLength()-1&&u>0,p=d<this.getLength()-1,m=o?u-1:u,w=o?this.getLine(m).length:0,x=p?d+1:d,R=p?0:this.getLine(x).length,T=new s(m,w,x,R),_=this.$lines.slice(u,d+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),_},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,d){if(u instanceof s||(u=s.fromPoints(u.start,u.end)),d.length===0&&u.isEmpty())return u.start;if(d==this.getTextRange(u))return u.end;this.remove(u);var o;return d?o=this.insert(u.start,d):o=u.start,o},l.prototype.applyDeltas=function(u){for(var d=0;d<u.length;d++)this.applyDelta(u[d])},l.prototype.revertDeltas=function(u){for(var d=u.length-1;d>=0;d--)this.revertDelta(u[d])},l.prototype.applyDelta=function(u,d){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!s.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(g(this.$lines,u,d),this._signal("change",u)))},l.prototype.$safeApplyDelta=function(u){var d=this.$lines.length;(u.action=="remove"&&u.start.row<d&&u.end.row<d||u.action=="insert"&&u.start.row<=d)&&this.applyDelta(u)},l.prototype.$splitAndapplyLargeDelta=function(u,d){for(var o=u.lines,p=o.length-d+1,m=u.start.row,w=u.start.column,x=0,R=0;x<p;x=R){R+=d-1;var T=o.slice(x,R);T.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+R,w=0),action:u.action,lines:T},!0)}u.lines=o.slice(x),u.start.row=m+x,u.start.column=w,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,d){for(var o=this.$lines||this.getAllLines(),p=this.getNewLineCharacter().length,m=d||0,w=o.length;m<w;m++)if(u-=o[m].length+p,u<0)return{row:m,column:u+o[m].length+p};return{row:w-1,column:u+o[w-1].length+p}},l.prototype.positionToIndex=function(u,d){for(var o=this.$lines||this.getAllLines(),p=this.getNewLineCharacter().length,m=0,w=Math.min(u.row,o.length),x=d||0;x<w;++x)m+=o[x].length+p;return m+u.column},l.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},l})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",h.implement(a.prototype,v),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var h=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function s(f,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var l=this;this.$worker=function(){if(l.running){for(var u=new Date,d=l.currentLine,o=-1,p=l.doc,m=d;l.lines[d];)d++;var w=p.getLength(),x=0;for(l.running=!1;d<w;){l.$tokenizeRow(d),o=d;do d++;while(l.lines[d]);if(x++,x%5===0&&new Date-u>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=d,o==-1&&(o=d),m<=o&&l.fireUpdateEvent(m,o)}}}return s.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(f,a){var l={first:f,last:a};this._signal("update",{data:l})},s.prototype.start=function(f){this.currentLine=Math.min(f||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(f){var a=f.start.row,l=f.end.row-a;if(l===0)this.lines[a]=null;else if(f.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()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},s.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},s.prototype.$tokenizeRow=function(f){var a=this.doc.getLine(f),l=this.states[f-1],u=this.tokenizer.getLineTokens(a,l,f);return this.states[f]+""!=u.state+""?(this.states[f]=u.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=u.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();h.implement(v.prototype,g),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,r,c){var h=t("./lib/lang"),g=t("./range").Range,v=(function(){function s(f,a,l){l===void 0&&(l="text"),this.setRegexp(f),this.clazz=a,this.type=l,this.docLen=0}return s.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},s.prototype.update=function(f,a,l,u){if(this.regExp){for(var d=u.firstRow,o=u.lastRow,p={},m=l.$editor&&l.$editor.$search,w=m&&m.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=l.getValue().length,R=x!=this.docLen,T=d;T<=o;T++){var _=this.cache[T];if(_==null||R){if(w){_=[];var C=m.$multiLineForward(l,this.regExp,T,o);if(C){var P=C.endRow<=o?C.endRow-1:o;P>T&&(T=P),_.push(new g(C.startRow,C.startCol,C.endRow,C.endCol))}_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES))}else _=h.getMatchOffsets(l.getLine(T),this.regExp),_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES)),_=_.map(function(B){return new g(T,B.offset,T,B.offset+B.length)});this.cache[T]=_.length?_:""}if(_.length!==0)for(var O=_.length;O--;){var E=_[O].toScreenRange(l),k=E.toString();p[k]||(p[k]=!0,a.drawSingleLineMarker(f,E,this.clazz,u))}}this.docLen=x}},s})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,r,c){var h=(function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,P,O){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),P===!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)}},_.prototype.addSelection=function(C,P){this.selections.push({value:C,rev:P||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,P){P==null&&(P=this.$rev+1);for(var O=this.$undoStack,E=O.length;E--;){var k=O[E][0];if(k.id<=C)break;k.id<P&&(k.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,P){for(var O=this.selections,E=O.length;E--;){var k=O[E];if(k.rev<C)return P&&(k=O[E+1]),k}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,P){P==null&&(P=this.$rev+1);for(var O=this.$undoStack,E=null,k=0,B=O.length;B--;){var N=O[B][0];if(N.id<P&&!E&&(E=B+1),N.id<=C){k=B+1;break}}return O.slice(k,E)},_.prototype.getChangedRanges=function(C,P){P==null&&(P=this.$rev+1)},_.prototype.getChangedLines=function(C,P){P==null&&(P=this.$rev+1)},_.prototype.undo=function(C,P){this.lastDeltas=null;var O=this.$undoStack;if(g(O,O.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=O.pop(),k=null;return E&&(k=C.undoChanges(E,P),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k}},_.prototype.redo=function(C,P){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),k=null;return E&&(k=C.redoChanges(E,P),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k},_.prototype.$syncRev=function(){var C=this.$undoStack,P=C[C.length-1],O=P&&P[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),C&&(this.$undoStack=C.$undoStack||[],this.$redoStack=C.$redoStack||[])},_.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
195
+ ---
196
+ `+l(this.$redoStack)},_})();h.prototype.hasUndo=h.prototype.canUndo,h.prototype.hasRedo=h.prototype.canRedo,h.prototype.isClean=h.prototype.isAtBookmark,h.prototype.markClean=h.prototype.bookmark;function g(_,C){for(var P=C;P--;){var O=_[P];if(O&&!O[0].ignore){for(;P<C-1;){var E=o(_[P],_[P+1]);_[P]=E[0],_[P+1]=E[1],P++}return!0}}}var v=t("./range").Range,s=v.comparePoints;v.comparePoints;function f(_){return{row:_.row,column:_.column}}function a(_){return{start:f(_.start),end:f(_.end),action:_.action,lines:_.lines.slice()}}function l(_){if(_=_||this,Array.isArray(_))return _.map(l).join(`
197
+ `);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(u).join(`
198
+ `):C=u(_.value)),_.start&&(C+=u(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function u(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function d(_,C){var P=_.action=="insert",O=C.action=="insert";if(P&&O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.start,_.start)<=0)m(_,C,1);else return null;else if(P&&!O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.end,_.start)<=0)m(_,C,-1);else return null;else if(!P&&O)if(s(C.start,_.start)>=0)m(C,_,1);else if(s(C.start,_.start)<=0)m(_,C,1);else return null;else if(!P&&!O)if(s(C.start,_.start)>=0)m(C,_,1);else if(s(C.end,_.start)<=0)m(_,C,-1);else return null;return[C,_]}function o(_,C){for(var P=_.length;P--;)for(var O=0;O<C.length;O++)if(!d(_[P],C[O])){for(;P<_.length;){for(;O--;)d(C[O],_[P]);O=C.length,P++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function p(_,C){var P=_.action=="insert",O=C.action=="insert";if(P&&O)s(_.start,C.start)<0?m(C,_,1):m(_,C,1);else if(P&&!O)s(_.start,C.end)>=0?m(_,C,-1):(s(_.start,C.start)<=0||m(_,v.fromPoints(C.start,_.start),-1),m(C,_,1));else if(!P&&O)s(C.start,_.end)>=0?m(C,_,-1):(s(C.start,_.start)<=0||m(C,v.fromPoints(_.start,C.start),-1),m(_,C,1));else if(!P&&!O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.end,_.start)<=0)m(_,C,-1);else{var E,k;return s(_.start,C.start)<0&&(E=_,_=x(_,C.start)),s(_.end,C.end)>0&&(k=x(_,C.end)),w(C.end,_.start,_.end,-1),k&&!E&&(_.lines=k.lines,_.start=k.start,_.end=k.end,k=_),[C,E,k].filter(Boolean)}return[C,_]}function m(_,C,P){w(_.start,C.start,C.end,P),w(_.end,C.start,C.end,P)}function w(_,C,P,O){_.row==(O==1?C:P).row&&(_.column+=O*(P.column-C.column)),_.row+=O*(P.row-C.row)}function x(_,C){var P=_.lines,O=_.end;_.end=f(C);var E=_.end.row-_.start.row,k=P.splice(E,P.length),B=E?C.column:C.column-_.start.column;P.push(k[0].substring(0,B)),k[0]=k[0].substr(B);var N={start:f(C),end:O,lines:k,action:_.action};return N}function R(_,C){C=a(C);for(var P=_.length;P--;){for(var O=_[P],E=0;E<O.length;E++){var k=O[E],B=p(k,C);C=B[0],B.length!=2&&(B[2]?(O.splice(E+1,1,B[1],B[2]),E++):B[1]||(O.splice(E,1),E--))}O.length||_.splice(P,1)}return _}function T(_,C){for(var P=0;P<C.length;P++)for(var O=C[P],E=0;E<O.length;E++)R(_,O[E])}r.UndoManager=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,r,c){var h=t("../range").Range,g=(function(){function v(s,f){this.foldData=s,Array.isArray(f)?this.folds=f:f=this.folds=[f];var a=f[f.length-1];this.range=new h(f[0].start.row,f[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 v.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(f){f.start.row+=s,f.end.row+=s})},v.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(f,a){return-f.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},v.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},v.prototype.walk=function(s,f,a){var l=0,u=this.folds,d,o,p,m=!0;f==null&&(f=this.end.row,a=this.end.column);for(var w=0;w<u.length;w++){if(d=u[w],o=d.range.compareStart(f,a),o==-1){s(null,f,a,l,m);return}if(p=s(null,d.start.row,d.start.column,l,m),p=!p&&s(d.placeholder,d.start.row,d.start.column,l),p||o===0)return;m=!d.sameRow,l=d.end.column}s(null,f,a,l,m)},v.prototype.getNextFoldTo=function(s,f){for(var a,l,u=0;u<this.folds.length;u++){if(a=this.folds[u],l=a.range.compareEnd(s,f),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},v.prototype.addRemoveChars=function(s,f,a){var l=this.getNextFoldTo(s,f),u,d;if(l){if(u=l.fold,l.kind=="inside"&&u.start.column!=f&&u.start.row!=s)window.console&&window.console.log(s,f,u);else if(u.start.row==s){d=this.folds;var o=d.indexOf(u);for(o===0&&(this.start.column+=a),o;o<d.length;o++){if(u=d[o],u.start.column+=a,!u.sameRow)return;u.end.column+=a}this.end.column+=a}}},v.prototype.split=function(s,f){var a=this.getNextFoldTo(s,f);if(!a||a.kind=="inside")return null;var l=a.fold,u=this.folds,d=this.foldData,o=u.indexOf(l),p=u[o-1];this.end.row=p.end.row,this.end.column=p.end.column,u=u.splice(o,u.length-o);var m=new v(d,u);return d.splice(d.indexOf(this)+1,0,m),m},v.prototype.merge=function(s){for(var f=s.folds,a=0;a<f.length;a++)this.addFold(f[a]);var l=this.foldData;l.splice(l.indexOf(s),1)},v.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(f){s.push(" "+f.toString())}),s.push("]"),s.join(`
199
+ `)},v.prototype.idxToPosition=function(s){for(var f=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(s-=l.start.column-f,s<0)return{row:l.start.row,column:l.start.column+s};if(s-=l.placeholder.length,s<0)return l.start;f=l.end.column}return{row:this.end.row,column:this.end.column+s}},v})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,r,c){var h=t("./range").Range,g=h.comparePoints,v=(function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(f,a,l){for(var u=this.ranges,d=l||0;d<u.length;d++){var o=u[d],p=g(f,o.end);if(!(p>0)){var m=g(f,o.start);return p===0?a&&m!==0?-d-2:d:m>0||m===0&&!a?d:-d-1}}return-d-1},s.prototype.add=function(f){var a=!f.isEmpty(),l=this.pointIndex(f.start,a);l<0&&(l=-l-1);var u=this.pointIndex(f.end,a,l);return u<0?u=-u-1:u++,this.ranges.splice(l,u-l,f)},s.prototype.addList=function(f){for(var a=[],l=f.length;l--;)a.push.apply(a,this.add(f[l]));return a},s.prototype.substractPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges.splice(a,1)},s.prototype.merge=function(){var f=[],a=this.ranges;a=a.sort(function(p,m){return g(p.start,m.start)});for(var l=a[0],u,d=1;d<a.length;d++){u=l,l=a[d];var o=g(u.end,l.start);o<0||o==0&&!u.isEmpty()&&!l.isEmpty()||(g(u.end,l.end)<0&&(u.end.row=l.end.row,u.end.column=l.end.column),a.splice(d,1),f.push(l),l=u,d--)}return this.ranges=a,f},s.prototype.contains=function(f,a){return this.pointIndex({row:f,column:a})>=0},s.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},s.prototype.rangeAtPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges[a]},s.prototype.clipRows=function(f,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<f)return[];var u=this.pointIndex({row:f,column:0});u<0&&(u=-u-1);var d=this.pointIndex({row:a,column:0},u);d<0&&(d=-d-1);for(var o=[],p=u;p<d;p++)o.push(l[p]);return o},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(f){for(var a=f.start,l=f.end,u=a.row,d=l.row,o=this.ranges,p=0,m=o.length;p<m;p++){var w=o[p];if(w.end.row>=u)break}if(f.action=="insert")for(var x=d-u,R=-a.column+l.column;p<m;p++){var w=o[p];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=a.column&&(w.start.column==a.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=x)),w.end.row==u&&w.end.column>=a.column){if(w.end.column==a.column&&this.$bias<0)continue;w.end.column==a.column&&R>0&&p<m-1&&w.end.column>w.start.column&&w.end.column==o[p+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=x}}else for(var x=u-d,R=a.column-l.column;p<m;p++){var w=o[p];if(w.start.row>d)break;w.end.row<d&&(u<w.end.row||u==w.end.row&&a.column<w.end.column)?(w.end.row=u,w.end.column=a.column):w.end.row==d?w.end.column<=l.column?(x||w.end.column>a.column)&&(w.end.column=a.column,w.end.row=a.row):(w.end.column+=R,w.end.row+=x):w.end.row>d&&(w.end.row+=x),w.start.row<d&&(u<w.start.row||u==w.start.row&&a.column<w.start.column)?(w.start.row=u,w.start.column=a.column):w.start.row==d?w.start.column<=l.column?(x||w.start.column>a.column)&&(w.start.column=a.column,w.start.row=a.row):(w.start.column+=R,w.start.row+=x):w.start.row>d&&(w.start.row+=x)}if(x!=0&&p<m)for(;p<m;p++){var w=o[p];w.start.row+=x,w.end.row+=x}},s})();v.prototype.comparePoints=g,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,r,c){var h=this&&this.__extends||(function(){var u=function(d,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(p[w]=m[w])},u(d,o)};return function(d,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(d,o);function p(){this.constructor=d}d.prototype=o===null?Object.create(o):(p.prototype=o.prototype,new p)}})(),g=t("../range_list").RangeList,v=(function(u){h(d,u);function d(o,p){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=p,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return d.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},d.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(p){p.setFoldLine(o)})},d.prototype.clone=function(){var o=this.range.clone(),p=new d(o,this.placeholder);return this.subFolds.forEach(function(m){p.subFolds.push(m.clone())}),p.collapseChildren=this.collapseChildren,p},d.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){f(o,this.start);for(var p=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(p,m),x==1);w++);var R=this.subFolds[w],T=0;if(x==0){if(R.range.containsRange(o))return R.addSubFold(o);T=1}for(var p=o.range.end.row,m=o.range.end.column,_=w,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(p,m),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(w,_-w,o),P=x==0?C.length-1:C.length,O=T;O<P;O++)o.addSubFold(C[O]);return o.setFoldLine(this.foldLine),o}},d.prototype.restoreRange=function(o){return l(o,this.start)},d})(g);function s(u,d){u.row-=d.row,u.row==0&&(u.column-=d.column)}function f(u,d){s(u.start,d),s(u.end,d)}function a(u,d){u.row==0&&(u.column+=d.column),u.row+=d.row}function l(u,d){a(u.start,d),a(u.end,d)}r.Fold=v}),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(t,r,c){var h=t("../range").Range,g=t("./fold_line").FoldLine,v=t("./fold").Fold,s=t("../token_iterator").TokenIterator,f=t("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,u,d){var o=this.getFoldLine(l);if(!o)return null;for(var p=o.folds,m=0;m<p.length;m++){var w=p[m].range;if(w.contains(l,u)){if(d==1&&w.isEnd(l,u)&&!w.isEmpty()||d==-1&&w.isStart(l,u)&&!w.isEmpty())continue;return p[m]}}},this.getFoldsInRange=function(l){var u=l.start,d=l.end,o=this.$foldData,p=[];u.column+=1,d.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(l);if(w!=2){if(w==-2)break;for(var x=o[m].folds,R=0;R<x.length;R++){var T=x[R];if(w=T.range.compareRange(l),w==-2)break;if(w!=2){if(w==42)break;p.push(T)}}}}return u.column-=1,d.column+=1,p},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var u=[];l.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(l);return u},this.getAllFolds=function(){for(var l=[],u=this.$foldData,d=0;d<u.length;d++)for(var o=0;o<u[d].folds.length;o++)l.push(u[d].folds[o]);return l},this.getFoldStringAt=function(l,u,d,o){if(o=o||this.getFoldLine(l),!o)return null;for(var p={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var R=w.range.compareEnd(l,u);if(R==-1){m=this.getLine(w.start.row).substring(p.end.column,w.start.column);break}else if(R===0)return null;p=w}return m||(m=this.getLine(w.start.row).substring(p.end.column)),d==-1?m.substring(0,u-p.end.column):d==1?m.substring(u-p.end.column):m},this.getFoldLine=function(l,u){var d=this.$foldData,o=0;for(u&&(o=d.indexOf(u)),o==-1&&(o=0),o;o<d.length;o++){var p=d[o];if(p.start.row<=l&&p.end.row>=l)return p;if(p.end.row>l)return null}return null},this.getNextFoldLine=function(l,u){var d=this.$foldData,o=0;for(u&&(o=d.indexOf(u)),o==-1&&(o=0),o;o<d.length;o++){var p=d[o];if(p.end.row>=l)return p}return null},this.getFoldedRowCount=function(l,u){for(var d=this.$foldData,o=u-l+1,p=0;p<d.length;p++){var m=d[p],w=m.end.row,x=m.start.row;if(w>=u){x<u&&(x>=l?o-=u-x:o=0);break}else w>=l&&(x>=l?o-=w-x:o-=w-l+1)}return o},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(u,d){return u.start.row-d.start.row}),l},this.addFold=function(l,u){var d=this.$foldData,o=!1,p;l instanceof v?p=l:(p=new v(u,l),p.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(p.range);var m=p.start.row,w=p.start.column,x=p.end.row,R=p.end.column,T=this.getFoldAt(m,w,1),_=this.getFoldAt(x,R,-1);if(T&&_==T)return T.addSubFold(p);T&&!T.range.isStart(m,w)&&this.removeFold(T),_&&!_.range.isEnd(x,R)&&this.removeFold(_);var C=this.getFoldsInRange(p.range);C.length>0&&(this.removeFolds(C),p.collapseChildren||C.forEach(function(k){p.addSubFold(k)}));for(var P=0;P<d.length;P++){var O=d[P];if(x==O.start.row){O.addFold(p),o=!0;break}else if(m==O.end.row){if(O.addFold(p),o=!0,!p.sameRow){var E=d[P+1];if(E&&E.start.row==x){O.merge(E);break}}break}else if(x<=O.start.row)break}return o||(O=this.$addFoldLine(new g(this.$foldData,p))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:p,action:"add"}),p},this.addFolds=function(l){l.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(l){var u=l.foldLine,d=u.start.row,o=u.end.row,p=this.$foldData,m=u.folds;if(m.length==1)p.splice(p.indexOf(u),1);else if(u.range.isEnd(l.end.row,l.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(l.start.row,l.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(l.sameRow)m.splice(m.indexOf(l),1);else{var w=u.split(l.start.row,l.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(d,o):this.$updateRowLengthCache(d,o)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var u=[],d=0;d<l.length;d++)u.push(l[d]);u.forEach(function(o){this.removeFold(o)},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 d,o;if(l==null)d=new h(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof l=="number")d=new h(l,0,l,this.getLine(l).length);else if("row"in l)d=h.fromPoints(l,l);else{if(Array.isArray(l))return o=[],l.forEach(function(m){o=o.concat(this.unfold(m))},this),o;d=l}o=this.getFoldsInRangeList(d);for(var p=o;o.length==1&&h.comparePoints(o[0].start,d.start)<0&&h.comparePoints(o[0].end,d.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(d);if(u!=!1?this.removeFolds(o):this.expandFolds(o),p.length)return p},this.isRowFolded=function(l,u){return!!this.getFoldLine(l,u)},this.getRowFoldEnd=function(l,u){var d=this.getFoldLine(l,u);return d?d.end.row:l},this.getRowFoldStart=function(l,u){var d=this.getFoldLine(l,u);return d?d.start.row:l},this.getFoldDisplayLine=function(l,u,d,o,p){o==null&&(o=l.start.row),p==null&&(p=0),u==null&&(u=l.end.row),d==null&&(d=this.getLine(u).length);var m=this.doc,w="";return l.walk(function(x,R,T,_){if(!(R<o)){if(R==o){if(T<p)return;_=Math.max(p,_)}x!=null?w+=x:w+=m.getLine(R).substring(_,T)}},u,d),w},this.getDisplayLine=function(l,u,d,o){var p=this.getFoldLine(l);if(p)return this.getFoldDisplayLine(p,l,u,d,o);var m;return m=this.doc.getLine(l),m.substring(o||0,u||m.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(u){var d=u.folds.map(function(o){return o.clone()});return new g(l,d)}),l},this.toggleFold=function(l){var u=this.selection,d=u.getRange(),o,p;if(d.isEmpty()){var m=d.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(l){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(p=this.findMatchingBracket(m))?d.comparePoint(p)==1?d.end=p:(d.start=p,d.start.column++,d.end.column--):(p=this.findMatchingBracket({row:m.row,column:m.column+1}))?(d.comparePoint(p)==1?d.end=p:d.start=p,d.start.column++):d=this.getCommentFoldRange(m.row,m.column)||d}else{var x=this.getFoldsInRange(d);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(d.start.row,d.start.column)),o&&o.range.toString()==d.toString()){this.expandFold(o);return}var R="...";if(!d.isMultiLine()){if(R=this.getTextRange(d),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,d)},this.getCommentFoldRange=function(l,u,d){var o=new s(this,l,u),p=o.getCurrentToken(),m=p&&p.type;if(p&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new h;if(d!=1){do p=o.stepBackward();while(p&&w.test(p.type));p=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+p.value.length,o=new s(this,l,u);var R=this.getState(o.$row);if(d!=-1){var T=-1;do if(p=o.stepForward(),T==-1){var _=this.getState(o.$row);R.toString()!==_.toString()&&(T=o.$row)}else if(o.$row>T)break;while(p&&w.test(p.type));p=o.stepBackward()}else p=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(l,u,d,o){d==null&&(d=1e5);var p=this.foldWidgets;if(p){u=u||this.getLength(),l=l||0;for(var m=l;m<u;m++)if(p[m]==null&&(p[m]=this.getFoldWidget(m)),p[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=l&&(m=w.end.row,w.collapseChildren=d,this.addFold("...",w))}}},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 d=l.getTokens(u),o=0;o<d.length;o++){var p=d[o];if(!(p.type=="text"&&/^\s+$/.test(p.value)))return!!/comment/.test(p.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 d=this.foldWidgets;if(!d||u&&d[l])return{};for(var o=l-1,p;o>=0;){var m=d[o];if(m==null&&(m=d[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(p||(p=w),w&&w.end.row>=l)break}o--}return{range:o!==-1&&w,firstRange:p}},this.onFoldWidgetClick=function(l,u){u instanceof f&&(u=u.domEvent);var d={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(l,d);if(!o){var p=u.target||u.srcElement;p&&/ace_fold-widget/.test(p.className)&&(p.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,u){if(this.getFoldWidget){var d=this.getFoldWidget(l),o=this.getLine(l),p=d==="end"?-1:1,m=this.getFoldAt(l,p===-1?0:o.length,p);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(l,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var R=x.range.start.row+1,T=x.range.end.row;this.foldAll(R,T,u.all?1e4:0)}else u.children?(T=w?w.end.row:this.getLength(),this.foldAll(l+1,T,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(l){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var d=this.$toggleFoldWidget(u,{});if(!d){var o=this.getParentFoldRangeData(u,!0);if(d=o.range||o.firstRange,d){u=d.start.row;var p=this.getFoldAt(u,this.getLine(u).length,1);p?this.removeFold(p):this.addFold("...",d)}}},this.updateFoldWidgets=function(l){var u=l.start.row,d=l.end.row-u;if(d===0)this.foldWidgets[u]=null;else if(l.action=="remove")this.foldWidgets.splice(u,d+1,null);else{var o=Array(d+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},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(t,r,c){var h=t("../token_iterator").TokenIterator,g=t("../range").Range;function v(){this.findMatchingBracket=function(s,f){if(s.column==0)return null;var a=f||this.getLine(s.row).charAt(s.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],s):this.$findOpeningBracket(l[2],s):null},this.getBracketRange=function(s){var f=this.getLine(s.row),a=!0,l,u=f.charAt(s.column-1),d=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(d||(u=f.charAt(s.column),s={row:s.row,column:s.column+1},d=u&&u.match(/([\(\[\{])|([\)\]\}])/),a=!1),!d)return null;if(d[1]){var o=this.$findClosingBracket(d[1],s);if(!o)return null;l=g.fromPoints(s,o),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var o=this.$findOpeningBracket(d[2],s);if(!o)return null;l=g.fromPoints(o,s),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(s,f){var a=this.getLine(s.row),l=/([\(\[\{])|([\)\]\}])/,u=!f&&a.charAt(s.column-1),d=u&&u.match(l);if(d||(u=(f===void 0||f)&&a.charAt(s.column),s={row:s.row,column:s.column+1},d=u&&u.match(l)),!d)return null;var o=new g(s.row,s.column-1,s.row,s.column),p=d[1]?this.$findClosingBracket(d[1],s):this.$findOpeningBracket(d[2],s);if(!p)return[o];var m=new g(p.row,p.column,p.row,p.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,f,a){var l=this.$brackets[s],u=1,d=new h(this,f.row,f.column),o=d.getCurrentToken();if(o||(o=d.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var p=f.column-d.getCurrentTokenColumn()-2,m=o.value;;){for(;p>=0;){var w=m.charAt(p);if(w==l){if(u-=1,u==0)return{row:d.getCurrentTokenRow(),column:p+d.getCurrentTokenColumn()}}else w==s&&(u+=1);p-=1}do o=d.stepBackward();while(o&&!a.test(o.type));if(o==null)break;m=o.value,p=m.length-1}return null}},this.$findClosingBracket=function(s,f,a){var l=this.$brackets[s],u=1,d=new h(this,f.row,f.column),o=d.getCurrentToken();if(o||(o=d.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var p=f.column-d.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;p<w;){var x=m.charAt(p);if(x==l){if(u-=1,u==0)return{row:d.getCurrentTokenRow(),column:p+d.getCurrentTokenColumn()}}else x==s&&(u+=1);p+=1}do o=d.stepForward();while(o&&!a.test(o.type));if(o==null)break;p=0}return null}},this.getMatchingTags=function(s){var f=new h(this,s.row,s.column),a=this.$findTagName(f);if(a){var l=f.stepBackward();return l.value==="<"?this.$findClosingTag(f,a):this.$findOpeningTag(f,a)}},this.$findTagName=function(s){var f=s.getCurrentToken(),a=!1,l=!1;if(f&&f.type.indexOf("tag-name")===-1)do l?f=s.stepBackward():f=s.stepForward(),f&&(f.value==="/>"?l=!0:f.type.indexOf("tag-name")!==-1&&(a=!0));while(f&&!a);return f},this.$findClosingTag=function(s,f){var a,l=f.value,u=f.value,d=0,o=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);f=s.stepForward();var p=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length),m=!1;do{if(a=f,a.type.indexOf("tag-close")!==-1&&!m){var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(f=s.stepForward(),f){if(f.value===">"&&!m){var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(f.type.indexOf("tag-name")!==-1){if(l=f.value,u===l){if(a.value==="<")d++;else if(a.value==="</"&&(d--,d<0)){s.stepBackward();var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);f=s.stepForward();var R=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=s.stepForward()),f&&f.value===">")var T=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(u===l&&f.value==="/>"&&(d--,d<0))var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),R=x,T=R,w=new g(p.end.row,p.end.column,p.end.row,p.end.column+1)}}while(f&&d>=0);if(o&&w&&x&&T&&p&&R)return{openTag:new g(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,T.end.row,T.end.column),openTagName:p,closeTagName:R}},this.$findOpeningTag=function(s,f){var a=s.getCurrentToken(),l=f.value,u=0,d=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),p=o+2,m=new g(d,o,d,p);s.stepForward();var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=s.stepForward()),!(!f||f.value!==">")){var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(f=a,d=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),p=o+f.value.length,a=s.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(l===f.value)if(a.value==="<"){if(u++,u>0){var R=new g(d,o,d,p),T=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do f=s.stepForward();while(f&&f.value!==">");var _=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else a.value==="</"&&u--}else if(f.value==="/>"){for(var C=0,P=a;P;){if(P.type.indexOf("tag-name")!==-1&&P.value===l){u--;break}else if(P.value==="<")break;P=s.stepBackward(),C++}for(var O=0;O<C;O++)s.stepForward()}}while(a&&u<=0);if(T&&_&&m&&x&&R&&w)return{openTag:new g(T.start.row,T.start.column,_.end.row,_.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:w}}}}r.BracketMatch=v}),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(t,r,c){var h=t("./lib/oop"),g=t("./lib/lang"),v=t("./bidihandler").BidiHandler,s=t("./config"),f=t("./lib/event_emitter").EventEmitter,a=t("./selection").Selection,l=t("./mode/text").Mode,u=t("./range").Range,d=t("./line_widgets").LineWidgets,o=t("./document").Document,p=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,x=(function(){function N(I,$){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"+ ++N.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new p(new l().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(D){A._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof I!="object"||!I.getLine)&&(I=new o(I)),this.setDocument(I),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 v(this),s.resetOptions(this),this.setMode($),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return N.prototype.$initOperationListeners=function(){var I=this;this.curOp=null,this.on("change",function(){I.curOp||(I.startOperation(),I.curOp.selectionBefore=I.$lastSel),I.curOp.docChanged=!0},!0),this.on("changeSelection",function(){I.curOp||(I.startOperation(),I.curOp.selectionBefore=I.$lastSel),I.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},N.prototype.startOperation=function(I){if(this.curOp){if(!I||this.curOp.command)return;this.prevOp=this.curOp}I||(I={}),this.$operationResetTimer.schedule(),this.curOp={command:I.command||{},args:I.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",I)},N.prototype.endOperation=function(I){if(this.curOp){if(I&&I.returnValue===!1){this.curOp=null,this._signal("endOperation",I);return}if(I==!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",I)}},N.prototype.setDocument=function(I){this.doc&&this.doc.off("change",this.$onChange),this.doc=I,I.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},N.prototype.getDocument=function(){return this.doc},Object.defineProperty(N.prototype,"widgetManager",{get:function(){var I=new d(this);return this.widgetManager=I,this.$editor&&I.attach(this.$editor),I},set:function(I){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:I})},enumerable:!1,configurable:!0}),N.prototype.$resetRowCache=function(I){if(!I){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,I)+1;$>A&&(this.$docRowCache.splice(A,$),this.$screenRowCache.splice(A,$))},N.prototype.$getRowCacheIndex=function(I,$){for(var A=0,D=I.length-1;A<=D;){var j=A+D>>1,U=I[j];if($>U)A=j+1;else if($<U)D=j-1;else return j}return A-1},N.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},N.prototype.onChangeFold=function(I){var $=I.data;this.$resetRowCache($.start.row)},N.prototype.onChange=function(I){this.$modified=!0,this.$bidiHandler.onChange(I),this.$resetRowCache(I.start.row);var $=this.$updateInternalDataOnChange(I);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(I,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(I),this._signal("change",I)},N.prototype.onSelectionChange=function(){this._signal("changeSelection")},N.prototype.setValue=function(I){this.doc.setValue(I),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},N.fromJSON=function(I){typeof I=="string"&&(I=JSON.parse(I));var $=new w;I.history&&($.$undoStack=I.history.$undoStack||[],$.$redoStack=I.history.$redoStack||[],$.mark=I.history.mark||0,$.$rev=I.history.rev||0);var A=new N(I.value);return I.folds.forEach(function(D){A.addFold("...",u.fromPoints(D.start,D.end))}),A.setAnnotations(I.annotations),A.setBreakpoints(I.breakpoints),A.setMode(I.mode),A.setScrollLeft(I.scrollLeft),A.setScrollTop(I.scrollTop),A.setUndoManager($),A.selection.fromJSON(I.selection),A},N.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(I){return I.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},N.prototype.toString=function(){return this.doc.getValue()},N.prototype.getSelection=function(){return this.selection},N.prototype.getState=function(I){return this.bgTokenizer.getState(I)},N.prototype.getTokens=function(I){return this.bgTokenizer.getTokens(I)},N.prototype.getTokenAt=function(I,$){var A=this.bgTokenizer.getTokens(I),D,j=0;if($==null){var U=A.length-1;j=this.getLine(I).length}else for(var U=0;U<A.length&&(j+=A[U].value.length,!(j>=$));U++);return D=A[U],D?(D.index=U,D.start=j-D.value.length,D):null},N.prototype.setUndoManager=function(I){if(this.$undoManager=I,this.$informUndoManager&&this.$informUndoManager.cancel(),I){var $=this;I.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},N.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},N.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},N.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},N.prototype.setUseSoftTabs=function(I){this.setOption("useSoftTabs",I)},N.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},N.prototype.setTabSize=function(I){this.setOption("tabSize",I)},N.prototype.getTabSize=function(){return this.$tabSize},N.prototype.isTabStop=function(I){return this.$useSoftTabs&&I.column%this.$tabSize===0},N.prototype.setNavigateWithinSoftTabs=function(I){this.setOption("navigateWithinSoftTabs",I)},N.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},N.prototype.setOverwrite=function(I){this.setOption("overwrite",I)},N.prototype.getOverwrite=function(){return this.$overwrite},N.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},N.prototype.addGutterDecoration=function(I,$){this.$decorations[I]||(this.$decorations[I]=""),this.$decorations[I]+=" "+$,this._signal("changeBreakpoint",{})},N.prototype.removeGutterCustomWidget=function(I){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(I)},N.prototype.addGutterCustomWidget=function(I,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(I,$)},N.prototype.removeGutterDecoration=function(I,$){this.$decorations[I]=(this.$decorations[I]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},N.prototype.getBreakpoints=function(){return this.$breakpoints},N.prototype.setBreakpoints=function(I){this.$breakpoints=[];for(var $=0;$<I.length;$++)this.$breakpoints[I[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},N.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},N.prototype.setBreakpoint=function(I,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[I]=$:delete this.$breakpoints[I],this._signal("changeBreakpoint",{})},N.prototype.clearBreakpoint=function(I){delete this.$breakpoints[I],this._signal("changeBreakpoint",{})},N.prototype.addMarker=function(I,$,A,D){var j=this.$markerId++,U={range:I,type:A||"line",renderer:typeof A=="function"?A:null,clazz:$,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},N.prototype.addDynamicMarker=function(I,$){if(I.update){var A=this.$markerId++;return I.id=A,I.inFront=!!$,$?(this.$frontMarkers[A]=I,this._signal("changeFrontMarker")):(this.$backMarkers[A]=I,this._signal("changeBackMarker")),I}},N.prototype.removeMarker=function(I){var $=this.$frontMarkers[I]||this.$backMarkers[I];if($){var A=$.inFront?this.$frontMarkers:this.$backMarkers;delete A[I],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},N.prototype.getMarkers=function(I){return I?this.$frontMarkers:this.$backMarkers},N.prototype.highlight=function(I){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(I)},N.prototype.highlightLines=function(I,$,A,D){typeof $!="number"&&(A=$,$=I),A||(A="ace_step");var j=new u(I,0,$,1/0);return j.id=this.addMarker(j,A,"fullLine",D),j},N.prototype.setAnnotations=function(I){this.$annotations=I,this._signal("changeAnnotation",{})},N.prototype.getAnnotations=function(){return this.$annotations||[]},N.prototype.clearAnnotations=function(){this.setAnnotations([])},N.prototype.$detectNewLine=function(I){var $=I.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
201
+ `},N.prototype.getWordRange=function(I,$){var A=this.getLine(I),D=!1;if($>0&&(D=!!A.charAt($-1).match(this.tokenRe)),D||(D=!!A.charAt($).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(A.slice($-1,$+1)))var j=/\s/;else var j=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&A.charAt(U).match(j));U++}for(var q=$;q<A.length&&A.charAt(q).match(j);)q++;return new u(I,U,I,q)},N.prototype.getAWordRange=function(I,$){for(var A=this.getWordRange(I,$),D=this.getLine(A.end.row);D.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},N.prototype.setNewLineMode=function(I){this.doc.setNewLineMode(I)},N.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},N.prototype.setUseWorker=function(I){this.setOption("useWorker",I)},N.prototype.getUseWorker=function(){return this.$useWorker},N.prototype.onReloadTokenizer=function(I){var $=I.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",I)},N.prototype.setMode=function(I,$){if(I&&typeof I=="object"){if(I.getTokenizer)return this.$onChangeMode(I);var A=I,D=A.path}else D=I||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[D]&&!A){this.$onChangeMode(this.$modes[D]),$&&$();return}this.$modeId=D,s.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return $&&$();this.$modes[D]&&!A?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(A),A||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},N.prototype.$onChangeMode=function(I,$){if($||(this.$modeId=I.$id),this.$mode!==I){var A=this.$mode;this.$mode=I,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=I.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=I.tokenRe,this.nonTokenRe=I.nonTokenRe,$||(I.attachToSession&&I.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(I.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:I}))}},N.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},N.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(I){s.warn("Could not load worker",I),this.$worker=null}},N.prototype.getMode=function(){return this.$mode},N.prototype.setScrollTop=function(I){this.$scrollTop===I||isNaN(I)||(this.$scrollTop=I,this._signal("changeScrollTop",I))},N.prototype.getScrollTop=function(){return this.$scrollTop},N.prototype.setScrollLeft=function(I){this.$scrollLeft===I||isNaN(I)||(this.$scrollLeft=I,this._signal("changeScrollLeft",I))},N.prototype.getScrollLeft=function(){return this.$scrollLeft},N.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},N.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var I=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>I&&(I=$.screenWidth)}),this.lineWidgetWidth=I},N.prototype.$computeWidth=function(I){if(this.$modified||I){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),A=this.$rowLengthCache,D=0,j=0,U=this.$foldData[j],q=U?U.start.row:1/0,Q=$.length,re=0;re<Q;re++){if(re>q){if(re=U.end.row+1,re>=Q)break;U=this.$foldData[j++],q=U?U.start.row:1/0}A[re]==null&&(A[re]=this.$getStringScreenWidth($[re])[0]),A[re]>D&&(D=A[re])}this.screenWidth=D}},N.prototype.getLine=function(I){return this.doc.getLine(I)},N.prototype.getLines=function(I,$){return this.doc.getLines(I,$)},N.prototype.getLength=function(){return this.doc.getLength()},N.prototype.getTextRange=function(I){return this.doc.getTextRange(I||this.selection.getRange())},N.prototype.insert=function(I,$){return this.doc.insert(I,$)},N.prototype.remove=function(I){return this.doc.remove(I)},N.prototype.removeFullLines=function(I,$){return this.doc.removeFullLines(I,$)},N.prototype.undoChanges=function(I,$){if(I.length){this.$fromUndo=!0;for(var A=I.length-1;A!=-1;A--){var D=I[A];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!$&&this.$undoSelect&&(I.selectionBefore?this.selection.fromJSON(I.selectionBefore):this.selection.setRange(this.$getUndoSelection(I,!0))),this.$fromUndo=!1}},N.prototype.redoChanges=function(I,$){if(I.length){this.$fromUndo=!0;for(var A=0;A<I.length;A++){var D=I[A];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!$&&this.$undoSelect&&(I.selectionAfter?this.selection.fromJSON(I.selectionAfter):this.selection.setRange(this.$getUndoSelection(I,!1))),this.$fromUndo=!1}},N.prototype.setUndoSelect=function(I){this.$undoSelect=I},N.prototype.$getUndoSelection=function(I,$){function A(Q){return $?Q.action!=="insert":Q.action==="insert"}for(var D,j,U=0;U<I.length;U++){var q=I[U];if(q.start){if(!D){A(q)?D=u.fromPoints(q.start,q.end):D=u.fromPoints(q.start,q.start);continue}A(q)?(j=q.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=q.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=q.start,D.compare(j.row,j.column)==-1&&(D=u.fromPoints(q.start,q.start)))}}return D},N.prototype.replace=function(I,$){return this.doc.replace(I,$)},N.prototype.moveText=function(I,$,A){var D=this.getTextRange(I),j=this.getFoldsInRange(I),U=u.fromPoints($,$);if(!A){this.remove(I);var q=I.start.row-I.end.row,Q=q?-I.end.column:I.start.column-I.end.column;Q&&(U.start.row==I.end.row&&U.start.column>I.end.column&&(U.start.column+=Q),U.end.row==I.end.row&&U.end.column>I.end.column&&(U.end.column+=Q)),q&&U.start.row>=I.end.row&&(U.start.row+=q,U.end.row+=q)}if(U.end=this.insert(U.start,D),j.length){var re=I.start,le=U.start,q=le.row-re.row,Q=le.column-re.column;this.addFolds(j.map(function(he){return he=he.clone(),he.start.row==re.row&&(he.start.column+=Q),he.end.row==re.row&&(he.end.column+=Q),he.start.row+=q,he.end.row+=q,he}))}return U},N.prototype.indentRows=function(I,$,A){A=A.replace(/\t/g,this.getTabString());for(var D=I;D<=$;D++)this.doc.insertInLine({row:D,column:0},A)},N.prototype.outdentRows=function(I){for(var $=I.collapseRows(),A=new u(0,0,0,0),D=this.getTabSize(),j=$.start.row;j<=$.end.row;++j){var U=this.getLine(j);A.start.row=j,A.end.row=j;for(var q=0;q<D&&U.charAt(q)==" ";++q);q<D&&U.charAt(q)==" "?(A.start.column=q,A.end.column=q+1):(A.start.column=0,A.end.column=q),this.remove(A)}},N.prototype.$moveLines=function(I,$,A){if(I=this.getRowFoldStart(I),$=this.getRowFoldEnd($),A<0){var D=this.getRowFoldStart(I+A);if(D<0)return 0;var j=D-I}else if(A>0){var D=this.getRowFoldEnd($+A);if(D>this.doc.getLength()-1)return 0;var j=D-$}else{I=this.$clipRowToDocument(I),$=this.$clipRowToDocument($);var j=$-I+1}var U=new u(I,0,$,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(re){return re=re.clone(),re.start.row+=j,re.end.row+=j,re}),Q=A==0?this.doc.getLines(I,$):this.doc.removeFullLines(I,$);return this.doc.insertFullLines(I+j,Q),q.length&&this.addFolds(q),j},N.prototype.moveLinesUp=function(I,$){return this.$moveLines(I,$,-1)},N.prototype.moveLinesDown=function(I,$){return this.$moveLines(I,$,1)},N.prototype.duplicateLines=function(I,$){return this.$moveLines(I,$,0)},N.prototype.$clipRowToDocument=function(I){return Math.max(0,Math.min(I,this.doc.getLength()-1))},N.prototype.$clipColumnToRow=function(I,$){return $<0?0:Math.min(this.doc.getLine(I).length,$)},N.prototype.$clipPositionToDocument=function(I,$){if($=Math.max(0,$),I<0)I=0,$=0;else{var A=this.doc.getLength();I>=A?(I=A-1,$=this.doc.getLine(A-1).length):$=Math.min(this.doc.getLine(I).length,$)}return{row:I,column:$}},N.prototype.$clipRangeToDocument=function(I){I.start.row<0?(I.start.row=0,I.start.column=0):I.start.column=this.$clipColumnToRow(I.start.row,I.start.column);var $=this.doc.getLength()-1;return I.end.row>$?(I.end.row=$,I.end.column=this.doc.getLine($).length):I.end.column=this.$clipColumnToRow(I.end.row,I.end.column),I},N.prototype.setUseWrapMode=function(I){if(I!=this.$useWrapMode){if(this.$useWrapMode=I,this.$modified=!0,this.$resetRowCache(0),I){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},N.prototype.getUseWrapMode=function(){return this.$useWrapMode},N.prototype.setWrapLimitRange=function(I,$){(this.$wrapLimitRange.min!==I||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:I,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},N.prototype.adjustWrapLimit=function(I,$){var A=this.$wrapLimitRange;A.max<0&&(A={min:$,max:$});var D=this.$constrainWrapLimit(I,A.min,A.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},N.prototype.$constrainWrapLimit=function(I,$,A){return $&&(I=Math.max($,I)),A&&(I=Math.min(A,I)),I},N.prototype.getWrapLimit=function(){return this.$wrapLimit},N.prototype.setWrapLimit=function(I){this.setWrapLimitRange(I,I)},N.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},N.prototype.$updateInternalDataOnChange=function(I){var $=this.$useWrapMode,A=I.action,D=I.start,j=I.end,U=D.row,q=j.row,Q=q-U,re=null;if(this.$updating=!0,Q!=0)if(A==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Q);var le=this.$foldData;re=this.getFoldsInRange(I),this.removeFolds(re);var ne=this.getFoldLine(j.row),ue=0;if(ne){ne.addRemoveChars(j.row,j.column,D.column-j.column),ne.shiftRow(-Q);var he=this.getFoldLine(U);he&&he!==ne&&(he.merge(ne),ne=he),ue=le.indexOf(ne)+1}for(ue;ue<le.length;ue++){var ne=le[ue];ne.start.row>=j.row&&ne.shiftRow(-Q)}q=U}else{var oe=Array(Q);oe.unshift(U,0);var ee=$?this.$wrapData:this.$rowLengthCache;ee.splice.apply(ee,oe);var le=this.$foldData,ne=this.getFoldLine(U),ue=0;if(ne){var ye=ne.range.compareInside(D.row,D.column);ye==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Q),ne.addRemoveChars(q,0,j.column-D.column))):ye==-1&&(ne.addRemoveChars(U,0,j.column-D.column),ne.shiftRow(Q)),ue=le.indexOf(ne)+1}for(ue;ue<le.length;ue++){var ne=le[ue];ne.start.row>=U&&ne.shiftRow(Q)}}else{Q=Math.abs(I.start.column-I.end.column),A==="remove"&&(re=this.getFoldsInRange(I),this.removeFolds(re),Q=-Q);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Q)}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,q):this.$updateRowLengthCache(U,q),re},N.prototype.$updateRowLengthCache=function(I,$){this.$rowLengthCache[I]=null,this.$rowLengthCache[$]=null},N.prototype.$updateWrapData=function(I,$){var A=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,q,Q,re=I;for($=Math.min($,A.length-1);re<=$;)Q=this.getFoldLine(re,Q),Q?(q=[],Q.walk((function(le,ne,ue,he){var oe;if(le!=null){oe=this.$getDisplayTokens(le,q.length),oe[0]=_;for(var ee=1;ee<oe.length;ee++)oe[ee]=C}else oe=this.$getDisplayTokens(A[ne].substring(he,ue),q.length);q=q.concat(oe)}).bind(this),Q.end.row,A[Q.end.row].length+1),j[Q.start.row]=this.$computeWrapSplits(q,U,D),re=Q.end.row+1):(q=this.$getDisplayTokens(A[re]),j[re]=this.$computeWrapSplits(q,U,D),re++)},N.prototype.$computeWrapSplits=function(I,$,A){if(I.length==0)return[];var D=[],j=I.length,U=0,q=0,Q=this.$wrapAsCode,re=this.$indentedSoftWrap,le=$<=Math.max(2*A,8)||re===!1?0:Math.floor($/2);function ne(){var ye=0;if(le===0)return ye;if(re)for(var we=0;we<I.length;we++){var Ae=I[we];if(Ae==O)ye+=1;else if(Ae==E)ye+=A;else{if(Ae==k)continue;break}}return Q&&re!==!1&&(ye+=A),Math.min(ye,le)}function ue(ye){for(var we=ye-U,Ae=U;Ae<ye;Ae++){var Je=I[Ae];(Je===12||Je===2)&&(we-=1)}D.length||(he=ne(),D.indent=he),q+=we,D.push(q),U=ye}for(var he=0;j-U>$-he;){var oe=U+$-he;if(I[oe-1]>=O&&I[oe]>=O){ue(oe);continue}if(I[oe]==_||I[oe]==C){for(oe;oe!=U-1&&I[oe]!=_;oe--);if(oe>U){ue(oe);continue}for(oe=U+$,oe;oe<I.length&&I[oe]==C;oe++);if(oe==I.length)break;ue(oe);continue}for(var ee=Math.max(oe-($-($>>2)),U-1);oe>ee&&I[oe]<_;)oe--;if(Q){for(;oe>ee&&I[oe]<_;)oe--;for(;oe>ee&&I[oe]==P;)oe--}else for(;oe>ee&&I[oe]<O;)oe--;if(oe>ee){ue(++oe);continue}oe=U+$,I[oe]==T&&oe--,ue(oe-he)}return D},N.prototype.$getDisplayTokens=function(I,$){var A=[],D;$=$||0;for(var j=0;j<I.length;j++){var U=I.charCodeAt(j);if(U==9){D=this.getScreenTabSize(A.length+$),A.push(E);for(var q=1;q<D;q++)A.push(k)}else U==32?A.push(O):U>39&&U<48||U>57&&U<64?A.push(P):U>=4352&&B(U)?A.push(R,T):A.push(R)}return A},N.prototype.$getStringScreenWidth=function(I,$,A){if($==0)return[0,0];$==null&&($=1/0),A=A||0;var D,j;for(j=0;j<I.length&&(D=I.charCodeAt(j),D==9?A+=this.getScreenTabSize(A):A+=1,!(A>$));j++);return[A,j]},N.prototype.getRowLength=function(I){var $=1;return this.lineWidgets&&($+=this.lineWidgets[I]&&this.lineWidgets[I].rowCount||0),!this.$useWrapMode||!this.$wrapData[I]?$:this.$wrapData[I].length+$},N.prototype.getRowLineCount=function(I){return!this.$useWrapMode||!this.$wrapData[I]?1:this.$wrapData[I].length+1},N.prototype.getRowWrapIndent=function(I){if(this.$useWrapMode){var $=this.screenToDocumentPosition(I,Number.MAX_VALUE),A=this.$wrapData[$.row];return A.length&&A[0]<$.column?A.indent:0}else return 0},N.prototype.getScreenLastRowColumn=function(I){var $=this.screenToDocumentPosition(I,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},N.prototype.getDocumentLastRowColumn=function(I,$){var A=this.documentToScreenRow(I,$);return this.getScreenLastRowColumn(A)},N.prototype.getDocumentLastRowColumnPosition=function(I,$){var A=this.documentToScreenRow(I,$);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},N.prototype.getRowSplitData=function(I){if(this.$useWrapMode)return this.$wrapData[I]},N.prototype.getScreenTabSize=function(I){return this.$tabSize-(I%this.$tabSize|0)},N.prototype.screenToDocumentRow=function(I,$){return this.screenToDocumentPosition(I,$).row},N.prototype.screenToDocumentColumn=function(I,$){return this.screenToDocumentPosition(I,$).column},N.prototype.screenToDocumentPosition=function(I,$){if(I<0)return{row:0,column:0};var A,ne=0,D=0,j,le=0,U=0,q=this.$screenRowCache,Q=this.$getRowCacheIndex(q,I),re=q.length;if(re&&Q>=0)var le=q[Q],ne=this.$docRowCache[Q],ue=I>q[re-1];else var ue=!re;for(var he=this.getLength()-1,oe=this.getNextFoldLine(ne),ee=oe?oe.start.row:1/0;le<=I&&(U=this.getRowLength(ne),!(le+U>I||ne>=he));)le+=U,ne++,ne>ee&&(ne=oe.end.row+1,oe=this.getNextFoldLine(ne,oe),ee=oe?oe.start.row:1/0),ue&&(this.$docRowCache.push(ne),this.$screenRowCache.push(le));if(oe&&oe.start.row<=ne)A=this.getFoldDisplayLine(oe),ne=oe.start.row;else{if(le+U<=I||ne>he)return{row:he,column:this.getLine(he).length};A=this.getLine(ne),oe=null}var ye=0,we=Math.floor(I-le);if(this.$useWrapMode){var Ae=this.$wrapData[ne];Ae&&(j=Ae[we],we>0&&Ae.length&&(ye=Ae.indent,D=Ae[we-1]||Ae[Ae.length-1],A=A.substring(D)))}return D+=this.$getStringScreenWidth(A,$-ye)[1],this.$useWrapMode&&D>=j&&(D=j-1),oe?oe.idxToPosition(D):{row:ne,column:D}},N.prototype.documentToScreenPosition=function(I,$){if(typeof $>"u")var A=this.$clipPositionToDocument(I.row,I.column);else A=this.$clipPositionToDocument(I,$);I=A.row,$=A.column;var ne=0,D=null,j=null;j=this.getFoldAt(I,$,1),j&&(I=j.start.row,$=j.start.column);var U,le=0,q=this.$docRowCache,Q=this.$getRowCacheIndex(q,I),re=q.length;if(re&&Q>=0)var le=q[Q],ne=this.$screenRowCache[Q],ue=I>q[re-1];else var ue=!re;for(var he=this.getNextFoldLine(le),oe=he?he.start.row:1/0;le<I;){if(le>=oe){if(U=he.end.row+1,U>I)break;he=this.getNextFoldLine(U,he),oe=he?he.start.row:1/0}else U=le+1;ne+=this.getRowLength(le),le=U,ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne))}var ee="";he&&le>=oe?(ee=this.getFoldDisplayLine(he,I,$),D=he.start.row):(ee=this.getLine(I).substring(0,$),D=I);var ye=0;if(this.$useWrapMode){var we=this.$wrapData[D];if(we){for(var Ae=0;ee.length>=we[Ae];)ne++,Ae++;ee=ee.substring(we[Ae-1]||0,ee.length),ye=Ae>0?we.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(ne+=this.lineWidgets[le].rowsAbove),{row:ne,column:ye+this.$getStringScreenWidth(ee)[0]}},N.prototype.documentToScreenColumn=function(I,$){return this.documentToScreenPosition(I,$).column},N.prototype.documentToScreenRow=function(I,$){return this.documentToScreenPosition(I,$).row},N.prototype.getScreenLength=function(){var I=0,$=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,D=0,j=0,$=this.$foldData[j++],U=$?$.start.row:1/0;D<A;){var q=this.$wrapData[D];I+=q?q.length+1:1,D++,D>U&&(D=$.end.row+1,$=this.$foldData[j++],U=$?$.start.row:1/0)}else{I=this.getLength();for(var Q=this.$foldData,j=0;j<Q.length;j++)$=Q[j],I-=$.end.row-$.start.row}return this.lineWidgets&&(I+=this.$getWidgetScreenLength()),I},N.prototype.$setFontMetrics=function(I){this.$enableVarChar&&(this.$getStringScreenWidth=function($,A,D){if(A===0)return[0,0];A||(A=1/0),D=D||0;var j,U;for(U=0;U<$.length&&(j=$.charAt(U),j===" "?D+=this.getScreenTabSize(D):D+=I.getCharacterWidth(j),!(D>A));U++);return[D,U]})},N.prototype.getPrecedingCharacter=function(){var I=this.selection.getCursor();if(I.column===0)return I.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(I.row);return $[I.column-1]},N.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()},N})();x.$uid=0,x.prototype.$modes=s.$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=B,h.implement(x.prototype,f);var R=1,T=2,_=3,C=4,P=9,O=10,E=11,k=12;function B(N){return N<4352?!1:N>=4352&&N<=4447||N>=4515&&N<=4519||N>=4602&&N<=4607||N>=9001&&N<=9002||N>=11904&&N<=11929||N>=11931&&N<=12019||N>=12032&&N<=12245||N>=12272&&N<=12283||N>=12288&&N<=12350||N>=12353&&N<=12438||N>=12441&&N<=12543||N>=12549&&N<=12589||N>=12593&&N<=12686||N>=12688&&N<=12730||N>=12736&&N<=12771||N>=12784&&N<=12830||N>=12832&&N<=12871||N>=12880&&N<=13054||N>=13056&&N<=19903||N>=19968&&N<=42124||N>=42128&&N<=42182||N>=43360&&N<=43388||N>=44032&&N<=55203||N>=55216&&N<=55238||N>=55243&&N<=55291||N>=63744&&N<=64255||N>=65040&&N<=65049||N>=65072&&N<=65106||N>=65108&&N<=65126||N>=65128&&N<=65131||N>=65281&&N<=65376||N>=65504&&N<=65510}t("./edit_session/folding").Folding.call(x.prototype),t("./edit_session/bracket_match").BracketMatch.call(x.prototype),s.defineOptions(x.prototype,"session",{wrap:{set:function(N){if(!N||N=="off"?N=!1:N=="free"?N=!0:N=="printMargin"?N=-1:typeof N=="string"&&(N=parseInt(N,10)||!1),this.$wrap!=N)if(this.$wrap=N,!N)this.setUseWrapMode(!1);else{var I=typeof N=="number"?N:null;this.setWrapLimitRange(I,I),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(N){N=N=="auto"?this.$mode.type!="text":N!="text",N!=this.$wrapAsCode&&(this.$wrapAsCode=N,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(N){this.$useWorker=N,this.$stopWorker(),N&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(N){N=parseInt(N),N>0&&this.$tabSize!==N&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=N,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(N){this.setFoldStyle(N)},handlesSet:!0},overwrite:{set:function(N){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(N){this.doc.setNewLineMode(N)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(N){this.setMode(N)},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(t,r,c){var h=t("./lib/lang"),g=t("./lib/oop"),v=t("./range").Range,s=(function(){function u(){this.$options={}}return u.prototype.set=function(d){return g.mixin(this.$options,d),this},u.prototype.getOptions=function(){return h.copyObject(this.$options)},u.prototype.setOptions=function(d){this.$options=d},u.prototype.find=function(d){var o=this.$options,p=this.$matchIterator(d,o);if(!p)return!1;var m=null;return p.forEach(function(w,x,R,T){return m=new v(w,x,R,T),x==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(d){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var p=o.range,m=p?d.getLines(p.start.row,p.end.row):d.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var R=x.length,T=m.length-R,_;e:for(var C=x.offset||0;C<=T;C++){for(var P=0;P<R;P++)if(m[C+P].search(x[P])==-1)continue e;var O=m[C],E=m[C+R-1],k=O.length-O.match(x[0])[0].length,B=E.match(x[R-1])[0].length;_&&_.end.row===C&&_.end.column>k||(w.push(_=new v(C,k,C+R-1,B)),R>2&&(C=C+R-2))}}else for(var N,I=0;I<m.length;I++)if(this.$isMultilineSearch(o)){var $=m.length-1;if(N=this.$multiLineForward(d,x,I,$),N){var A=N.endRow<=$?N.endRow-1:$;A>I&&(I=A),w.push(new v(N.startRow,N.startCol,N.endRow,N.endCol))}}else{N=h.getMatchOffsets(m[I],x);for(var P=0;P<N.length;P++){var D=N[P];w.push(new v(I,D.offset,I,D.offset+D.length))}}if(p){for(var j=p.start.column,U=p.end.column,I=0,P=w.length-1;I<P&&w[I].start.column<j&&w[I].start.row==0;)I++;for(var q=p.end.row-p.start.row;I<P&&w[P].end.column>U&&w[P].end.row==q;)P--;for(w=w.slice(I,P+1),I=0,P=w.length;I<P;I++)w[I].start.row+=p.start.row,w[I].end.row+=p.start.row}return w},u.prototype.parseReplaceString=function(d){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},p="",m=0,w=d.length;m<w;m++){var x=d.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){p+="\\";break}var R=d.charCodeAt(m);switch(R){case o.Backslash:p+="\\";break;case o.n:p+=`
202
+ `;break;case o.t:p+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){p+="$";break}var T=d.charCodeAt(m);if(T===o.DollarSign){p+="$$";continue}if(T===o.Digit0||T===o.Ampersand){p+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){p+="$"+d[m];continue}}p+=d[m]}return p||d},u.prototype.replace=function(d,o){var p=this.$options,m=this.$assembleRegExp(p);if(p.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(p);w&&(d=d.replace(/\r\n|\r|\n/g,`
203
+ `));var x=m.exec(d);if(!x||!w&&x[0].length!=d.length)return null;if(o=p.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=d.replace(m,o),p.preserveCase){o=o.split("");for(var R=Math.min(d.length,d.length);R--;){var T=d[R];T&&T.toLowerCase()!=T?o[R]=o[R].toUpperCase():o[R]=o[R].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(d,o){if(d.needle instanceof RegExp)return d.re=d.needle;var p=d.needle;if(!d.needle)return d.re=!1;d.regExp||(p=h.escapeRegExp(p));var m=d.caseSensitive?"gm":"gmi";try{new RegExp(p,"u"),d.$supportsUnicodeFlag=!0,m+="u"}catch{d.$supportsUnicodeFlag=!1}if(d.wholeWord&&(p=f(p,d)),d.$isMultiLine=!o&&/[\n\r]/.test(p),d.$isMultiLine)return d.re=this.$assembleMultilineRegExp(p,m);try{var w=new RegExp(p,m)}catch{w=!1}return d.re=w},u.prototype.$assembleMultilineRegExp=function(d,o){for(var p=d.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),m=[],w=0;w<p.length;w++)try{m.push(new RegExp(p[w],o))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(d){return d.re&&/\\r\\n|\\r|\\n/.test(d.re.source)&&d.regExp&&!d.$isMultiLine},u.prototype.$multiLineForward=function(d,o,p,m){for(var w,x=l(d,p),R=p;R<=m;){for(var T=0;T<x&&!(R>m);T++){var _=d.getLine(R++);w=w==null?_:w+`
206
+ `+_}var C=o.exec(w);if(o.lastIndex=0,C){var P=w.slice(0,C.index).split(`
207
+ `),O=C[0].split(`
208
+ `),E=p+P.length-1,k=P[P.length-1].length,B=E+O.length-1,N=O.length==1?k+O[0].length:O[O.length-1].length;return{startRow:E,startCol:k,endRow:B,endCol:N}}}return null},u.prototype.$multiLineBackward=function(d,o,p,m,w){for(var x,R=l(d,m),T=d.getLine(m).length-p,_=m;_>=w;){for(var C=0;C<R&&_>=w;C++){var P=d.getLine(_--);x=x==null?P:P+`
209
+ `+x}var O=a(x,o,T);if(O){var E=x.slice(0,O.index).split(`
210
+ `),k=O[0].split(`
211
+ `),B=_+E.length,N=E[E.length-1].length,I=B+k.length-1,$=k.length==1?N+k[0].length:k[k.length-1].length;return{startRow:B,startCol:N,endRow:I,endCol:$}}}return null},u.prototype.$matchIterator=function(d,o){var p=this.$assembleRegExp(o);if(!p)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,R=o.backwards==!0,T=o.skipCurrent!=!1,_=p.unicode,C=o.range,P=o.start;P||(P=C?C[R?"end":"start"]:d.selection.getRange()),P.start&&(P=P[T!=R?"end":"start"]);var O=C?C.start.row:0,E=C?C.end.row:d.getLength()-1;if(R)var k=function(I){var $=P.row;if(!N($,P.column,I)){for($--;$>=O;$--)if(N($,Number.MAX_VALUE,I))return;if(o.wrap!=!1){for($=E,O=P.row;$>=O;$--)if(N($,Number.MAX_VALUE,I))return}}};else var k=function(I){var $=P.row;if(!N($,P.column,I)){for($=$+1;$<=E;$++)if(N($,0,I))return;if(o.wrap!=!1){for($=O,E=P.row;$<=E;$++)if(N($,0,I))return}}};if(o.$isMultiLine)var B=p.length,N=function(I,$,A){var D=R?I-B+1:I;if(!(D<0||D+B>d.getLength())){var j=d.getLine(D),U=j.search(p[0]);if(!(!R&&U<$||U===-1)){for(var q=1;q<B;q++)if(j=d.getLine(D+q),j.search(p[q])==-1)return;var Q=j.match(p[B-1])[0].length;if(!(R&&Q>$)&&A(D,U,D+B-1,Q))return!0}}};else if(R)var N=function(I,$,A){if(m){var D=x(d,p,$,I,O);if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=d.getLine(I),U=[],q,Q=0;for(p.lastIndex=0;q=p.exec(j);){var re=q[0].length;if(Q=q.index,!re){if(Q>=j.length)break;p.lastIndex=Q+=h.skipEmptyMatch(j,Q,_)}if(q.index+re>$)break;U.push(q.index,re)}for(var le=U.length-1;le>=0;le-=2){var ne=U[le-1],re=U[le];if(A(I,ne,I,ne+re))return!0}}};else var N=function(I,$,A){if(p.lastIndex=$,m){var D=w(d,p,I,E);if(D){var j=D.endRow<=E?D.endRow-1:E;j>I&&(I=j)}if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=d.getLine(I),q,Q;Q=p.exec(U);){var re=Q[0].length;if(q=Q.index,A(I,q,I,q+re))return!0;if(!re&&(p.lastIndex=q+=h.skipEmptyMatch(U,q,_),q>=U.length))return!1}};return{forEach:k}},u})();function f(u,d){var o=h.supportsLookbehind();function p(R,T){T===void 0&&(T=!0);var _=o&&d.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(R)||d.regExp?o&&d.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),w=m[0],x=m[m.length-1];return p(w)+u+p(x,!1)}function a(u,d,o){for(var p=null,m=0;m<=u.length;){d.lastIndex=m;var w=d.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-o)break;(!p||x>p.index+p[0].length)&&(p=w),m=w.index+1}return p}function l(u,d){var o=5e3,p={row:d,column:0},m=u.doc.positionToIndex(p),w=m+o,x=u.doc.indexToPosition(w),R=x.row;return R+1}r.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,c){var h=this&&this.__extends||(function(){var u=function(d,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(p[w]=m[w])},u(d,o)};return function(d,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(d,o);function p(){this.constructor=d}d.prototype=o===null?Object.create(o):(p.prototype=o.prototype,new p)}})(),g=t("../lib/keys"),v=t("../lib/useragent"),s=g.KEY_MODS,f=(function(){function u(d,o){this.$init(d,o,!1)}return u.prototype.$init=function(d,o,p){this.platform=o||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(d),this.$singleCommand=p},u.prototype.addCommand=function(d){this.commands[d.name]&&this.removeCommand(d),this.commands[d.name]=d,d.bindKey&&this._buildKeyHash(d)},u.prototype.removeCommand=function(d,o){var p=d&&(typeof d=="string"?d:d.name);d=this.commands[p],o||delete this.commands[p];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==d)delete m[w];else if(Array.isArray(x)){var R=x.indexOf(d);R!=-1&&(x.splice(R,1),x.length==1&&(m[w]=x[0]))}}},u.prototype.bindKey=function(d,o,p){if(typeof d=="object"&&d&&(p==null&&(p=d.position),d=d[this.platform]),!!d){if(typeof o=="function")return this.addCommand({exec:o,bindKey:d,name:o.name||d});d.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),P=s[C.hashId]+C.key;w+=(w?" ":"")+P,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),T=s[R.hashId]+R.key;this._addCommandToBinding(w+T,o,p)},this)}},u.prototype._addCommandToBinding=function(d,o,p){var m=this.commandKeyBinding,w;if(!o)delete m[d];else if(!m[d]||this.$singleCommand)m[d]=o;else{Array.isArray(m[d])?(w=m[d].indexOf(o))!=-1&&m[d].splice(w,1):m[d]=[m[d]],typeof p!="number"&&(p=a(o));var x=m[d];for(w=0;w<x.length;w++){var R=x[w],T=a(R);if(T>p)break}x.splice(w,0,o)}},u.prototype.addCommands=function(d){d&&Object.keys(d).forEach(function(o){var p=d[o];if(p){if(typeof p=="string")return this.bindKey(p,o);typeof p=="function"&&(p={exec:p}),typeof p=="object"&&(p.name||(p.name=o),this.addCommand(p))}},this)},u.prototype.removeCommands=function(d){Object.keys(d).forEach(function(o){this.removeCommand(d[o])},this)},u.prototype.bindKeys=function(d){Object.keys(d).forEach(function(o){this.bindKey(o,d[o])},this)},u.prototype._buildKeyHash=function(d){this.bindKey(d.bindKey,d)},u.prototype.parseKeys=function(d){var o=d.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),p=o.pop(),m=g[p];if(g.FUNCTION_KEYS[m])p=g.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:p.toUpperCase(),hashId:-1}}else return{key:p,hashId:-1};for(var w=0,x=o.length;x--;){var R=g.KEY_MODS[o[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+d),!1;w|=R}return{key:p,hashId:w}},u.prototype.findKeyCommand=function(d,o){var p=s[d]+o;return this.commandKeyBinding[p]},u.prototype.handleKeyboard=function(d,o,p,m){if(!(m<0)){var w=s[o]+p,x=this.commandKeyBinding[w];return d.$keyChain&&(d.$keyChain+=" "+w,x=this.commandKeyBinding[d.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(d.$keyChain=d.$keyChain||w,{command:"null"}):(d.$keyChain&&((!o||o==4)&&p.length==1?d.$keyChain=d.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(d.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(d,o){return o.$keyChain||""},u})();function a(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var l=(function(u){h(d,u);function d(o,p){var m=u.call(this,o,p)||this;return m.$singleCommand=!0,m}return d})(f);l.call=function(u,d,o){f.prototype.$init.call(u,d,o,!0)},f.call=function(u,d,o){f.prototype.$init.call(u,d,o,!1)},r.HashHandler=l,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,r,c){var h=this&&this.__extends||(function(){var a=function(l,u){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var p in o)Object.prototype.hasOwnProperty.call(o,p)&&(d[p]=o[p])},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 d(){this.constructor=l}l.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})(),g=t("../lib/oop"),v=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,f=(function(a){h(l,a);function l(u,d){var o=a.call(this,d,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(p){return p.args?p.command.exec(p.editor,p.args,p.event,!1):p.command.exec(p.editor,{},p.event,!0)}),o}return l.prototype.exec=function(u,d,o){if(Array.isArray(u)){for(var p=u.length;p--;)if(this.exec(u[p],d,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:d,command:u,args:o};return this.canExecute(u,d)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},l.prototype.canExecute=function(u,d){return typeof u=="string"&&(u=this.commands[u]),!(!u||d&&d.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(d))},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(d){this.macro.push([d.command,d.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(d){typeof d=="string"?this.exec(d,u):this.exec(d[0],u,d[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(u){return u.map(function(d){return typeof d[0]!="string"&&(d[0]=d[0].name),d[1]||(d=d[0]),d})},l})(v);g.implement(f.prototype,s),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,r,c){var h=t("../lib/lang"),g=t("../config"),v=t("../range").Range;function s(a,l){return{win:a,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(a){g.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("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:s("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:s("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:s("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("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:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("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:s("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:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(a){g.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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("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:s("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:s("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:s("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:s("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:s("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("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:s("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:s("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("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:s(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("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:s(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:s("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("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:s("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("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:s("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:s(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:s("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("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:s("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:s("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("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:s("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:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("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(h.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("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:s("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(a){for(var l=a.selection.isBackwards(),u=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),d=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),o=a.session.doc.getLine(u.row).length,p=a.session.doc.getTextRange(a.selection.getRange()),m=p.replace(/\n\s*/," ").length,w=a.session.doc.getLine(u.row),x=u.row+1;x<=d.row+1;x++){var R=h.stringTrimLeft(h.stringTrimRight(a.session.doc.getLine(x)));R.length!==0&&(R=" "+R),w+=R}d.row+1<a.session.doc.getLength()-1&&(w+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new v(u.row,0,d.row+2,0),w),m>0?(a.selection.moveCursorTo(u.row,u.column),a.selection.selectTo(u.row,u.column+m)):(o=a.session.doc.getLine(u.row).length>o?o+1:o,a.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(a){var l=a.session.doc.getLength()-1,u=a.session.doc.getLine(l).length,d=a.selection.rangeList.ranges,o=[];d.length<1&&(d=[a.selection.getRange()]);for(var p=0;p<d.length;p++)p==d.length-1&&(d[p].end.row===l&&d[p].end.column===u||o.push(new v(d[p].end.row,d[p].end.column,l,u))),p===0?d[p].start.row===0&&d[p].start.column===0||o.push(new v(0,0,d[p].start.row,d[p].start.column)):o.push(new v(d[p-1].end.row,d[p-1].end.column,d[p].start.row,d[p].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var p=0;p<o.length;p++)a.selection.addRange(o[p],!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(`
212
+ `)},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(`
213
+ `),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:s("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,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(t,r,c){var h=t("../lib/keys"),g=(function(){function s(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return s.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))},s.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))},s.prototype.$onGutterKeyDown=function(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===h.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=h.enter)return;f.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),d=this.$findNearestAnnotation(l);if(!(u===null&&d===null)){var o=this.$findClosestNumber(u,d,l);if(o===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=d,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new v(f,this))}).bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===h.tab){f.preventDefault();return}if(f.keyCode===h.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===h.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===h.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===h.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===h.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===h.enter||f.keyCode===h.space){switch(f.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(f,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),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}},s.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()},s.prototype.$isFoldWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),l=this.$getFoldWidget(f).style.display!=="none";return a&&l},s.prototype.$isCustomWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),l=!!this.$getCustomWidget(f);return a&&l},s.prototype.$isAnnotationVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),l=this.$getAnnotation(f).style.display!=="none";return a&&l},s.prototype.$getFoldWidget=function(f){var a=this.lines.get(f),l=a.element;return l.childNodes[1]},s.prototype.$getCustomWidget=function(f){var a=this.lines.get(f),l=a.element;return l.childNodes[3]},s.prototype.$getAnnotation=function(f){var a=this.lines.get(f),l=a.element;return l.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isCustomWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+a))return f+a;if(f-a>=0&&this.$isFoldWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+a))return f+a}return null},s.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isAnnotationVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+a))return f+a}return null},s.prototype.$focusFoldWidget=function(f){if(f!=null){var a=this.$getFoldWidget(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},s.prototype.$focusCustomWidget=function(f){if(f!=null){var a=this.$getCustomWidget(f);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},s.prototype.$focusAnnotation=function(f){if(f!=null){var a=this.$getAnnotation(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},s.prototype.$blurFoldWidget=function(f){var a=this.$getFoldWidget(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},s.prototype.$blurCustomWidget=function(f){var a=this.$getCustomWidget(f);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},s.prototype.$blurAnnotation=function(f){var a=this.$getAnnotation(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},s.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$findClosestNumber=function(f,a,l){return f===null?a:a===null||Math.abs(l-f)<=Math.abs(l-a)?f:a},s.prototype.$switchLane=function(f){switch(f){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}},s.prototype.$rowIndexToRow=function(f){var a=this.lines.get(f);return a?a.row:null},s.prototype.$rowToRowIndex=function(f){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==f)return a}return null},s})();r.GutterKeyboardHandler=g;var v=(function(){function s(f,a){this.gutterKeyboardHandler=a,this.domEvent=f}return s.prototype.getKey=function(){return h.keyCodeToString(this.domEvent.keyCode)},s.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},s.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},s.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},s})();r.GutterKeyboardEvent=v}),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(t,r,c){var h=this&&this.__values||function($){var A=typeof Symbol=="function"&&Symbol.iterator,D=A&&$[A],j=0;if(D)return D.call($);if($&&typeof $.length=="number")return{next:function(){return $&&j>=$.length&&($=void 0),{value:$&&$[j++],done:!$}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/lang"),f=t("./lib/useragent"),a=t("./keyboard/textinput").TextInput,l=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,d=t("./keyboard/keybinding").KeyBinding,o=t("./edit_session").EditSession,p=t("./search").Search,m=t("./range").Range,w=t("./lib/event_emitter").EventEmitter,x=t("./commands/command_manager").CommandManager,R=t("./commands/default_commands").commands,T=t("./config"),_=t("./token_iterator").TokenIterator,C=t("./keyboard/gutter_handler").GutterKeyboardHandler,P=t("./config").nls,O=t("./clipboard"),E=t("./lib/keys"),k=t("./lib/event"),B=t("./tooltip").HoverTooltip,N=(function(){function $(A,D,j){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(f.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 d(this),this.$search=new p().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(q,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new o("")),T.resetOptions(this),j&&this.setOptions(j),T._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 D=this.curOp.command,j=D&&D.scrollIntoView;if(j){switch(j){case"center-animate":j="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),q=this.renderer.layerConfig;(U.start.row>=q.lastRow||U.end.row<=q.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="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 D=this.prevOp,j=this.$mergeableCommands,U=D.command&&A.command.name==D.command.name;if(A.command.name=="insertstring"){var q=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(q)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(A,D){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var j=this;T.loadModule(["keybinding",A],function(U){j.$keybindingId==A&&j.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),D&&D()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){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 j=this.session.getSelection();this.session.$fontMetrics=null,j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),A.$fontMetrics=this.renderer.$fontMetrics,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:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$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,D){return this.session.doc.setValue(A),D?D==1?this.navigateFileEnd():D==-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,D){this.renderer.setTheme(A,D)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(A,D){this.renderer.setStyle(A,D)},$.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||v.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 D=A.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(he){D.removeMarker(he)}),D.$bracketHighlight=null);var j=A.getCursorPosition(),U=A.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Q=D.getMatchingBracketRanges(j,q);if(!Q){var re=new _(D,j.row,j.column),le=re.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var ne=D.getMatchingTags(j);ne&&(Q=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Q&&D.$mode.getMatching&&(Q=D.$mode.getMatching(A.session)),!Q){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ue="ace_bracket";Array.isArray(Q)?Q.length==1&&(ue="ace_error_bracket"):Q=[Q],Q.length==2&&(m.comparePoints(Q[0].end,Q[1].start)==0?Q=[m.fromPoints(Q[0].start,Q[1].end)]:m.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[m.fromPoints(Q[1].start,Q[0].end)])),D.$bracketHighlight={ranges:Q,markerIds:Q.map(function(he){return D.addMarker(he,ue,"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 D=this.session.$useWrapMode,j=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,j,D),this._signal("change",A),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(A){var D=A.data;this.renderer.updateLines(D.first,D.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(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),A.$highlightLineMarker&&!D)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&D){var j=new m(D.row,D.column,D.row,1/0);j.id=A.addMarker(j,"ace_active-line","screenLine"),A.$highlightLineMarker=j}else D&&(A.$highlightLineMarker.start.row=D.row,A.$highlightLineMarker.end.row=D.row,A.$highlightLineMarker.start.column=D.column,A._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(A){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,U=D.end.column,q=A.getLine(D.start.row),Q=q.substring(j,U);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var re=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),le=q.substring(j-1,U+1);if(re.test(le))return re}}},$.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(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!A&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),q=0;q<U.length;q++){var Q=U[q];q&&U[q-1].start.row==Q.start.row||(A+=this.session.getLine(Q.start.row)+D)}}var re={text:A};return this._signal("copy",re),O.lineMode=j?re.text:!1,re.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(A,D){var j={text:A,event:D};this.commands.exec("paste",this,j)},$.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var D=A.text,j=D===O.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(ue){U.insert({row:ue.start.row,column:0},D)});else{var q=D.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,re=q.length==2&&(!q[0]||!q[1]);if(q.length!=Q.length||re)return this.commands.exec("insertstring",this,D);for(var le=Q.length;le--;){var ne=Q[le];ne.isEmpty()||U.remove(ne),U.insert(ne.start,q[le])}}},$.prototype.execCommand=function(A,D){return this.commands.exec(A,this,D)},$.prototype.insert=function(A,D){var j=this.session,U=j.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Q=U.transformAction(j.getState(q.row),"insertion",this,j,A);Q&&(A!==Q.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Q.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
214
+ `)==-1){var re=m.fromPoints(q,q);re.end.column+=A.length,this.session.remove(re)}}else{var re=this.getSelectionRange();q=this.session.remove(re),this.clearSelection()}if(A==`
215
+ `||A==`\r
216
+ `){var he=j.getLine(q.row);if(q.column>he.search(/\S|$/)){var le=he.substr(q.column).search(/\S|$/);j.doc.removeInLine(q.row,q.column,q.column+le)}}this.clearSelection();var ne=q.column,ue=j.getState(q.row),he=j.getLine(q.row),oe=U.checkOutdent(ue,he,A);if(j.insert(q,A),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new m(q.row,ne+Q.selection[0],q.row,ne+Q.selection[1])):this.selection.setSelectionRange(new m(q.row+Q.selection[0],Q.selection[1],q.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(A)){var ee=U.getNextLineIndent(ue,he.slice(0,q.column),j.getTabString());j.insert({row:q.row+1,column:0},ee)}oe&&U.autoOutdent(ue,j,q.row)}},$.prototype.autoIndent=function(){for(var A=this.session,D=A.getMode(),j=this.selection.isEmpty()?[new m(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",Q="",re=A.getTabString(),le=0;le<j.length;le++)for(var ne=j[le].start.row,ue=j[le].end.row,he=ne;he<=ue;he++){he>0&&(U=A.getState(he-1),q=A.getLine(he-1),Q=D.getNextLineIndent(U,q,re));var oe=A.getLine(he),ee=D.$getIndent(oe);if(Q!==ee){if(ee.length>0){var ye=new m(he,0,he,ee.length);A.remove(ye)}Q.length>0&&A.insert({row:he,column:0},Q)}D.autoOutdent(U,A,he)}},$.prototype.onTextInput=function(A,D){if(!D)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,A,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},$.prototype.applyComposition=function(A,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!A&&!j.isEmpty()&&this.execCommand(D.extendLeft?"backspace":"del")}if((A||!this.selection.isEmpty())&&this.insert(A,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},$.prototype.onCommandKey=function(A,D,j){return this.keyBinding.onCommandKey(A,D,j)},$.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 D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(D.start.row),q=j.getMode().transformAction(U,"deletion",this,j,D);if(D.end.column===0){var Q=j.getTextRange(D);if(Q[Q.length-1]==`
217
+ `){var re=j.getLine(D.end.row);/^\s+$/.test(re)&&(D.end.column=re.length)}}q&&(D=q)}this.session.remove(D),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(`
218
+ `),this.moveCursorToPosition(A)},$.prototype.setGhostText=function(A,D){this.renderer.setGhostText(A,D)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),D=A.column;if(D!==0){var j=this.session.getLine(A.row),U,q;D<j.length?(U=j.charAt(D)+j.charAt(D-1),q=new m(A.row,D-1,A.row,D+1)):(U=j.charAt(D-1)+j.charAt(D-2),q=new m(A.row,D-2,A.row,D)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},$.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(A)},$.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(A)},$.prototype.indent=function(){var A=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var U=A.getTextRange(D);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}}var q=A.getLine(D.start.row),Q=D.start,re=A.getTabSize(),le=A.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var ne=re-le%re,ue=s.stringRepeat(" ",ne);else{for(var ne=le%re;q[D.start.column-1]==" "&&ne;)D.start.column--,ne--;this.selection.setSelectionRange(D),ue=" "}return this.insert(ue)},$.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(),D=this.session,j=[],U=A.first;U<=A.last;U++)j.push(D.getLine(U));j.sort(function(re,le){return re.toLowerCase()<le.toLowerCase()?-1:re.toLowerCase()>le.toLowerCase()?1:0});for(var q=new m(0,0,0,0),U=A.first;U<=A.last;U++){var Q=D.getLine(U);q.start.row=U,q.end.row=U,q.end.column=Q.length,D.replace(q,j[U-A.first])}},$.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,D.first,D.last)},$.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),D=this.session.getState(A.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,A)},$.prototype.getNumberAt=function(A,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(A);j.lastIndex<D;){var q=j.exec(U);if(q.index<=D&&q.index+q[0].length>=D){var Q={value:q[0],start:q.index,end:q.index+q[0].length};return Q}}return null},$.prototype.modifyNumber=function(A){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new m(D,j-1,D,j),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var Q=this.getNumberAt(D,j);if(Q){var re=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,le=Q.start+Q.value.length-re,ne=parseFloat(Q.value);ne*=Math.pow(10,le),re!==Q.end&&j<re?A*=Math.pow(10,Q.end-j-1):A*=Math.pow(10,Q.end-j),ne+=A,ne/=Math.pow(10,le);var ue=ne.toFixed(le),he=new m(D,Q.start,D,Q.end);this.session.replace(he,ue),this.moveCursorTo(D,Math.max(Q.start+1,j+ue.length-Q.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var A=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Q=D-U-1;Q<0&&(Q=0);var re=0,le=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&q.forEach(function(ze,qe){le=re+ze.length,Q>=re&&Q<=le&&(j=ze,ne.selection.clearSelection(),ne.moveCursorTo(A,re+U),ne.selection.selectTo(A,le+U)),re=le});for(var ue=this.$toggleWordPairs,he,oe=0;oe<ue.length;oe++)for(var ee=ue[oe],ye=0;ye<=1;ye++){var we=+!ye,Ae=j.match(new RegExp("^\\s?_?("+s.escapeRegExp(ee[ye])+")\\s?$","i"));if(Ae){var Je=j.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Ae[1])+")($|\\s)","g"));Je&&(he=j.replace(new RegExp(s.escapeRegExp(ee[ye]),"i"),function(ze){var qe=ee[we];return ze.toUpperCase()==ze?qe=qe.toUpperCase():ze.charAt(0).toUpperCase()==ze.charAt(0)&&(qe=qe.substr(0,0)+ee[we].charAt(0).toUpperCase()+qe.substr(1)),qe}),this.insert(he),he="")}}},$.prototype.findLinkAt=function(A,D){var j,U,q=this.session.getLine(A),Q=q.split(/((?:https?|ftp):\/\/[\S]+)/),re=D;re<0&&(re=0);var le=0,ne=0,ue;try{for(var he=h(Q),oe=he.next();!oe.done;oe=he.next()){var ee=oe.value;if(ne=le+ee.length,re>=le&&re<=ne&&ee.match(/((?:https?|ftp):\/\/[\S]+)/)){ue=ee.replace(/[\s:.,'";}\]]+$/,"");break}le=ne}}catch(ye){j={error:ye}}finally{try{oe&&!oe.done&&(U=he.return)&&U.call(he)}finally{if(j)throw j.error}}return ue},$.prototype.openLink=function(){var A=this.selection.getCursor(),D=this.findLinkAt(A.row,A.column);return D&&window.open(D,"_blank"),D!=null},$.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var A=this.selection,D=this.session,j=A.getRange(),U=A.isBackwards();if(j.isEmpty()){var q=j.start.row;D.duplicateLines(q,q)}else{var Q=U?j.start:j.end,re=D.insert(Q,D.getTextRange(j));j.start=Q,j.end=re,A.setSelectionRange(j,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(A,D,j){return this.session.moveText(A,D,j)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(A,D){var j,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var Q=q.toOrientedRange();j=this.$getSelectedRows(Q),U=this.session.$moveLines(j.first,j.last,D?0:A),D&&A==-1&&(U=0),Q.moveBy(U,0),q.fromOrientedRange(Q)}else{var re=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,ne=0,ue=re.length,he=0;he<ue;he++){var oe=he;re[he].moveBy(le,0),j=this.$getSelectedRows(re[he]);for(var ee=j.first,ye=j.last;++he<ue;){ne&&re[he].moveBy(ne,0);var we=this.$getSelectedRows(re[he]);if(D&&we.first!=ye||!D&&we.first>ye+1)break;ye=we.last}for(he--,le=this.session.$moveLines(ee,ye,D?0:A),D&&A==-1&&(oe=he+1);oe<=he;)re[oe].moveBy(le,0),oe++;D||(le=0),ne+=le}q.fromOrientedRange(q.ranges[0]),q.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,D){var j=this.renderer,U=this.renderer.layerConfig,q=A*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(q,0)}):D===!1&&(this.selection.moveCursorBy(q,0),this.selection.clearSelection());var Q=j.scrollTop;j.scrollBy(0,q*U.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Q)},$.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,D,j,U){this.renderer.scrollToLine(A,D,j,U)},$.prototype.centerSelection=function(){var A=this.getSelectionRange(),D={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(D,.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,D){this.selection.moveCursorTo(A,D)},$.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},$.prototype.jumpToMatching=function(A,D){var j=this.getCursorPosition(),U=new _(this.session,j.row,j.column),q=U.getCurrentToken(),Q=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var re=q||U.stepForward();if(re){var le,ne=!1,ue={},he=j.column-re.start,oe,ee={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(re.value.match(/[{}()\[\]]/g)){for(;he<re.value.length&&!ne;he++)if(ee[re.value[he]])switch(oe=ee[re.value[he]]+"."+re.type.replace("rparen","lparen"),isNaN(ue[oe])&&(ue[oe]=0),re.value[he]){case"(":case"[":case"{":ue[oe]++;break;case")":case"]":case"}":ue[oe]--,ue[oe]===-1&&(le="bracket",ne=!0);break}}else re.type.indexOf("tag-name")!==-1&&(isNaN(ue[re.value])&&(ue[re.value]=0),q.value==="<"&&Q>1?ue[re.value]++:q.value==="</"&&ue[re.value]--,ue[re.value]===-1&&(le="tag",ne=!0));ne||(q=re,Q++,re=U.stepForward(),he=0)}while(re&&!ne);if(le){var ye,we;if(le==="bracket")ye=this.session.getBracketRange(j),ye||(ye=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1),we=ye.start,(D||we.row===j.row&&Math.abs(we.column-j.column)<2)&&(ye=this.session.getBracketRange(we)));else if(le==="tag"){if(!re||re.type.indexOf("tag-name")===-1)return;if(ye=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),ye.compare(j.row,j.column)===0){var Ae=this.session.getMatchingTags(j);Ae&&(Ae.openTag.contains(j.row,j.column)?(ye=Ae.closeTag,we=ye.start):(ye=Ae.openTag,Ae.closeTag.start.row===j.row&&Ae.closeTag.start.column===j.column?we=ye.end:we=ye.start))}we=we||ye.start}we=ye&&ye.cursor||we,we&&(A?ye&&D?this.selection.setRange(ye):ye&&ye.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(we.row,we.column):this.selection.moveTo(we.row,we.column))}}},$.prototype.gotoLine=function(A,D,j){this.selection.clearSelection(),this.session.unfold({row:A-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,D||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,j)},$.prototype.navigateTo=function(A,D){this.selection.moveTo(A,D)},$.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},$.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}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 D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}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,D){D&&this.$search.set(D);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,A)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},$.prototype.replaceAll=function(A,D){D&&this.$search.set(D);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var Q=j.length-1;Q>=0;--Q)this.$tryReplace(j[Q],A)&&U++;return this.selection.setSelectionRange(q),U},$.prototype.$tryReplace=function(A,D){var j=this.session.getTextRange(A);return D=this.$search.replace(j,D),D!==null?(A.end=this.session.replace(A,D),A):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(A,D,j){D||(D={}),typeof A=="string"||A instanceof RegExp?D.needle=A:typeof A=="object"&&g.mixin(D,A);var U=this.selection.getRange();D.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(D),D.start||this.$search.set({start:U});var q=this.$search.find(this.session);if(D.preventScroll)return q;if(q)return this.revealRange(q,j),q;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(A,D){this.find({skipCurrent:!0,backwards:!1},A,D)},$.prototype.findPrevious=function(A,D){this.find(A,{skipCurrent:!0,backwards:!0},D)},$.prototype.revealRange=function(A,D){this.session.unfold(A),this.selection.setSelectionRange(A);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),D!==!1&&this.renderer.animateScrolling(j)},$.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 D,j=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var q=this.$scrollAnchor;q.style.cssText="position:absolute",this.container.insertBefore(q,this.container.firstChild);var Q=this.on("changeSelection",function(){U=!0}),re=this.renderer.on("beforeRender",function(){U&&(D=j.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,ue=ne.$cursorLayer.$pixelPos,he=ne.layerConfig,oe=ue.top-he.offset;ue.top>=0&&oe+D.top<0?U=!0:ue.top<he.height&&ue.top+D.top+he.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=oe+"px",q.style.left=ue.left+"px",q.style.height=he.lineHeight+"px",q.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",re))}}},$.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(A)),D.isBlinking=!this.$readOnly&&A!="wide",v.setCssClass(D.element,"ace_slim-cursors",/slim/.test(A)))},$.prototype.prompt=function(A,D,j){var U=this;T.loadModule("ace/ext/prompt",function(q){q.prompt(U,A,D,j)})},Object.defineProperty($.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(A){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=A},enumerable:!1,configurable:!0}),$})();N.$uid=0,N.prototype.curOp=null,N.prototype.prevOp={},N.prototype.$mergeableCommands=["backspace","del","insertstring"],N.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"],["&&","||"],["==","!="]],g.implement(N.prototype,w),T.defineOptions(N.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(j){var U=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),U=j.key.length==1),!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){var q=v.createElement("div");q.textContent=P("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),q)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var D=this.textInput.getElement();$?(k.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(k.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},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?I.attach(this):I.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?I.attach(this):I.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),v.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),v.addCssClass(this.container,"ace_hasPlaceholder");var D=v.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,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},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===E.enter){U.preventDefault();var q=this.getCursorPosition().row;this.isRowVisible(q)||this.scrollToLine(q,!0,!0),this.focus()}},j;$?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",P("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",P("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.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",P("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",P("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),j||(j=new C(this)),j.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",D.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),j&&j.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 I={getText:function($,A){return(Math.abs($.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function($,A,D){return Math.max(A.toString().length,(D.lastRow+1).toString().length,2)*D.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=N}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,r,c){var h=t("../lib/dom"),g=(function(){function v(s,f){this.element=s,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(s){h.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(s,f){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(s,f,a){var l=f.firstRowScreen*f.lineHeight,u=Math.floor(l/this.canvasHeight),d=a.documentToScreenRow(s,0)*f.lineHeight;return d-u*this.canvasHeight},v.prototype.$getCellByScreenRow=function(s,f){for(var a=f.firstRowScreen*f.lineHeight,l=Math.floor(a/this.canvasHeight),u=s*f.lineHeight-l*this.canvasHeight,d=this.cells.length-1;d>=0;d--){var o=this.cells[d],p=parseInt(o.element.style.top),m=parseInt(o.element.style.height);if(p<=u){if(p+m<u)return null;var w=u-p;return{cell:o,offset:w}}}return null},v.prototype.computeLineHeight=function(s,f,a){return f.lineHeight*a.getRowLineCount(s)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(s){return this.cells[s]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var f=h.createFragment(this.element),a=0;a<s.length;a++)f.appendChild(s[a].element);this.element.appendChild(f)}else this.cells.push(s),this.element.appendChild(s.element)},v.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var f=h.createFragment(this.element),a=0;a<s.length;a++)f.appendChild(s[a].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},v.prototype.createCell=function(s,f,a,l){var u=this.cellCache.pop();if(!u){var d=h.createElement("div");l&&l(d),this.element.appendChild(d),u={element:d,text:"",row:s}}return u.row=s,u},v})();r.Lines=g}),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(t,r,c){var h=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,f=t("./lines").Lines,a=t("../config").nls,l=(function(){function d(o){this.$showCursorMarker=null,this.element=h.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return d.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},d.prototype.addGutterDecoration=function(o,p){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,p)},d.prototype.removeGutterDecoration=function(o,p){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,p)},d.prototype.setAnnotations=function(o){this.$annotations=[];for(var p=0;p<o.length;p++){var m=o[p],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,T=m.text,_=m.type;R=R?v.escapeHTML(R):m.html||"",T=T||m.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(_),x.displayText.push(T));var C=m.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},d.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var p=o.start.row,m=o.end.row-p;if(m!==0)if(o.action=="remove")this.$annotations.splice(p,m+1,null);else{var w=new Array(m+1);w.unshift(p,1),this.$annotations.splice.apply(this.$annotations,w)}}},d.prototype.update=function(o){this.config=o;var p=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,p.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=p.getNextFoldLine(m),R=x?x.start.row:1/0,T=null,_=-1,C=m;;){if(C>R&&(C=x.end.row+1,x=p.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}T=this.$lines.get(++_),T?T.row=C:(T=this.$lines.createCell(C,o,this.session,u),this.$lines.push(T)),this.$renderCell(T,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},d.prototype.$updateGutterWidth=function(o){var p=this.session,m=p.gutterRenderer||this.$renderer,w=p.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||p.$useWrapMode)&&(x=p.getLength()+w-1);var R=m?m.getWidth(p,x,o):x.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();R+=T.left+T.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))},d.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},d.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var p=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<p.length;m++){var w=p[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==p[m-1].row)w=p[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},d.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=h.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var p=o.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,R=Math.floor(x/w.canvasHeight),T=o.documentToScreenRow(p)*m.lineHeight,_=T-R*w.canvasHeight;h.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),h.setStyle(this.$highlightElement.style,"top",_+"px")}},d.prototype.scrollLines=function(o){var p=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(p,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!p||w<o.firstRow)return this.update(o);if(m<p.firstRow)return this.update(o);if(p.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(p.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();o.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,p.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},d.prototype.$renderLines=function(o,p,m){for(var w=[],x=p,R=this.session.getNextFoldLine(x),T=R?R.start.row:1/0;x>T&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),T=R?R.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session,u);this.$renderCell(_,o,R,x),w.push(_),x++}return w},d.prototype.$renderCell=function(o,p,m,w){var x=o.element,R=this.session,T=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],P=x.childNodes[3],O=C.firstChild,E=R.$firstLineNumber,k=R.$breakpoints,B=R.$decorations,N=R.gutterRenderer||this.$renderer,I=this.$showFoldWidgets&&R.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,A=p.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(N?N.getText(R,w):w+E).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=$&&this.$cursorRow<=m.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),k[w]&&(D+=k[w]),B[w]&&(D+=B[w]),this.$annotations[w]&&w!==$&&(D+=this.$annotations[w].className),I){var q=I[w];q==null&&(q=I[w]=R.getFoldWidget(w))}if(q){var Q="ace_fold-widget ace_"+q,re=q=="start"&&w==$&&w<m.end.row;if(re){Q+=" ace_closed";for(var le="",ne=!1,ue=w+1;ue<=m.end.row;ue++)if(this.$annotations[ue]){if(this.$annotations[ue].className===" ace_error"){ne=!0,le=" ace_error_fold";break}this.$annotations[ue].className===" ace_security"?(ne=!0,le=" ace_security_fold"):this.$annotations[ue].className===" ace_warning"&&le!==" ace_security_fold"&&(ne=!0,le=" ace_warning_fold")}D+=le}else Q+=" ace_open";_.className!=Q&&(_.className=Q),h.setStyle(_.style,"height",A),h.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var he=R.getFoldWidgetRange(w);he?_.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[he.start.row+1,he.end.row+1])):m?_.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):_.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),re?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else _&&(h.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var oe=this.session.$gutterCustomWidgets[w];if(oe?this.$addCustomWidget(w,oe,o):P&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",O.className=j,O.className+=le,h.setStyle(O.style,"height",A),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",A);var ee;switch(le){case" ace_error_fold":ee=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ee=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ee=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",ee),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),h.setStyle(O.style,"height",A),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",A);var ee;switch(this.$annotations[w].className){case" ace_error":ee=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ee=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ee=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ee=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ee=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",ee),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else h.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==T.data&&(T.data=U),x.className!=D&&(x.className=D),h.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,p,R)+"px"),h.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,p,R)+"px"),o.text=U,C.style.display==="none"&&_.style.display==="none"&&!oe?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},d.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},d.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},d.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},d.prototype.setShowFoldWidgets=function(o){o?h.addCssClass(this.element,"ace_folding-enabled"):h.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},d.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},d.prototype.$hideFoldWidget=function(o,p){var m=p||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&h.setStyle(w.style,"display","none")}},d.prototype.$showFoldWidget=function(o,p){var m=p||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&h.setStyle(w.style,"display","inline-block")}},d.prototype.$getGutterCell=function(o){var p=this.$lines.cells,m=0,w=p.length-1;if(!(o<p[0].row||o>p[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),R=p[x];if(R.row>o)w=x-1;else if(R.row<o)m=x+1;else return R}return R}},d.prototype.$addCustomWidget=function(o,p,m){var w=p.className,x=p.label,R=p.title,T=p.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:x,title:R,callbacks:T},this.$hideFoldWidget(o,m);var _=m||this.$getGutterCell(o);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=h.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),h.setStyle(C.style,"display","inline-block"),h.setStyle(C.style,"height","inherit"),T&&T.onClick&&C.addEventListener("click",function(P){T.onClick(P,o),P.stopPropagation()}),_.element.appendChild(C)}},d.prototype.$removeCustomWidget=function(o,p){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,p);var m=p||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},d.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=h.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},d.prototype.getRegion=function(o){var p=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<p.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-p.right)return"foldWidgets"},d})();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,g.implement(l.prototype,s);function u(d){var o=document.createTextNode("");d.appendChild(o);var p=h.createElement("span");d.appendChild(p);var m=h.createElement("span");d.appendChild(m);var w=h.createElement("span");return m.appendChild(w),d}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,r,c){var h=t("../range").Range,g=t("../lib/dom"),v=(function(){function f(a){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return f.prototype.setPadding=function(a){this.$padding=a},f.prototype.setSession=function(a){this.session=a},f.prototype.setMarkers=function(a){this.markers=a},f.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},f.prototype.update=function(a){if(a){this.config=a,this.element.style.display="none",this.i=0;var l;for(var u in this.markers){var d=this.markers[u];if(!d.range){d.update(l,this,this.session,a);continue}var o=d.range.clipRows(a.firstRow,a.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),d.renderer){var p=this.$getTop(o.start.row,a),m=this.$padding+a.fontMetrics.textWidth(o.start.row,o.start.column);d.renderer(l,o,m,p,a)}else d.type=="fullLine"?this.drawFullLineMarker(l,o,d.clazz,a):d.type=="screenLine"?this.drawScreenLineMarker(l,o,d.clazz,a):o.isMultiLine()?d.type=="text"?this.drawTextMarker(l,o,d.clazz,a):this.drawMultiLineMarker(l,o,d.clazz,a):this.drawSingleLineMarker(l,o,d.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild);this.element.style.display=""}},f.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},f.prototype.drawTextMarker=function(a,l,u,d,o){for(var p=this.session,m=l.start.row,w=l.end.row,x=m,R=0,T=0,_=p.getScreenLastRowColumn(x),C=new h(x,l.start.column,x,T);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?l.start.column:p.getRowWrapIndent(x),C.end.column=_,R=T,T=_,_=x+1<w?p.getScreenLastRowColumn(x+1):x==w?0:l.end.column,this.drawSingleLineMarker(a,C,u+(x==m?" ace_start":"")+" ace_br"+s(x==m||x==m+1&&l.start.column,R<T,T>_,x==w),d,x==w?0:1,o)},f.prototype.drawMultiLineMarker=function(a,l,u,d,o){var p=this.$padding,m=d.lineHeight,w=this.$getTop(l.start.row,d),x=p+d.fontMetrics.textWidth(l.start.row,l.start.column);if(o=o||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var R=l.clone();R.end.row=R.start.row,R.end.column=Number.MAX_VALUE,this.drawBidiSingleLineMarker(a,R,u+" ace_br1 ace_start",d,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+p+"px;top:"+w+"px;left:"+x+"px;"+(o||""));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",d,null,o)}else{w=this.$getTop(l.end.row,d);var T=d.fontMetrics.textWidth(l.end.row,l.end.column);this.elt(u+" ace_br12","height:"+m+"px;width:"+T+"px;top:"+w+"px;left:"+p+"px;"+(o||""))}if(m=(l.end.row-l.start.row-1)*d.lineHeight,!(m<=0)){w=this.$getTop(l.start.row+1,d);var _=(l.start.column?1:0)|(l.end.column?0:8);this.elt(u+(_?" ace_br"+_:""),"height:"+m+"px;right:"+p+"px;top:"+w+"px;left:"+p+"px;"+(o||""))}},f.prototype.drawSingleLineMarker=function(a,l,u,d,o,p){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,u,d,o,p);var m=d.lineHeight,w=d.fontMetrics.textWidth(l.start.row,l.end.column)+(o||0)*d.characterWidth,x=this.$getTop(l.start.row,d),R=d.fontMetrics.textWidth(l.start.row,l.start.column);this.elt(u,"height:"+m+"px;width:"+(w-R)+"px;top:"+x+"px;left:"+(this.$padding+R)+"px;"+(p||""))},f.prototype.drawBidiSingleLineMarker=function(a,l,u,d,o,p){var m=d.lineHeight,w=this.$getTop(l.start.row,d),x=this.$padding,R=this.config.fontMetrics.getRects(l.start,l.end);R.forEach(function(T){this.elt(u,"height:"+m+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(x+T.left)+"px;"+(p||""))},this)},f.prototype.drawFullLineMarker=function(a,l,u,d,o){var p=this.$getTop(l.start.row,d),m=d.lineHeight;l.start.row!=l.end.row&&(m+=this.$getTop(l.end.row,d)-p),this.elt(u,"height:"+m+"px;top:"+p+"px;left:0;right:0;"+(o||""))},f.prototype.drawScreenLineMarker=function(a,l,u,d,o){var p=this.$getTop(l.start.row,d),m=d.lineHeight;this.elt(u,"height:"+m+"px;top:"+p+"px;left:0;right:0;"+(o||""))},f})();v.prototype.$padding=0;function s(f,a,l,u){return(f?1:0)|(a?2:0)|(l?4:0)|(u?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,r,c){var h=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return h.has(g)}}),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(t,r,c){var h=t("../lib/oop"),g=t("../lib/dom"),v=t("../lib/lang"),s=t("./lines").Lines,f=t("../lib/event_emitter").EventEmitter,a=t("../config").nls,l=t("./text_util").isTextToken,u=(function(){function d(o){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return d.prototype.$updateEolChar=function(){var o=this.session.doc,p=o.getNewLineCharacter()==`
219
+ `&&o.getNewLineMode()!="windows",m=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},d.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},d.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},d.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},d.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(p){this._signal("changeCharacterSize",p)}).bind(this)),this.$pollSizeChanges()},d.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},d.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},d.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},d.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},d.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},d.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},d.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var p=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=v.stringRepeat(this.TAB_CHAR,m),p.push(w)}else p.push(this.dom.createTextNode(v.stringRepeat(" ",m),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":"",T=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=x+R,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+_,w.textContent=C,this.$tabStrings[" "]=w}},d.prototype.updateLines=function(o,p,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(p,o.firstRow),x=Math.min(m,o.lastRow),R=this.element.childNodes,T=0,_=o.firstRow;_<w;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(w)){w=C.start.row;break}else _=C.end.row;T++}for(var P=!1,_=w,C=this.session.getNextFoldLine(_),O=C?C.start.row:1/0;_>O&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),O=C?C.start.row:1/0),!(_>x);){var E=R[T++];if(E){this.dom.removeChildren(E),this.$renderLine(E,_,_==O?C:!1),P&&(E.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var k=o.lineHeight*this.session.getRowLength(_)+"px";E.style.height!=k&&(P=!0,E.style.height=k)}_++}if(P)for(;T<this.$lines.cells.length;){var B=this.$lines.cells[T++];B.element.style.top=this.$lines.computeLineTop(B.row,o,this.session)+"px"}},d.prototype.scrollLines=function(o){var p=this.config;if(this.config=o,this.$lines.pageChanged(p,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=p?p.lastRow:-1;if(!p||w<o.firstRow)return this.update(o);if(m<p.firstRow)return this.update(o);if(!p||p.lastRow<o.firstRow)return this.update(o);if(o.lastRow<p.firstRow)return this.update(o);if(p.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(p.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(p.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,p.lastRow);x>0;x--)this.$lines.pop();o.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,p.firstRow-1)),o.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(o,p.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},d.prototype.$renderLinesFragment=function(o,p,m){for(var w=[],x=p,R=this.session.getNextFoldLine(x),T=R?R.start.row:1/0;x>T&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),T=R?R.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session),C=_.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==T?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(_),x++}return w},d.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var p=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,p,m))},d.prototype.$renderToken=function(o,p,m,w){for(var x=this,R=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200C\u200E\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+)/g,T=this.dom.createFragment(this.element),_,C=0;_=R.exec(w);){var P=_[1],O=_[2],E=_[3],k=_[4];if(!(!x.showSpaces&&O)){var B=C!=_.index?w.slice(C,_.index):"";if(C=_.index+_[0].length,B&&T.appendChild(this.dom.createTextNode(B,this.element)),P){var N=x.session.getScreenTabSize(p+_.index),I=x.$tabStrings[N].cloneNode(!0);I.charCount=1,T.appendChild(I),p+=N-1}else if(O)if(x.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=v.stringRepeat(x.SPACE_CHAR,O.length),T.appendChild($)}else T.appendChild(this.dom.createTextNode(O,this.element));else if(E){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space ace_invalid",$.textContent=v.stringRepeat(x.SPACE_CHAR,E.length),T.appendChild($)}else if(k)if(x.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=v.stringRepeat(x.CJK_SPACE_CHAR,k.length),T.appendChild($)}else T.appendChild(this.dom.createTextNode(k,this.element))}}var A=C?w.slice(C):w;if(A.length>256)for(var D=0;D<A.length;)T.appendChild(this.dom.createTextNode(A.slice(D,D+=256),this.element));else T.appendChild(this.dom.createTextNode(A,this.element));if(l(m.type))o.appendChild(T);else{var j="ace_"+m.type.replace(/\./g," ace_"),$=this.dom.createElement("span");m.type=="fold"&&($.style.width=m.value.length*this.config.characterWidth+"px",$.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),$.className=j,$.appendChild(T),o.appendChild($)}return p+w.length},d.prototype.renderIndentGuide=function(o,p,m){var w=p.search(this.$indentGuideRe);if(w<=0||w>=m)return p;if(p[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,R=0;R<x;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(w)}else if(p[0]==" "){for(var R=0;R<w;R++){var T=this.$tabStrings[" "].cloneNode(!0);T.charCount=1,o.appendChild(T)}return this.$highlightIndentGuide(),p.substr(w)}return this.$highlightIndentGuide(),p},d.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var p=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:p.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,T=0;T<R.length;T++)if(p.row!==R[T].start.row){this.$highlightIndentGuideMarker.end=R[T].start.row+1,p.row>R[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[p.row]!==""&&p.column===o[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=p.row+1;T<o.length;T++){var _=o[T],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=T,C<=m))break}}this.$renderHighlightIndentGuide()}}},d.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),p=0;p<o.length;p++)o[p].classList.remove("ace_indent-guide-active")},d.prototype.$setIndentGuideActive=function(o,p){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var R=x[p-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},d.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,p)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,p)}}}},d.prototype.$createLineElement=function(o){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},d.prototype.$renderWrappedLine=function(o,p,m){var w=0,x=0,R=m[0],T=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<p.length;C++){var P=p[C],O=P.value;if(C==0&&this.displayIndentGuides){if(w=O.length,O=this.renderIndentGuide(_,O,R),!O)continue;w-=O.length}if(w+O.length<R)T=this.$renderToken(_,T,P,O),w+=O.length;else{for(;w+O.length>=R;){T=this.$renderToken(_,T,P,O.substring(0,R-w)),O=O.substring(R-w),w=R,_=this.$createLineElement(),o.appendChild(_);var E=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);E.charCount=0,_.appendChild(E),x++,T=0,R=m[x]||Number.MAX_VALUE}O.length!=0&&(w+=O.length,T=this.$renderToken(_,T,P,O))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,T,null,"",!0)},d.prototype.$renderSimpleLine=function(o,p){for(var m=0,w=0;w<p.length;w++){var x=p[w],R=x.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(o,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,R);m=this.$renderToken(o,m,x,R)}}},d.prototype.$renderOverflowMessage=function(o,p,m,w,x){m&&this.$renderToken(o,p,m,w.slice(0,this.MAX_LINE_LENGTH-p));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",o.appendChild(R)},d.prototype.$renderLine=function(o,p,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(p)),m)var w=this.$getFoldLineTokens(p,m);else var w=this.session.getTokens(p);var x=o;if(w.length){var R=this.session.getRowSplitData(p);if(R&&R.length){this.$renderWrappedLine(o,w,R);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(p=m.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},d.prototype.$getFoldLineTokens=function(o,p){var m=this.session,w=[];function x(T,_,C){for(var P=0,O=0;O+T[P].value.length<_;)if(O+=T[P].value.length,P++,P==T.length)return;if(O!=_){var E=T[P].value.substring(_-O);E.length>C-_&&(E=E.substring(0,C-_)),w.push({type:T[P].type,value:E}),O=_+E.length,P+=1}for(;O<C&&P<T.length;){var E=T[P].value;E.length+O>C?w.push({type:T[P].type,value:E.substring(0,C-O)}):w.push(T[P]),O+=E.length,P+=1}}var R=m.getTokens(o);return p.walk(function(T,_,C,P,O){T!=null?w.push({type:"fold",value:T}):(O&&(R=m.getTokens(_)),R.length&&x(R,P,C))},p.end.row,this.session.getLine(p.end.row).length),w},d.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},d})();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.CJK_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,h.implement(u.prototype,f),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,r,c){var h=t("../lib/dom"),g=(function(){function v(s){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(s){for(var f=this.cursors,a=f.length;a--;)h.setStyle(f[a].style,"opacity",s?"":"0")},v.prototype.$startCssAnimation=function(){for(var s=this.cursors,f=s.length;f--;)s[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&h.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,h.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(s){this.$padding=s},v.prototype.setSession=function(s){this.session=s},v.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},v.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},v.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,h.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var s=h.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},v.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},v.prototype.hideCursor=function(){this.isVisible=!1,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,h.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,h.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&h.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),h.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),f()},this.blinkInterval),f()}},v.prototype.getPixelPosition=function(s,f){if(!this.config||!this.session)return{left:0,top:0,width:0};s||(s=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(s),l=this.config.fontMetrics.textWidth(a.row,a.column),u=this.$padding+l,d=(a.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight,o=this.config.fontMetrics.textWidth(a.row,a.column+1)-l;return{left:u,top:d,width:Math.abs(o)||this.config.characterWidth}},v.prototype.isCursorInView=function(s,f){return s.top>=0&&s.top<f.maxHeight},v.prototype.update=function(s){this.config=s;var f=this.session.$selectionMarkers,a=0,l=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var a=0,u=f.length;a<u;a++){var d=this.getPixelPosition(f[a].cursor,!0);if(!((d.top>s.height+s.offset||d.top<0)&&a>1)){var o=this.cursors[l++]||this.addCursor(),p=o.style;this.drawCursor?this.drawCursor(o,d,s,f[a],this.session):this.isCursorInView(d,s)?(h.setStyle(p,"display","block"),h.translate(o,d.left,d.top),h.setStyle(p,"width",Math.round(d.width)+"px"),h.setStyle(p,"height",s.lineHeight+"px")):h.setStyle(p,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=d,this.restartTimer()},v.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var h=this&&this.__extends||(function(){var o=function(p,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(p,m);function w(){this.constructor=p}p.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter,a=32768,l=(function(){function o(p,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return o.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},o})();g.implement(l.prototype,f);var u=(function(o){h(p,o);function p(m,w){var x=o.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return p.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(m){this.element.style.height=m+"px"},p.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>a?(this.coeff=a/m,m=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},p.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},p})(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var d=(function(o){h(p,o);function p(m,w){var x=o.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return p.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.setWidth=function(m){this.element.style.width=m+"px"},p.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},p.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},p.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},p})(l);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=d,r.VScrollBar=u,r.HScrollBar=d}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var h=this&&this.__extends||(function(){var d=function(o,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},d(o,p)};return function(o,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(o,p);function m(){this.constructor=o}o.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var a=(function(){function d(o,p){this.element=v.createElement("div"),this.element.className="ace_sb"+p,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return d.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},d})();g.implement(a.prototype,f);var l=(function(d){h(o,d);function o(p,m){var w=d.call(this,p,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=p,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(p,m){if(p==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,R=function(k){x=k.clientY},T=function(){clearInterval(O)},_=m.clientY,C=this.thumbTop,P=function(){if(x!==void 0){var k=w.scrollTopFromThumbTop(C+x-_);k!==w.scrollTop&&w._emit("scroll",{data:k})}};s.capture(this.inner,R,T);var O=setInterval(P,20);return s.preventDefault(m)}var E=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(p){var m=p*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(p){this.height=Math.max(0,p),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(p,m){this.pageHeight===p&&!m||(this.pageHeight=p,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(p){this.scrollTop=p,p<0&&(p=0),this.thumbTop=p*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var u=(function(d){h(o,d);function o(p,m){var w=d.call(this,p,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return o.prototype.onMouseDown=function(p,m){if(p==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,R=function(k){x=k.clientX},T=function(){clearInterval(O)},_=m.clientX,C=this.thumbLeft,P=function(){if(x!==void 0){var k=w.scrollLeftFromThumbLeft(C+x-_);k!==w.scrollLeft&&w._emit("scroll",{data:k})}};s.capture(this.inner,R,T);var O=setInterval(P,20);return s.preventDefault(m)}var E=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(p){var m=p*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(p){this.width=Math.max(0,p),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(p,m){this.pageWidth===p&&!m||(this.pageWidth=p,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(p){this.scrollLeft=p,p<0&&(p=0),this.thumbLeft=p*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(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(t,r,c){var h=t("./lib/event"),g=(function(){function v(s,f){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var a=this;this._flush=function(l){a.pending=!1;var u=a.changes;if(u&&(h.blockIdle(100),a.changes=0,a.onRender(u)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return v.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(h.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(s){var f=this.changes;return this.changes=0,f},v})();r.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var h=this&&this.__read||function(O,E){var k=typeof Symbol=="function"&&O[Symbol.iterator];if(!k)return O;var B=k.call(O),N,I=[],$;try{for(;(E===void 0||E-- >0)&&!(N=B.next()).done;)I.push(N.value)}catch(A){$={error:A}}finally{try{N&&!N.done&&(k=B.return)&&k.call(B)}finally{if($)throw $.error}}return I},g=t("../lib/oop"),v=t("../lib/dom"),s=t("../lib/lang"),f=t("../lib/event"),a=t("../lib/event_emitter").EventEmitter,l=512,u=typeof ResizeObserver=="function",d=200,o=(function(){function O(E,k,B){this.config={characterWidth:1},this.$characterSize={width:0,height:0},this.textLayer=k,this.renderer=B,this.el=v.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=v.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=v.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),E.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",l),u?this.$addObserver():this.checkForSizeChanges(),this.textLayer.$setFontMetrics(this),this.$scratchRange=document.createRange()}return O.prototype.$setMeasureNodeStyles=function(E,k){E.width=E.height="auto",E.left=E.top="0px",E.visibility="hidden",E.position="absolute",E.whiteSpace="pre",E.font="inherit",E.overflow=k?"hidden":"visible"},O.prototype.checkForSizeChanges=function(E){if(E===void 0&&(E=this.$measureSizes()),E&&(this.$characterSize.width!==E.width||this.$characterSize.height!==E.height)){this.$measureNode.style.fontWeight="bold";var k=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=E,this.charSizes=Object.create(null),this.allowBoldFonts=k&&k.width===E.width&&k.height===E.height,this._emit("changeCharacterSize",{data:E})}},O.prototype.$addObserver=function(){var E=this;this.$observer=new window.ResizeObserver(function(k){E.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},O.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var E=this;return this.$pollSizeChangesTimer=f.onIdle(function k(){E.checkForSizeChanges(),f.onIdle(k,500)},500)},O.prototype.setPolling=function(E){E?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},O.prototype.$measureSizes=function(E){var k={height:(E||this.$measureNode).clientHeight,width:(E||this.$measureNode).clientWidth/l};return k.width===0||k.height===0?null:k},O.prototype.$measureCharWidth=function(E){this.$main.textContent=s.stringRepeat(E,l);var k=this.$main.getBoundingClientRect();return k.width/l},O.prototype.getCharacterWidth=function(E){var k=this.charSizes[E];return k===void 0&&(k=this.charSizes[E]=this.$measureCharWidth(E)/this.$characterSize.width),k},O.prototype.getTextWidth=function(E){return E?(this.$main.textContent=E,this.$main.clientWidth):0},O.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},O.prototype.$initTransformMeasureNodes=function(){var E=function(k,B){return["div",{style:"position: absolute;left:"+k+"px;top:"+B+"px;"}]};this.els=v.buildDom([E(0,0),E(d,0),E(0,d),E(d,d)],this.el)},O.prototype.getTransform=function(){if(this.config.$transformData)return this.config.$transformData;this.els||this.$initTransformMeasureNodes();function E(Q){var re=Q.getBoundingClientRect();return[re.left,re.top]}var k=E(this.els[0]),B=E(this.els[1]),N=E(this.els[2]),I=E(this.els[3]),$=m(w(I,B),w(I,N),w(x(B,N),x(I,k))),A=R((1+$[0])/d,w(B,k)),D=R((1+$[1])/d,w(N,k)),j=[A[0],D[0],0,A[1],D[1],0,$[0]/d,$[1]/d,1],U=1/(j[0]*j[4]-j[3]*j[1]),q=[j[4]*U,-j[1]*U,0,-j[3]*U,j[0]*U,0,(j[3]*j[7]-j[4]*j[6])*U,(j[1]*j[6]-j[0]*j[7])*U,1];return this.config.$transformData={M:j,MInv:q,t:k},this.config.$transformData},O.prototype.transformCoordinates=function(E,k){this.config.$transformData||this.getTransform();var B=this.config.$transformData;return k?x(_(B.M,k[0],k[1]),B.t):_(B.MInv,E[0]-B.t[0],E[1]-B.t[1])},O.prototype.recoverRect=function(E,k){var B=E.M,N=Math.abs(B[6])<1e-10&&Math.abs(B[7])<1e-10,I=k.left,$=k.top,A=k.width,D=k.height;if(I-=E.t[0],$-=E.t[1],N){var j=h(B,6),U=j[0],q=j[1],Q=j[2],re=j[3],le=j[4],ne=j[5],ue=[Math.abs(U),Math.abs(q),Math.abs(re),Math.abs(le)],he=ue[0]*ue[3]-ue[2]*ue[1],oe=void 0,ee=void 0;Math.abs(he)<1e-10?(ee=this.config&&this.config.lineHeight||0,oe=(A-ue[1]*ee)/ue[0]):(oe=(ue[3]*A-ue[1]*D)/he,ee=(-ue[2]*A+ue[0]*D)/he);var ye=U*le-q*re,we=I+A/2-Q,Ae=$+D/2-ne,Je=(le*we-q*Ae)/ye,ze=(-re*we+U*Ae)/ye;return{left:Je-oe/2,top:ze-ee/2,width:oe,height:ee,right:Je+oe/2,bottom:ze+ee/2}}return T(E,k)},O.prototype.$findElementForScreenRow=function(E){var k=this.textLayer;if(!this.config)return null;var B=k.$lines.$getCellByScreenRow(E,this.config),N=B&&B.cell.element;if(N&&k.$useLineGroups()){var I=Math.floor(B.offset/this.config.lineHeight);N=N.children[Math.max(I,0)]}return N},O.prototype.textWidth=function(E,k){var B=this.$findElementForScreenRow(E);return!B||!document.createRange?k*this.config.characterWidth:this.$measureLineToColumn(B,k)},O.prototype.$measureLineToColumn=function(E,k){var B=this.textLayer;try{var N=this.$findColumnPosition(E,k);if(!N)return k*this.config.characterWidth;this.$scratchRange.setStart(N.node,N.offset),this.$scratchRange.setEnd(N.node,N.offset);var I=this.$scratchRange.getBoundingClientRect();if(this.renderer.$hasCssTransforms){var $=this.getTransform(),A=this.recoverRect($,I),D=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft;return A.left-D+N.overflow*this.config.characterWidth}var j=B.element.getBoundingClientRect();return I.left-j.left+N.overflow*this.config.characterWidth}catch(U){return console.error("Error measuring text width:",U),k*this.config.characterWidth}},O.prototype.$findColumnPosition=function(E,k){for(var B=document.createTreeWalker(E,NodeFilter.SHOW_TEXT,null),N=0,I,$;I=B.nextNode();){var A=I.nodeValue,D=A.length;if(N+D>=k)return{node:I,offset:k-N,overflow:0};N+=D,$=I}return $&&{node:$,offset:$.nodeValue.length,overflow:k-N}},O.prototype.$pixelToColumn=function(E,k,B,N,I){var $=this,A=this.$scratchRange,D=this.$findElementForScreenRow(E);if(!D||k<0)return k;var j=this.renderer.$hasCssTransforms,U=j&&this.getTransform();I&&(j?B+=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft:B+=this.textLayer.element.getBoundingClientRect().left);var q=0,Q=function(ne){var ue=[];if(ne.nodeType===Node.TEXT_NODE?(A.setStart(ne,0),A.setEnd(ne,ne.nodeValue.length),ue=Array.from(A.getClientRects())):ne.nodeType===Node.ELEMENT_NODE&&(ue=Array.from(ne.getClientRects())),j){for(var he=[],oe=0;oe<ue.length;oe++){var ee=ue[oe];he.push($.recoverRect(U,ee))}ue=he}return ue},re=this;function le(ne){if(ne.nodeType===Node.TEXT_NODE){for(var ue=ne.nodeValue.length,he=Number.MAX_VALUE,oe=-1,ee=void 0,ye=ne.nodeValue,we=0;we<=ue;we++)if(A.setStart(ne,we),A.setEnd(ne,we),!(we>0&&we<ue&&/[\uDC00-\uDFFF]/.test(ye.charAt(we))&&/[\uD800-\uDBFF]/.test(ye.charAt(we-1)))){var Ae=A.getBoundingClientRect();j&&(Ae=re.recoverRect(U,Ae));var Je=B-Ae.left,ze=Math.abs(Je);ze<he&&(oe=we,he=ze,ee=Je)}return N&&ee<0&&(oe=Math.max(0,oe-1)),q=q+oe}else if(ne.nodeType===Node.ELEMENT_NODE)for(var qe=ne.childNodes,Ze=0;Ze<qe.length;Ze++){for(var at=qe[Ze],ct=Q(at),we=0;we<ct.length;we++){var Ae=ct[we];if(Ae.left<=B&&B<=Ae.left+Ae.width)return le(at),q}q+=at.nodeType===Node.TEXT_NODE?at.nodeValue.length:at.textContent.length}}return le(D),q},O.prototype.getRects=function(E,k){var B=E.row,N=this.textLayer,I=this.$findElementForScreenRow(B);if(I)try{var $=this.$findColumnPosition(I,E.column),A=this.$findColumnPosition(I,k.column);if($&&A){this.$scratchRange.setStart($.node,$.offset),this.$scratchRange.setEnd(A.node,A.offset);var D=this.$scratchRange.getClientRects(),j=this.renderer&&this.renderer.$hasCssTransforms;if(j){for(var U=this.getTransform(),q=[],Q=0;Q<D.length;Q++){var re=this.recoverRect(U,D[Q]);re.right=re.left+re.width,q.push(re)}var le=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft,ue=p(q).map(function(oe){return{left:oe.left-le,width:oe.right-oe.left}});return ue}var ne=N.element.getBoundingClientRect(),ue=p(D).map(function(he){return{left:he.left-ne.left,width:he.right-he.left}});return ue}}catch(he){console.error("Error measuring text width:",he)}return[{left:E.column*this.config.characterWidth,width:(k.column-E.column)*this.config.characterWidth}]},O})();function p(O){for(var E=[],k=0;k<O.length;k++){for(var B=O[k],N=!1,I=0;I<E.length;I++){var $=E[I];if($.left<=B.left&&B.left<=$.right||$.left<=B.right&&B.right<=$.right||B.left<=$.left&&$.right<=B.right){$.left=Math.min($.left,B.left),$.right=Math.max($.right,B.right),N=!0;break}}N||E.push({left:B.left,right:B.right,top:B.top,height:B.height})}return E}function m(O,E,k){var B=O[1]*E[0]-O[0]*E[1];return[(-E[1]*k[0]+E[0]*k[1])/B,(+O[1]*k[0]-O[0]*k[1])/B]}function w(O,E){return[O[0]-E[0],O[1]-E[1]]}function x(O,E){return[O[0]+E[0],O[1]+E[1]]}function R(O,E){return[O*E[0],O*E[1]]}g.implement(o.prototype,a),r.FontMetrics=o;function T(O,E){var k=E.left,B=E.top,N=E.width,I=E.height,$=O.M;k-=O.t[0],B-=O.t[1],E={left:k,top:B,width:N,height:I};for(var A=[B,k+N,B+I,k],D=[!0,!1,!0,!1],j=[[0,0],[1,0],[1,1],[0,1]],U=null,q=[27,57,23,53,43,9,10,11,14,37,31,56,40,41,47],Q=-q.length;Q<256;Q++){var re=Q<0?q[q.length+Q]:Q,le=[re>>0&3,re>>2&3,re>>4&3,re>>6&3],ne=le.map(function(ze){return j[ze]}),ue=ne.map(function(ze,qe){var Ze=h(ze,2),at=Ze[0],ct=Ze[1],Ft=A[qe],Me=D[qe]?$.slice(3,6):$.slice(0,3),xt=$.slice(6,9),St=Me[0]-Ft*xt[0],Vt=Me[1]-Ft*xt[1];return[St,Vt,at*St,ct*Vt,Ft*xt[2]-Me[2]]}),he=P(ue),U;if(he){var oe=h(he,4),ee=oe[0],ye=oe[1],we=oe[2],Ae=oe[3];if(we<0&&(ee+=we,we=-we),Ae<0&&(ye+=Ae,Ae=-Ae),C($,ee,ye,we,Ae,E)){U={left:ee,top:ye,width:we,height:Ae,right:ee+we,bottom:ye+Ae,mappingIdx:Q};break}}}return U||console.warn("No valid mapping found in 256 combinations."),U}var _=function(O,E,k){var B=O[6]*E+O[7]*k+O[8];return[(O[0]*E+O[1]*k+O[2])/B,(O[3]*E+O[4]*k+O[5])/B]};function C(O,E,k,B,N,I){var $=[[E,k],[E+B,k],[E+B,k+N],[E,k+N]];return $.every(function(A){var D=_(O,A[0],A[1]);return I.left-.5<=D[0]&&D[0]<=I.left+I.width+.5&&I.top-.5<=D[1]&&D[1]<=I.top+I.height+.5})}function P(O){for(var E,k=4,B=0;B<k;B++){for(var N=B,I=B+1;I<k;I++)Math.abs(O[I][B])>Math.abs(O[N][B])&&(N=I);E=h([O[N],O[B]],2),O[B]=E[0],O[N]=E[1];var $=O[B][B];if(Math.abs($)<1e-10)return null;for(var I=B;I<=k;I++)O[B][I]/=$;for(var A=0;A<k;A++)if(A!==B)for(var D=O[A][B],I=B;I<=k;I++)O[A][I]-=D*O[B][I]}return O.map(function(j){return j[k]})}}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,r,c){c.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .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 {
383
+ 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==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ 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==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .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 {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var h=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/event_emitter").EventEmitter,s=(function(){function f(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 f.prototype.$createCanvas=function(){this.canvas=h.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},f.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 d(I,$){return I.priority<$.priority?-1:I.priority>$.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var p={info:1,warning:2,error:3};o.forEach(function(I){I.priority=p[I.type]||null}),o=o.sort(d);for(var m=0;m<o.length;m++){var w=o[m].row,x=this.getVerticalOffsetForRow(w),R=x+this.lineHeight,T=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*R),C=Math.round((T+_)/2),P=_-C;P<this.halfMinDecorationHeight&&(P=this.halfMinDecorationHeight),C-P<0&&(C=P),C+P>this.canvasHeight&&(C=this.canvasHeight-P);var O=C-P,E=C+P,k=E-O;u.fillStyle=l[o[m].type]||null,u.fillRect(0,O,Math.round(this.oneZoneWidth-1),k)}}var B=this.renderer.session.selection.getCursor();if(B){var N=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,N,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(a){a=a|0;var l=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return l},f.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},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},f})();g.implement(s.prototype,v),r.Decorator=s}),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(t,r,c){var h=t("./lib/oop"),g=t("./lib/dom"),v=t("./lib/lang"),s=t("./config"),f=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,u=t("./layer/cursor").Cursor,d=t("./scrollbar").HScrollBar,o=t("./scrollbar").VScrollBar,p=t("./scrollbar_custom").HScrollBar,m=t("./scrollbar_custom").VScrollBar,w=t("./renderloop").RenderLoop,x=t("./layer/font_metrics").FontMetrics,R=t("./lib/event_emitter").EventEmitter,T=t("./css/editor-css"),_=t("./layer/decorators").Decorator,C=t("./lib/useragent"),P=t("./layer/text_util").isTextToken;g.importCssString(T,"ace_editor.css",!1);var O=(function(){function E(k,B){var N=this;this.container=k||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var I=this.$textLayer=new l(this.content);this.canvas=I.element,this.$markerFront=new a(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on("scroll",function($){N.$scrollAnimation||N.session.setScrollTop($.data-N.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){N.$scrollAnimation||N.session.setScrollLeft($.data-N.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container,this.$textLayer,this),this.$textLayer.on("changeCharacterSize",function($){N.updateCharacterSize(),N.onResize(!0,N.gutterWidth,N.$size.width,N.$size.height),N._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,fontMetrics:this.$fontMetrics,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.$fontMetrics.config=this.layerConfig,this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._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(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(k){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=k,k&&this.scrollMargin.top&&k.getScrollTop()<=0&&k.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(k),this.$markerBack.setSession(k),this.$markerFront.setSession(k),this.$gutterLayer.setSession(k),this.$textLayer.setSession(k),k&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function(k,B,N){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>k&&(this.$changedLines.firstRow=k),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:k,lastRow:B},this.$changedLines.lastRow<this.layerConfig.firstRow)if(N)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(k){k?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(k,B,N,I){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var $=this.container;I||(I=$.clientHeight||$.scrollHeight),!I&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",I=$.clientHeight||$.scrollHeight),N||(N=$.clientWidth||$.scrollWidth);var A=this.$updateCachedSize(k,B,N,I);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!N&&!I)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?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(k,B,N,I){I-=this.$extraHeight||0;var $=0,A=this.$size,D={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(I&&(k||A.height!=I)&&(A.height=I,$|=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),N&&(k||A.width!=N)){$|=this.CHANGE_SIZE,A.width=N,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,g.setStyle(this.scrollBarH.element.style,"left",B+"px"),g.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),A.scrollerWidth=Math.max(0,N-B-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",j),g.setStyle(this.scroller.style,"right",j),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&($|=this.CHANGE_FULL)}return A.$dirty=!N||!I,$&&this._signal("resize",D),$},E.prototype.onGutterResize=function(k){var B=this.$showGutter?k:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,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 k=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},E.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},E.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=g.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.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 k=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){g.translate(this.textarea,-100,0);return}var N=this.$cursorLayer.$pixelPos;if(N){B&&B.markerRange&&(N=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var I=this.layerConfig,$=N.top,A=N.left;$-=I.offset;var D=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>I.height-D){g.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-D;if(!B)$+=this.lineHeight;else if(B.useTextareaForIME){var q=this.textarea.value;j=this.$fontMetrics.getTextWidth(q)+1}else $+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-j&&(A=this.$size.scrollerWidth-j),A+=this.gutterWidth+this.margin.left,g.setStyle(k,"height",D+"px"),g.setStyle(k,"width",j+"px"),g.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-j),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 k=this.layerConfig,B=k.lastRow,N=this.session.documentToScreenRow(B,0)*k.lineHeight;return N-this.session.getScrollTop()>k.height-k.lineHeight?B-1:B},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(k,B,N,I){var $=this.scrollMargin;$.top=k|0,$.bottom=B|0,$.right=I|0,$.left=N|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},E.prototype.setMargin=function(k,B,N,I){var $=this.margin;$.top=k|0,$.bottom=B|0,$.right=I|0,$.left=N|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(k){this.setOption("hScrollBarAlwaysVisible",k)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},E.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-B&&(k=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+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(k,B){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!B){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k);var N=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),N.firstRow!=this.layerConfig.firstRow&&N.firstRowScreen==this.layerConfig.firstRowScreen){var I=this.scrollTop+(N.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;I>0&&(this.scrollTop=I,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}N=this.layerConfig}if(k&this.CHANGE_H_SCROLL&&(this.$updateContentTransformAndSize(N,k),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$updateContentTransformAndSize(N,k),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(N):this.$textLayer.scrollLines(N),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(N):this.$gutterLayer.scrollLines(N)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$updateContentTransformAndSize(N,k),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$updateContentTransformAndSize(N,k)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$updateContentTransformAndSize(N,k)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(N),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(N),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(N),this._signal("afterRender",k)},E.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,N=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(N+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&N>this.$maxPixelHeight&&(N=this.$maxPixelHeight);var I=N<=2*this.lineHeight,$=!I&&k>B;if(N!=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=N+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,N),this.desiredHeight=N,this._signal("autosize")}},E.prototype.$updateContentTransformAndSize=function(k,B){var N=this.scrollMargin;if(this.session&&!this.session.getUseWrapMode()){var I=this.$getLongestRenderedLine();k.width<I&&(k.width=I)}this.session&&this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,k.width+2*this.$padding-this.$size.scrollerWidth+N.right))),g.translate(this.content,-this.scrollLeft,-k.offset);var $=k.width+2*this.$padding+"px",A=k.minHeight+"px";g.setStyle(this.content.style,"width",$),g.setStyle(this.content.style,"height",A),this.$updateScrollBarV(),B&this.CHANGE_H_SCROLL&&this.$updateScrollBarH()},E.prototype.$getLongestRenderedLine=function(){for(var k=0,B=this.$hasCssTransforms&&this.$fontMetrics.getTransform(),N=this.$textLayer.$lines.cells,I=0;I<N.length;I++){var $=N[I].element;this.$fontMetrics.$scratchRange.setStart($,0),this.$fontMetrics.$scratchRange.setEnd($,$.childNodes.length);var A=this.$fontMetrics.$scratchRange.getBoundingClientRect();this.$hasCssTransforms&&(A=this.$fontMetrics.recoverRect(B,A)||A);var D=A.width;D>k&&(k=D)}return k},E.prototype.$computeLayerConfig=function(){var k=this.session,B=this.$size,N=B.height<=2*this.lineHeight,I=this.session.getScreenLength(),$=I*this.lineHeight,A=this.$getLongestLine(),D=!N&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-A-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),N=B.height<=2*this.lineHeight);var q=B.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=Q;var re=this.scrollMargin;this.session.setScrollTop(Math.max(-re.top,Math.min(this.scrollTop,$-B.scrollerHeight+re.bottom)));var le=!N&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-$+Q<0||this.scrollTop>re.top),ne=U!==le;ne&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ue=this.scrollTop%this.lineHeight,he=Math.ceil(q/this.lineHeight)-1,oe=Math.max(0,Math.round((this.scrollTop-ue)/this.lineHeight)),ee=oe+he,ye,we,Ae=this.lineHeight;oe=k.screenToDocumentRow(oe,0);var Je=k.getFoldLine(oe);Je&&(oe=Je.start.row),ye=k.documentToScreenRow(oe,0),we=k.getRowLength(oe)*Ae,ee=Math.min(k.screenToDocumentRow(ee,0),k.getLength()-1),q=B.scrollerHeight+k.getRowLength(ee)*Ae+we,ue=this.scrollTop-ye*Ae,ue<0&&ye>0&&(ye=Math.max(0,ye+Math.floor(ue/Ae)),ue=this.scrollTop-ye*Ae);var ze=0;return(this.layerConfig.width!=A||j)&&(ze=this.CHANGE_H_SCROLL),(j||ne)&&(ze|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:oe,firstRowScreen:ye,lastRow:ee,lineHeight:Ae,characterWidth:this.characterWidth,fontMetrics:this.$fontMetrics,minHeight:q,maxHeight:$,offset:ue,gutterOffset:Ae?Math.max(0,Math.ceil((ue+B.height-B.scrollerHeight)/Ae)):0,height:this.$size.scrollerHeight},this.$fontMetrics.config=this.layerConfig,this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),ze},E.prototype.$updateLines=function(){if(this.$changedLines){var k=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var N=this.layerConfig;if(!(k>N.lastRow+1)&&!(B<N.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(N),this.$textLayer.update(N);return}return this.$textLayer.updateLines(N,k,B),!0}}},E.prototype.$getLongestLine=function(){var k=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(k+=1),this.$textLayer&&k>this.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*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(k,B){this.$gutterLayer.addGutterDecoration(k,B)},E.prototype.removeGutterDecoration=function(k,B){this.$gutterLayer.removeGutterDecoration(k,B)},E.prototype.updateBreakpoints=function(k){this._rows=k,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),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(k,B,N){this.scrollCursorIntoView(k,N),this.scrollCursorIntoView(B,N)},E.prototype.scrollCursorIntoView=function(k,B,N){if(this.$size.scrollerHeight!==0){var I=this.$cursorLayer.getPixelPosition(k),$=I.left,A=I.top,D=N&&N.top||0,j=N&&N.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>A?(B&&U+D>A+this.lineHeight&&(A-=B*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-j<A+this.lineHeight&&(B&&U+this.$size.scrollerHeight-j<A-this.lineHeight&&(A+=B*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+j-this.$size.scrollerHeight));var q=this.scrollLeft,Q=2*this.layerConfig.characterWidth;$-Q<q?($-=Q,$<this.$padding+Q&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=Q,q+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):q<=this.$padding&&$-q<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(k){this.session.setScrollTop(k*this.lineHeight)},E.prototype.alignCursor=function(k,B){typeof k=="number"&&(k={row:k,column:0});var N=this.$cursorLayer.getPixelPosition(k),I=this.$size.scrollerHeight-this.lineHeight,$=N.top-I*(B||0);return this.session.setScrollTop($),$},E.prototype.$calcSteps=function(k,B){var N=0,I=this.STEPS,$=[],A=function(D,j,U){return U*(Math.pow(D-1,3)+1)+j};for(N=0;N<I;++N)$.push(A(N/this.STEPS,k,B-k));return $},E.prototype.scrollToLine=function(k,B,N,I){var $=this.$cursorLayer.getPixelPosition({row:k,column:0}),A=$.top;B&&(A-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(A),N!==!1&&this.animateScrolling(D,I)},E.prototype.animateScrolling=function(k,B){var N=this.scrollTop;if(!this.$animatedScroll)return;var I=this;if(k==N)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(k=$[0],k==N))return}var A=I.$calcSteps(k,N);this.$scrollAnimation={from:k,to:N,steps:A},clearInterval(this.$timer),I.session.setScrollTop(A.shift()),I.session.$scrollTop=N;function D(){I.$timer=clearInterval(I.$timer),I.$scrollAnimation=null,I.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(I.$stopAnimation){D();return}if(!I.session)return clearInterval(I.$timer);A.length?(I.session.setScrollTop(A.shift()),I.session.$scrollTop=N):N!=null?(I.session.$scrollTop=-1,I.session.setScrollTop(N),N=null):D()},10)},E.prototype.scrollToY=function(k){this.scrollTop!==k&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=k)},E.prototype.scrollToX=function(k){this.scrollLeft!==k&&(this.scrollLeft=k),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(k,B){this.session.setScrollTop(B),this.session.setScrollLeft(k)},E.prototype.scrollBy=function(k,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),k&&this.session.setScrollLeft(this.session.getScrollLeft()+k)},E.prototype.isScrollableBy=function(k,B){if(B<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(k,B){var N;if(this.$hasCssTransforms){N={top:this.margin.top,left:this.gutterWidth+this.margin.left};var I=this.$fontMetrics.transformCoordinates([k,B]);k=I[0],B=I[1]}else N=this.scroller.getBoundingClientRect();var $=k+this.scrollLeft-N.left-this.$padding,A=$/this.characterWidth,D=(B+this.scrollTop-N.top)/this.lineHeight,j=this.$blockCursor?Math.floor(A):Math.round(A);return j=this.$fontMetrics.$pixelToColumn(D,j,k,this.$blockCursor),{row:D,column:j,side:A-j>0?1:-1,offsetX:$}},E.prototype.screenToTextCoordinates=function(k,B){var N=this.pixelToScreenCoordinates(k,B);return this.session.screenToDocumentPosition(N.row,Math.max(N.column,0))},E.prototype.textToScreenCoordinates=function(k,B){var N=this.session.documentToScreenPosition(k,B),I=this.$padding+this.$fontMetrics.textWidth(N.row,N.column),$=N.row*this.lineHeight;if(this.$hasCssTransforms){var A=this.$fontMetrics.transformCoordinates(null,[this.gutterWidth+this.margin.left+I-this.scrollLeft,this.margin.top+$-this.scrollTop]);return{pageX:A[0],pageY:A[1]}}var D=this.scroller.getBoundingClientRect();return{pageX:D.left+I-this.scrollLeft,pageY:D.top+$-this.scrollTop}},E.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(k){var B=this.session.selection.cursor;this.addToken(k,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(k,B){var N=this.session.selection.cursor,I=B||{row:N.row,column:N.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(k,I);this.addToken($[0].text,"ghost_text",I.row,I.column),this.$ghostText={text:k,position:{row:I.row,column:I.column}};var A=g.createElement("div");if($.length>1){var D=this.hideTokensAfterPosition(I.row,I.column),j;$.slice(1).forEach(function(ne){var ue=g.createElement("div"),he=g.createElement("span");he.className="ace_ghost_text",ne.wrapped&&(ue.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),he.appendChild(g.createTextNode(ne.text)),ue.appendChild(he),A.appendChild(ue),j=ue}),D.forEach(function(ne){var ue=g.createElement("span");P(ne.type)||(ue.className="ace_"+ne.type.replace(/\./g," ace_")),ue.appendChild(g.createTextNode(ne.value)),j.appendChild(ue)}),this.$ghostTextWidget={el:A,row:I.row,column:I.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(I,!0),q=this.container,Q=q.getBoundingClientRect().height,re=$.length*this.lineHeight,le=re<Q-U.top;if(le)return;re<Q?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(I.row)}},E.prototype.$calculateWrappedTextChunks=function(k,B){var N=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(N/this.characterWidth)-2;I=I<=0?60:I;for(var $=k.split(/\r?\n/),A=[],D=0;D<$.length;D++){var j=this.session.$getDisplayTokens($[D],B.column),U=this.session.$computeWrapSplits(j,I,this.session.$tabSize);if(U.length>0){var q=0;U.push($[D].length);for(var Q=0;Q<U.length;Q++){var re=$[D].slice(q,U[Q]);A.push({text:re,wrapped:!0}),q=U[Q]}}else A.push({text:$[D],wrapped:!1})}return A},E.prototype.removeGhostText=function(){if(this.$ghostText){var k=this.$ghostText.position;this.removeExtraToken(k.row,k.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(k,B,N,I){var $=this.session;$.bgTokenizer.lines[N]=null;var A={type:B,value:k},D=$.getTokens(N);if(I==null||!D.length)D.push(A);else for(var j=0,U=0;U<D.length;U++){var q=D[U];if(j+=q.value.length,I<=j){var Q=q.value.length-(j-I),re=q.value.slice(0,Q),le=q.value.slice(Q);D.splice(U,1,{type:q.type,value:re},A,{type:q.type,value:le});break}}this.updateLines(N,N)},E.prototype.hideTokensAfterPosition=function(k,B){for(var N=this.session.getTokens(k),I=0,$=!1,A=[],D=0;D<N.length;D++){var j=N[D];if(I+=j.value.length,j.type!=="ghost_text"){if($){A.push({type:j.type,value:j.value}),j.type="hidden_token";continue}I===B&&($=!0)}}return this.updateLines(k,k),A},E.prototype.removeExtraToken=function(k,B){this.session.bgTokenizer.lines[k]=null,this.updateLines(k,k)},E.prototype.setTheme=function(k,B){var N=this;if(this.$themeId=k,N._dispatchEvent("themeChange",{theme:k}),!k||typeof k=="string"){var I=k||this.$options.theme.initialValue;s.loadModule(["theme",I],$)}else $(k);function $(A){if(N.$themeId!=k)return B&&B();if(!A||!A.cssClass)throw new Error("couldn't load module "+k+" or it didn't call define");A.$id&&(N.$themeId=A.$id),g.importCssString(A.cssText,A.cssClass,N.container),N.theme&&g.removeCssClass(N.container,N.theme.cssClass);var D="padding"in A?A.padding:"padding"in(N.theme||{})?4:N.$padding;if(N.$padding&&D!=N.$padding&&N.setPadding(D),N.$gutterLayer){var j=A.$showGutterCursorMarker;j&&!N.$gutterLayer.$showCursorMarker?N.$gutterLayer.$showCursorMarker="theme":!j&&N.$gutterLayer.$showCursorMarker=="theme"&&(N.$gutterLayer.$showCursorMarker=null)}N.$theme=A.cssClass,N.theme=A,g.addCssClass(N.container,A.cssClass),g.setCssClass(N.container,"ace_dark",A.isDark),N.$size&&(N.$size.width=0,N.$updateSizeAsync()),N._dispatchEvent("themeLoaded",{theme:A}),B&&B(),C.isSafari&&N.scroller&&(N.scroller.style.background="red",N.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(k,B){g.setCssClass(this.container,k,B!==!1)},E.prototype.unsetStyle=function(k){g.removeCssClass(this.container,k)},E.prototype.setCursorStyle=function(k){g.setStyle(this.scroller.style,"cursor",k)},E.prototype.setMouseCursor=function(k){g.setStyle(this.scroller.style,"cursor",k)},E.prototype.attachToShadowRoot=function(){g.importCssString(T,"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(k){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),k===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollTop(N.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollLeft(N.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollTop(N.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollLeft(N.data-B.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var k=this;this.$resizeTimer=v.delayedCall(function(){k.destroyed||k.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var N=B[0].contentRect.width,I=B[0].contentRect.height;Math.abs(k.$size.width-N)>1||Math.abs(k.$size.height-I)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E})();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,h.implement(O.prototype,R),s.defineOptions(O.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){g.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=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,r,c){var h=t("../lib/oop"),g=t("../lib/net"),v=t("../lib/event_emitter").EventEmitter,s=t("../config");function f(d){var o="importScripts('"+g.qualifyURL(d)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var p=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new p;return m.append(o),m.getBlob("application/javascript")}}function a(d){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var o=f(d),p=window.URL||window.webkitURL,m=p.createObjectURL(o);return new Worker(m)}return new Worker(d)}var l=function(d){d.postMessage||(d=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=d,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(){h.implement(this,v),this.$createWorkerFromOldConfig=function(d,o,p,m,w){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),s.get("packaged")||!t.toUrl)m=m||s.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var R={};d.forEach(function(T){R[T]=x(t.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:o,classname:p}),this.$worker},this.onMessage=function(d){var o=d.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var p=this.callbacks[o.id];p&&(p(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(d){window.console&&console.error&&console.error(d)},this.$normalizePath=function(d){return g.qualifyURL(d)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(d){d.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(d,o){this.$worker.postMessage({command:d,args:o})},this.call=function(d,o,p){if(p){var m=this.callbackId++;this.callbacks[m]=p,o.push(m)}this.send(d,o)},this.emit=function(d,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:d,data:{data:o.data}})}catch(p){console.error(p.stack)}},this.attachToDocument=function(d){this.$doc&&this.terminate(),this.$doc=d,this.call("setValue",[d.getValue()]),d.on("change",this.changeListener,!0)},this.changeListener=function(d){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),d.action=="insert"?this.deltaQueue.push(d.start,d.lines):this.deltaQueue.push(d.start,d.end)},this.$sendDeltaQueue=function(){var d=this.deltaQueue;d&&(this.deltaQueue=null,d.length>50&&d.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:d}))}}).call(l.prototype);var u=function(d,o,p){var m=null,w=!1,x=Object.create(v),R=[],T=new l({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),m&&(w?setTimeout(_):_())}});T.setEmitSync=function(C){w=C};var _=function(){var C=R.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){T.onMessage({data:C})},x.callback=function(C,P){this.postMessage({type:"call",id:P,data:C})},x.emit=function(C,P){this.postMessage({type:"event",name:C,data:P})},s.loadModule(["worker",o],function(C){for(m=new C[p](x);R.length;)_()}),T};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(t,r,c){var h=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,v=t("./lib/oop"),s=(function(){function f(a,l,u,d,o,p){var m=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=o,this.othersClass=p,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var w=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return f.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 d=this.pos;d.$insertRight=!0,d.detach(),d.markerId=u.addMarker(new h(d.row,d.column,d.row,d.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var p=l.createAnchor(o.row,o.column);p.$insertRight=!0,p.detach(),a.others.push(p)}),u.setUndoSelect(!1)},f.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 h(u.row,u.column,u.row,u.column+l.length),l.othersClass,null,!1)})}},f.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)}},f.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,d=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,o=l.start.column-this.pos.column;if(this.updateAnchors(a),d&&(this.length+=u),d&&!this.session.$fromUndo){if(a.action==="insert")for(var p=this.others.length-1;p>=0;p--){var m=this.others[p],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,a.lines)}else if(a.action==="remove")for(var p=this.others.length-1;p>=0;p--){var m=this.others[p],w={row:m.row,column:m.column+o};this.doc.remove(new h(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,u=function(o,p){l.removeMarker(o.markerId),o.markerId=l.addMarker(new h(o.row,o.column,o.row,o.column+a.length),p,null,!1)};u(this.pos,this.mainClass);for(var d=this.others.length;d--;)u(this.others[d],this.othersClass)}},f.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))}},f.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var 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)}},f})();v.implement(s.prototype,g),r.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,c){var h=t("../lib/event"),g=t("../lib/useragent");function v(f,a){return f.row==a.row&&f.column==a.column}function s(f){var a=f.domEvent,l=a.altKey,u=a.shiftKey,d=a.ctrlKey,o=f.getAccelKey(),p=f.getButton();if(d&&g.isMac&&(p=a.button),f.editor.inMultiSelectMode&&p==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!d&&!l&&!o){p===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(p===0){var m=f.editor,w=m.selection,x=m.inMultiSelectMode,R=f.getDocumentPosition(),T=w.getCursor(),_=f.inSelection()||w.isEmpty()&&v(R,T),C=f.x,P=f.y,O=function(re){C=re.clientX,P=re.clientY},E=m.session,k=m.renderer.pixelToScreenCoordinates(C,P),B=k,N;if(m.$mouseHandler.$enableJumpToDef)d&&l||o&&l?N=u?"block":"add":l&&m.$blockSelectEnabled&&(N="block");else if(o&&!l){if(N="add",!x&&u)return}else l&&m.$blockSelectEnabled&&(N="block");if(N&&g.isMac&&a.ctrlKey&&m.$mouseHandler.cancelContextMenu(),N=="add"){if(!x&&_)return;if(!x){var I=w.toOrientedRange();m.addSelectionMarker(I)}var $=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,u&&($=null,I=w.ranges[0]||I,m.removeSelectionMarker(I)),m.once("mouseup",function(){var re=w.toOrientedRange();$&&re.isEmpty()&&v($.cursor,re.cursor)?w.substractPoint(re.cursor):(u?w.substractPoint(I.cursor):I&&(m.removeSelectionMarker(I),w.addRange(I)),w.addRange(re)),m.inVirtualSelectionMode=!1})}else if(N=="block"){f.stop(),m.inVirtualSelectionMode=!0;var A,D=[],j=function(){var re=m.renderer.pixelToScreenCoordinates(C,P),le=E.screenToDocumentPosition(re.row,re.column);v(B,re)&&v(le,w.lead)||(B=re,m.selection.moveToPosition(le),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=w.rectangularRangeBlock(B,k),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(A=w.toOrientedRange(),m.addSelectionMarker(A)),u?k=E.documentToScreenPosition(w.lead):w.moveToPosition(R),B={row:-1,column:-1};var U=function(re){j(),clearInterval(Q),m.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),A&&(m.removeSelectionMarker(A),w.toSingleRange(A));for(var le=0;le<D.length;le++)w.addRange(D[le]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},q=j;h.capture(m.container,O,U);var Q=setInterval(function(){q()},20);return f.preventDefault()}}}r.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,r,c){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.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(g){g.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(g){g.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(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.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(g){g.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(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.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(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var h=t("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new h(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(t,r,c){var h=t("./range_list").RangeList,g=t("./range").Range,v=t("./selection").Selection,s=t("./mouse/multi_select_handler").onMouseDown,f=t("./lib/event"),a=t("./lib/lang"),l=t("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=t("./search").Search,d=new u;function o(T,_,C){return d.$options.wrap=!0,d.$options.needle=_,d.$options.backwards=C==-1,d.find(T)}var p=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,_){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}T.cursor||(T.cursor=T.end);var P=this.rangeList.add(T);return this.$onAddRange(T),P.length&&this.$onRemoveRange(P),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var _=this.rangeList.substractPoint(T);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();T.push(_),this.rangeCount=0}for(var C=T.length;C--;){var P=this.ranges.indexOf(T[C]);P!=-1&&this.ranges.splice(P,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<T.length;C++){var P=T[C],O=P.start.row,E=P.end.row;if(O===E)_.push(P.clone());else{for(_.push(new g(O,P.start.column,O,this.session.getLine(O).length));++O<E;)_.push(this.getLineRange(O,!0));_.push(new g(E,0,E,P.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var T=this.rangeList.ranges,_=T[T.length-1],C=g.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,_=T[T.length-1],C=g.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var P=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(P,O);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,_,C){var P=[],O=T.column<_.column;if(O)var E=T.column,k=_.column;else var E=_.column,k=T.column;var B=T.row<_.row;if(B)var N=T.row,I=_.row;else var N=_.row,I=T.row;E<0&&(E=0),N<0&&(N=0),N==I&&(C=!0);for(var $,A=N;A<=I;A++){var D=g.fromPoints(this.session.screenToDocumentPosition(A,E),this.session.screenToDocumentPosition(A,k));if(D.isEmpty()){if($&&w(D.end,$))break;$=D.end}D.cursor=O?D.start:D.end,P.push(D)}if(B&&P.reverse(),!C){for(var j=P.length-1;P[j].isEmpty()&&j>0;)j--;if(j>0)for(var U=0;P[U].isEmpty();)U++;for(var q=j;q>=U;q--)P[q].isEmpty()&&P.splice(q,1)}return P}}).call(v.prototype);var m=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var _=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",_),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var _=this.session.$selectionMarkers.indexOf(T);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var _=this.session.$selectionMarkers,C=T.length;C--;){var P=T[C];if(P.marker){this.session.removeMarker(P.marker);var O=_.indexOf(P);O!=-1&&_.splice(O,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){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(T){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(T){var _=T.command,C=T.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?P=C.forEachSelection(_,T.args):_.multiSelectAction=="forEachLine"?P=C.forEachSelection(_,T.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),P=_.exec(C,T.args||{})):P=_.multiSelectAction(C,T.args||{});else{var P=_.exec(C,T.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return P}},this.forEachSelection=function(T,_,C){if(!this.inVirtualSelectionMode){var P=C&&C.keepOrder,O=C==!0||C&&C.$byLines,E=this.session,k=this.selection,B=k.rangeList,N=(P?k:B).ranges,I;if(!N.length)return T.exec?T.exec(this,_||{}):T(this,_||{});var $=k._eventRegistry;k._eventRegistry={};var A=new v(E);this.inVirtualSelectionMode=!0;try{for(var D=N.length;D--;){if(O)for(;D>0&&N[D].start.row==N[D-1].end.row;)D--;A.fromOrientedRange(N[D]),A.index=D,this.selection=E.selection=A;var j=T.exec?T.exec(this,_||{}):T(this,_||{});!I&&j!==void 0&&(I=j),A.toOrientedRange(N[D])}A.detach()}finally{this.selection=E.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=$,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),I}}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],P=0;P<_.length;P++)C.push(this.session.getTextRange(_[P]));var O=this.session.getDocument().getNewLineCharacter();T=C.join(O),T.length==(C.length-1)*O.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(!C||this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var P=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;P.row!=_.row||this.session.$clipPositionToDocument(P.row,P.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,_,C){if(_=_||{},_.needle=T||_.needle,_.needle==null){var P=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(P)}this.$search.set(_);var O=this.$search.findAll(this.session);if(!O.length)return 0;var E=this.multiSelect;C||E.toSingleRange(O[0]);for(var k=O.length;k--;)E.addRange(O[k],!0);return P&&E.rangeList.rangeAtPoint(P.start)&&E.addRange(P,!0),O.length},this.selectMoreLines=function(T,_){var C=this.selection.toOrientedRange(),P=C.cursor==C.end,O=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(O.row+T,O.column);if(C.isEmpty())var B=E;else var k=this.session.documentToScreenPosition(P?C.end:C.start),B=this.session.screenToDocumentPosition(k.row+T,k.column);if(P){var N=g.fromPoints(E,B);N.cursor=N.start}else{var N=g.fromPoints(B,E);N.cursor=N.end}if(N.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var I=C.cursor;this.selection.addRange(N),I&&this.selection.substractPoint(I)},this.transposeSelections=function(T){for(var _=this.session,C=_.multiSelect,P=C.ranges,O=P.length;O--;){var E=P[O];if(E.isEmpty()){var k=_.getWordRange(E.start.row,E.start.column);E.start.row=k.start.row,E.start.column=k.start.column,E.end.row=k.end.row,E.end.column=k.end.column}}C.mergeOverlappingRanges();for(var B=[],O=P.length;O--;){var E=P[O];B.unshift(_.getTextRange(E))}T<0?B.unshift(B.pop()):B.push(B.shift());for(var O=P.length;O--;){var E=P[O],N=E.clone();_.replace(E,B[O]),E.start.row=N.start.row,E.start.column=N.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(T,_,C){var P=this.session,O=P.multiSelect,E=O.toOrientedRange();if(!(E.isEmpty()&&(E=P.getWordRange(E.start.row,E.start.column),E.cursor=T==-1?E.start:E.end,this.multiSelect.addRange(E),C))){var k=P.getTextRange(E),B=o(P,k,T);B&&(B.cursor=T==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var T=this.session,_=T.multiSelect,C=_.ranges,P=-1,O=C.filter(function(q){if(q.cursor.row==P)return!0;P=q.cursor.row});if(!C.length||O.length==C.length-1){var E=this.selection.getRange(),k=E.start.row,B=E.end.row,N=k==B;if(N){var I=this.session.getLength(),$;do $=this.session.getLine(B);while(/[=:]/.test($)&&++B<I);do $=this.session.getLine(k);while(/[=:]/.test($)&&--k>0);k<0&&(k=0),B>=I&&(B=I-1)}var A=this.session.removeFullLines(k,B);A=this.$reAlignText(A,N),this.session.insert({row:k,column:0},A.join(`
954
+ `)+`
955
+ `),N||(E.start.column=0,E.end.column=A[A.length-1].length),this.selection.setRange(E)}else{O.forEach(function(q){_.substractPoint(q.cursor)});var D=0,j=1/0,U=C.map(function(q){var Q=q.cursor,re=T.getLine(Q.row),le=re.substr(Q.column).search(/\S/g);return le==-1&&(le=0),Q.column>D&&(D=Q.column),le<j&&(j=le),le});C.forEach(function(q,Q){var re=q.cursor,le=D-re.column,ne=U[Q]-j;le>ne?T.insert(re,a.stringRepeat(" ",le-ne)):T.remove(new g(re.row,re.column,re.row,re.column-le+ne)),q.start.column=q.end.column=D,q.start.row=q.end.row=re.row,q.cursor=q.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,_){var C=!0,P=!0,O,E,k;return T.map(function(A){var D=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?O==null?(O=D[1].length,E=D[2].length,k=D[3].length,D):(O+E+k!=D[1].length+D[2].length+D[3].length&&(P=!1),O!=D[1].length&&(C=!1),O>D[1].length&&(O=D[1].length),E<D[2].length&&(E=D[2].length),k>D[3].length&&(k=D[3].length),D):[A]}).map(_?N:C?P?I:N:$);function B(A){return a.stringRepeat(" ",A)}function N(A){return A[2]?B(O)+A[2]+B(E-A[2].length+k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function I(A){return A[2]?B(O+E-A[2].length)+A[2]+B(k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function $(A){return A[2]?B(O)+A[2]+B(k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(m.prototype);function w(T,_){return T.row==_.row&&T.column==_.column}r.onSessionChange=function(T){var _=T.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=T.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",s),T.commands.addCommands(l.defaultCommands),R(T))}function R(T){if(!T.textInput)return;var _=T.textInput.getElement(),C=!1;f.addListener(_,"keydown",function(O){var E=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);T.$blockSelectEnabled&&E?C||(T.renderer.setMouseCursor("crosshair"),C=!0):C&&P()},T),f.addListener(_,"keyup",P,T),f.addListener(_,"blur",P,T);function P(O){C&&(T.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,t("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(T){x(this),T?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,r,c){var h=t("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,s,f){var a=v.getLine(f);return this.foldingStartMarker.test(a)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(v,s,f){return null},this.indentationBlock=function(v,s,f){var a=/\S/,l=v.getLine(s),u=l.search(a);if(u!=-1){for(var d=f||l.length,o=v.getLength(),p=s,m=s;++s<o;){var w=v.getLine(s).search(a);if(w!=-1){if(w<=u){var x=v.getTokenAt(s,0);if(!x||x.type!=="string")break}m=s}}if(m>p){var R=v.getLine(m).length;return new h(p,d,m,R)}}},this.openingBracketBlock=function(v,s,f,a,l){var u={row:f,column:a+1},d=v.$findClosingBracket(s,u,l);if(d){var o=v.foldWidgets[d.row];return o==null&&(o=v.getFoldWidget(d.row)),o=="start"&&d.row>u.row&&(d.row--,d.column=v.getLine(d.row).length),h.fromPoints(u,d)}},this.closingBracketBlock=function(v,s,f,a,l){var u={row:f,column:a},d=v.$findOpeningBracket(s,u);if(d)return d.column++,u.column--,h.fromPoints(d,u)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,r,c){var h=t("../lib/dom"),g=t("../range").Range,v=t("../config").nls;function s(a,l,u){for(var d=0,o=a.length-1;d<=o;){var p=d+o>>1,m=u(l,a[p]);if(m>0)d=p+1;else if(m<0)o=p-1;else return p}return-(d+1)}function f(a,l,u){var d=a.getAnnotations().sort(g.comparePoints);if(d.length){var o=s(d,{row:l,column:-1},g.comparePoints);o<0&&(o=-o-1),o>=d.length?o=u>0?0:d.length-1:o===0&&u<0&&(o=d.length-1);var p=d[o];if(!(!p||!u)){if(p.row===l){do p=d[o+=u];while(p&&p.row===l);if(!p)return d.slice()}var m=[];l=p.row;do m[u<0?"unshift":"push"](p),p=d[o+=u];while(p&&p.row==l);return m.length&&m}}}r.showErrorMarker=function(a,l){var u=a.session,d=a.getCursorPosition(),o=d.row,p=u.widgetManager.getWidgetsAtRow(o).filter(function(O){return O.type=="errorMarker"})[0];p?p.destroy():o-=l;var m=f(u,o,l),w;if(m){var x=m[0];d.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,d.row=x.row,w=a.renderer.$gutterLayer.$annotations[d.row]}else{if(p)return;w={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(d.row),a.selection.moveToPosition(d);var R={row:d.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},T=R.el.appendChild(h.createElement("div")),_=R.el.appendChild(h.createElement("div"));_.className="error_widget_arrow "+w.className;var C=a.renderer.$cursorLayer.getPixelPosition(d).left;_.style.left=C+a.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(O,E){T.appendChild(h.createTextNode(O)),E<w.displayText.length-1&&T.appendChild(h.createElement("br"))}),T.appendChild(h.createElement("div"));var P=function(O,E,k){if(E===0&&(k==="esc"||k==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(P),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(P),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})},h.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"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(t,r,c){t("./loader_build")(r);var h=t("./lib/dom"),g=t("./range").Range,v=t("./editor").Editor,s=t("./edit_session").EditSession,f=t("./undomanager").UndoManager,a=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(u,d){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof v)return u.env.editor;var p="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;p=m.value,u=h.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(p=u.textContent,u.innerHTML="");var w=r.createEditSession(p),x=new v(new a(u),w,d),R={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(R.textarea=m),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(u,d){var o=new s(u,d);return o.setUndoManager(new f),o},r.Range=g,r.Editor=v,r.EditSession=s,r.UndoManager=f,r.VirtualRenderer=a;var l=r.config.version;r.version=l}),(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var c in t)t.hasOwnProperty(c)&&(r.ace[c]=t[c]);r.ace.default=r.ace,e&&(e.exports=r.ace)})})()})(Jv)),Jv.exports}var f3=ur("m",eT()),Zv={exports:{}},Xv;function tT(){return Xv||(Xv=1,(function(e,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=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 s=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=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/},d=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",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",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":T,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,P={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{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,d,v,s,o,f,a,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,E,k){var B=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",N=O.split(this.splitRegex);return k.push(B,N[3]),[{type:"constant",value:N[1]},{type:"string",value:N[2]},{type:"support.class",value:N[3]},{type:"string",value:N[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(O,E,k){return O===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(O,E,k){return O===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,E,k){return this.next="",O=="}"&&k.length>1&&k[1]!="start"&&(k.shift(),this.next=k.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(O,E,k){return k.length&&O===k[0]?(k.unshift(O,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(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,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(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,E,k){return k.length&&O[0]===P[k[0]]?(k.shift(),this.next=k.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()};h.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var h=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),a=f.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=v.findMatchingBracket({row:s,column:l});if(!u||u.row==s)return 0;var d=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,l-1),d)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,c){var h=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,s=t("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};h.inherits(f,g),(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 d=a.getLine(u),o=this.foldingStartMarker.test(d),p=this.foldingStopMarker.test(d);if(o&&!p){var m=d.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(d)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(d)===!1)||m[1]=="when"&&/\sthen\s/.test(d)===!0)return;if(a.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||a.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!p||o&&p)return"";var m=d.match(this.foldingStopMarker);if(m[3]==="end"){if(a.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||a.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,l,u){var d=a.doc.getLine(u),o=this.foldingStartMarker.exec(d);if(o)return o[1]||o[3]?this.rubyBlock(a,u,o.index+2):this.openingBracketBlock(a,"{",u,o.index);var o=this.foldingStopMarker.exec(d);if(o)return o[3]==="end"&&a.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(a,u,o.index+1):o[1]==="=end"&&a.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(a,u,o.index+1):this.closingBracketBlock(a,"}",u,o.index+o[0].length)},this.rubyBlock=function(a,l,u,d){var o=new s(a,l,u),p=o.getCurrentToken();if(!(!p||p.type!="keyword"&&p.type!="comment.multiline")){var m=p.value,w=a.getLine(l);switch(p.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+p.value);if(!x.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+p.value+"\\s*$");if(!x.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var T=[m];if(R){var _=R===-1?a.getLine(l-1).length:a.getLine(l).length,C=l,P=[];if(P.push(o.getCurrentTokenRange()),o.step=R===-1?o.stepBackward:o.stepForward,p.type=="comment.multiline"){for(;p=o.step();)if(p.type==="comment.multiline"){if(R==1){if(_=6,p.value=="=end")break}else if(p.value=="=begin")break}}else for(;p=o.step();){var O=!1;if(p.type==="keyword"){var E=R*this.indentKeywords[p.value];switch(w=a.getLine(o.getCurrentTokenRow()),p.value){case"do":for(var k=o.$tokenIndex-1;k>=0;k--){var B=o.$rowTokens[k];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){E=0;break}}break;case"else":var x=new RegExp("^\\s*"+p.value+"\\s*$");(!x.test(w)||m=="case")&&(E=0,O=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+p.value);x.test(w)||(E=0,O=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(E=0,O=!0)}if(E>0)T.unshift(p.value);else if(E<=0&&O===!1){if(T.shift(),!T.length&&((m=="while"||m=="until"||m=="for")&&p.value!="do"||p.value=="do"&&R==-1&&E!=0||p.value!="do"))break;E===0&&T.unshift(p.value)}}}if(!p)return null;if(d)return P.push(o.getCurrentTokenRange()),P;var l=o.getCurrentTokenRow();if(R===-1){if(p.type==="comment.multiline")var N=6;else var N=a.getLine(l).length;return new v(l,N,C-1,_)}return new v(C,_,l-1,a.getLine(l-1).length)}}}}).call(f.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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./ruby_highlight_rules").RubyHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../range").Range,a=t("./folding/ruby").FoldMode,l=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};h.inherits(l,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,d,o){var p=this.$getIndent(d),m=this.getTokenizer().getLineTokens(d,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return p;if(u=="start"){var x=d.match(/^.*[\{\(\[]\s*$/),R=d.match(/^\s*(class|def|module)\s.*$/),T=d.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=d.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||T||_)&&(p+=o)}return p},this.checkOutdent=function(u,d,o){return/^\s+(end|else|rescue|ensure)$/.test(d+o)||this.$outdent.checkOutdent(d,o)},this.autoOutdent=function(u,d,o){var p=d.getLine(o);if(/}/.test(p))return this.$outdent.autoOutdent(d,o);var m=this.$getIndent(p),w=d.getLine(o-1),x=this.$getIndent(w),R=d.getTabString();x.length<=m.length&&m.slice(-R.length)==R&&d.remove(new f(o,m.length-R.length,o,m.length))},this.getMatching=function(u,d,o){if(d==null){var p=u.selection.lead;o=p.column,d=p.row}var m=u.getTokenAt(d,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,d,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/ruby"],function(t){e&&(e.exports=t)})})()})(Zv)),Zv.exports}tT();var ey={exports:{}},ty;function nT(){return ty||(ty=1,(function(e,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){var s="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",f="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":f,keyword:s},"identifier"),u="[uU]?",d="[rR]",o="[fF]",p="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",T="(?:"+m+"|"+w+"|"+x+"|"+R+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",P="(?:\\d+)",O="(?:(?:"+P+"?"+C+")|(?:"+P+"\\.))",E="(?:(?:"+O+"|"+P+")"+_+")",k="(?:"+E+"|"+O+")",B=`\\\\(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:d+'"{3}',next:"rawqqstring3"},{token:"string",regex:d+'"(?=.)',next:"rawqqstring"},{token:"string",regex:d+"'{3}",next:"rawqstring3"},{token:"string",regex:d+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:p+'"{3}',next:"rfqqstring3"},{token:"string",regex:p+'"(?=.)',next:"rfqqstring"},{token:"string",regex:p+"'{3}",next:"rfqstring3"},{token:"string",regex:p+"'(?=.)",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:B},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:B},{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:B},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:B},{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:"(?:"+k+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:k},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};h.inherits(v,g),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,c){var h=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(s){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+s+")(?:\\s*)(?:#.*)?$")};h.inherits(v,g),(function(){this.getFoldWidgetRange=function(s,f,a){var l=s.getLine(a),u=l.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(s,u[1],a,u.index):u[2]?this.indentationBlock(s,a,u.index+u[2].length):this.indentationBlock(s,a)}}).call(v.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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./python_highlight_rules").PythonHighlightRules,s=t("./folding/pythonic").FoldMode,f=t("../range").Range,a=function(){this.HighlightRules=v,this.foldingRules=new s("\\:"),this.$behaviour=this.$defaultBehaviour};h.inherits(a,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,d,o){var p=this.$getIndent(d),m=this.getTokenizer().getLineTokens(d,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return p;if(u=="start"){var x=d.match(/^.*[\{\(\[:]\s*$/);x&&(p+=o)}return p};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,d,o){if(o!==`\r
989
+ `&&o!=="\r"&&o!==`
990
+ `)return!1;var p=this.getTokenizer().getLineTokens(d.trim(),u).tokens;if(!p)return!1;do var m=p.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(u,d,o){o+=1;var p=this.$getIndent(d.getLine(o)),m=d.getTabString();p.slice(-m.length)==m&&d.remove(new f(o,p.length-m.length,o,p.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(t){e&&(e.exports=t)})})()})(ey)),ey.exports}nT();var ny={exports:{}},ry;function rT(){return ry||(ry=1,(function(e,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=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"}]}};h.inherits(v,g),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var h=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),a=f.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=v.findMatchingBracket({row:s,column:l});if(!u||u.row==s)return 0;var d=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,l-1),d)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){var h=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};h.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,l){var u=f.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var d=this._getFoldWidgetBase(f,a,l);return!d&&this.startRegionRe.test(u)?"start":d},this.getFoldWidgetRange=function(f,a,l,u){var d=f.getLine(l);if(this.startRegionRe.test(d))return this.getCommentRegionBlock(f,d,l);var o=d.match(this.foldingStartMarker);if(o){var p=o.index;if(o[1])return this.openingBracketBlock(f,o[1],l,p);var m=f.getCommentFoldRange(l,p+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,l):a!="all"&&(m=null)),m}if(a!=="markbegin"){var o=d.match(this.foldingStopMarker);if(o){var p=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],l,p):f.getCommentFoldRange(l,p,-1)}}},this.getSectionRange=function(f,a){var l=f.getLine(a),u=l.search(/\S/),d=a,o=l.length;a+=1;for(var p=a,m=f.getLength();++a<m;){l=f.getLine(a);var w=l.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=d)break;if(x.isMultiLine())a=x.end.row;else if(u==w)break}p=a}}return new g(d,o,p,f.getLine(p).length)},this.getCommentRegionBlock=function(f,a,l){for(var u=a.search(/\s*$/),d=f.getLength(),o=l,p=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<d;){a=f.getLine(l);var w=p.exec(a);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,u,x,a.length)}}).call(s.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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./json_highlight_rules").JsonHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("./folding/cstyle").FoldMode,a=t("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};h.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,d,o){var p=this.$getIndent(d);if(u=="start"){var m=d.match(/^.*[\{\(\[]\s*$/);m&&(p+=o)}return p},this.checkOutdent=function(u,d,o){return this.$outdent.checkOutdent(d,o)},this.autoOutdent=function(u,d,o){this.$outdent.autoOutdent(d,o)},this.createWorker=function(u){var d=new a(["ace"],"ace/mode/json_worker","JsonWorker");return d.attachToDocument(u.getDocument()),d.on("annotate",function(o){u.setAnnotations(o.data)}),d.on("terminate",function(){u.clearAnnotations()}),d},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/json"],function(t){e&&(e.exports=t)})})()})(ny)),ny.exports}rT();var iy={exports:{}},oy;function iT(){return oy||(oy=1,(function(e,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop");t("../lib/lang");var g=t("./text_highlight_rules").TextHighlightRules,v=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",s=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=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]+))",d=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var m=this.createKeywordMapper({"support.function":s,"support.constant":f,"support.type":v,"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:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,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()};h.inherits(p,g),r.CssHighlightRules=p}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=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|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};h.inherits(v,g),v.getTagRule=function(s){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(s){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:s}},v.getEndRule=function(s){return{token:"comment.doc",regex:"\\*\\/",next:s}},r.JsDocCommentHighlightRules=v}),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(t,r,c){function h(){var u=a.replace("\\d","\\d\\-"),d={onMatch:function(p,m,w){var x=p.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:p.slice(0,x)},{type:"meta.tag.tag-name.xml",value:p.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(d);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,d,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(p,m,w){return m==w[0]&&w.shift(),p.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:p}]},nextState:"jsx"},o,g("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"}]},d],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(u){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=t("../lib/oop"),s=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=t("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",l=function(u){var d={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(d,"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(d).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[s.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+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*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex: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:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),g("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"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("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:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,T,_){if(this.next=R=="{"?this.nextState:"",R=="{"&&_.length)_.unshift("start",T);else if(R=="}"&&_.length&&(_.shift(),this.next=_.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:m},{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)&&h.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(l,f),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(s){var f="[_: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:"(<\\?)("+f+")",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:f},{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:"(<\\!)("+f+")",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:"(?:(<)|(</))((?:"+f+":)?"+f+")",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:f},{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===v&&this.normalizeRules()};(function(){this.embedTagRules=function(s,f,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:f+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,u,d){return d.splice(0),this.token}}],this.embedRules(s,f,[{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(g.prototype),h.inherits(v,g),r.XmlHighlightRules=v}),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(t,r,c){var h=t("../lib/oop"),g=t("../lib/lang"),v=t("./css_highlight_rules").CssHighlightRules,s=t("./javascript_highlight_rules").JavaScriptHighlightRules,f=t("./xml_highlight_rules").XmlHighlightRules,a=g.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(){f.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,d){var o=a[d];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(v,"css-","style"),this.embedTagRules(new s({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};h.inherits(l,f),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(t,r,c){var h=t("../config").$modes,g=t("../lib/oop"),v=t("../lib/lang"),s=t("./text_highlight_rules").TextHighlightRules,f=t("./html_highlight_rules").HtmlHighlightRules,a=function(u){return"(?:[^"+v.escapeRegExp(u)+"\\\\]|\\\\.)*"},l=function(){f.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,p,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return h[R]||(R=""),m.unshift("githubblock",[],[x[1],x[2],R],p),this.token},next:"githubblock"},d=[{token:"support.function",regex:".*",onMatch:function(o,p,m,w){var x=m[1],R=m[2][0],T=m[2][1],_=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<R.length+3&&C[2].length>=T.length&&C[2][0]==T[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&h[_]){var P=h[_].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=P.state,P.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+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:d}),this.normalizeRules()};g.inherits(l,s),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,r,c){var h=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,s=r.FoldMode=function(){};h.inherits(s,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,a,l){var u=f.getLine(l);return this.foldingStartMarker.test(u)?u[0]=="`"&&f.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,a,l){function u(O){return R=f.getTokens(O)[0],R&&R.type.lastIndexOf(T,0)===0}function d(){var O=R.value[0];return O=="="?6:O=="-"?5:7-R.value.search(/[^#]|$/)}var o=f.getLine(l),p=o.length,m=f.getLength(),w=l,x=l;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(f.bgTokenizer.getState(l)!=="start"){for(;++l<m&&(o=f.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(w,p,l,0)}for(;l-- >0&&(o=f.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(l,o.length,w,0)}var R,T="markup.heading";if(u(l)){for(var _=d();++l<m;)if(u(l)){var C=d();if(C>=_)break}if(x=l-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(f.getLine(x));)x--;if(x>w){var P=f.getLine(x).length;return new v(w,p,x,P)}}}}}).call(s.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var h=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),a=f.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,u=v.findMatchingBracket({row:s,column:l});if(!u||u.row==s)return 0;var d=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,l-1),d)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(t,r,c){function h(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var g=t("../../lib/oop"),v=t("../behaviour").Behaviour,s=t("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(a,l,u,d,o){if(o=='"'||o=="'"){var p=o,m=d.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:p+m+p,selection:!1};var w=u.getCursorPosition(),x=d.doc.getLine(w.row),R=x.substring(w.column,w.column+1),T=new s(d,w.row,w.column),_=T.getCurrentToken();if(R==p&&(h(_,"attribute-value")||h(_,"string")))return{text:"",selection:[1,1]};if(_||(_=T.stepBackward()),!_)return;for(;h(_,"tag-whitespace")||h(_,"whitespace");)_=T.stepBackward();var C=!R||R.match(/\s/);if(h(_,"attribute-equals")&&(C||R==">")||h(_,"decl-attribute-equals")&&(C||R=="?"))return{text:p+p,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,u,d,o){var p=d.doc.getTextRange(o);if(!o.isMultiLine()&&(p=='"'||p=="'")){var m=d.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==p)return o.end.column++,o}}),this.add("autoclosing","insertion",function(a,l,u,d,o){if(o==">"){var p=u.getSelectionRange().start,m=new s(d,p.row,p.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(h(w,"tag-name")||h(w,"tag-whitespace")||h(w,"attribute-name")||h(w,"attribute-equals")||h(w,"attribute-value"))||h(w,"reference.attribute-value"))return;if(h(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(p.column<x)return;if(p.column==x){var R=m.stepForward();if(R&&h(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(d.getLine(p.row).slice(p.column)))return;for(;!h(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var T=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(h(m.stepBackward(),"end-tag-open"))return;var C=w.value;return T==p.row&&(C=C.substring(0,p.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,u,d,o){if(o==`
991
+ `){var p=u.getCursorPosition(),m=d.getLine(p.row),w=new s(d,p.row,p.column),x=w.getCurrentToken();if(h(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var R=x.value,T=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var _=d.getTokenAt(p.row,p.column+1),m=d.getLine(T),C=this.$getIndent(m),P=C+d.getTabString();return _&&_.value==="</"?{text:`
992
+ `+P+`
993
+ `+C,selection:[1,P.length,1,P.length]}:{text:`
994
+ `+P}}}}})};g.inherits(f,v),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(t,r,c){var h=t("../../lib/oop"),g=t("../../token_iterator").TokenIterator,v=t("../behaviour/cstyle").CstyleBehaviour,s=t("../behaviour/xml").XmlBehaviour,f=function(){var a=new s({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(v),this.add("autoclosing-fragment","insertion",function(l,u,d,o,p){if(p==">"){var m=d.getSelectionRange().start,w=new g(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};h.inherits(f,v),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){function h(l,u){return l&&l.type&&l.type.lastIndexOf(u+".xml")>-1}var g=t("../../lib/oop"),v=t("../../range").Range,s=t("./fold_mode").FoldMode,f=r.FoldMode=function(l,u){s.call(this),this.voidElements=l||{},this.optionalEndTags=g.mixin({},this.voidElements),u&&g.mixin(this.optionalEndTags,u)};g.inherits(f,s);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,d){var o=this._getFirstTagInLine(l,d);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(l,d,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(l,d)},this.getCommentFoldWidget=function(l,u){return/comment/.test(l.getState(u))&&/<!-/.test(l.getLine(u))?"start":""},this._getFirstTagInLine=function(l,u){for(var d=l.getTokens(u),o=new a,p=0;p<d.length;p++){var m=d[p];if(h(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=h(m,"end-tag-open"),m=d[++p],!m)return null;if(o.tagName=m.value,m.value===""){if(m=d[++p],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,p++;p<d.length;p++)if(m=d[p],o.end.column+=m.value.length,h(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(h(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(l,u,d,o){for(var p=l.getTokens(u),m=0,w=0;w<p.length;w++){var x=p[w];if(m+=x.value.length,!(m<o-1)&&h(x,"end-tag-open")&&(x=p[w+1],h(x,"tag-name")&&x.value===""&&(x=p[w+2]),x&&x.value==d))return!0}return!1},this.getFoldWidgetRange=function(l,u,d){var o=this._getFirstTagInLine(l,d);if(!o)return this.getCommentFoldWidget(l,d)&&l.getCommentFoldRange(d,l.getLine(d).length);var p=l.getMatchingTags({row:d,column:0});if(p){var m=p.openTag.start.row;return new v(m,l.getLine(m).length,p.closeTag.start.row,p.closeTag.start.column)}}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){var h=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};h.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,l){var u=f.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var d=this._getFoldWidgetBase(f,a,l);return!d&&this.startRegionRe.test(u)?"start":d},this.getFoldWidgetRange=function(f,a,l,u){var d=f.getLine(l);if(this.startRegionRe.test(d))return this.getCommentRegionBlock(f,d,l);var o=d.match(this.foldingStartMarker);if(o){var p=o.index;if(o[1])return this.openingBracketBlock(f,o[1],l,p);var m=f.getCommentFoldRange(l,p+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,l):a!="all"&&(m=null)),m}if(a!=="markbegin"){var o=d.match(this.foldingStopMarker);if(o){var p=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],l,p):f.getCommentFoldRange(l,p,-1)}}},this.getSectionRange=function(f,a){var l=f.getLine(a),u=l.search(/\S/),d=a,o=l.length;a+=1;for(var p=a,m=f.getLength();++a<m;){l=f.getLine(a);var w=l.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=d)break;if(x.isMultiLine())a=x.end.row;else if(u==w)break}p=a}}return new g(d,o,p,f.getLine(p).length)},this.getCommentRegionBlock=function(f,a,l){for(var u=a.search(/\s*$/),d=f.getLength(),o=l,p=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<d;){a=f.getLine(l);var w=p.exec(a);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,u,x,a.length)}}).call(s.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,c){var h=t("../../lib/oop"),g=t("./xml").FoldMode,v=t("./cstyle").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new g};h.inherits(s,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,l){var u=this.getFoldWidgetBase(f,a,l);return u||this.xmlFoldMode.getFoldWidget(f,a,l)},this.getFoldWidgetRange=function(f,a,l,u){var d=this.getFoldWidgetRangeBase(f,a,l,u);return d||this.xmlFoldMode.getFoldWidgetRange(f,a,l)}}).call(s.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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./javascript_highlight_rules").JavaScriptHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,a=t("./behaviour/javascript").JavaScriptBehaviour,l=t("./folding/javascript").FoldMode,u=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};h.inherits(u,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(d,o,p){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,d),x=w.tokens,R=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(d=="start"||d=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(m+=p)}else if(d=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(d,o,p){return this.$outdent.checkOutdent(o,p)},this.autoOutdent=function(d,o,p){this.$outdent.autoOutdent(o,p)},this.createWorker=function(d){var o=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(d.getDocument()),o.on("annotate",function(p){d.setAnnotations(p.data)}),o.on("terminate",function(){d.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(t,r,c){var h={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}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var v=document.createElement("c").style;for(var s in v)if(typeof v[s]=="string"){var f=s.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});h.hasOwnProperty(f)||(h[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,s,f,a){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||s.$mode.$id=="ace/mode/scss"){var l=s.getLine(f.row).substr(0,f.column),u=/\([^)]*$/.test(l);return u&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(v,s,f,a):this.getPropertyCompletions(v,s,f,a,u)}return[]},this.getPropertyCompletions=function(v,s,f,a,l){l=l||!1;var u=Object.keys(h);return u.map(function(d){return{caption:d,snippet:d+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,s,f,a){var l=s.getLine(f.row).substr(0,f.column),u=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!u)return[];var d=[];return u in h&&typeof h[u]=="object"&&(d=Object.keys(h[u])),d.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(t,r,c){var h=t("../../lib/oop");t("../behaviour").Behaviour;var g=t("./cstyle").CstyleBehaviour,v=t("../../token_iterator").TokenIterator,s=function(){this.inherit(g),this.add("colon","insertion",function(f,a,l,u,d){if(d===":"&&l.selection.isEmpty()){var o=l.getCursorPosition(),p=new v(u,o.row,o.column),m=p.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=p.stepBackward()),m&&m.type==="support.type"){var w=u.doc.getLine(o.row),x=w.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,a,l,u,d){var o=u.doc.getTextRange(d);if(!d.isMultiLine()&&o===":"){var p=l.getCursorPosition(),m=new v(u,p.row,p.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(d.start.row),R=x.substring(d.end.column,d.end.column+1);if(R===";")return d.end.column++,d}}}),this.add("semicolon","insertion",function(f,a,l,u,d){if(d===";"&&l.selection.isEmpty()){var o=l.getCursorPosition(),p=u.doc.getLine(o.row),m=p.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,a,l,u,d){if(d==="!"&&l.selection.isEmpty()){var o=l.getCursorPosition(),p=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(p.substring(o.column)))return{text:"!important",selection:[10,10]}}})};h.inherits(s,g),r.CssBehaviour=s}),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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./css_highlight_rules").CssHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,a=t("./css_completions").CssCompletions,l=t("./behaviour/css").CssBehaviour,u=t("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new u};h.inherits(d,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,p,m){var w=this.$getIndent(p),x=this.getTokenizer().getLineTokens(p,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var R=p.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(o,p,m){return this.$outdent.checkOutdent(p,m)},this.autoOutdent=function(o,p,m){this.$outdent.autoOutdent(p,m)},this.getCompletions=function(o,p,m,w){return this.$completer.getCompletions(o,p,m,w)},this.createWorker=function(o){var p=new f(["ace"],"ace/mode/css_worker","Worker");return p.attachToDocument(o.getDocument()),p.on("annotate",function(m){o.setAnnotations(m.data)}),p.on("terminate",function(){o.clearAnnotations()}),p},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(d.prototype),r.Mode=d}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,c){var h=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(s,f){this.defaultMode=s,this.subModes=f};h.inherits(v,g),(function(){this.$getMode=function(s){typeof s!="string"&&(s=s[0]);for(var f in this.subModes)if(s.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(s,f,a,l){var u=this.$getMode(s);return u?u.getFoldWidget(f,a,l):""},this.getFoldWidget=function(s,f,a){return this.$tryMode(s.getState(a-1),s,f,a)||this.$tryMode(s.getState(a),s,f,a)||this.defaultMode.getFoldWidget(s,f,a)},this.getFoldWidgetRange=function(s,f,a){var l=this.$getMode(s.getState(a-1));return(!l||!l.getFoldWidget(s,f,a))&&(l=this.$getMode(s.getState(a))),(!l||!l.getFoldWidget(s,f,a))&&(l=this.defaultMode),l.getFoldWidgetRange(s,f,a)}}).call(v.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(t,r,c){var h=t("../../lib/oop"),g=t("./mixed").FoldMode,v=t("./xml").FoldMode,s=t("./cstyle").FoldMode,f=r.FoldMode=function(a,l){g.call(this,new v(a,l),{"js-":new s,"css-":new s})};h.inherits(f,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(t,r,c){function h(p,m){return p.type.lastIndexOf(m+".xml")>-1}function g(p,m){for(var w=new s(p,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function v(p,m){for(var w=new s(p,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var s=t("../token_iterator").TokenIterator,f=["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=f.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:{}},d=Object.keys(u),o=function(){};(function(){this.getCompletions=function(p,m,w,x){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(h(R,"tag-name")||h(R,"tag-open")||h(R,"end-tag-open"))return this.getTagCompletions(p,m,w,x);if(h(R,"tag-whitespace")||h(R,"attribute-name"))return this.getAttributeCompletions(p,m,w,x);if(h(R,"attribute-value"))return this.getAttributeValueCompletions(p,m,w,x);var T=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(p,m,w,x):[]},this.getTagCompletions=function(p,m,w,x){return d.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(p,m,w,x){var R=g(m,w);if(!R)return[];var T=l;return R in u&&(T=T.concat(Object.keys(u[R]))),T.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(p,m,w,x){var R=g(m,w),T=v(m,w);if(!R)return[];var _=[];return R in u&&T in u[R]&&typeof u[R][T]=="object"&&(_=Object.keys(u[R][T])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(p,m,w,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(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(t,r,c){var h=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,s=t("./javascript").Mode,f=t("./css").Mode,a=t("./html_highlight_rules").HtmlHighlightRules,l=t("./behaviour/xml").XmlBehaviour,u=t("./folding/html").FoldMode,d=t("./html_completions").HtmlCompletions,o=t("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new d,this.createModeDelegates({"js-":s,"css-":f}),this.foldingRules=new u(this.voidElements,g.arrayToMap(m))};h.inherits(w,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(p),this.getNextLineIndent=function(x,R,T){return this.$getIndent(R)},this.checkOutdent=function(x,R,T){return!1},this.getCompletions=function(x,R,T,_){return this.$completer.getCompletions(x,R,T,_)},this.createWorker=function(x){if(this.constructor==w){var R=new o(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function(T){x.setAnnotations(T.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var h=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=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",s=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",f=function(){var a=this.createKeywordMapper({keyword:v,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",d="(?:\\d+)",o="(?:(?:"+d+"?"+u+")|(?:"+d+"\\.))",p="(?:(?:"+o+"|"+d+"))",m="(?:"+p+"|"+o+")",w="(?:&"+d+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+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,P,O){var E=C[2]=="-"?"indentedHeredoc":"heredoc",k=C.split(this.splitRegex);return O.push(E,k[4]),[{type:"constant",value:k[1]},{type:"text",value:k[2]},{type:"string",value:k[3]},{type:"support.class",value:k[4]},{type:"string",value:k[5]}]},rules:{heredoc:[{onMatch:function(C,P,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,P,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,P){return P[0]==="heredoc"||P[0]==="indentedHeredoc"?P[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:T},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{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()};h.inherits(f,g),r.ShHighlightRules=f}),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(t,r,c){var h=t("../lib/oop"),g=t("./text").Mode,v=t("./sh_highlight_rules").ShHighlightRules,s=t("../range").Range,f=t("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=v,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};h.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,d,o){var p=this.$getIndent(d),m=this.getTokenizer().getLineTokens(d,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return p;if(u=="start"){var x=d.match(/^.*[\{\(\[:]\s*$/);x&&(p+=o)}return p};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,d,o){if(o!==`\r
995
+ `&&o!=="\r"&&o!==`
996
+ `)return!1;var p=this.getTokenizer().getLineTokens(d.trim(),u).tokens;if(!p)return!1;do var m=p.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(u,d,o){o+=1;var p=this.$getIndent(d.getLine(o)),m=d.getTabString();p.slice(-m.length)==m&&d.remove(new s(o,p.length-m.length,o,p.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(t,r,c){var h=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,s=t("./xml_highlight_rules").XmlHighlightRules,f=t("./behaviour/xml").XmlBehaviour,a=t("./folding/xml").FoldMode,l=t("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=s,this.$behaviour=new f,this.foldingRules=new a};h.inherits(u,v),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(d){var o=new l(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(d.getDocument()),o.on("error",function(p){d.setAnnotations(p.data)}),o.on("terminate",function(){d.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(t,r,c){var h=t("../lib/oop"),g=t("./behaviour/cstyle").CstyleBehaviour,v=t("./text").Mode,s=t("./markdown_highlight_rules").MarkdownHighlightRules,f=t("./folding/markdown").FoldMode,a=function(){this.HighlightRules=s,this.createModeDelegates({javascript:t("./javascript").Mode,html:t("./html").Mode,bash:t("./sh").Mode,sh:t("./sh").Mode,xml:t("./xml").Mode,css:t("./css").Mode}),this.foldingRules=new f,this.$behaviour=new g({braces:!0})};h.inherits(a,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,u,d){if(l=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var p=o[2];return p||(p=parseInt(o[3],10)+1+"."),o[1]+p+o[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(t){e&&(e.exports=t)})})()})(iy)),iy.exports}iT();var sy={exports:{}},ay;function oT(){return ay||(ay=1,(function(e,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,c){c.exports=`.ace-twilight .ace_gutter {
997
+ background: #232323;
998
+ color: #E2E2E2
999
+ }
1000
+
1001
+ .ace-twilight .ace_print-margin {
1002
+ width: 1px;
1003
+ background: #232323
1004
+ }
1005
+
1006
+ .ace-twilight {
1007
+ background-color: #141414;
1008
+ color: #F8F8F8
1009
+ }
1010
+
1011
+ .ace-twilight .ace_cursor {
1012
+ color: #A7A7A7
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selection {
1016
+ background: rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1020
+ box-shadow: 0 0 3px 0px #141414;
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_step {
1024
+ background: rgb(102, 82, 0)
1025
+ }
1026
+
1027
+ .ace-twilight .ace_marker-layer .ace_bracket {
1028
+ margin: -1px 0 0 -1px;
1029
+ border: 1px solid rgba(255, 255, 255, 0.25)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_active-line {
1033
+ background: rgba(255, 255, 255, 0.031)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_gutter-active-line {
1037
+ background-color: rgba(255, 255, 255, 0.031)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1041
+ border: 1px solid rgba(221, 240, 255, 0.20)
1042
+ }
1043
+
1044
+ .ace-twilight .ace_invisible {
1045
+ color: rgba(255, 255, 255, 0.25)
1046
+ }
1047
+
1048
+ .ace-twilight .ace_keyword,
1049
+ .ace-twilight .ace_meta {
1050
+ color: #CDA869
1051
+ }
1052
+
1053
+ .ace-twilight .ace_constant,
1054
+ .ace-twilight .ace_constant.ace_character,
1055
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1056
+ .ace-twilight .ace_constant.ace_other,
1057
+ .ace-twilight .ace_heading,
1058
+ .ace-twilight .ace_markup.ace_heading,
1059
+ .ace-twilight .ace_support.ace_constant {
1060
+ color: #CF6A4C
1061
+ }
1062
+
1063
+ .ace-twilight .ace_invalid.ace_illegal {
1064
+ color: #F8F8F8;
1065
+ background-color: rgba(86, 45, 86, 0.75)
1066
+ }
1067
+
1068
+ .ace-twilight .ace_invalid.ace_deprecated {
1069
+ text-decoration: underline;
1070
+ font-style: italic;
1071
+ color: #D2A8A1
1072
+ }
1073
+
1074
+ .ace-twilight .ace_support {
1075
+ color: #9B859D
1076
+ }
1077
+
1078
+ .ace-twilight .ace_fold {
1079
+ background-color: #AC885B;
1080
+ border-color: #F8F8F8
1081
+ }
1082
+
1083
+ .ace-twilight .ace_support.ace_function {
1084
+ color: #DAD085
1085
+ }
1086
+
1087
+ .ace-twilight .ace_list,
1088
+ .ace-twilight .ace_markup.ace_list,
1089
+ .ace-twilight .ace_storage {
1090
+ color: #F9EE98
1091
+ }
1092
+
1093
+ .ace-twilight .ace_entity.ace_name.ace_function,
1094
+ .ace-twilight .ace_meta.ace_tag {
1095
+ color: #AC885B
1096
+ }
1097
+
1098
+ .ace-twilight .ace_string {
1099
+ color: #8F9D6A
1100
+ }
1101
+
1102
+ .ace-twilight .ace_string.ace_regexp {
1103
+ color: #E9C062
1104
+ }
1105
+
1106
+ .ace-twilight .ace_comment {
1107
+ font-style: italic;
1108
+ color: #5F5A60
1109
+ }
1110
+
1111
+ .ace-twilight .ace_variable {
1112
+ color: #7587A6
1113
+ }
1114
+
1115
+ .ace-twilight .ace_xml-pe {
1116
+ color: #494949
1117
+ }
1118
+
1119
+ .ace-twilight .ace_indent-guide {
1120
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1121
+ }
1122
+
1123
+ .ace-twilight .ace_indent-guide-active {
1124
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1125
+ }
1126
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(t,r,c){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=t("./twilight-css");var h=t("../lib/dom");h.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(t){e&&(e.exports=t)})})()})(sy)),sy.exports}oT();var ly={exports:{}},cy;function sT(){return cy||(cy=1,(function(e,n){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(t,r,c){function h(C){var P=new Date().toLocaleString("en-us",C);return P.length==1?"0"+P:P}var g=t("./lib/dom"),v=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,f=t("./lib/lang"),a=t("./range").Range,l=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,d=t("./tokenizer").Tokenizer,o=t("./clipboard"),p={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,P,O){var E=C.session.getTextRange();return O?E.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+O+"$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 o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var P=C.session.$mode||{};return P.blockComment&&P.blockComment.start||""},BLOCK_COMMENT_END:function(C){var P=C.session.$mode||{};return P.blockComment&&P.blockComment.end||""},LINE_COMMENT:function(C){var P=C.session.$mode||{};return P.lineCommentStart||""},CURRENT_YEAR:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function P(k){return k=k.substr(1),/^\d+$/.test(k)?[{tabstopId:parseInt(k,10)}]:[{text:k}]}function O(k){return"(?:[^\\\\"+k+"]|\\\\.)"}var E={regex:"/("+O("/")+"+)/",onMatch:function(k,B,N){var I=N[0];return I.fmtString=!0,I.guard=k.slice(1,-1),I.flag="",""},next:"formatString"};return C.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(k,B,N){var I=k[1];return(I=="}"&&N.length||"`$\\".indexOf(I)!=-1)&&(k=I),[k]}},{regex:/}/,onMatch:function(k,B,N){return[N.length?N.shift():k]}},{regex:/\$(?:\d+|\w+)/,onMatch:P},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(k,B,N){var I=P(k.substr(1));return N.unshift(I[0]),I},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(k,B,N){var I=k.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return N[0].choices=I,[I[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(k,B,N){return N.length&&N[0].expectElse?(N[0].expectElse=!1,N[0].ifEnd={elseEnd:N[0]},[N[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(k,B,N){var I=k[1];return I=="}"&&N.length||"`$\\".indexOf(I)!=-1?k=I:I=="n"?k=`
1128
+ `:I=="t"?k=" ":"ulULE".indexOf(I)!=-1&&(k={changeCase:I,local:I>"a"}),[k]}},{regex:"/\\w*}",onMatch:function(k,B,N){var I=N.shift();return I&&(I.flag=k.slice(1,-1)),this.next=I&&I.tabstopId?"start":"",[I||k]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(k,B,N){return[{text:k.slice(1)}]}},{regex:/\${\w+/,onMatch:function(k,B,N){var I={text:k.slice(2)};return N.unshift(I),[I]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(k,B,N){var I=N.shift();return this.next=I&&I.tabstopId?"start":"",[I||k]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(k,B,N){var I=N[0];return I.formatFunction=k.slice(2,-1),[N.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(k,B,N){k[1]=="+"&&(N[0].ifEnd=N[0]),k[1]=="?"&&(N[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(P,O){return this.getTokenizer().getLineTokens(P,O).tokens.map(function(E){return E.value||E})},C.prototype.getVariableValue=function(P,O,E){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var k=this.variables[O];return typeof k=="function"&&(k=this.variables[O](P,O,E)),k??""},C.prototype.tmStrFormat=function(P,O,E){if(!O.fmt)return P;var k=O.flag||"",B=O.guard;B=new RegExp(B,k.replace(/[^gim]/g,""));var N=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,I=this,$=P.replace(B,function(){var A=I.variables.__;I.variables.__=[].slice.call(arguments);for(var D=I.resolveVariables(N,E),j="E",U=0;U<D.length;U++){var q=D[U];if(typeof q=="object")if(D[U]="",q.changeCase&&q.local){var Q=D[U+1];Q&&typeof Q=="string"&&(q.changeCase=="u"?D[U]=Q[0].toUpperCase():D[U]=Q[0].toLowerCase(),D[U+1]=Q.substr(1))}else q.changeCase&&(j=q.changeCase);else j=="U"?D[U]=q.toUpperCase():j=="L"&&(D[U]=q.toLowerCase())}return I.variables.__=A,D.join("")});return $},C.prototype.tmFormatFunction=function(P,O,E){return O.formatFunction=="upcase"?P.toUpperCase():O.formatFunction=="downcase"?P.toLowerCase():P},C.prototype.resolveVariables=function(P,O){function E(j){var U=P.indexOf(j,I+1);U!=-1&&(I=U)}for(var k=[],B="",N=!0,I=0;I<P.length;I++){var $=P[I];if(typeof $=="string"){k.push($),$==`
1129
+ `?(N=!0,B=""):N&&(B=/^\t*/.exec($)[0],N=/\S/.test($));continue}if($){if(N=!1,$.fmtString){var A=P.indexOf($,I+1);A==-1&&(A=P.length),$.fmt=P.slice(I+1,A),I=A}if($.text){var D=this.getVariableValue(O,$.text,B)+"";$.fmtString&&(D=this.tmStrFormat(D,$,O)),$.formatFunction&&(D=this.tmFormatFunction(D,$,O)),D&&!$.ifEnd?(k.push(D),E($)):!D&&$.ifEnd&&E($.ifEnd)}else $.elseEnd?E($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&k.push($)}}return k},C.prototype.getDisplayTextForSnippet=function(P,O){var E=w.call(this,P,O);return E.text},C.prototype.insertSnippetForSelection=function(P,O,E){E===void 0&&(E={});var k=w.call(this,P,O,E),B=P.getSelectionRange(),N=P.session.replace(B,k.text),I=new x(P),$=P.inVirtualSelectionMode&&P.selection.index;I.addTabstops(k.tabstops,B.start,N,$)},C.prototype.insertSnippet=function(P,O,E){E===void 0&&(E={});var k=this;if(P.inVirtualSelectionMode)return k.insertSnippetForSelection(P,O,E);P.forEachSelection(function(){k.insertSnippetForSelection(P,O,E)},null,{keepOrder:!0}),P.tabstopManager&&P.tabstopManager.tabNext()},C.prototype.$getScope=function(P){var O=P.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!P.session.$mode.inlinePhp&&(O="html");var E=P.getCursorPosition(),k=P.session.getState(E.row);typeof k=="object"&&(k=k[0]),k.substring&&(k.substring(0,3)=="js-"?O="javascript":k.substring(0,4)=="css-"?O="css":k.substring(0,4)=="php-"&&(O="php"))}return O},C.prototype.getActiveScopes=function(P){var O=this.$getScope(P),E=[O],k=this.snippetMap;return k[O]&&k[O].includeScopes&&E.push.apply(E,k[O].includeScopes),E.push("_"),E},C.prototype.expandWithTab=function(P,O){var E=this,k=P.forEachSelection(function(){return E.expandSnippetForSelection(P,O)},null,{keepOrder:!0});return k&&P.tabstopManager&&P.tabstopManager.tabNext(),k},C.prototype.expandSnippetForSelection=function(P,O){var E=P.getCursorPosition(),k=P.session.getLine(E.row),B=k.substring(0,E.column),N=k.substr(E.column),I=this.snippetMap,$;return this.getActiveScopes(P).some(function(A){var D=I[A];return D&&($=this.findMatchingSnippet(D,B,N)),!!$},this),$?(O&&O.dryRun||(P.session.doc.removeInLine(E.row,E.column-$.replaceBefore.length,E.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(P,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(P,O,E){for(var k=P.length;k--;){var B=P[k];if(!(B.startRe&&!B.startRe.test(O))&&!(B.endRe&&!B.endRe.test(E))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(O):[""],B.matchAfter=B.endRe?B.endRe.exec(E):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(O)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(E)[0]:"",B}},C.prototype.register=function(P,O){function E(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function k(A,D,j){return A=E(A),D=E(D),A=D+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function B(A){A.scope||(A.scope=O||"_"),O=A.scope,N[O]||(N[O]=[],I[O]={});var D=I[O];if(A.name){var j=D[A.name];j&&$.unregister(j),D[A.name]=A}N[O].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
1130
+ `):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=f.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=k(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=k(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var N=this.snippetMap,I=this.snippetNameMap,$=this;P||(P=[]),Array.isArray(P)?P.forEach(B):Object.keys(P).forEach(function(A){B(P[A])}),this._signal("registerSnippets",{scope:O})},C.prototype.unregister=function(P,O){function E(N){var I=B[N.scope||O];if(I&&I[N.name]){delete I[N.name];var $=k[N.scope||O],A=$&&$.indexOf(N);A>=0&&$.splice(A,1)}}var k=this.snippetMap,B=this.snippetNameMap;P.content?E(P):Array.isArray(P)&&P.forEach(E)},C.prototype.parseSnippetFile=function(P){P=P.replace(/\r/g,"");for(var O=[],E={},k=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=k.exec(P);){if(B[1])try{E=JSON.parse(B[1]),O.push(E)}catch{}if(B[4])E.content=B[4].replace(/^\t/gm,""),O.push(E),E={};else{var N=B[2],I=B[3];if(N=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=$.exec(I)[1],E.trigger=$.exec(I)[1],E.endTrigger=$.exec(I)[1],E.endGuard=$.exec(I)[1]}else N=="snippet"?(E.tabTrigger=I.match(/^\S*/)[0],E.name||(E.name=I)):N&&(E[N]=I)}}return O},C.prototype.getSnippetByName=function(P,O){var E=this.snippetNameMap,k;return this.getActiveScopes(O).some(function(B){var N=E[B];return N&&(k=N[P]),!!k},this),k},C})();v.implement(m.prototype,s);var w=function(C,P,O){function E(oe){for(var ee=[],ye=0;ye<oe.length;ye++){var we=oe[ye];if(typeof we=="object"){if(D[we.tabstopId])continue;var Ae=oe.lastIndexOf(we,ye-1);we=ee[Ae]||{tabstopId:we.tabstopId}}ee[ye]=we}return ee}O===void 0&&(O={});var k=C.getCursorPosition(),B=C.session.getLine(k.row),N=C.session.getTabString(),I=B.match(/^\s*/)[0];k.column<I.length&&(I=I.slice(0,k.column)),P=P.replace(/\r/g,"");var $=this.tokenizeTmSnippet(P);$=this.resolveVariables($,C),$=$.map(function(oe){return oe==`
1131
+ `&&!O.excludeExtraIndent?oe+I:typeof oe=="string"?oe.replace(/\t/g,N):oe});var A=[];$.forEach(function(oe,ee){if(typeof oe=="object"){var ye=oe.tabstopId,we=A[ye];if(we||(we=A[ye]=[],we.index=ye,we.value="",we.parents={}),we.indexOf(oe)===-1){oe.choices&&!we.choices&&(we.choices=oe.choices),we.push(oe);var Ae=$.indexOf(oe,ee+1);if(Ae!==-1){var Je=$.slice(ee+1,Ae),ze=Je.some(function(qe){return typeof qe=="object"});ze&&!we.value?we.value=Je:Je.length&&(!we.value||typeof we.value!="string")&&(we.value=Je.join(""))}}}}),A.forEach(function(oe){oe.length=0});for(var D={},j=0;j<$.length;j++){var U=$[j];if(typeof U=="object"){var q=U.tabstopId,Q=A[q],re=$.indexOf(U,j+1);if(D[q]){D[q]===U&&(delete D[q],Object.keys(D).forEach(function(oe){Q.parents[oe]=!0}));continue}D[q]=U;var le=Q.value;typeof le!="string"?le=E(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),$.splice.apply($,[j+1,Math.max(0,re-j)].concat(le,U)),Q.indexOf(U)===-1&&Q.push(U)}}var ne=0,ue=0,he="";return $.forEach(function(oe){if(typeof oe=="string"){var ee=oe.split(`
1132
+ `);ee.length>1?(ue=ee[ee.length-1].length,ne+=ee.length-1):ue+=oe.length,he+=oe}else oe&&(oe.start?oe.end={row:ne,column:ue}:oe.start={row:ne,column:ue})}),{text:he,tabstops:A,tokens:$}},x=(function(){function C(P){if(this.index=0,this.ranges=[],this.tabstops=[],P.tabstopManager)return P.tabstopManager;P.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(P)}return C.prototype.attach=function(P){this.$openTabstops=null,this.selectedTabstop=null,this.editor=P,this.session=P.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(P){for(var O=P.action[0]=="r",E=this.selectedTabstop||{},k=E.parents||{},B=this.tabstops.slice(),N=0;N<B.length;N++){var I=B[N],$=I==E||k[I.index];if(I.rangeList.$bias=$?0:1,P.action=="remove"&&I!==E){var A=I.parents&&I.parents[E.index],D=I.rangeList.pointIndex(P.start,A);D=D<0?-D-1:D+1;var j=I.rangeList.pointIndex(P.end,A);j=j<0?-j-1:j-1;for(var U=I.rangeList.ranges.slice(D,j),q=0;q<U.length;q++)this.removeRange(U[q])}I.rangeList.$onChange(P)}var Q=this.session;!this.$inChange&&O&&Q.getLength()==1&&!Q.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var P=this.selectedTabstop;if(!(!P||!P.hasLinkedRanges||!P.firstNonLinked)){this.$inChange=!0;for(var O=this.session,E=O.getTextRange(P.firstNonLinked),k=0;k<P.length;k++){var B=P[k];if(B.linked){var N=B.original,I=r.snippetManager.tmStrFormat(E,N,this.editor);O.replace(B,I)}}this.$inChange=!1}},C.prototype.onAfterExec=function(P){P.command&&!P.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var P=this.editor.selection.lead,O=this.editor.selection.anchor,E=this.editor.selection.isEmpty(),k=0;k<this.ranges.length;k++)if(!this.ranges[k].linked){var B=this.ranges[k].contains(P.row,P.column),N=E||this.ranges[k].contains(O.row,O.column);if(B&&N)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(P){var O=this.tabstops.length,E=this.index+(P||1);E=Math.min(Math.max(E,1),O),E==O&&(E=0),this.selectTabstop(E),this.updateTabstopMarkers(),E===0&&this.detach()},C.prototype.selectTabstop=function(P){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=P,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var E=O.firstNonLinked||O;if(O.choices&&(E.cursor=E.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(E);else{var k=this.editor.multiSelect;k.toSingleRange(E);for(var B=0;B<O.length;B++)O.hasLinkedRanges&&O[B].linked||k.addRange(O[B].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(P,O,E){var k=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!P[0]){var B=a.fromPoints(E,E);T(B.start,O),T(B.end,O),P[0]=[B],P[0].index=0}var N=this.index,I=[N+1,0],$=this.ranges,A=this.snippetId=(this.snippetId||0)+1;P.forEach(function(D,j){var U=this.$openTabstops[j]||D;U.snippetId=A;for(var q=0;q<D.length;q++){var Q=D[q],re=a.fromPoints(Q.start,Q.end||Q.start);R(re.start,O),R(re.end,O),re.original=Q,re.tabstop=U,$.push(re),U!=D?U.unshift(re):U[q]=re,Q.fmtString||U.firstNonLinked&&k?(re.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=re)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(I.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,U.rangeList.$bias=0,U.rangeList.addList(U)},this),I.length>2&&(this.tabstops.length&&I.push(I.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,I))},C.prototype.addTabstopMarkers=function(P){var O=this.session;P.forEach(function(E){E.markerId||(E.markerId=O.addMarker(E,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(P){var O=this.session;P.forEach(function(E){O.removeMarker(E.markerId),E.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var P=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&P--,this.tabstops.forEach(function(O){O.snippetId===P?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},C.prototype.removeRange=function(P){var O=P.tabstop.indexOf(P);O!=-1&&P.tabstop.splice(O,1),O=this.ranges.indexOf(P),O!=-1&&this.ranges.splice(O,1),O=P.tabstop.rangeList.ranges.indexOf(P),O!=-1&&P.tabstop.splice(O,1),this.session.removeMarker(P.markerId),P.tabstop.length||(O=this.tabstops.indexOf(P.tabstop),O!=-1&&this.tabstops.splice(O,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,P){C.row==0&&(C.column+=P.column),C.row+=P.row},T=function(C,P){C.row==P.row&&(C.column-=P.column),C.row-=P.row};g.importCssString(`
1133
+ .ace_snippet-marker {
1134
+ -moz-box-sizing: border-box;
1135
+ box-sizing: border-box;
1136
+ background: rgba(194, 193, 208, 0.09);
1137
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1138
+ position: absolute;
1139
+ }`,"snippets.css",!1),r.snippetManager=new m;var _=t("./editor").Editor;(function(){this.insertSnippet=function(C,P){return r.snippetManager.insertSnippet(this,C,P)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,r,c){var h=t("../virtual_renderer").VirtualRenderer,g=t("../editor").Editor,v=t("../range").Range,s=t("../lib/event"),f=t("../lib/lang"),a=t("../lib/dom"),l=t("../config").nls,u=t("./../lib/useragent"),d=function(R){return"suggest-aria-id:".concat(R)},o=u.isSafari?"menu":"listbox",p=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",w=function(R){var T=new h(R);T.$maxLines=4;var _=new g(T);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function R(T){var _=a.createElement("div"),C=w(_);T&&T.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",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 P=function(){};C.focus=P,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=P,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),k.start.row=k.end.row=A.row,$.stop()});var O,E=new v(-1,0,-1,1/0),k=new v(-1,0,-1,1/0);k.id=C.session.addMarker(k,"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(!O){O=$;return}if(!(O.x==$.x&&O.y==$.y)){O=$,O.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=O.getDocumentPosition().row;E.start.row!=A&&(E.id||C.setRow(A),N(A))}}),C.renderer.on("beforeRender",function(){if(O&&E.start.row!=-1){O.$pos=null;var $=O.getDocumentPosition().row;E.id||C.setRow($),N($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,A=$.config.firstRow,D=$.config.lastRow;A<=D;A++){var j=$.element.childNodes[A-$.config.firstRow];j.setAttribute("role",p),j.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",q)}var Q=j.querySelectorAll(".ace_completion-highlight");Q.forEach(function(re){re.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),A=C.renderer.$textLayer,D=A.element.childNodes[$-A.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=d($);a.addCssClass(D,"ace_selected"),D.id=U,A.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var B=function(){N(-1)},N=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},s.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,B()}),C.on("hide",B),C.on("changeSelection",B),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 I=C.session.bgTokenizer;return I.$tokenizeRow=function($){function A(oe,ee){oe&&j.push({type:(D.className||"")+(ee||""),value:oe})}var D=C.data[$],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,q=U.toLowerCase(),Q=(C.filterText||"").toLowerCase(),re=0,le=0,ne=0;ne<=Q.length;ne++)if(ne!=le&&(D.matchMask&1<<ne||ne==Q.length)){var ue=Q.slice(le,ne);le=ne;var he=q.indexOf(ue,re);if(he==-1)continue;A(U.slice(re,he),""),re=he+ue.length,A(U.slice(he,re),"completion-highlight")}return A(U.slice(re,U.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},I.$updateOnChange=P,I.start=P,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(f.stringRepeat(`
1140
+ `,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return k.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),k.start.row!=$&&(C.selection.clearSelection(),k.start.row=k.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,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===$.top&&C.anchorPos.left===$.left&&C.anchor===D)return!0;var U=this.container,q=this.renderer.scrollBar.width||10,Q=window.innerHeight-q,re=window.innerWidth-q,le=this.renderer,ne=le.$maxLines*A*1.4,ue={top:0,bottom:0},he=Q-$.top-3*this.$borderSize-A,oe=$.top-3*this.$borderSize;D||(oe<=he||he>=ne?D="bottom":D="top"),D==="top"?(ue.bottom=$.top-this.$borderSize,ue.top=ue.bottom-ne):D==="bottom"&&(ue.top=$.top+A+this.$borderSize,ue.bottom=ue.top+ne);var ee=ue.top>=0&&ue.bottom<=Q;if(!j&&!ee)return!1;ee?le.$maxPixelHeight=null:D==="top"?le.$maxPixelHeight=oe:le.$maxPixelHeight=he,D==="top"?(U.style.top="",U.style.bottom=Q+q-ue.bottom+"px",C.isTopdown=!1):(U.style.top=ue.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var ye=$.left;return ye+U.offsetWidth>re&&(ye=re-U.offsetWidth),U.style.left=ye+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),O=null),C.anchorPos=$,C.anchor=D,!0},C.show=function($,A,D){this.tryShow($,A,D?"bottom":void 0,!0)},C.goTo=function($){var A=this.getRow(),D=this.session.getLength()-1;switch($){case"up":A=A<=0?D:A-1;break;case"down":A=A>=D?-1:A+1;break;case"start":A=0;break;case"end":A=D}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(`
1141
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
+ background-color: #CAD6FA;
1143
+ z-index: 1;
1144
+ }
1145
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1146
+ background-color: #3a674e;
1147
+ }
1148
+ .ace_editor.ace_autocomplete .ace_line-hover {
1149
+ border: 1px solid #abbffe;
1150
+ margin-top: -1px;
1151
+ background: rgba(233,233,253,0.4);
1152
+ position: absolute;
1153
+ z-index: 2;
1154
+ }
1155
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1156
+ border: 1px solid rgba(109, 150, 13, 0.8);
1157
+ background: rgba(58, 103, 78, 0.62);
1158
+ }
1159
+ .ace_completion-meta {
1160
+ opacity: 0.5;
1161
+ margin-left: 0.9em;
1162
+ }
1163
+ .ace_completion-message {
1164
+ margin-left: 0.9em;
1165
+ color: blue;
1166
+ }
1167
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #2d69c7;
1169
+ }
1170
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1171
+ color: #93ca12;
1172
+ }
1173
+ .ace_editor.ace_autocomplete {
1174
+ width: 300px;
1175
+ z-index: 200000;
1176
+ border: 1px lightgray solid;
1177
+ position: fixed;
1178
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1179
+ line-height: 1.4;
1180
+ background: #fefefe;
1181
+ color: #111;
1182
+ }
1183
+ .ace_dark.ace_editor.ace_autocomplete {
1184
+ border: 1px #484747 solid;
1185
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1186
+ line-height: 1.4;
1187
+ background: #25282c;
1188
+ color: #c1c1c1;
1189
+ }
1190
+ .ace_autocomplete .ace_text-layer {
1191
+ width: calc(100% - 8px);
1192
+ }
1193
+ .ace_autocomplete .ace_line {
1194
+ display: flex;
1195
+ align-items: center;
1196
+ }
1197
+ .ace_autocomplete .ace_line > * {
1198
+ min-width: 0;
1199
+ flex: 0 0 auto;
1200
+ }
1201
+ .ace_autocomplete .ace_line .ace_ {
1202
+ flex: 0 1 auto;
1203
+ overflow: hidden;
1204
+ text-overflow: ellipsis;
1205
+ }
1206
+ .ace_autocomplete .ace_completion-spacer {
1207
+ flex: 1;
1208
+ }
1209
+ .ace_autocomplete.ace_loading:after {
1210
+ content: "";
1211
+ position: absolute;
1212
+ top: 0px;
1213
+ height: 2px;
1214
+ width: 8%;
1215
+ background: blue;
1216
+ z-index: 100;
1217
+ animation: ace_progress 3s infinite linear;
1218
+ animation-delay: 300ms;
1219
+ transform: translateX(-100%) scaleX(1);
1220
+ }
1221
+ @keyframes ace_progress {
1222
+ 0% { transform: translateX(-100%) scaleX(1) }
1223
+ 50% { transform: translateX(625%) scaleX(2) }
1224
+ 100% { transform: translateX(1500%) scaleX(3) }
1225
+ }
1226
+ @media (prefers-reduced-motion) {
1227
+ .ace_autocomplete.ace_loading:after {
1228
+ transform: translateX(625%) scaleX(2);
1229
+ animation: none;
1230
+ }
1231
+ }
1232
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=d}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,r,c){var h=(function(){function g(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),a=this.popup.renderer.$textLayer,l=a.element.childNodes[f-a.config.firstRow];if(l){for(var u="doc-tooltip ",d=0;d<this._lines.length;d++)u+="ace-inline-screenreader-line-".concat(d," ");l.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var s=this.createCodeBlock();this.screenReaderDiv.appendChild(s)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var s=0;s<this._lines.length;s++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(s));var a=document.createTextNode(this._lines[s]);f.appendChild(a),v.appendChild(f)}return v},g})();r.AceInlineScreenReader=h}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(t,r,c){var h=t("../snippets").snippetManager,g=t("./inline_screenreader").AceInlineScreenReader,v=(function(){function s(){this.editor=null}return s.prototype.show=function(f,a,l){if(l=l||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(f));var u=a.snippet?h.getDisplayTextForSnippet(f,a.snippet):a.value;return a.hideInlinePreview||!u||!u.startsWith(l)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(l.length),u===""?f.removeGhostText():f.setGhostText(u),!0)},s.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},s.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},s.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},s})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(t,r,c){r.parForEach=function(g,v,s){var f=0,a=g.length;a===0&&s();for(var l=0;l<a;l++)v(g[l],function(u,d){f++,f===a&&s(u,d)})};var h=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,v,s){s=s||h;for(var f=[],a=v-1;a>=0&&s.test(g[a]);a--)f.push(g[a]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,v,s){s=s||h;for(var f=[],a=v;a<g.length&&s.test(g[a]);a++)f.push(g[a]);return f},r.getCompletionPrefix=function(g){var v=g.getCursorPosition(),s=g.session.getLine(v.row),f;return g.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(l){!f&&l&&(f=this.retrievePrecedingIdentifier(s,v.column,l))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(s,v.column)},r.triggerAutocomplete=function(g,s){var s=s??g.session.getPrecedingCharacter();return g.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(s)})}}),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(t,r,c){var h=t("./keyboard/hash_handler").HashHandler,g=t("./autocomplete/popup").AcePopup,v=t("./autocomplete/inline").AceInline,s=t("./autocomplete/popup").getAriaId,f=t("./autocomplete/util"),a=t("./lib/lang"),l=t("./lib/dom"),u=t("./snippets").snippetManager,d=t("./config"),o=t("./lib/event"),p=t("./lib/scroll").preventParentScroll,m=function(T,_){_.completer&&_.completer.destroy()},w=(function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new h,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 _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new R(T.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:d.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},T.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},T.prototype.$updateGhostText=function(_){var C=this.base.row,P=this.base.column,O=this.editor.getCursorPosition().column,E=this.editor.session.getLine(C).slice(P,O);this.inlineRenderer.show(this.editor,_,E)?this.$seen(_):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var P=this.popup.getData(C);P&&(!_||P.hideInlinePreview)&&this.$seen(P)}},T.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},T.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,P=C.layerConfig.lineHeight,O=C.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var E=_.container.getBoundingClientRect();O.top+=E.top-C.layerConfig.offset,O.left+=E.left-_.renderer.scrollLeft,O.left+=C.gutterWidth;var k={top:O.top,left:O.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(k.top+=C.$ghostTextWidget.el.offsetHeight);var B=_.container.getBoundingClientRect().bottom-P,N=B<k.top?{top:B,left:k.left}:k;this.popup.tryShow(N,P,"bottom")||this.popup.tryShow(O,P,"top")||this.popup.show(O,P)},T.prototype.openPopup=function(_,C,P){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var O=this.popup.getRow(),E=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var k;this.stickySelection&&(k=this.popup.data.indexOf(E)),(!k||k===-1)&&(k=0),this.popup.setRow(this.autoSelect?k:-1),k===O&&E!==this.completions.filtered[k]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(k===O&&B){var N=this.popup.getData(this.popup.getRow());this.$updateGhostText(N)}P||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.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()},T.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(_){var C=document.activeElement,P=this.editor.textInput.getElement(),O=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),E=this.popup&&this.popup.container;C!=P&&C.parentNode!=E&&!O&&C!=this.tooltipNode&&_.relatedTarget!=P&&this.detach()},T.prototype.mousedownListener=function(_){this.detach()},T.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(_){this.popup.goTo(_)},T.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var P=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,_,P.filterText,C);return this.completions==P&&this.detach(),O},T.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},T.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},T.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},T.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var O=this.editor.getCursorPosition(),E=this.editor.session.getTextRange({start:this.base,end:O});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,_);return}if(C&&C.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var P=this.editor.getSession(),O=this.editor.getCursorPosition(),E=f.getCompletionPrefix(this.editor);this.base=P.doc.createAnchor(O.row,O.column-E.length),this.base.$insertRight=!0;var k={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:E,pos:O}).provideCompletions(this.editor,k,(function(B,N,I){var $=N.filtered,A=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),I){if(!$.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(A)),D){var j=[{caption:D,value:""}];this.completions=new R(j),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==A&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!I&&this.showLoadingState?new R(T.completionsForLoading.concat($),N.filterText):N,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!I)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,P=C&&(C[_.getHoveredRow()]||C[_.getRow()]),O=null;if(!P||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var E=this.editor.completers.length,k=0;k<E;k++){var B=this.editor.completers[k];if(B.getDocTooltip&&P.completerId===B.id){O=B.getDocTooltip(P);break}}if(!O&&typeof P!="string"&&(O=P),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},T.prototype.showDocTooltip=function(_){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",p));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var P=this.tooltipNode;_.docHTML?P.innerHTML=_.docHTML:_.docText&&(P.textContent=_.docText),P.parentNode||this.popup.container.appendChild(this.tooltipNode);var O=this.popup,E=O.container.getBoundingClientRect(),k=400,B=300,N=O.renderer.scrollBar.width||10,I=E.left,$=window.innerWidth-E.right-N,A=O.isTopdown?window.innerHeight-N-E.bottom:E.top,D=[Math.min($/k,1),Math.min(I/k,1),Math.min(A/B,1)*.9],j=Math.max.apply(Math,D),U=P.style;U.display="block",j==D[0]||D[0]>=1?(U.left=E.right+1+"px",U.right="",U.maxWidth=k*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.top,B)+"px"):j==D[1]||D[1]>=1?(U.right=window.innerWidth-E.left+"px",U.left="",U.maxWidth=k*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.top,B)+"px"):j==D[2]&&(U.left=E.left+"px",U.right="",U.maxWidth=Math.min(k,window.innerWidth-E.left)+"px",O.isTopdown?(U.top=E.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.bottom,B)+"px"):(U.top="",U.bottom=window.innerHeight-E.top+"px",U.maxHeight=Math.min(E.top,B)+"px")),l.$fixPositionBug(P)},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},T.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(_){return _.completer instanceof T||(_.completer&&(_.completer.destroy(),_.completer=null),d.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),_.completer=T.$sharedInstance):(_.completer=new T,_.once("destroy",m))),_.completer},T})();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var _=T.completer.insertMatch();if(_||T.tabstopManager)return _;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var _=f.getCompletionPrefix(T);!_&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,_){var C=w.for(T);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(T,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function T(_){this.initialPosition=_,this.active=!0}return T.prototype.insertByIndex=function(_,C,P){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],P)},T.prototype.insertMatch=function(_,C,P){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var O=this.completions.filterText.length,E=0;if(C.range&&C.range.start.row===C.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-C.range.start.column,E+=C.range.end.column-this.initialPosition.pos.column),O||E){var k;_.selection.getAllRanges?k=_.selection.getAllRanges():k=[_.getSelectionRange()];for(var B=0,N;N=k[B];B++)N.start.column-=O,N.end.column+=E,_.session.remove(N)}C.snippet?u.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},T.prototype.$insertString=function(_,C){var P=C.value||C;_.execCommand("insertstring",P)},T.prototype.gatherCompletions=function(_,C){var P=_.getSession(),O=_.getCursorPosition(),E=f.getCompletionPrefix(_),k=[];this.completers=_.completers;var B=_.completers.length;return _.completers.forEach(function(N,I){N.getCompletions(_,P,O,E,function($,A){N.hideInlinePreview&&(A=A.map(function(D){return Object.assign(D,{hideInlinePreview:N.hideInlinePreview})})),!$&&A&&(k=k.concat(A)),C(null,{prefix:f.getCompletionPrefix(_),matches:k,finished:--B===0})})}),!0},T.prototype.provideCompletions=function(_,C,P){var O=(function(N){var I=N.prefix,$=N.matches;this.completions=new R($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(I),(N.finished||this.completions.filtered.length)&&P(null,this.completions,N.finished)}).bind(this),E=!0,k=null;if(this.gatherCompletions(_,(function(N,I){if(this.active){N&&(P(N,[],!0),this.detach());var $=I.prefix;if($.indexOf(I.prefix)===0){if(E){k=I;return}O(I)}}}).bind(this)),E=!1,k){var B=k;k=null,O(B)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},T})(),R=(function(){function T(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(O,E){return E.exactMatch-O.exactMatch||E.$score-O.$score||(O.caption||O.value).localeCompare(E.caption||E.value)});var P=null;C=C.filter(function(O){var E=O.snippet||O.caption||O.value;return E===P?!1:(P=E,!0)}),this.filtered=C},T.prototype.filterCompletions=function(_,C){var P=[],O=C.toUpperCase(),E=C.toLowerCase();e:for(var k=0,B;B=_[k];k++){if(B.skipFilter){B.$score=B.score,P.push(B);continue}var N=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(N){var I=-1,$=0,A=0,D,j;if(this.exactMatch){if(C!==N.substr(0,C.length))continue e}else{var U=N.toLowerCase().indexOf(E);if(U>-1)A=U;else for(var q=0;q<C.length;q++){var Q=N.indexOf(E[q],I+1),re=N.indexOf(O[q],I+1);if(D=Q>=0&&(re<0||Q<re)?Q:re,D<0)continue e;j=D-I-1,j>0&&(I===-1&&(A+=10),A+=j,$|=1<<q),I=D}}B.matchMask=$,B.exactMatch=A?0:1,B.$score=(B.score||0)-A,P.push(B)}}return P},T})();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(t,r,c){var h=(function(){function g(v,s){s&&(this.markerType=s.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(s){return s.range.contains(v.row,v.column)})},g.prototype.markersComparator=function(v,s){return v.range.start.row-s.range.start.row},g.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(v,s,f,a){if(!(!this.markers||!this.markers.length))for(var l=a.firstRow,u=a.lastRow,d,o=0,p=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<l)&&!(w.range.start.row>u)&&(w.range.start.row===p?o++:(p=w.range.start.row,o=0),!(o>200))){var x=w.range.clipRows(l,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(f);if(R.isEmpty()){d=f.getNextFoldLine(x.end.row,d),d&&d.end.row>x.end.row&&(l=d.end.row);continue}this.markerType==="fullLine"?s.drawFullLineMarker(v,R,w.className,a):R.isMultiLine()?this.markerType==="line"?s.drawMultiLineMarker(v,R,w.className,a):s.drawTextMarker(v,R,w.className,a):s.drawSingleLineMarker(v,R,w.className+" ace_br15",a)}}}},g})();h.prototype.MAX_MARKERS=1e4,r.MarkerGroup=h}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,c){function h(f,a){var l=f.getTextRange(v.fromPoints({row:0,column:0},a));return l.split(s).length-1}function g(f,a){var l=h(f,a),u=f.getValue().split(s),d=Object.create(null),o=u[l];return u.forEach(function(p,m){if(!(!p||p===o)){var w=Math.abs(l-m),x=u.length-w;d[p]?d[p]=Math.max(x,d[p]):d[p]=x}}),d}var v=t("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(f,a,l,u,d){var o=g(a,l),p=Object.keys(o);d(null,p.map(function(m){return{caption:m,value:m,score:o[m],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(t,r,c){var h=t("../snippets").snippetManager,g=t("../autocomplete").Autocomplete,v=t("../config"),s=t("../lib/lang"),f=t("../autocomplete/util"),a=t("../marker_group").MarkerGroup,l=t("../autocomplete/text_completer"),u={getCompletions:function(E,k,B,N,I){if(k.$mode.completer)return k.$mode.completer.getCompletions(E,k,B,N,I);var $=E.session.getState(B.row),A=k.$mode.getCompletions($,k,B,N);A=A.map(function(D){return D.completerId=u.id,D}),I(null,A)},id:"keywordCompleter"},d=function(E){var k={};return E.replace(/\${(\d+)(:(.*?))?}/g,function(B,N,I,$){return k[N]=$||""}).replace(/\$(\d+?)/g,function(B,N){return k[N]})},o={getCompletions:function(E,k,B,N,I){var $=[],A=k.getTokenAt(B.row,B.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=h.getActiveScopes(E);var D=h.snippetMap,j=[];$.forEach(function(U){for(var q=D[U]||[],Q=q.length;Q--;){var re=q[Q],le=re.name||re.tabTrigger;le&&j.push({caption:le,snippet:re.content,meta:re.tabTrigger&&!re.name?re.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),I(null,j)},getDocTooltip:function(E){E.snippet&&!E.docHTML&&(E.docHTML=["<b>",s.escapeHTML(E.caption),"</b>","<hr></hr>",s.escapeHTML(d(E.snippet))].join(""))},id:"snippetCompleter"},p=[o,l,u];r.setCompleters=function(E){p.length=0,E&&p.push.apply(p,E)},r.addCompleter=function(E){p.push(E)},r.textCompleter=l,r.keyWordCompleter=u,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(E){return h.expandWithTab(E)},bindKey:"Tab"},w=function(E,k){x(k.session.$mode)},x=function(E){typeof E=="string"&&(E=v.$modes[E]),E&&(h.files||(h.files={}),R(E.$id,E.snippetFileId),E.modes&&E.modes.forEach(x))},R=function(E,k){!k||!E||h.files[E]||(h.files[E]={},v.loadModule(k,function(B){B&&(h.files[E]=B,!B.snippets&&B.snippetText&&(B.snippets=h.parseSnippetFile(B.snippetText)),h.register(B.snippets||[],B.scope),B.includeScopes&&(h.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(N){x("ace/mode/"+N)})))}))},T=function(E){var k=E.editor,B=k.completer&&k.completer.activated;if(E.command.name==="backspace")B&&!f.getCompletionPrefix(k)&&k.completer.detach();else if(E.command.name==="insertstring"&&!B){_=E;var N=E.editor.$liveAutocompletionDelay;N?C.delay(N):P(E)}},_,C=s.delayedCall(function(){P(_)},0),P=function(E){var k=E.editor,B=f.getCompletionPrefix(k),N=E.args,I=f.triggerAutocomplete(k,N);if(B&&B.length>=k.$liveAutocompletionThreshold||I){var $=g.for(k);$.autoShown=!0,$.showPopup(k)}},O=t("../editor").Editor;t("../config").defineOptions(O.prototype,"editor",{enableBasicAutocompletion:{set:function(E){E?(g.for(this),this.completers||(this.completers=Array.isArray(E)?E:p),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(E){E?(this.completers||(this.completers=Array.isArray(E)?E:p),this.commands.on("afterExec",T)):this.commands.off("afterExec",T)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(E){E?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(t){e&&(e.exports=t)})})()})(ly)),ly.exports}sT();var uy={exports:{}},hy;function aT(){return hy||(hy=1,(function(e,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,c){c.exports=`
1233
+
1234
+ /* ------------------------------------------------------------------------------------------
1235
+ * Editor Search Form
1236
+ * --------------------------------------------------------------------------------------- */
1237
+ .ace_search {
1238
+ background-color: #ddd;
1239
+ color: #666;
1240
+ border: 1px solid #cbcbcb;
1241
+ border-top: 0 none;
1242
+ overflow: hidden;
1243
+ margin: 0;
1244
+ padding: 4px 6px 0 4px;
1245
+ position: absolute;
1246
+ top: 0;
1247
+ z-index: 99;
1248
+ white-space: normal;
1249
+ }
1250
+ .ace_search.left {
1251
+ border-left: 0 none;
1252
+ border-radius: 0px 0px 5px 0px;
1253
+ left: 0;
1254
+ }
1255
+ .ace_search.right {
1256
+ border-radius: 0px 0px 0px 5px;
1257
+ border-right: 0 none;
1258
+ right: 0;
1259
+ }
1260
+
1261
+ .ace_search_form, .ace_replace_form {
1262
+ margin: 0 20px 4px 0;
1263
+ overflow: hidden;
1264
+ line-height: 1.9;
1265
+ }
1266
+ .ace_replace_form {
1267
+ margin-right: 0;
1268
+ }
1269
+ .ace_search_form.ace_nomatch {
1270
+ outline: 1px solid red;
1271
+ }
1272
+
1273
+ .ace_search_field {
1274
+ border-radius: 3px 0 0 3px;
1275
+ background-color: white;
1276
+ color: black;
1277
+ border: 1px solid #cbcbcb;
1278
+ border-right: 0 none;
1279
+ outline: 0;
1280
+ padding: 0;
1281
+ font-size: inherit;
1282
+ margin: 0;
1283
+ line-height: inherit;
1284
+ padding: 0 6px;
1285
+ min-width: 17em;
1286
+ vertical-align: top;
1287
+ min-height: 1.8em;
1288
+ box-sizing: content-box;
1289
+ }
1290
+ .ace_searchbtn {
1291
+ border: 1px solid #cbcbcb;
1292
+ line-height: inherit;
1293
+ display: inline-block;
1294
+ padding: 0 6px;
1295
+ background: #fff;
1296
+ border-right: 0 none;
1297
+ border-left: 1px solid #dcdcdc;
1298
+ cursor: pointer;
1299
+ margin: 0;
1300
+ position: relative;
1301
+ color: #666;
1302
+ }
1303
+ .ace_searchbtn:last-child {
1304
+ border-radius: 0 3px 3px 0;
1305
+ border-right: 1px solid #cbcbcb;
1306
+ }
1307
+ .ace_searchbtn:disabled {
1308
+ background: none;
1309
+ cursor: default;
1310
+ }
1311
+ .ace_searchbtn:hover {
1312
+ background-color: #eef1f6;
1313
+ }
1314
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1315
+ padding: 0px 0.7em
1316
+ }
1317
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1318
+ content: "";
1319
+ border: solid 2px #888;
1320
+ width: 0.5em;
1321
+ height: 0.5em;
1322
+ border-width: 2px 0 0 2px;
1323
+ display:inline-block;
1324
+ transform: rotate(-45deg);
1325
+ }
1326
+ .ace_searchbtn.next:after {
1327
+ border-width: 0 2px 2px 0 ;
1328
+ }
1329
+ .ace_searchbtn_close {
1330
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1331
+ border-radius: 50%;
1332
+ border: 0 none;
1333
+ color: #656565;
1334
+ cursor: pointer;
1335
+ font: 16px/16px Arial;
1336
+ padding: 0;
1337
+ height: 14px;
1338
+ width: 14px;
1339
+ top: 9px;
1340
+ right: 7px;
1341
+ position: absolute;
1342
+ }
1343
+ .ace_searchbtn_close:hover {
1344
+ background-color: #656565;
1345
+ background-position: 50% 100%;
1346
+ color: white;
1347
+ }
1348
+
1349
+ .ace_button {
1350
+ margin-left: 2px;
1351
+ cursor: pointer;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ -o-user-select: none;
1355
+ -ms-user-select: none;
1356
+ user-select: none;
1357
+ overflow: hidden;
1358
+ opacity: 0.7;
1359
+ border: 1px solid rgba(100,100,100,0.23);
1360
+ padding: 1px;
1361
+ box-sizing: border-box!important;
1362
+ color: black;
1363
+ }
1364
+
1365
+ .ace_button:hover {
1366
+ background-color: #eee;
1367
+ opacity:1;
1368
+ }
1369
+ .ace_button:active {
1370
+ background-color: #ddd;
1371
+ }
1372
+
1373
+ .ace_button.checked {
1374
+ border-color: #3399ff;
1375
+ opacity:1;
1376
+ }
1377
+
1378
+ .ace_search_options{
1379
+ margin-bottom: 3px;
1380
+ text-align: right;
1381
+ -webkit-user-select: none;
1382
+ -moz-user-select: none;
1383
+ -o-user-select: none;
1384
+ -ms-user-select: none;
1385
+ user-select: none;
1386
+ clear: both;
1387
+ }
1388
+
1389
+ .ace_search_counter {
1390
+ float: left;
1391
+ font-family: arial;
1392
+ padding: 0 8px;
1393
+ }`}),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(t,r,c){var h=t("../lib/dom"),g=t("../lib/lang"),v=t("../lib/event"),s=t("./searchbox-css"),f=t("../keyboard/hash_handler").HashHandler,a=t("../lib/keys"),l=t("../config").nls,u=999;h.importCssString(s,"ace_searchbox",!1);var d=(function(){function m(w,x,R){this.activeInput,this.element=h.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(w),h.importCssString(s,"ace_searchbox",w.container),v.addListener(this.element,"touchstart",function(T){T.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;v.addListener(w,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(R)}),v.addListener(w,"click",function(R){var T=R.target||R.srcElement,_=T.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),v.stopPropagation(R)}),v.addCommandKeyListener(w,function(R,T,_){var C=a.keyCodeToString(_),P=x.$searchBarKb.findKeyCommand(T,C);P&&P.exec&&(P.exec(x),v.stopEvent(R))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){h.setCssClass(this.replaceOption,"checked",this.searchRange),h.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",h.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),h.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),h.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,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,R){if(this.editor.session){var T=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),_=!T&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,R=x.unicode,T=0,_=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
+ `),w.session.doc.$autoNewLine=`
1395
+ `);var P=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(P-=w.session.doc.positionToIndex(this.searchRange.start));for(var O=x.lastIndex=0,E;(E=x.exec(C))&&(T++,O=E.index,O<=P&&_++,!(T>u||!E[0]&&(x.lastIndex=O+=g.skipEmptyMatch(C,O,R),O>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[_,T>u?u+"+":T])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.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()},m.prototype.show=function(w,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&&(w=g.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m})(),o=new f;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var p=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);d.prototype.$searchBarKb=o,d.prototype.$closeSearchBarKb=p,r.SearchBox=d,r.Search=function(m,w){var x=m.searchBox||new d(m),R=m.session.selection.getRange(),T=R.isMultiLine()?"":m.session.getTextRange(R);x.show(T,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})})()})(uy)),uy.exports}aT();var dy={exports:{}},fy;function lT(){return fy||(fy=1,(function(e,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,c){function h(f,a){function l(E,k,B){if(!(E.length<k)){var N=E.slice(0,k),I=E.slice(k),$=/^(?:(\s+)|(\S+)(\s+))/.exec(I),A=/(?:(\s+)|(\s+)(\S+))$/.exec(N),D=0,j=0;if(A&&!A[2]&&(D=k-A[1].length,j=k),$&&!$[2]&&(D||(D=k),j=k+$[1].length),D)return{start:D,end:j};if(A&&A[2]&&A.index>B)return{start:A.index,end:A.index+A[2].length};if($&&$[2])return D=k+$[2].length,{start:D,end:D+$[3].length}}}for(var u=a.column||f.getOption("printMarginColumn"),d=a.allowMerge!=0,o=Math.min(a.startRow,a.endRow),p=Math.max(a.startRow,a.endRow),m=f.session;o<=p;){var w=m.getLine(o);if(w.length>u){var x=l(w,u,5);if(x){var R=/^\s*/.exec(w)[0];m.replace(new v(o,x.start,o,x.end),`
1396
+ `+R)}p++}else if(d&&/\S/.test(w)&&o!=p){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var _=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),P=_+" "+C,x=l(P,u,5);if(x&&x.start>_.length||P.length<u){var O=new v(o,_.length,o+1,T.length-C.length);m.replace(O," "),o--,p--}else _.length<w.length&&m.remove(new v(o,_.length,o,w.length))}}o++}}function g(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var a=f.editor,l=a.selection.cursor;if(l.column<=a.renderer.$printMarginColumn)return;var u=a.session.$undoManager.$lastDelta;h(a,{startRow:l.row,endRow:l.row,allowMerge:!1}),u!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var v=t("../range").Range,s=t("../editor").Editor;t("../config").defineOptions(s.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=h}),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(t,r,c){function h(b){return{row:b.line,column:b.ch}}function g(b){return new Fe(b.row,b.column)}function v(b,M,S){if(M.line===S.line&&M.ch>=S.ch-1){var z=b.getLine(M.line),F=z.charCodeAt(M.ch);55296<=F&&F<=55551&&(S.ch+=1)}return{start:M,end:S}}function s(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),Ue.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",Ji),P(b),Ue.on(b.getInputField(),"paste",a(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",Ji),Ue.off(b.getInputField(),"paste",a(b)),b.state.vim=null,wn&&clearTimeout(wn)}function a(b){var M=b.state.vim;return M.onPasteFn||(M.onPasteFn=function(){M.insertMode||(b.setCursor(ee(b.getCursor(),0,1)),ir.enterInsertMode(b,{},M))}),M.onPasteFn}function l(b,M){return M>=b.firstLine()&&M<=b.lastLine()}function u(b){return/^[a-z]$/.test(b)}function d(b){return"()[]{}".indexOf(b)!=-1}function o(b){return is.test(b)}function p(b){return We.test(b)}function m(b){return/^\s*$/.test(b)}function w(b){return".?!".indexOf(b)!=-1}function x(b,M){for(var S=0;S<M.length;S++)if(M[S]==b)return!0;return!1}function R(b,M,S,z,F){if(M===void 0&&!F)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),rt[b]={type:S,defaultValue:M,callback:F},z)for(var W=0;W<z.length;W++)rt[z[W]]=rt[b];M&&T(b,M)}function T(b,M,S,z){var F=rt[b];z=z||{};var W=z.scope;if(!F)return new Error("Unknown option: "+b);if(F.type=="boolean"){if(M&&M!==!0)return new Error("Invalid argument: "+b+"="+M);M!==!1&&(M=!0)}F.callback?(W!=="local"&&F.callback(M,void 0),W!=="global"&&S&&F.callback(M,S)):(W!=="local"&&(F.value=F.type=="boolean"?!!M:M),W!=="global"&&S&&(S.state.vim.options[b]={value:M}))}function _(b,M,S){var z=rt[b];S=S||{};var F=S.scope;if(!z)return new Error("Unknown option: "+b);if(z.callback){var W=M&&z.callback(void 0,M);return F!=="global"&&W!==void 0?W:F!=="local"?z.callback():void 0}var W=F!=="global"&&M&&M.state.vim.options[b];return(W||F!=="local"&&z||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=yn()}function P(b){return b.state.vim||(b.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}),b.state.vim}function O(){Ve={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:rn(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new Q,exCommandHistoryController:new Q};for(var b in rt){var M=rt[b];M.value=M.defaultValue}}function E(b){function M(K){typeof K=="string"?qt.value=K:qt=null}if(b[0]=="<"){var S=b.toLowerCase().slice(1,-1),z=S.split("-");if(S=z.pop()||"",S=="lt")b="<";else if(S=="space")b=" ";else if(S=="cr")b=`
1397
+ `;else if(Wo[S]){var F=qt.value,W={key:Wo[S],target:{value:F,selectionEnd:F.length,selectionStart:F.length}};qt.onKeyDown&&qt.onKeyDown(W,qt.value,M),qt&&qt.onKeyUp&&qt.onKeyUp(W,qt.value,M);return}}if(b==`
1398
+ `){var G=qt;qt=null,G.onClose&&G.onClose(G.value)}else qt.value=(qt.value||"")+b}function k(b,M,S){var z=mi;if(S){if(an.indexOf(S)!=-1)return;an.push(S),mi=S.noremap!=0}try{for(var F=P(b),W=/<(?:[CSMA]-)*\w+>|./gi,G;G=W.exec(M);){var K=G[0],Z=F.insertMode;if(qt){E(K);continue}var se=wt.handleKey(b,K,"mapping");if(!se&&Z&&F.insertMode){if(K[0]=="<"){var de=K.toLowerCase().slice(1,-1),ke=de.split("-");if(de=ke.pop()||"",de=="lt")K="<";else if(de=="space")K=" ";else if(de=="cr")K=`
1399
+ `;else{if(Wo.hasOwnProperty(de)){K=Wo[de],Xo(b,K);continue}K=K[0],W.lastIndex=G.index+1}}b.replaceSelection(K)}}}finally{if(an.pop(),mi=an.length?z:!1,!an.length&&qt){var Te=qt;qt=null,Or(b,Te)}}}function B(b,M){var S=b.key;if(!vr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=ri[S]||S;var z="";if(b.ctrlKey&&(z+="C-"),b.altKey&&(z+="A-"),b.metaKey&&(z+="M-"),Ue.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(z=z.slice(2)),(z||S.length>1)&&b.shiftKey&&(z+="S-"),M&&!M.expectLiteralNext&&S.length==1){if(Sn.keymap&&S in Sn.keymap)(Sn.remapCtrl!=0||!z)&&(S=Sn.keymap[S]);else if(S.charCodeAt(0)>255){var F=b.code&&b.code.slice(-1)||"";b.shiftKey||(F=F.toLowerCase()),F&&(S=F)}}return z+=S,z.length>1&&(z="<"+z+">"),z}}function N(b,M){Sn.string!==b&&(Sn=I(b)),Sn.remapCtrl=M}function I(b){function M(z){return z.split(/\\?(.)/).filter(Boolean)}var S={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(z){if(z){var F=z.split(/((?:[^\\;]|\\.)+);/);if(F.length==3){var W=M(F[1]),G=M(F[2]);if(W.length!==G.length)return;for(var K=0;K<W.length;++K)S[W[K]]=G[K]}else if(F.length==1){var Z=M(z);if(Z.length%2!==0)return;for(var K=0;K<Z.length;K+=2)S[Z[K]]=Z[K+1]}}}),{keymap:S,string:b}):{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(b,M){b.state.vim.inputState=new $,b.state.vim.expectLiteralNext=!1,Ue.signal(b,"vim-command-done",M)}function D(){this.removed=[],this.inserted=""}function j(b,M,S){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!M,this.blockwise=!!S}function U(b,M){var S=Ve.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");S[b]=M,Oe.push(b)}function q(b){this.registers=b,this.unnamedRegister=b['"']=new j,b["."]=new j,b[":"]=new j,b["/"]=new j,b["+"]=new j}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function re(b,M){Kn[b]=M}function le(b,M){for(var S=[],z=0;z<M;z++)S.push(b);return S}function ne(b,M){Us[b]=M}function ue(b,M){ir[b]=M}function he(b,M,S){var z=b.state.vim,F=z.insertMode||z.visualMode,W=Math.min(Math.max(b.firstLine(),M.line),b.lastLine()),G=b.getLine(W),K=G.length-1+ +!!F,Z=Math.min(Math.max(0,M.ch),K),se=G.charCodeAt(Z);if(56320<=se&&se<=57343){var de=1;S&&S.line==W&&S.ch>Z&&(de=-1),Z+=de,Z>K&&(Z-=2)}return new Fe(W,Z)}function oe(b){var M={};for(var S in b)b.hasOwnProperty(S)&&(M[S]=b[S]);return M}function ee(b,M,S){return typeof M=="object"&&(S=M.ch,M=M.line),new Fe(b.line+M,b.ch+S)}function ye(b,M,S,z){z.operator&&(S="operatorPending");for(var F,W=[],G=[],K=mi?M.length-wo:0,Z=K;Z<M.length;Z++){var se=M[Z];S=="insert"&&se.context!="insert"||se.context&&se.context!=S||z.operator&&se.type=="action"||!(F=we(b,se.keys))||(F=="partial"&&W.push(se),F=="full"&&G.push(se))}return{partial:W.length&&W,full:G.length&&G}}function we(b,M){var S=M.slice(-11)=="<character>",z=M.slice(-10)=="<register>";if(S||z){var F=M.length-(S?11:10),W=b.slice(0,F),G=M.slice(0,F);return W==G&&b.length>F?"full":G.indexOf(W)==0?"partial":!1}return b==M?"full":M.indexOf(b)==0?"partial":!1}function Ae(b){var M=/^.*(<[^>]+>)$/.exec(b),S=M?M[1]:b.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
1400
+ `;break;case"<Space>":S=" ";break;default:S=""}return S}function Je(b,M,S){return function(){for(var z=0;z<S;z++)M(b)}}function ze(b){return new Fe(b.line,b.ch)}function qe(b,M){return b.ch==M.ch&&b.line==M.line}function Ze(b,M){return b.line<M.line?!0:b.line==M.line&&b.ch<M.ch}function at(b,M){return arguments.length>2&&(M=at.apply(void 0,Array.prototype.slice.call(arguments,1))),Ze(b,M)?b:M}function ct(b,M){return arguments.length>2&&(M=ct.apply(void 0,Array.prototype.slice.call(arguments,1))),Ze(b,M)?M:b}function Ft(b,M,S){var z=Ze(b,M),F=Ze(M,S);return z&&F}function Me(b,M){return b.getLine(M).length}function xt(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function St(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Vt(b,M,S){var z=Me(b,M),F=new Array(S-z+1).join(" ");b.setCursor(new Fe(M,z)),b.replaceRange(F,b.getCursor())}function un(b,M){var S=[],z=b.listSelections(),F=ze(b.clipPos(M)),W=!qe(M,F),G=b.getCursor("head"),K=ft(z,G),Z=qe(z[K].head,z[K].anchor),se=z.length-1,de=se-K>K?se:0,ke=z[de].anchor,Te=Math.min(ke.line,F.line),Ce=Math.max(ke.line,F.line),$e=ke.ch,Be=F.ch,De=z[de].head.ch-$e,et=Be-$e;De>0&&et<=0?($e++,W||Be--):De<0&&et>=0?($e--,Z||Be++):De<0&&et==-1&&($e--,Be++);for(var Ct=Te;Ct<=Ce;Ct++){var ut={anchor:new Fe(Ct,$e),head:new Fe(Ct,Be)};S.push(ut)}return b.setSelections(S),M.ch=Be,ke.ch=$e,ke}function An(b,M,S){for(var z=[],F=0;F<S;F++){var W=ee(M,F,0);z.push({anchor:W,head:W})}b.setSelections(z,0)}function ft(b,M,S){for(var z=0;z<b.length;z++){var F=qe(b[z].anchor,M),W=qe(b[z].head,M);if(F||W)return z}return-1}function it(b,M){var S=M.lastSelection,z=function(){var W=b.listSelections(),G=W[0],K=W[W.length-1],Z=Ze(G.anchor,G.head)?G.anchor:G.head,se=Ze(K.anchor,K.head)?K.head:K.anchor;return[Z,se]},F=function(){var W=b.getCursor(),G=b.getCursor(),K=S.visualBlock;if(K){var Z=K.width,se=K.height;G=new Fe(W.line+se,W.ch+Z);for(var de=[],ke=W.line;ke<G.line;ke++){var Te=new Fe(ke,W.ch),Ce=new Fe(ke,G.ch),$e={anchor:Te,head:Ce};de.push($e)}b.setSelections(de)}else{var Be=S.anchorMark.find(),De=S.headMark.find(),et=De.line-Be.line,Ct=De.ch-Be.ch;G={line:G.line+et,ch:et?G.ch:Ct+G.ch},S.visualLine&&(W=new Fe(W.line,0),G=new Fe(G.line,Me(b,G.line))),b.setSelection(W,G)}return[W,G]};return M.visualMode?z():F()}function Gt(b,M){var S=M.sel.anchor,z=M.sel.head;M.lastPastedText&&(z=b.posFromIndex(b.indexFromPos(S)+M.lastPastedText.length),M.lastPastedText=null),M.lastSelection={anchorMark:b.setBookmark(S),headMark:b.setBookmark(z),anchor:ze(S),head:ze(z),visualMode:M.visualMode,visualLine:M.visualLine,visualBlock:M.visualBlock}}function Bn(b,M,S,z){var F=b.state.vim.sel,W=z?M:F.head,G=z?M:F.anchor,K;return Ze(S,M)&&(K=S,S=M,M=K),Ze(W,G)?(W=at(M,W),G=ct(G,S)):(G=at(M,G),W=ct(W,S),W=ee(W,0,-1),W.ch==-1&&W.line!=b.firstLine()&&(W=new Fe(W.line-1,Me(b,W.line-1)))),[G,W]}function $n(b,M,F){var z=b.state.vim;M=M||z.sel;var F=F||z.visualLine?"line":z.visualBlock?"block":"char",W=Nn(b,M,F);b.setSelections(W.ranges,W.primary)}function Nn(b,M,S,z){var F=ze(M.head),W=ze(M.anchor);if(S=="char"){var G=!z&&!Ze(M.head,M.anchor)?1:0,K=Ze(M.head,M.anchor)?1:0;return F=ee(M.head,0,G),W=ee(M.anchor,0,K),{ranges:[{anchor:W,head:F}],primary:0}}if(S=="line"){if(Ze(M.head,M.anchor))F.ch=0,W.ch=Me(b,W.line);else{W.ch=0;var Z=b.lastLine();F.line>Z&&(F.line=Z),F.ch=Me(b,F.line)}return{ranges:[{anchor:W,head:F}],primary:0}}if(S=="block"){var se=Math.min(W.line,F.line),de=W.ch,ke=Math.max(W.line,F.line),Te=F.ch;de<Te?Te+=1:de+=1;for(var Ce=ke-se+1,$e=F.line==se?0:Ce-1,Be=[],De=0;De<Ce;De++)Be.push({anchor:new Fe(se+De,de),head:new Fe(se+De,Te)});return{ranges:Be,primary:$e}}}function Un(b){var M=b.getCursor("head");return b.getSelection().length==1&&(M=at(M,b.getCursor("anchor"))),M}function Rn(b,M){var S=b.state.vim;M!==!1&&b.setCursor(he(b,S.sel.head)),Gt(b,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Ue.signal(b,"vim-mode-change",{mode:"normal"})}function Vn(b,M,S){var z=b.getRange(M,S);if(/\n\s*$/.test(z)){var F=z.split(`
1401
+ `);F.pop();for(var W,W=F.pop();F.length>0&&W&&m(W);W=F.pop())S.line--,S.ch=0;W?(S.line--,S.ch=Me(b,S.line)):S.ch=0}}function Xn(b,M,S){M.ch=0,S.ch=0,S.line++}function hn(b){if(!b)return 0;var M=b.search(/\S/);return M==-1?b.length:M}function Dn(b,M,S){var z=M.inclusive,F=M.innerWord,W=M.bigWord,G=M.noSymbol,K=M.multiline,Z=S||Un(b),se=b.getLine(Z.line),de=se,ke=Z.line,Te=ke,Ce=Z.ch,$e,Be=G?X[0]:xe[0];if(F&&/\s/.test(se.charAt(Ce)))Be=function(Wn){return/\s/.test(Wn)};else{for(;!Be(se.charAt(Ce));)if(Ce++,Ce>=se.length){if(!K)return null;Ce--,$e=ho(b,Z,!0,W,!0);break}W?Be=xe[0]:(Be=X[0],Be(se.charAt(Ce))||(Be=X[1]))}for(var De=Ce,et=Ce;Be(se.charAt(et))&&et>=0;)et--;if(et++,$e)De=$e.to,Te=$e.line,de=b.getLine(Te),!de&&De==0&&De++;else for(;Be(se.charAt(De))&&De<se.length;)De++;if(z){var Ct=De,ut=Z.ch<=et&&/\s/.test(se.charAt(Z.ch));if(!ut)for(;/\s/.test(de.charAt(De))&&De<de.length;)De++;if(Ct==De||ut){for(var dt=et;/\s/.test(se.charAt(et-1))&&et>0;)et--;!et&&!ut&&(et=dt)}}return{start:new Fe(ke,et),end:new Fe(Te,De)}}function Ti(b,M,S){var z=M;if(!Ue.findMatchingTag||!Ue.findEnclosingTag)return{start:z,end:z};var F=Ue.findMatchingTag(b,M)||Ue.findEnclosingTag(b,M);return!F||!F.open||!F.close?{start:z,end:z}:S?{start:F.open.from,end:F.close.to}:{start:F.open.to,end:F.close.from}}function Xr(b,M,S){qe(M,S)||Ve.jumpList.add(b,M,S)}function ei(b,M){Ve.lastCharacterSearch.increment=b,Ve.lastCharacterSearch.forward=M.forward,Ve.lastCharacterSearch.selectedCharacter=M.selectedCharacter}function Ei(b,M,S,z){var F=ze(b.getCursor()),W=S?1:-1,G=S?b.lineCount():-1,K=F.ch,Z=F.line,se=b.getLine(Z),de={lineText:se,nextCh:se.charAt(K),lastCh:null,index:K,symb:z,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[z],forward:S,depth:0,curMoveThrough:!1},ke=eo[z];if(!ke)return F;var Te=to[ke].init,Ce=to[ke].isComplete;for(Te&&Te(de);Z!==G&&M;){if(de.index+=W,de.nextCh=de.lineText.charAt(de.index),!de.nextCh){if(Z+=W,de.lineText=b.getLine(Z)||"",W>0)de.index=0;else{var $e=de.lineText.length;de.index=$e>0?$e-1:0}de.nextCh=de.lineText.charAt(de.index)}Ce(de)&&(F.line=Z,F.ch=de.index,M--)}return de.nextCh||de.curMoveThrough?new Fe(Z,de.index):F}function ho(b,M,S,z,F){var W=M.line,G=M.ch,K=b.getLine(W),Z=S?1:-1,se=z?xe:X;if(F&&K==""){if(W+=Z,K=b.getLine(W),!l(b,W))return null;G=S?0:K.length}for(;;){if(F&&K=="")return{from:0,to:0,line:W};for(var de=Z>0?K.length:-1,ke=de,Te=de;G!=de;){for(var Ce=!1,$e=0;$e<se.length&&!Ce;++$e)if(se[$e](K.charAt(G))){for(ke=G;G!=de&&se[$e](K.charAt(G));)G+=Z;if(Te=G,Ce=ke!=Te,ke==M.ch&&W==M.line&&Te==ke+Z)continue;return{from:Math.min(ke,Te+1),to:Math.max(ke,Te),line:W}}Ce||(G+=Z)}if(W+=Z,!l(b,W))return null;K=b.getLine(W),G=Z>0?0:K.length}}function mr(b,M,S,z,F,W){var G=ze(M),K=[];(z&&!F||!z&&F)&&S++;for(var Z=!z||!F,se=0;se<S;se++){var de=ho(b,M,z,W,Z);if(!de){var ke=Me(b,b.lastLine());K.push(z?{line:b.lastLine(),from:ke,to:ke}:{line:0,from:0,to:0});break}K.push(de),M=new Fe(de.line,z?de.to-1:de.from)}var Te=K.length!=S,Ce=K[0],$e=K.pop();return z&&!F?(!Te&&(Ce.from!=G.ch||Ce.line!=G.line)&&($e=K.pop()),new Fe($e.line,$e.from)):z&&F?new Fe($e.line,$e.to-1):!z&&F?(!Te&&(Ce.to!=G.ch||Ce.line!=G.line)&&($e=K.pop()),new Fe($e.line,$e.to)):new Fe($e.line,$e.from)}function Ki(b,M,S,z,F){var W=M,G=new Fe(W.line+S.repeat-1,1/0),K=b.clipPos(G);return K.ch--,F||(z.lastHPos=1/0,z.lastHSPos=b.charCoords(K,"div").left),G}function Fr(b,M,S,z,F){for(var W=F||b.getCursor(),G=W.ch,K,Z=0;Z<M;Z++){var se=b.getLine(W.line);if(K=Ws(G,se,z,S),K==-1)return null;G=K}return new Fe(b.getCursor().line,K)}function fo(b,M){var S=b.getCursor().line;return he(b,new Fe(S,M-1))}function ar(b,M,S,z){!x(S,Ie)&&!Ye.test(S)||(M.marks[S]&&M.marks[S].clear(),M.marks[S]=b.setBookmark(z))}function Ws(b,M,S,z,F){var W;return z?(W=M.indexOf(S,b+1),W!=-1):(W=M.lastIndexOf(S,b-1),W!=-1),W}function gs(b,M,S,z,F){function W(et){return!/\S/.test(b.getLine(et))}function G(et,Ct,ut){return ut?W(et)!=W(et+Ct):!W(et)&&W(et+Ct)}function K(et){z=z>0?1:-1;var Ct=b.ace.session.getFoldLine(et);Ct&&et+z>Ct.start.row&&et+z<Ct.end.row&&(z=(z>0?Ct.end.row:Ct.start.row)-et)}var Z=M.line,se=b.firstLine(),de=b.lastLine(),ke,Te,Ce=Z;if(z){for(;se<=Ce&&Ce<=de&&S>0;)K(Ce),G(Ce,z)&&S--,Ce+=z;return new Fe(Ce,0)}var $e=b.state.vim;if($e.visualLine&&G(Z,1,!0)){var Be=$e.sel.anchor;G(Be.line,-1,!0)&&(!F||Be.line!=Z)&&(Z+=1)}var De=W(Z);for(Ce=Z;Ce<=de&&S;Ce++)G(Ce,1,!0)&&(!F||W(Ce)!=De)&&S--;for(Te=new Fe(Ce,0),Ce>de&&!De?De=!0:F=!1,Ce=Z;Ce>se&&!((!F||W(Ce)==De||Ce==Z)&&G(Ce,-1,!0));Ce--);return ke=new Fe(Ce,0),{start:ke,end:Te}}function Ko(b,M,S,z,F){function W(se){se.pos+se.dir<0||se.pos+se.dir>=se.line.length?se.line=null:se.pos+=se.dir}function G(se,de,ke,Te){var Ce=se.getLine(de),$e={line:Ce,ln:de,pos:ke,dir:Te};if($e.line==="")return{ln:$e.ln,pos:$e.pos};var Be=$e.pos;for(W($e);$e.line!==null;){if(Be=$e.pos,w($e.line[$e.pos])){if(!F)return{ln:$e.ln,pos:$e.pos+1};for(W($e);$e.line!==null&&m($e.line[$e.pos]);)Be=$e.pos,W($e);return{ln:$e.ln,pos:Be+1}}W($e)}return{ln:$e.ln,pos:Be+1}}function K(se,de,ke,Te){var Ce=se.getLine(de),$e={line:Ce,ln:de,pos:ke,dir:Te};if($e.line==="")return{ln:$e.ln,pos:$e.pos};var Be=$e.pos;for(W($e);$e.line!==null;){if(!m($e.line[$e.pos])&&!w($e.line[$e.pos]))Be=$e.pos;else if(w($e.line[$e.pos]))return F?m($e.line[$e.pos+1])?{ln:$e.ln,pos:$e.pos+1}:{ln:$e.ln,pos:Be}:{ln:$e.ln,pos:Be};W($e)}return $e.line=Ce,F&&m($e.line[$e.pos])?{ln:$e.ln,pos:$e.pos}:{ln:$e.ln,pos:Be}}for(var Z={ln:M.line,pos:M.ch};S>0;)z<0?Z=K(b,Z.ln,Z.pos,z):Z=G(b,Z.ln,Z.pos,z),S--;return new Fe(Z.ln,Z.pos)}function Mi(b,M,S,z){function F(Z,se){if(se.pos+se.dir<0||se.pos+se.dir>=se.line.length){if(se.ln+=se.dir,!l(Z,se.ln)){se.line=null,se.ln=null,se.pos=null;return}se.line=Z.getLine(se.ln),se.pos=se.dir>0?0:se.line.length-1}else se.pos+=se.dir}function W(Z,se,de,ke){var De=Z.getLine(se),Te=De==="",Ce={line:De,ln:se,pos:de,dir:ke},$e={ln:Ce.ln,pos:Ce.pos},Be=Ce.line==="";for(F(Z,Ce);Ce.line!==null;){if($e.ln=Ce.ln,$e.pos=Ce.pos,Ce.line===""&&!Be)return{ln:Ce.ln,pos:Ce.pos};if(Te&&Ce.line!==""&&!m(Ce.line[Ce.pos]))return{ln:Ce.ln,pos:Ce.pos};w(Ce.line[Ce.pos])&&!Te&&(Ce.pos===Ce.line.length-1||m(Ce.line[Ce.pos+1]))&&(Te=!0),F(Z,Ce)}var De=Z.getLine($e.ln);$e.pos=0;for(var et=De.length-1;et>=0;--et)if(!m(De[et])){$e.pos=et;break}return $e}function G(Z,se,de,ke){var Be=Z.getLine(se),Te={line:Be,ln:se,pos:de,dir:ke},Ce={ln:Te.ln,pos:null},$e=Te.line==="";for(F(Z,Te);Te.line!==null;){if(Te.line===""&&!$e)return Ce.pos!==null?Ce:{ln:Te.ln,pos:Te.pos};if(!(!w(Te.line[Te.pos])||Ce.pos===null||Te.ln===Ce.ln&&Te.pos+1===Ce.pos))return Ce;Te.line!==""&&!m(Te.line[Te.pos])&&($e=!1,Ce={ln:Te.ln,pos:Te.pos}),F(Z,Te)}var Be=Z.getLine(Ce.ln);Ce.pos=0;for(var De=0;De<Be.length;++De)if(!m(Be[De])){Ce.pos=De;break}return Ce}for(var K={ln:M.line,pos:M.ch};S>0;)z<0?K=G(b,K.ln,K.pos,z):K=W(b,K.ln,K.pos,z),S--;return new Fe(K.ln,K.pos)}function Gn(b,M,S,z){var F=M,W,G,K={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Z={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],se=b.getLine(F.line).charAt(F.ch),de=se===Z?1:0;if(W=b.scanForBracket(new Fe(F.line,F.ch+de),-1,void 0,{bracketRegex:K}),G=b.scanForBracket(new Fe(F.line,F.ch+de),1,void 0,{bracketRegex:K}),!W||!G)return null;if(W=W.pos,G=G.pos,W.line==G.line&&W.ch>G.ch||W.line>G.line){var ke=W;W=G,G=ke}return z?G.ch+=1:W.ch+=1,{start:W,end:G}}function Ar(b,M,S,z){var F=ze(M),W=b.getLine(F.line),G=W.split(""),K,Z,se,de,ke=G.indexOf(S);if(F.ch<ke)F.ch=ke;else if(ke<F.ch&&G[F.ch]==S){var Te=/string/.test(b.getTokenTypeAt(ee(M,0,1))),Ce=/string/.test(b.getTokenTypeAt(M)),$e=Te&&!Ce;$e||(Z=F.ch,--F.ch)}if(G[F.ch]==S&&!Z)K=F.ch+1;else for(se=F.ch;se>-1&&!K;se--)G[se]==S&&(K=se+1);if(K&&!Z)for(se=K,de=G.length;se<de&&!Z;se++)G[se]==S&&(Z=se);return!K||!Z?{start:F,end:F}:(z&&(--K,++Z),{start:new Fe(F.line,K),end:new Fe(F.line,Z)})}function Lr(){}function gn(b){var M=b.state.vim;return M.searchState_||(M.searchState_=new Lr)}function Fn(b){return hi(b,"/")}function Ii(b){return ms(b,"/")}function hi(b,M){var S=ms(b,M)||[];if(!S.length)return[];var z=[];if(S[0]===0){for(var F=0;F<S.length;F++)typeof S[F]=="number"&&z.push(b.substring(S[F]+1,S[F+1]));return z}}function ms(b,M){M||(M="/");for(var S=!1,z=[],F=0;F<b.length;F++){var W=b.charAt(F);!S&&W==M&&z.push(F),S=!S&&W=="\\"}return z}function vs(b){for(var M="|(){",S="}",z=!1,F=[],W=-1;W<b.length;W++){var G=b.charAt(W)||"",K=b.charAt(W+1)||"",Z=K&&M.indexOf(K)!=-1;z?((G!=="\\"||!Z)&&F.push(G),z=!1):G==="\\"?(z=!0,K&&S.indexOf(K)!=-1&&(Z=!0),(!Z||K==="\\")&&F.push(G)):(F.push(G),Z&&K!=="\\"&&F.push("\\"))}return F.join("")}function ys(b){for(var M=!1,S=[],z=-1;z<b.length;z++){var F=b.charAt(z)||"",W=b.charAt(z+1)||"";xo[F+W]?(S.push(xo[F+W]),z++):M?(S.push(F),M=!1):F==="\\"?(M=!0,o(W)||W==="$"?S.push("$"):W!=="/"&&W!=="\\"&&S.push("\\")):(F==="$"&&S.push("$"),S.push(F),W==="/"&&S.push("\\"))}return S.join("")}function bs(b){for(var M=new Ue.StringStream(b),S=[];!M.eol();){for(;M.peek()&&M.peek()!="\\";)S.push(M.next());var z=!1;for(var F in Ta)if(M.match(F,!0)){z=!0,S.push(Ta[F]);break}z||S.push(M.next())}return S.join("")}function di(b,M,S){var z=Ve.registerController.getRegister("/");if(z.setText(b),b instanceof RegExp)return b;var F=Ii(b),W,G;if(!F.length)W=b;else{W=b.substring(0,F[0]);var K=b.substring(F[0]);G=K.indexOf("i")!=-1}if(!W)return null;_("pcre")||(W=vs(W)),S&&(M=/^[^A-Z]*$/.test(W));var Z=new RegExp(W,M||G?"im":"m");return Z}function Ri(b){typeof b=="string"&&(b=document.createElement(b));for(var M,S=1;S<arguments.length;S++)if(M=arguments[S])if(typeof M!="object"&&(M=document.createTextNode(M)),M.nodeType)b.appendChild(M);else for(var z in M)Object.prototype.hasOwnProperty.call(M,z)&&(z[0]==="$"?b.style[z.slice(1)]=M[z]:b.setAttribute(z,M[z]));return b}function Dt(b,M){var S=Ri("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},M);b.openNotification?b.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function Hs(b,M){return Ri("div",{$display:"flex"},Ri("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,Ri("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),M&&Ri("span",{$color:"#888"},M))}function Or(b,M){if(an.length){M.value||(M.value=""),qt=M;return}var S=Hs(M.prefix,M.desc);if(b.openDialog)b.openDialog(S,M.onClose,{onKeyDown:M.onKeyDown,onKeyUp:M.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:M.value});else{var z="";typeof M.prefix!="string"&&M.prefix&&(z+=M.prefix.textContent),M.desc&&(z+=" "+M.desc),M.onClose(prompt(z,""))}}function Pt(b,M){if(b instanceof RegExp&&M instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],z=0;z<S.length;z++){var F=S[z];if(b[F]!==M[F])return!1}return!0}return!1}function dn(b,M,S,z){if(M){var F=gn(b),W=di(M,!!S,!!z);if(W)return po(b,W),Pt(W,F.getQuery())||F.setQuery(W),W}}function qn(b){if(b.source.charAt(0)=="^")var M=!0;return{token:function(S){if(M&&!S.sol()){S.skipToEnd();return}var z=S.match(b,!1);if(z)return z[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!b.exec(S.next()+z[0]))?(S.next(),null):(S.match(b),"searching");for(;!S.eol()&&(S.next(),!S.match(b,!1)););},query:b}}function po(b,M){clearTimeout(wn);var S=gn(b);S.highlightTimeout=wn,wn=setTimeout(function(){if(b.state.vim){var z=gn(b);z.highlightTimeout=null;var F=z.getOverlay();(!F||M!=F.query)&&(F&&b.removeOverlay(F),F=qn(M),b.addOverlay(F),b.showMatchesOnScrollbar&&(z.getScrollbarAnnotate()&&z.getScrollbarAnnotate().clear(),z.setScrollbarAnnotate(b.showMatchesOnScrollbar(M))),z.setOverlay(F))}},50)}function er(b,M,S,z){return z===void 0&&(z=1),b.operation(function(){for(var F=b.getCursor(),W=b.getSearchCursor(S,F),G=0;G<z;G++){var K=W.find(M);if(G==0&&K&&qe(W.from(),F)){var Z=M?W.from():W.to();K=W.find(M),K&&!K[0]&&qe(W.from(),Z)&&b.getLine(Z.line).length==Z.ch&&(K=W.find(M))}if(!K&&(W=b.getSearchCursor(S,M?new Fe(b.lastLine()):new Fe(b.firstLine(),0)),!W.find(M)))return}return W.from()})}function go(b,M,S,z,F){return z===void 0&&(z=1),b.operation(function(){var W=b.getCursor(),G=b.getSearchCursor(S,W),K=G.find(!M);!F.visualMode&&K&&qe(G.from(),W)&&G.find(!M);for(var Z=0;Z<z;Z++)if(K=G.find(M),!K&&(G=b.getSearchCursor(S,M?new Fe(b.lastLine()):new Fe(b.firstLine(),0)),!G.find(M)))return;return[G.from(),G.to()]})}function Li(b){var M=gn(b);M.highlightTimeout&&(clearTimeout(M.highlightTimeout),M.highlightTimeout=null),b.removeOverlay(gn(b).getOverlay()),M.setOverlay(null),M.getScrollbarAnnotate()&&(M.getScrollbarAnnotate().clear(),M.setScrollbarAnnotate(null))}function ws(b,M,S){return typeof b!="number"&&(b=b.line),M instanceof Array?x(b,M):typeof S=="number"?b>=M&&b<=S:b==M}function mo(b){var M=b.ace.renderer;return{top:M.getFirstFullyVisibleRow(),bottom:M.getLastFullyVisibleRow()}}function fi(b,M,S){if(S=="'"||S=="`")return Ve.jumpList.find(b,-1)||new Fe(0,0);if(S==".")return Do(b);var z=M.marks[S];return z&&z.find()}function Do(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var M=b.doc.history.done,S=M.length;S--;)if(M[S].changes)return ze(M[S].changes[0].to)}function ti(b,M,S,z,F,W,G,K,Z){function se(){b.operation(function(){for(;!Be;)de(),Te();Ce()})}function de(){var ut=b.getRange(W.from(),W.to()),dt=ut.replace(G,K),Wn=W.to().line;W.replace(dt),et=W.to().line,F+=et-Wn,Ct=et<Wn}function ke(){var ut=De&&ze(W.to()),dt=W.findNext();return dt&&!dt[0]&&ut&&qe(W.from(),ut)&&(dt=W.findNext()),dt}function Te(){for(;ke()&&ws(W.from(),z,F);)if(!(!S&&W.from().line==et&&!Ct)){b.scrollIntoView(W.from(),30),b.setSelection(W.from(),W.to()),De=W.from(),Be=!1;return}Be=!0}function Ce(ut){if(ut&&ut(),b.focus(),De){b.setCursor(De);var dt=b.state.vim;dt.exMode=!1,dt.lastHPos=dt.lastHSPos=De.ch}Z&&Z()}function $e(ut,dt,Wn){Ue.e_stop(ut);var Rt=B(ut);switch(Rt){case"y":de(),Te();break;case"n":Te();break;case"a":var ln=Z;Z=void 0,b.operation(se),Z=ln;break;case"l":de();case"q":case"<Esc>":case"<C-c>":case"<C-[>":Ce(Wn)}return Be&&Ce(Wn),!0}b.state.vim.exMode=!0;var Be=!1,De,et,Ct;if(Te(),Be){Dt(b,"No matches for "+G.source);return}if(!M){se(),Z&&Z();return}Or(b,{prefix:Ri("span","replace with ",Ri("strong",K)," (y/n/a/q/l)"),onKeyDown:$e})}function Nr(b,M){var S=b.state.vim,z=Ve.macroModeState,F=Ve.registerController.getRegister("."),W=z.isPlaying,G=z.lastInsertModeChanges;W||(b.off("change",Qo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Ue.off(b.getInputField(),"keydown",Bo)),!W&&S.insertModeRepeat>1&&(Cs(b,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,M||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),F.setText(G.changes.join("")),Ue.signal(b,"vim-mode-change",{mode:"normal"}),z.isRecording&&tr(z)}function vo(b){jn.unshift(b)}function Oi(b,M,S,z,F){var W={keys:b,type:M};W[M]=S,W[M+"Args"]=z;for(var G in F)W[G]=F[G];vo(W)}function Jo(b,M,S,z){var F=Ve.registerController.getRegister(z);if(z==":"){F.keyBuffer[0]&&ii.processCommand(b,F.keyBuffer[0]),S.isPlaying=!1;return}var W=F.keyBuffer,G=0;S.isPlaying=!0,S.replaySearchQueries=F.searchQueries.slice(0);for(var K=0;K<W.length;K++)for(var Z=W[K],se,de;Z;)if(se=/<\w+-.+?>|<\w+>|./.exec(Z),de=se[0],Z=Z.substring(se.index+de.length),wt.handleKey(b,de,"macro"),M.insertMode){var ke=F.insertModeChanges[G++].changes;Ve.macroModeState.lastInsertModeChanges.changes=ke,es(b,ke,1),Nr(b)}S.isPlaying=!1}function Po(b,M){if(!b.isPlaying){var S=b.latestRegister,z=Ve.registerController.getRegister(S);z&&z.pushText(M)}}function tr(b){if(!b.isPlaying){var M=b.latestRegister,S=Ve.registerController.getRegister(M);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(b.lastInsertModeChanges)}}function zo(b,M){if(!b.isPlaying){var S=b.latestRegister,z=Ve.registerController.getRegister(S);z&&z.pushSearchQuery&&z.pushSearchQuery(M)}}function Qo(b,M){var S=Ve.macroModeState,z=S.lastInsertModeChanges;if(!S.isPlaying)for(var F=b.state.vim;M;){if(z.expectCursorActivityForChange=!0,z.ignoreCount>1)z.ignoreCount--;else if(M.origin=="+input"||M.origin=="paste"||M.origin===void 0){var W=b.listSelections().length;W>1&&(z.ignoreCount=W);var G=M.text.join(`
1402
+ `);if(z.maybeReset&&(z.changes=[],z.maybeReset=!1),G)if(b.state.overwrite&&!/\n/.test(G))z.changes.push([G]);else{if(G.length>1){var K=F&&F.insertEnd&&F.insertEnd.find(),Z=b.getCursor();if(K&&K.line==Z.line){var se=K.ch-Z.ch;se>0&&se<G.length&&(z.changes.push([G,se]),G="")}}G&&z.changes.push(G)}}M=M.next}}function Ji(b){var M=b.state.vim;if(M.insertMode){var S=Ve.macroModeState;if(S.isPlaying)return;var z=S.lastInsertModeChanges;z.expectCursorActivityForChange?z.expectCursorActivityForChange=!1:(z.maybeReset=!0,M.insertEnd&&M.insertEnd.clear(),M.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||xs(b,M)}function xs(b,M,S){var z=b.getCursor("anchor"),F=b.getCursor("head");if(M.visualMode&&!b.somethingSelected()?Rn(b,!1):!M.visualMode&&!M.insertMode&&b.somethingSelected()&&(M.visualMode=!0,M.visualLine=!1,Ue.signal(b,"vim-mode-change",{mode:"visual"})),M.visualMode){var W=Ze(F,z)?0:-1,G=Ze(F,z)?-1:0;F=ee(F,0,W),z=ee(z,0,G),M.sel={anchor:z,head:F},ar(b,M,"<",at(F,z)),ar(b,M,">",ct(F,z))}else!M.insertMode&&!S&&(M.lastHPos=b.getCursor().ch)}function Zo(b,M){this.keyName=b,this.key=M.key,this.ctrlKey=M.ctrlKey,this.altKey=M.altKey,this.metaKey=M.metaKey,this.shiftKey=M.shiftKey}function Bo(b){var M=Ve.macroModeState,S=M.lastInsertModeChanges,z=Ue.keyName?Ue.keyName(b):b.key;z&&(z.indexOf("Delete")!=-1||z.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new Zo(z,b)))}function Cs(b,M,S,z){function F(){K?Xi.processAction(b,M,M.lastEditActionCommand):Xi.evalInput(b,M)}function W(de){if(G.lastInsertModeChanges.changes.length>0){de=M.lastEditActionCommand?de:1;var ke=G.lastInsertModeChanges;es(b,ke.changes,de)}}var G=Ve.macroModeState;G.isPlaying=!0;var K=!!M.lastEditActionCommand,Z=M.inputState;if(M.inputState=M.lastEditInputState,K&&M.lastEditActionCommand.interlaceInsertRepeat)for(var se=0;se<S;se++)F(),W(1);else z||F(),W(S);M.inputState=Z,M.insertMode&&!z&&Nr(b),G.isPlaying=!1}function Xo(b,M){Ue.lookupKey(M,"vim-insert",function(S){return typeof S=="string"?Ue.commands[S](b):S(b),!0})}function es(b,M,S){var z=b.getCursor("head"),F=Ve.macroModeState.lastInsertModeChanges.visualBlock;F&&(An(b,z,F+1),S=b.listSelections().length,b.setCursor(z));for(var W=0;W<S;W++){F&&b.setCursor(ee(z,W,0));for(var G=0;G<M.length;G++){var K=M[G];if(K instanceof Zo)Xo(b,K.keyName);else if(typeof K=="string")b.replaceSelection(K);else{var Z=b.getCursor(),se=ee(Z,0,K[0].length-(K[1]||0));b.replaceRange(K[0],Z,K[1]?Z:se),b.setCursor(se)}}}F&&b.setCursor(ee(z,0,1))}function ks(b,M,S,z){M.length>1&&M[0]=="n"&&(M=M.replace("numpad","")),M=os[M]||M;var F="";if(S.ctrlKey&&(F+="C-"),S.altKey&&(F+="A-"),(F||M.length>1)&&S.shiftKey&&(F+="S-"),z&&!z.expectLiteralNext&&M.length==1){if(Sn.keymap&&M in Sn.keymap)(Sn.remapCtrl!==!1||!F)&&(M=Sn.keymap[M]);else if(M.charCodeAt(0)>255){var W=S.code&&S.code.slice(-1)||"";S.shiftKey||(W=W.toLowerCase()),W&&(M=W)}}return F+=M,F.length>1&&(F="<"+F+">"),F}function Ni(b){var M=new b.constructor;return Object.keys(b).forEach(function(S){if(S!="insertEnd"){var z=b[S];Array.isArray(z)?z=z.slice():z&&typeof z=="object"&&z.constructor!=Object&&(z=Ni(z)),M[S]=z}}),b.sel&&(M.sel={head:b.sel.head&&ze(b.sel.head),anchor:b.sel.anchor&&ze(b.sel.anchor)}),M}function Qi(b,M,S){var z=!1,F=wt.maybeInitVimState_(b),W=F.visualBlock||F.wasInVisualBlock,G=b.ace.inMultiSelectMode;if(F.wasInVisualBlock&&!G?F.wasInVisualBlock=!1:G&&F.visualBlock&&(F.wasInVisualBlock=!0),M=="<Esc>"&&!F.insertMode&&!F.visualMode&&G)b.ace.exitMultiSelectMode();else if(W||!G||b.ace.inVirtualSelectionMode)z=wt.handleKey(b,M,S);else{var K=Ni(F),Z=F.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var se=0;b.ace.forEachSelection(function(){var de=b.ace.selection;b.state.vim.lastHPos=de.$desiredColumn==null?de.lead.column:de.$desiredColumn,b.state.vim.inputState.changeQueue=Z[se];var ke=b.getCursor("head"),Te=b.getCursor("anchor"),Ce=Ze(ke,Te)?0:-1,$e=Ze(ke,Te)?-1:0;ke=ee(ke,0,Ce),Te=ee(Te,0,$e),b.state.vim.sel.head=ke,b.state.vim.sel.anchor=Te,z=Wr(b,M,S),de.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(Z[se]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=Ni(K)),se++}),b.curOp.cursorActivity&&!z&&(b.curOp.cursorActivity=!1),F.status=b.state.vim.status,b.state.vim=F,F.inputState.changeQueueList=Z,F.inputState.changeQueue=null},!0)}return z&&!F.visualMode&&!F.insert&&F.visualMode!=b.somethingSelected()&&xs(b,F,!0),z}function pi(b,M){M.off("beforeEndOperation",pi);var S=M.state.cm.vimCmd;S&&M.execCommand(S.exec?S:S.name,S.args),M.curOp=M.prevOp}var rr=t("../range").Range,yo=t("../lib/event_emitter").EventEmitter,Yn=t("../lib/dom"),bo=t("../lib/oop"),Dr=t("../lib/keys"),ts=t("../lib/event"),ni=t("../search").Search,Fo=t("../lib/useragent"),jo=t("../search_highlight").SearchHighlight,jr=t("../commands/multi_select_commands"),ns=t("../mode/text").Mode.prototype.tokenRe,Zi=t("../ext/hardwrap").hardWrap;t("../multi_select");var Ue=function(b){this.ace=b,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)};Ue.Pos=function(b,M){if(!(this instanceof Fe))return new Fe(b,M);this.line=b,this.ch=M},Ue.defineOption=function(b,M,S){},Ue.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
1403
+ `)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},Ue.keyMap={},Ue.addClass=Ue.rmClass=function(){},Ue.e_stop=Ue.e_preventDefault=ts.stopEvent,Ue.keyName=function(b){var M=Dr[b.keyCode]||b.key||"";return M.length==1&&(M=M.toUpperCase()),M=ts.getModifierString(b).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+M,M},Ue.keyMap.default=function(b){return function(M){var S=M.ace.commands.commandKeyBinding[b.toLowerCase()];return S&&M.ace.execCommand(S)!==!1}},Ue.lookupKey=function b(M,S,z){S||(S="default"),typeof S=="string"&&(S=Ue.keyMap[S]||Ue.keyMap.default);var F=typeof S=="function"?S(M):S[M];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&z(F))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return b(M,S.fallthrough,z);for(var W=0;W<S.fallthrough.length;W++){var G=b(M,S.fallthrough[W],z);if(G)return G}}},Ue.findMatchingTag=function(b,M){return b.findMatchingTag(M)},Ue.findEnclosingTag=function(b,M){},Ue.signal=function(b,M,S){return b._signal(M,S)},Ue.on=ts.addListener,Ue.off=ts.removeListener,Ue.isWordChar=function(b){return b<""?/^\w$/.test(b):(ns.lastIndex=0,ns.test(b))},(function(){bo.implement(Ue.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 z={text:S.action[0]=="i"?S.lines:[]},F=this.curOp=this.curOp||{};F.changeHandlers||(F.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),F.lastChange?F.lastChange.next=F.lastChange=z:F.lastChange=F.change=z,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(jr.keyboardHandler)},this.operation=function(S,z){if(!z&&this.curOp||z&&this.curOp&&this.curOp.force)return S();if((z||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var F=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var W=this.curOp=this.curOp||{};this.curOp.force=z;var G=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(),!W.cursorActivity&&!W.lastChange&&F&&(this.ace.prevOp=F)),(z||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),G},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,z,F){var W=F?F[S+"Handlers"]:(this._eventRegistry||{})[S];if(W){W=W.slice();for(var G=0;G<W.length;G++)W[G](this,z)}},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,z){typeof S=="object"&&(z=S.ch,S=S.line);var F=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:z}),this.ace.selection.moveTo(S,z),F&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var z=this.ace.selection,F=S=="anchor"?z.isEmpty()?z.lead:z.anchor:S=="head"||!S?z.lead:z.getRange()[S];return g(F)},this.listSelections=function(S){var z=this.ace.multiSelect.rangeList.ranges;return!z.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:z.map(function(F){return{anchor:this.clipPos(g(F.cursor==F.end?F.start:F.end)),head:this.clipPos(g(F.cursor))}},this)},this.setSelections=function(S,z){var F=this.ace.multiSelect,W=S.map(function(se){var de=h(se.anchor),ke=h(se.head),Te=rr.comparePoints(de,ke)<0?new rr.fromPoints(de,ke):new rr.fromPoints(ke,de);return Te.cursor=rr.comparePoints(Te.start,ke)?Te.end:Te.start,Te});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(W[0]);return}z?W[z]&&W.push(W.splice(z,1)[0]):W=W.reverse(),F.toSingleRange(W[0].clone());for(var G=this.ace.session,K=0;K<W.length;K++){var Z=G.$clipRangeToDocument(W[K]);F.addRange(Z)}},this.setSelection=function(S,z,F){var W=this.ace.selection;W.moveTo(S.line,S.ch),W.selectTo(z.line,z.ch),F&&F.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var z=this.ace.session.$clipPositionToDocument(S.line,S.ch);return g(z)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var z=S.action=="insert",F=S.start,W=S.end,G=(W.row-F.row)*(z?1:-1),K=(W.column-F.column)*(z?1:-1);z&&(W=F);for(var Z in this.marks){var se=this.marks[Z],de=rr.comparePoints(se,F);if(!(de<0)){if(de===0&&z)if(!se.$insertRight)de=1;else{if(se.bias!=1){se.bias=-1;continue}de=1}var ke=z?de:rr.comparePoints(se,W);if(ke>0){se.row+=G,se.column+=se.row==W.row?K:0;continue}!z&&ke<=0&&(se.row=F.row,se.column=F.column,ke===0&&(se.bias=1))}}};var b=function(S,z,F,W){this.cm=S,this.id=z,this.row=F,this.column=W,S.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return g(this)},this.setBookmark=function(S,z){var F=new b(this,this.$uid++,S.line,S.ch);return(!z||!z.insertLeft)&&(F.$insertRight=!0),this.marks[F.id]=F,F},this.moveH=function(S,z){if(z=="char"){var F=this.ace.selection;F.clearSelection(),F.moveCursorBy(0,S)}},this.findPosV=function(S,z,F,W){if(F=="page"){var G=this.ace.renderer,K=G.layerConfig;z*=Math.floor(K.height/K.lineHeight),F="line"}if(F=="line"){var Z=this.ace.session.documentToScreenPosition(S.line,S.ch);W!=null&&(Z.column=W),Z.row+=z,Z.row=Math.min(Math.max(0,Z.row),this.ace.session.getScreenLength()-1);var se=this.ace.session.screenToDocumentPosition(Z.row,Z.column);return g(se)}debugger},this.charCoords=function(S,z){if(z=="div"||!z){var F=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:F.column,top:F.row}}if(z=="local"){var W=this.ace.renderer,F=this.ace.session.documentToScreenPosition(S.line,S.ch),G=W.layerConfig.lineHeight,K=W.layerConfig.characterWidth,Z=G*F.row;return{left:F.column*K,top:Z,bottom:Z+G}}},this.coordsChar=function(S,z){var F=this.ace.renderer;if(z=="local"){var W=Math.max(0,Math.floor(S.top/F.lineHeight)),G=Math.max(0,Math.floor(S.left/F.characterWidth)),K=F.session.screenToDocumentPosition(W,G);return g(K)}if(z=="div")throw"not implemented"},this.getSearchCursor=function(S,z,F){var W=!1,G=!1;S instanceof RegExp&&!S.global&&(W=!S.ignoreCase,S=S.source,G=!0),S=="\\n"&&(S=`
1404
+ `,G=!1);var K=new ni;z.ch==null&&(z.ch=Number.MAX_VALUE);var Z={row:z.line,column:z.ch},se=this,de=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ke){K.setOptions({needle:S,caseSensitive:W,wrap:!1,backwards:ke,regExp:G,start:de||Z});var Te=K.find(se.ace.session);return de=Te,de&&[!de.isEmpty()]},from:function(){return de&&g(de.start)},to:function(){return de&&g(de.end)},replace:function(ke){de&&(de.end=se.ace.session.doc.replace(de,ke))}}},this.scrollTo=function(S,z){var F=this.ace.renderer,W=F.layerConfig,G=W.maxHeight;G-=(F.$size.scrollerHeight-F.lineHeight)*F.$scrollPastEnd,z!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(z,G))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,W.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,z){if(S){var F=this.ace.renderer,W={top:0,bottom:z};F.scrollCursorIntoView(h(S),F.lineHeight*2/F.$size.scrollerHeight,W)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,z){return this.ace.session.getTextRange(new rr(S.line,S.ch,z.line,z.ch))},this.replaceRange=function(S,z,F){F||(F=z);var W=new rr(z.line,z.ch,F.line,F.ch);return this.ace.session.$clipRangeToDocument(W),this.ace.session.replace(W,S)},this.replaceSelection=this.replaceSelections=function(S){var z=Array.isArray(S)&&S,F=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(F.getRange(),z?S[0]||"":S);return}F.inVirtualSelectionMode=!0;var W=F.rangeList.ranges;W.length||(W=[this.ace.multiSelect.getRange()]);for(var G=W.length;G--;)this.ace.session.replace(W[G],z?S[G]||"":S);F.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 M={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,z){switch(this.state[S]=z,S){case"indentWithTabs":S=M[S],z=!z;break;case"keyMap":this.state.$keyMap=z;return;default:S=M[S]}S&&this.ace.setOption(S,z)},this.getOption=function(S){var z,F=M[S];switch(F&&(z=this.ace.getOption(F)),S){case"indentWithTabs":return S=M[S],!z;case"keyMap":return this.state.$keyMap||"vim"}return F?z: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 z=new jo(null,"ace_highlight-marker","text"),F=this.ace.session.addDynamicMarker(z);z.id=F.id,z.session=this.ace.session,z.destroy=function(G){z.session.off("change",z.updateOnChange),z.session.off("changeEditor",z.destroy),z.session.removeMarker(z.id),z.session=null},z.updateOnChange=function(G){var K=G.start.row;K==G.end.row?z.cache[K]=void 0:z.cache.splice(K,z.cache.length)},z.session.on("changeEditor",z.destroy),z.session.on("change",z.updateOnChange)}var W=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=z,this.$searchHighlight.setRegexp(W),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,z=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:z.maxHeight,width:z.width,clientHeight:z.height,clientWidth:z.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var z=this.ace.session.getTokenAt(S.line,S.ch);return z&&/comment|string/.test(z.type)?"string":""},this.findMatchingBracket=function(S){var z=this.ace.session.findMatchingBracket(h(S));return{to:z&&g(z)}},this.findMatchingTag=function(S){var z=this.ace.session.getMatchingTags(h(S));if(z)return{open:{from:g(z.openTag.start),to:g(z.openTag.end)},close:{from:g(z.closeTag.start),to:g(z.closeTag.end)}}},this.indentLine=function(S,z){z===!0?this.ace.session.indentRows(S,S," "):z===!1&&this.ace.session.outdentRows(new rr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(h(S))},this.posFromIndex=function(S){return g(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,z,F,W){var G=W.bracketRegex.source,K=/paren|text|operator|tag/;if(z==1)var Z=this.ace.session.$findClosingBracket(G.slice(1,2),h(S),K);else{var Z=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:S.line,column:S.ch+1},K);!Z&&W.bracketRegex&&W.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Z={row:S.line,column:S.ch-1})}return Z&&{pos:g(Z)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Ue.commands.hasOwnProperty(S))return Ue.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var z=this.$lineHandleChanges;if(!z)return null;for(var F=S.row,W=0;W<z.length;W++){var G=z[W];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<F&&(F+=G.end.row-G.start.row);else if(G.start.row<F){if(F<G.end.row||F==G.end.row&&G.start.column>0)return null;F-=G.end.row-G.start.row}}}return F},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 g(S.$lastDelta.end)}}).call(Ue.prototype);var rs=Ue.StringStream=function(b,M){this.pos=this.start=0,this.string=b,this.tabSize=M||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};rs.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(b){var M=this.string.charAt(this.pos);if(typeof b=="string")var S=M==b;else var S=M&&(b.test?b.test(M):b(M));if(S)return++this.pos,M},eatWhile:function(b){for(var M=this.pos;this.eat(b););return this.pos>M},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var M=this.string.indexOf(b,this.pos);if(M>-1)return this.pos=M,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,M,S){if(typeof b!="string"){var z=this.string.slice(this.pos).match(b);return z&&z.index>0?null:(z&&M!==!1&&(this.pos+=z[0].length),z)}var F=function(G){return S?G.toLowerCase():G},W=this.string.substr(this.pos,b.length);if(F(W)==F(b))return M!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,M){this.lineStart+=b;try{return M()}finally{this.lineStart-=b}}},Ue.defineExtension=function(b,M){Ue.prototype[b]=M},Yn.importCssString(`.normal-mode .ace_cursor{
1405
+ border: none;
1406
+ background-color: rgba(255,0,0,0.5);
1407
+ }
1408
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1409
+ background-color: transparent;
1410
+ border: 1px solid red;
1411
+ opacity: 0.7
1412
+ }
1413
+ .ace_dialog {
1414
+ position: absolute;
1415
+ left: 0; right: 0;
1416
+ background: inherit;
1417
+ z-index: 15;
1418
+ padding: .1em .8em;
1419
+ overflow: hidden;
1420
+ color: inherit;
1421
+ }
1422
+ .ace_dialog-top {
1423
+ border-bottom: 1px solid #444;
1424
+ top: 0;
1425
+ }
1426
+ .ace_dialog-bottom {
1427
+ border-top: 1px solid #444;
1428
+ bottom: 0;
1429
+ }
1430
+ .ace_dialog input {
1431
+ border: none;
1432
+ outline: none;
1433
+ background: transparent;
1434
+ width: 20em;
1435
+ color: inherit;
1436
+ font-family: monospace;
1437
+ }`,"vimMode",!1),(function(){function b(S,z,F){var W=S.ace.container,G;return G=W.appendChild(document.createElement("div")),F?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof z=="string"?G.innerHTML=z:G.appendChild(z),G}function M(S,z){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=z}Ue.defineExtension("openDialog",function(S,z,F){function W(ke){if(typeof ke=="string")se.value=ke;else{if(K||ke&&ke.type=="blur"&&document.activeElement===se)return;Z.state.dialog==G&&(Z.state.dialog=null,Z.focus()),K=!0,G.remove(),F.onClose&&F.onClose(G);var Te=Z;Te.state.vim&&(Te.state.vim.status=null,Te.ace._signal("changeStatus"),Te.ace.renderer.$loop.schedule(Te.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){F||(F={}),M(this,null);var G=b(this,S,F.bottom),K=!1,Z=this;this.state.dialog=G;var se=G.getElementsByTagName("input")[0],de;return se?(F.value&&(se.value=F.value,F.selectValueOnOpen!==!1&&se.select()),F.onInput&&Ue.on(se,"input",function(ke){F.onInput(ke,se.value,W)}),F.onKeyUp&&Ue.on(se,"keyup",function(ke){F.onKeyUp(ke,se.value,W)}),Ue.on(se,"keydown",function(ke){F&&F.onKeyDown&&F.onKeyDown(ke,se.value,W)||(ke.keyCode==13&&z(se.value),(ke.keyCode==27||F.closeOnEnter!==!1&&ke.keyCode==13)&&(Ue.e_stop(ke),W()))}),F.closeOnBlur!==!1&&Ue.on(se,"blur",W),se.focus()):(de=G.getElementsByTagName("button")[0])&&(Ue.on(de,"click",function(){W(),Z.focus()}),F.closeOnBlur!==!1&&Ue.on(de,"blur",W),de.focus()),W}}),Ue.defineExtension("openNotification",function(S,z){function F(){G||(G=!0,clearTimeout(K),W.remove())}if(!this.virtualSelectionMode()){M(this,F);var W=b(this,S,z&&z.bottom),G=!1,K,Z=z&&typeof z.duration<"u"?z.duration:5e3;return Ue.on(W,"click",function(se){Ue.e_preventDefault(se),F()}),Z&&(K=setTimeout(F,Z)),F}})})();var Fe=Ue.Pos,jn=[{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"}],wo=jn.length,gi=[{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"}],Sn=I(""),is=/[\d]/,X=[Ue.isWordChar,function(b){return b&&!Ue.isWordChar(b)&&!/\s/.test(b)}],xe=[function(b){return/\S/.test(b)}],Ie=["<",">"],Oe=["-",'"',".",":","_","/","+"],Ye=/^\w$/,We;try{We=new RegExp("^[\\p{Lu}]$","u")}catch{We=/^[A-Z]$/}var rt={};R("filetype",void 0,"string",["ft"],function(b,M){if(M!==void 0){if(b===void 0){var S=M.getOption("mode");return S=="null"?"":S}var S=b==""?"null":b;M.setOption("mode",S)}}),R("textwidth",80,"number",["tw"],function(b,M){if(M!==void 0){if(b===void 0){var S=M.getOption("textwidth");return S}var z=Math.round(b);z>1&&M.setOption("textwidth",z)}});var rn=function(){function b(Z,se,de){function ke(Be){var De=++F%z,et=K[De];et&&et.clear(),K[De]=Z.setBookmark(Be)}var Te=F%z,Ce=K[Te];if(Ce){var $e=Ce.find();$e&&!qe($e,se)&&ke(se)}else ke(se);ke(de),W=F,G=F-z+1,G<0&&(G=0)}function M(Z,se){F+=se,F>W?F=W:F<G&&(F=G);var de=K[(z+F)%z];if(de&&!de.find()){var ke=se>0?1:-1,Te,Ce=Z.getCursor();do if(F+=ke,de=K[(z+F)%z],de&&(Te=de.find())&&!qe(Ce,Te))break;while(F<W&&F>G)}return de}function S(Z,se){var de=F,ke=M(Z,se);return F=de,ke&&ke.find()}var z=100,F=-1,W=0,G=0,K=new Array(z);return{cachedCursor:void 0,add:b,find:S,move:M}},yn=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=Ve.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,M){var S=Ve.registerController.getRegister(M);if(S){if(S.clear(),this.latestRegister=M,b.openDialog){var z=Ri("span",{class:"cm-vim-message"},"recording @"+M);this.onRecordingDone=b.openDialog(z,null,{bottom:!0})}this.isRecording=!0}}};var Ve,jt,wt={enterVimMode:s,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return Ve.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return Ve},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:Zo,map:function(b,M,S){ii.map(b,M,S)},unmap:function(b,M){return ii.unmap(b,M)},noremap:function(b,M,S){ii.map(b,M,S,!0)},mapclear:function(b){var M=jn.length,S=wo,z=jn.slice(0,M-S);if(jn=jn.slice(M-S),b)for(var F=z.length-1;F>=0;F--){var W=z[F];if(b!==W.context)if(W.context)this._mapCommand(W);else{var G=["normal","insert","visual"];for(var K in G)if(G[K]!==b){var Z={};for(var se in W)Z[se]=W[se];Z.context=G[K],this._mapCommand(Z)}}}},langmap:N,vimKeyFromEvent:B,setOption:T,getOption:_,defineOption:R,defineEx:function(b,M,S){if(!M)M=b;else if(b.indexOf(M)!==0)throw new Error('(Vim.defineEx) "'+M+'" is not a prefix of "'+b+'", command not registered');$r[b]=S,ii.commandMap_[M]={name:b,shortName:M,type:"api"}},handleKey:function(b,M,S){var z=this.findKey(b,M,S);if(typeof z=="function")return z()},multiSelectHandleKey:Qi,findKey:function(b,M,S){function z(){var se=Ve.macroModeState;if(se.isRecording){if(M=="q")return se.exitMacroRecordMode(),A(b),!0;S!="mapping"&&Po(se,M)}}function F(){if(M=="<Esc>"){if(K.visualMode)Rn(b);else{if(!K.insertMode)return;Nr(b)}return A(b),!0}}function W(){if(F())return!0;K.inputState.keyBuffer.push(M);var se=K.inputState.keyBuffer.join(""),de=M.length==1,ke=Xi.matchCommand(se,jn,K.inputState,"insert"),Te=K.inputState.changeQueue;if(ke.type=="none")return A(b),!1;if(ke.type=="partial"){if(ke.expectLiteralNext&&(K.expectLiteralNext=!0),jt&&window.clearTimeout(jt),jt=de&&window.setTimeout(function(){K.insertMode&&K.inputState.keyBuffer.length&&A(b)},_("insertModeEscKeysTimeout")),de){var Ce=b.listSelections();(!Te||Te.removed.length!=Ce.length)&&(Te=K.inputState.changeQueue=new D),Te.inserted+=M;for(var $e=0;$e<Ce.length;$e++){var Be=at(Ce[$e].anchor,Ce[$e].head),De=ct(Ce[$e].anchor,Ce[$e].head),et=b.getRange(Be,b.state.overwrite?ee(De,0,1):De);Te.removed[$e]=(Te.removed[$e]||"")+et}}return!de}if(K.expectLiteralNext=!1,jt&&window.clearTimeout(jt),ke.command&&Te){for(var Ce=b.listSelections(),$e=0;$e<Ce.length;$e++){var Ct=Ce[$e].head;b.replaceRange(Te.removed[$e]||"",ee(Ct,0,-Te.inserted.length),Ct,"+input")}Ve.macroModeState.lastInsertModeChanges.changes.pop()}return ke.command||A(b),ke.command}function G(){if(z()||F())return!0;K.inputState.keyBuffer.push(M);var se=K.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(se))return!0;var de=/^(\d*)(.*)$/.exec(se);if(!de)return A(b),!1;var ke=K.visualMode?"visual":"normal",Te=de[2]||de[1];K.inputState.operatorShortcut&&K.inputState.operatorShortcut.slice(-1)==Te&&(Te=K.inputState.operatorShortcut);var Ce=Xi.matchCommand(Te,jn,K.inputState,ke);return Ce.type=="none"?(A(b),!1):Ce.type=="partial"?(Ce.expectLiteralNext&&(K.expectLiteralNext=!0),!0):Ce.type=="clear"?(A(b),!0):(K.expectLiteralNext=!1,K.inputState.keyBuffer.length=0,de=/^(\d*)(.*)$/.exec(se),de[1]&&de[1]!="0"&&K.inputState.pushRepeatDigit(de[1]),Ce.command)}var K=P(b),Z;return K.insertMode?Z=W():Z=G(),Z===!1?!K.insertMode&&M.length===1?function(){return!0}:void 0:Z===!0?function(){return!0}:function(){if(!((Z.operator||Z.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{Z.type=="keyToKey"?k(b,Z.toKeys,Z):Xi.processCommand(b,K,Z)}catch(se){throw b.state.vim=void 0,P(b),wt.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(b,M){ii.processCommand(b,M)},defineMotion:re,defineAction:ue,defineOperator:ne,mapCommand:Oi,_mapCommand:vo,defineRegister:U,exitVisualMode:Rn,exitInsertMode:Nr},an=[],mi=!1,qt,ri={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},vr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Wo={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(ri)).forEach(function(b){Wo[(ri[b]||"").toLowerCase()]=Wo[b.toLowerCase()]=b}),R("langmap",void 0,"string",["lmap"],function(b,M){if(b===void 0)return Sn.string;N(b)}),$.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},$.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},j.prototype={setText:function(b,M,S){this.keyBuffer=[b||""],this.linewise=!!M,this.blockwise=!!S},pushText:function(b,M){M&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(yn(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(b,M,S,z,F){if(b!=="_"){z&&S.charAt(S.length-1)!==`
1439
+ `&&(S+=`
1440
+ `);var W=this.isValidRegister(b)?this.getRegister(b):null;if(!W){switch(M){case"yank":this.registers[0]=new j(S,z,F);break;case"delete":case"change":S.indexOf(`
1441
+ `)==-1?this.registers["-"]=new j(S,z):(this.shiftNumericRegisters_(),this.registers[1]=new j(S,z))}this.unnamedRegister.setText(S,z,F);return}var G=p(b);G?W.pushText(S,z):W.setText(S,z,F),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(W.toString(),z)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new j),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,Oe)||Ye.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},Q.prototype={nextMatch:function(b,M){var S=this.historyBuffer,z=M?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var F=this.iterator+z;M?F>=0:F<S.length;F+=z)for(var W=S[F],G=0;G<=W.length;G++)if(this.initialPrefix==W.substring(0,G))return this.iterator=F,W;if(F>=S.length)return this.iterator=S.length,this.initialPrefix;if(F<0)return b},pushInput:function(b){var M=this.historyBuffer.indexOf(b);M>-1&&this.historyBuffer.splice(M,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Xi={matchCommand:function(b,M,S,z){var F=ye(b,M,z,S);if(!F.full&&!F.partial)return{type:"none"};if(!F.full&&F.partial)return{type:"partial",expectLiteralNext:F.partial.length==1&&F.partial[0].keys.slice(-11)=="<character>"};for(var W,G=0;G<F.full.length;G++){var K=F.full[G];W||(W=K)}if(W.keys.slice(-11)=="<character>"||W.keys.slice(-10)=="<register>"){var Z=Ae(b);if(!Z||Z.length>1)return{type:"clear"};S.selectedCharacter=Z}return{type:"full",command:W}},processCommand:function(b,M,S){switch(M.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(b,M,S);break;case"operator":this.processOperator(b,M,S);break;case"operatorMotion":this.processOperatorMotion(b,M,S);break;case"action":this.processAction(b,M,S);break;case"search":this.processSearch(b,M,S);break;case"ex":case"keyToEx":this.processEx(b,M,S);break}},processMotion:function(b,M,S){M.inputState.motion=S.motion,M.inputState.motionArgs=oe(S.motionArgs),this.evalInput(b,M)},processOperator:function(b,M,S){var z=M.inputState;if(z.operator){if(z.operator==S.operator){z.motion="expandToLine",z.motionArgs={linewise:!0},this.evalInput(b,M);return}A(b)}z.operator=S.operator,z.operatorArgs=oe(S.operatorArgs),S.keys.length>1&&(z.operatorShortcut=S.keys),S.exitVisualBlock&&(M.visualBlock=!1,$n(b)),M.visualMode&&this.evalInput(b,M)},processOperatorMotion:function(b,M,S){var z=M.visualMode,F=oe(S.operatorMotionArgs);F&&z&&F.visualLine&&(M.visualLine=!0),this.processOperator(b,M,S),z||this.processMotion(b,M,S)},processAction:function(b,M,S){var z=M.inputState,F=z.getRepeat(),W=!!F,G=oe(S.actionArgs)||{};z.selectedCharacter&&(G.selectedCharacter=z.selectedCharacter),S.operator&&this.processOperator(b,M,S),S.motion&&this.processMotion(b,M,S),(S.motion||S.operator)&&this.evalInput(b,M),G.repeat=F||1,G.repeatIsExplicit=W,G.registerName=z.registerName,A(b),M.lastMotion=null,S.isEdit&&this.recordLastEdit(M,z,S),ir[S.action](b,G,M)},processSearch:function(b,M,S){function z(De,et,Ct){Ve.searchHistoryController.pushInput(De),Ve.searchHistoryController.reset();try{dn(b,De,et,Ct)}catch{Dt(b,"Invalid regex: "+De),A(b);return}Xi.processMotion(b,M,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function F(De){z(De,!0,!0);var et=Ve.macroModeState;et.isRecording&&zo(et,De)}function W(De,et,Ct){var ut=B(De),dt,Wn;ut=="<Up>"||ut=="<Down>"?(dt=ut=="<Up>",Wn=De.target?De.target.selectionEnd:0,et=Ve.searchHistoryController.nextMatch(et,dt)||"",Ct(et),Wn&&De.target&&(De.target.selectionEnd=De.target.selectionStart=Math.min(Wn,De.target.value.length))):ut&&ut!="<Left>"&&ut!="<Right>"&&Ve.searchHistoryController.reset();var Rt;try{Rt=dn(b,et,!0,!0)}catch{}Rt?b.scrollIntoView(er(b,!K,Rt),30):(Li(b),b.scrollTo(ke.left,ke.top))}function G(De,et,Ct){var ut=B(De);ut=="<Esc>"||ut=="<C-c>"||ut=="<C-[>"||ut=="<BS>"&&et==""?(Ve.searchHistoryController.pushInput(et),Ve.searchHistoryController.reset(),dn(b,de),Li(b),b.scrollTo(ke.left,ke.top),Ue.e_stop(De),A(b),Ct(),b.focus()):ut=="<Up>"||ut=="<Down>"?Ue.e_stop(De):ut=="<C-u>"&&(Ue.e_stop(De),Ct(""))}if(b.getSearchCursor){var K=S.searchArgs.forward,Z=S.searchArgs.wholeWordOnly;gn(b).setReversed(!K);var se=K?"/":"?",de=gn(b).getQuery(),ke=b.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var Te=Ve.macroModeState;if(Te.isPlaying){var Be=Te.replaySearchQueries.shift();z(Be,!0,!1)}else Or(b,{onClose:F,prefix:se,desc:"(JavaScript regexp)",onKeyUp:W,onKeyDown:G});break;case"wordUnderCursor":var Ce=Dn(b,{noSymbol:!0}),$e=!0;if(Ce||(Ce=Dn(b,{noSymbol:!1}),$e=!1),!Ce){Dt(b,"No word under cursor"),A(b);return}var Be=b.getLine(Ce.start.line).substring(Ce.start.ch,Ce.end.ch);$e&&Z?Be="\\b"+Be+"\\b":Be=St(Be),Ve.jumpList.cachedCursor=b.getCursor(),b.setCursor(Ce.start),z(Be,!0,!1)}}},processEx:function(b,M,S){function z(W){Ve.exCommandHistoryController.pushInput(W),Ve.exCommandHistoryController.reset(),ii.processCommand(b,W),b.state.vim&&A(b)}function F(W,G,K){var Z=B(W),se,de;(Z=="<Esc>"||Z=="<C-c>"||Z=="<C-[>"||Z=="<BS>"&&G=="")&&(Ve.exCommandHistoryController.pushInput(G),Ve.exCommandHistoryController.reset(),Ue.e_stop(W),A(b),K(),b.focus()),Z=="<Up>"||Z=="<Down>"?(Ue.e_stop(W),se=Z=="<Up>",de=W.target?W.target.selectionEnd:0,G=Ve.exCommandHistoryController.nextMatch(G,se)||"",K(G),de&&W.target&&(W.target.selectionEnd=W.target.selectionStart=Math.min(de,W.target.value.length))):Z=="<C-u>"?(Ue.e_stop(W),K("")):Z&&Z!="<Left>"&&Z!="<Right>"&&Ve.exCommandHistoryController.reset()}S.type=="keyToEx"?ii.processCommand(b,S.exArgs.input):M.visualMode?Or(b,{onClose:z,prefix:":",value:"'<,'>",onKeyDown:F,selectValueOnOpen:!1}):Or(b,{onClose:z,prefix:":",onKeyDown:F})},evalInput:function(b,M){var S=M.inputState,z=S.motion,F=S.motionArgs||{},W=S.operator,G=S.operatorArgs||{},K=S.registerName,Z=M.sel,se=ze(M.visualMode?he(b,Z.head):b.getCursor("head")),de=ze(M.visualMode?he(b,Z.anchor):b.getCursor("anchor")),ke=ze(se),Te=ze(de),Ce,$e,Be;if(W&&this.recordLastEdit(M,S),S.repeatOverride!==void 0?Be=S.repeatOverride:Be=S.getRepeat(),Be>0&&F.explicitRepeat?F.repeatIsExplicit=!0:(F.noRepeat||!F.explicitRepeat&&Be===0)&&(Be=1,F.repeatIsExplicit=!1),S.selectedCharacter&&(F.selectedCharacter=G.selectedCharacter=S.selectedCharacter),F.repeat=Be,A(b),z){var De=Kn[z](b,se,F,M,S);if(M.lastMotion=Kn[z],!De)return;if(F.toJumplist){!W&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var et=Ve.jumpList,Ct=et.cachedCursor;Ct?(Xr(b,Ct,De),delete et.cachedCursor):Xr(b,se,De)}De instanceof Array?($e=De[0],Ce=De[1]):Ce=De,Ce||(Ce=ze(se)),M.visualMode?((!M.visualBlock||Ce.ch!==1/0)&&(Ce=he(b,Ce,ke)),$e&&($e=he(b,$e)),$e=$e||Te,Z.anchor=$e,Z.head=Ce,$n(b),ar(b,M,"<",Ze($e,Ce)?$e:Ce),ar(b,M,">",Ze($e,Ce)?Ce:$e)):W||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),Ce=he(b,Ce,ke),b.setCursor(Ce.line,Ce.ch))}if(W){if(G.lastSel){$e=Te;var ut=G.lastSel,dt=Math.abs(ut.head.line-ut.anchor.line),Wn=Math.abs(ut.head.ch-ut.anchor.ch);ut.visualLine?Ce=new Fe(Te.line+dt,Te.ch):ut.visualBlock?Ce=new Fe(Te.line+dt,Te.ch+Wn):ut.head.line==ut.anchor.line?Ce=new Fe(Te.line,Te.ch+Wn):Ce=new Fe(Te.line+dt,Te.ch),M.visualMode=!0,M.visualLine=ut.visualLine,M.visualBlock=ut.visualBlock,Z=M.sel={anchor:$e,head:Ce},$n(b)}else M.visualMode&&(G.lastSel={anchor:ze(Z.anchor),head:ze(Z.head),visualBlock:M.visualBlock,visualLine:M.visualLine});var Rt,ln,Bt,Ot,yr;if(M.visualMode){Rt=at(Z.head,Z.anchor),ln=ct(Z.head,Z.anchor),Bt=M.visualLine||G.linewise,Ot=M.visualBlock?"block":Bt?"line":"char";var Sr=v(b,Rt,ln);if(yr=Nn(b,{anchor:Sr.start,head:Sr.end},Ot),Bt){var Jn=yr.ranges;if(Ot=="block")for(var V=0;V<Jn.length;V++)Jn[V].head.ch=Me(b,Jn[V].head.line);else Ot=="line"&&(Jn[0].head=new Fe(Jn[0].head.line+1,0))}}else{if(Rt=ze($e||Te),ln=ze(Ce||ke),Ze(ln,Rt)){var J=Rt;Rt=ln,ln=J}Bt=F.linewise||G.linewise,Bt?Xn(b,Rt,ln):F.forward&&Vn(b,Rt,ln),Ot="char";var ae=!F.inclusive||Bt,Sr=v(b,Rt,ln);yr=Nn(b,{anchor:Sr.start,head:Sr.end},Ot,ae)}b.setSelections(yr.ranges,yr.primary),M.lastMotion=null,G.repeat=Be,G.registerName=K,G.linewise=Bt;var ce=Us[W](b,G,yr.ranges,Te,Ce);M.visualMode&&Rn(b,ce!=null),ce&&b.setCursor(ce)}},recordLastEdit:function(b,M,S){var z=Ve.macroModeState;z.isPlaying||(b.lastEditInputState=M,b.lastEditActionCommand=S,z.lastInsertModeChanges.changes=[],z.lastInsertModeChanges.expectCursorActivityForChange=!1,z.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},Kn={moveToTopLine:function(b,M,S){var z=mo(b).top+S.repeat-1;return new Fe(z,hn(b.getLine(z)))},moveToMiddleLine:function(b){var M=mo(b),S=Math.floor((M.top+M.bottom)*.5);return new Fe(S,hn(b.getLine(S)))},moveToBottomLine:function(b,M,S){var z=mo(b).bottom-S.repeat+1;return new Fe(z,hn(b.getLine(z)))},expandToLine:function(b,M,S){var z=M;return new Fe(z.line+S.repeat-1,1/0)},findNext:function(b,M,S){var z=gn(b),F=z.getQuery();if(F){var W=!S.forward;return W=z.isReversed()?!W:W,po(b,F),er(b,W,F,S.repeat)}},findAndSelectNextInclusive:function(b,M,S,z,F){var W=gn(b),G=W.getQuery();if(G){var K=!S.forward;K=W.isReversed()?!K:K;var Z=go(b,K,G,S.repeat,z);if(Z){if(F.operator)return Z;var se=Z[0],de=new Fe(Z[1].line,Z[1].ch-1);if(z.visualMode){(z.visualLine||z.visualBlock)&&(z.visualLine=!1,z.visualBlock=!1,Ue.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var ke=z.sel.anchor;if(ke)return W.isReversed()?S.forward?[ke,se]:[ke,de]:S.forward?[ke,de]:[ke,se]}else z.visualMode=!0,z.visualLine=!1,z.visualBlock=!1,Ue.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return K?[de,se]:[se,de]}}},goToMark:function(b,M,S,z){var F=fi(b,z,S.selectedCharacter);return F?S.linewise?{line:F.line,ch:hn(b.getLine(F.line))}:F:null},moveToOtherHighlightedEnd:function(b,M,S,z){if(z.visualBlock&&S.sameLine){var F=z.sel;return[he(b,new Fe(F.anchor.line,F.head.ch)),he(b,new Fe(F.head.line,F.anchor.ch))]}return[z.sel.head,z.sel.anchor]},jumpToMark:function(b,M,S,z){for(var F=M,W=0;W<S.repeat;W++){var G=F;for(var K in z.marks)if(u(K)){var Z=z.marks[K].find(),se=S.forward?Ze(Z,G):Ze(G,Z);if(!se&&!(S.linewise&&Z.line==G.line)){var de=qe(G,F),ke=S.forward?Ft(G,Z,F):Ft(F,Z,G);(de||ke)&&(F=Z)}}}return S.linewise&&(F=new Fe(F.line,hn(b.getLine(F.line)))),F},moveByCharacters:function(b,M,S){var z=M,F=S.repeat,W=S.forward?z.ch+F:z.ch-F;return new Fe(z.line,W)},moveByLines:function(b,M,S,z){var F=M,W=F.ch;switch(z.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:W=z.lastHPos;break;default:z.lastHPos=W}var G=S.repeat+(S.repeatOffset||0),K=S.forward?F.line+G:F.line-G,Z=b.firstLine(),se=b.lastLine();if(K<Z&&F.line==Z)return this.moveToStartOfLine(b,M,S,z);if(K>se&&F.line==se)return Ki(b,M,S,z,!0);var de=b.ace.session.getFoldLine(K);return de&&(S.forward?K>de.start.row&&(K=de.end.row+1):K=de.start.row),S.toFirstChar&&(W=hn(b.getLine(K)),z.lastHPos=W),z.lastHSPos=b.charCoords(new Fe(K,W),"div").left,new Fe(K,W)},moveByDisplayLines:function(b,M,S,z){var F=M;switch(z.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:z.lastHSPos=b.charCoords(F,"div").left}var W=S.repeat,Z=b.findPosV(F,S.forward?W:-W,"line",z.lastHSPos);if(Z.hitSide)if(S.forward)var G=b.charCoords(Z,"div"),K={top:G.top+8,left:z.lastHSPos},Z=b.coordsChar(K,"div");else{var se=b.charCoords(new Fe(b.firstLine(),0),"div");se.left=z.lastHSPos,Z=b.coordsChar(se,"div")}return z.lastHPos=Z.ch,Z},moveByPage:function(b,M,S){var z=M,F=S.repeat;return b.findPosV(z,S.forward?F:-F,"page")},moveByParagraph:function(b,M,S){var z=S.forward?1:-1;return gs(b,M,S.repeat,z)},moveBySentence:function(b,M,S){var z=S.forward?1:-1;return Mi(b,M,S.repeat,z)},moveByScroll:function(b,M,S,z){var F=b.getScrollInfo(),W=null,G=S.repeat;G||(G=F.clientHeight/(2*b.defaultTextHeight()));var K=b.charCoords(M,"local");if(S.repeat=G,W=Kn.moveByDisplayLines(b,M,S,z),!W)return null;var Z=b.charCoords(W,"local");return b.scrollTo(null,F.top+Z.top-K.top),W},moveByWords:function(b,M,S){return mr(b,M,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(b,M,S){var z=S.repeat,F=Fr(b,z,S.forward,S.selectedCharacter,M),W=S.forward?-1:1;return ei(W,S),F?(F.ch+=W,F):null},moveToCharacter:function(b,M,S){var z=S.repeat;return ei(0,S),Fr(b,z,S.forward,S.selectedCharacter,M)||M},moveToSymbol:function(b,M,S){var z=S.repeat;return Ei(b,z,S.forward,S.selectedCharacter)||M},moveToColumn:function(b,M,S,z){var F=S.repeat;return z.lastHPos=F-1,z.lastHSPos=b.charCoords(M,"div").left,fo(b,F)},moveToEol:function(b,M,S,z){return Ki(b,M,S,z,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,M){var S=M;return new Fe(S.line,hn(b.getLine(S.line)))},moveToMatchedSymbol:function(b,M){for(var S=M,z=S.line,F=S.ch,W=b.getLine(z),G;F<W.length;F++)if(G=W.charAt(F),G&&d(G)){var K=b.getTokenTypeAt(new Fe(z,F+1));if(K!=="string"&&K!=="comment")break}if(F<W.length){var Z=/[<>]/.test(W[F])?/[(){}[\]<>]/:/[(){}[\]]/,se=b.findMatchingBracket(new Fe(z,F+1),{bracketRegex:Z});return se.to}return S},moveToStartOfLine:function(b,M){return new Fe(M.line,0)},moveToLineOrEdgeOfDocument:function(b,M,S){var z=S.forward?b.lastLine():b.firstLine();return S.repeatIsExplicit&&(z=S.repeat-b.getOption("firstLineNumber")),new Fe(z,hn(b.getLine(z)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var M=b.getCursor();return M.sticky=="before"&&M.ch--,M},textObjectManipulation:function(b,M,S,z){var F={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},W={"'":!0,'"':!0,"`":!0},G=S.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var K=!S.textObjectInner,Z,se;if(F[G]){if(se=!0,Z=Gn(b,M,G,K),!Z){var de=b.getSearchCursor(new RegExp("\\"+G,"g"),M);de.find()&&(Z=Gn(b,de.from(),G,K))}}else if(W[G])se=!0,Z=Ar(b,M,G,K);else if(G==="W"||G==="w")for(var ke=S.repeat||1;ke-- >0;){var Te=Dn(b,{inclusive:K,innerWord:!K,bigWord:G==="W",noSymbol:G==="W",multiline:!0},Z&&Z.end);Te&&(Z||(Z=Te),Z.end=Te.end)}else if(G==="p")if(Z=gs(b,M,S.repeat,0,K),S.linewise=!0,z.visualMode)z.visualLine||(z.visualLine=!0);else{var Ce=z.inputState.operatorArgs;Ce&&(Ce.linewise=!0),Z.end.line--}else if(G==="t")Z=Ti(b,M,K);else if(G==="s"){var $e=b.getLine(M.line);M.ch>0&&w($e[M.ch])&&(M.ch-=1);var Be=Ko(b,M,S.repeat,1,K),De=Ko(b,M,S.repeat,-1,K);m(b.getLine(De.line)[De.ch])&&m(b.getLine(Be.line)[Be.ch-1])&&(De={line:De.line,ch:De.ch+1}),Z={start:De,end:Be}}return Z?b.state.vim.visualMode?Bn(b,Z.start,Z.end,se):[Z.start,Z.end]:null},repeatLastCharacterSearch:function(b,M,S){var z=Ve.lastCharacterSearch,F=S.repeat,W=S.forward===z.forward,G=(z.increment?1:0)*(W?-1:1);b.moveH(-G,"char"),S.inclusive=!!W;var K=Fr(b,F,W,z.selectedCharacter);return K?(K.ch+=G,K):(b.moveH(G,"char"),M)}},Us={change:function(b,M,S){var z,F,W=b.state.vim,G=S[0].anchor,K=S[0].head;if(W.visualMode)if(M.fullLine)K.ch=Number.MAX_VALUE,K.line--,b.setSelection(G,K),F=b.getSelection(),b.replaceSelection(""),z=G;else{F=b.getSelection();var Z=le("",S.length);b.replaceSelections(Z),z=at(S[0].head,S[0].anchor)}else{F=b.getRange(G,K);var se=W.lastEditInputState||{};if(se.motion=="moveByWords"&&!m(F)){var de=/\s+$/.exec(F);de&&se.motionArgs&&se.motionArgs.forward&&(K=ee(K,0,-de[0].length),F=F.slice(0,-de[0].length))}M.linewise&&(G=new Fe(G.line,hn(b.getLine(G.line))),K.line>G.line&&(K=new Fe(K.line-1,Number.MAX_VALUE))),b.replaceRange("",G,K),z=G}Ve.registerController.pushText(M.registerName,"change",F,M.linewise,S.length>1),ir.enterInsertMode(b,{head:z},b.state.vim)},delete:function(b,M,S){var z,F,W=b.state.vim;if(W.visualBlock){F=b.getSelection();var G=le("",S.length);b.replaceSelections(G),z=at(S[0].head,S[0].anchor)}else{var K=S[0].anchor,Z=S[0].head;M.linewise&&Z.line!=b.firstLine()&&K.line==b.lastLine()&&K.line==Z.line-1&&(K.line==b.firstLine()?K.ch=0:K=new Fe(K.line-1,Me(b,K.line-1))),F=b.getRange(K,Z),b.replaceRange("",K,Z),z=K,M.linewise&&(z=Kn.moveToFirstNonWhiteSpaceCharacter(b,K))}return Ve.registerController.pushText(M.registerName,"delete",F,M.linewise,W.visualBlock),he(b,z)},indent:function(b,M,S){var z=b.state.vim,F=z.visualMode?M.repeat:1;if(z.visualBlock){for(var W=b.getOption("tabSize"),G=b.getOption("indentWithTabs")?" ":" ".repeat(W),K,Z=S.length-1;Z>=0;Z--)if(K=at(S[Z].anchor,S[Z].head),M.indentRight)b.replaceRange(G.repeat(F),K,K);else{for(var se=b.getLine(K.line),de=0,ke=0;ke<F;ke++){var Te=se[K.ch+de];if(Te==" ")de++;else{if(Te!=" ")break;de++;for(var Ce=1;Ce<G.length&&(Te=se[K.ch+de],Te===" ");Ce++)de++}}b.replaceRange("",K,ee(K,0,de))}return K}if(b.indentMore)for(var ke=0;ke<F;ke++)M.indentRight?b.indentMore():b.indentLess();else{var $e=S[0].anchor.line,Be=z.visualBlock?S[S.length-1].anchor.line:S[0].head.line;M.linewise&&Be--;for(var Z=$e;Z<=Be;Z++)for(var ke=0;ke<F;ke++)b.indentLine(Z,M.indentRight)}return Kn.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},indentAuto:function(b,M,S){return b.execCommand("indentAuto"),Kn.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},hardWrap:function(b,M,S,z,F){if(b.hardWrap){var W=S[0].anchor.line,G=S[0].head.line;M.linewise&&G--;var K=b.hardWrap({from:W,to:G});return K>W&&M.linewise&&K--,M.keepCursor?z:new Fe(K,0)}},changeCase:function(b,M,S,z,F){for(var W=b.getSelections(),G=[],K=M.toLower,Z=0;Z<W.length;Z++){var se=W[Z],de="";if(K===!0)de=se.toLowerCase();else if(K===!1)de=se.toUpperCase();else for(var ke=0;ke<se.length;ke++){var Te=se.charAt(ke);de+=p(Te)?Te.toLowerCase():Te.toUpperCase()}G.push(de)}return b.replaceSelections(G),M.shouldMoveCursor?F:!b.state.vim.visualMode&&M.linewise&&S[0].anchor.line+1==S[0].head.line?Kn.moveToFirstNonWhiteSpaceCharacter(b,z):M.linewise?z:at(S[0].anchor,S[0].head)},yank:function(b,M,S,z){var F=b.state.vim,W=b.getSelection(),G=F.visualMode?at(F.sel.anchor,F.sel.head,S[0].head,S[0].anchor):z;return Ve.registerController.pushText(M.registerName,"yank",W,M.linewise,F.visualBlock),G}},ir={jumpListWalk:function(b,M,S){if(!S.visualMode){var z=M.repeat,F=M.forward,W=Ve.jumpList,G=W.move(b,F?z:-z),K=G?G.find():void 0;K=K||b.getCursor(),b.setCursor(K),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,M,S){if(!S.visualMode){var z=M.repeat||1,F=b.defaultTextHeight(),W=b.getScrollInfo().top,G=F*z,K=M.forward?W+G:W-G,Z=ze(b.getCursor()),se=b.charCoords(Z,"local");if(M.forward)K>se.top?(Z.line+=(K-se.top)/F,Z.line=Math.ceil(Z.line),b.setCursor(Z),se=b.charCoords(Z,"local"),b.scrollTo(null,se.top)):b.scrollTo(null,K);else{var de=K+b.getScrollInfo().clientHeight;de<se.bottom?(Z.line-=(se.bottom-de)/F,Z.line=Math.floor(Z.line),b.setCursor(Z),se=b.charCoords(Z,"local"),b.scrollTo(null,se.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,K)}}},scrollToCursor:function(b,M){var S=b.getCursor().line,z=b.charCoords(new Fe(S,0),"local"),F=b.getScrollInfo().clientHeight,W=z.top;switch(M.position){case"center":W=z.bottom-F/2;break;case"bottom":var G=new Fe(S,b.getLine(S).length-1),K=b.charCoords(G,"local"),Z=K.bottom-W;W=W-F+Z}b.scrollTo(null,W)},replayMacro:function(b,M,S){var z=M.selectedCharacter,F=M.repeat,W=Ve.macroModeState;for(z=="@"?z=W.latestRegister:W.latestRegister=z;F--;)Jo(b,S,W,z)},enterMacroRecordMode:function(b,M){var S=Ve.macroModeState,z=M.selectedCharacter;Ve.registerController.isValidRegister(z)&&S.enterMacroRecordMode(b,z)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Ue.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Ue.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,M,S){if(!b.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=M&&M.repeat||1;var z=M?M.insertAt:null,F=S.sel,W=M.head||b.getCursor("head"),G=b.listSelections().length;if(z=="eol")W=new Fe(W.line,Me(b,W.line));else if(z=="bol")W=new Fe(W.line,0);else if(z=="charAfter"){var K=v(b,W,ee(W,0,1));W=K.end}else if(z=="firstNonBlank"){var K=v(b,W,Kn.moveToFirstNonWhiteSpaceCharacter(b,W));W=K.end}else if(z=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(W=new Fe(Math.min(F.head.line,F.anchor.line),Math.min(F.head.ch,F.anchor.ch)),G=Math.abs(F.head.line-F.anchor.line)+1):F.head.line<F.anchor.line?W=F.head:W=new Fe(F.anchor.line,0)}else if(z=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(W=new Fe(Math.min(F.head.line,F.anchor.line),Math.max(F.head.ch,F.anchor.ch)+1),G=Math.abs(F.head.line-F.anchor.line)+1):F.head.line>=F.anchor.line?W=ee(F.head,0,1):W=new Fe(F.anchor.line,0)}else if(z=="inplace"){if(S.visualMode)return}else z=="lastEdit"&&(W=Do(b)||W);b.setOption("disableInput",!1),M&&M.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Ue.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Ue.signal(b,"vim-mode-change",{mode:"insert"})),Ve.macroModeState.isPlaying||(b.on("change",Qo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=b.setBookmark(W,{insertLeft:!0}),Ue.on(b.getInputField(),"keydown",Bo)),S.visualMode&&Rn(b),An(b,W,G)}},toggleVisualMode:function(b,M,S){var z=M.repeat,F=b.getCursor(),W;if(S.visualMode)S.visualLine^M.linewise||S.visualBlock^M.blockwise?(S.visualLine=!!M.linewise,S.visualBlock=!!M.blockwise,Ue.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),$n(b)):Rn(b);else{S.visualMode=!0,S.visualLine=!!M.linewise,S.visualBlock=!!M.blockwise,W=he(b,new Fe(F.line,F.ch+z-1));var G=v(b,F,W);S.sel={anchor:G.start,head:G.end},Ue.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),$n(b),ar(b,S,"<",at(F,W)),ar(b,S,">",ct(F,W))}},reselectLastSelection:function(b,M,S){var z=S.lastSelection;if(S.visualMode&&Gt(b,S),z){var F=z.anchorMark.find(),W=z.headMark.find();if(!F||!W)return;S.sel={anchor:F,head:W},S.visualMode=!0,S.visualLine=z.visualLine,S.visualBlock=z.visualBlock,$n(b),ar(b,S,"<",at(F,W)),ar(b,S,">",ct(F,W)),Ue.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(b,M,S){var z,F;if(S.visualMode){if(z=b.getCursor("anchor"),F=b.getCursor("head"),Ze(F,z)){var W=F;F=z,z=W}F.ch=Me(b,F.line)-1}else{var G=Math.max(M.repeat,2);z=b.getCursor(),F=he(b,new Fe(z.line+G-1,1/0))}for(var K=0,Z=z.line;Z<F.line;Z++){K=Me(b,z.line);var se="",de=0;if(!M.keepSpaces){var ke=b.getLine(z.line+1);de=ke.search(/\S/),de==-1?de=ke.length:se=" "}b.replaceRange(se,new Fe(z.line,K),new Fe(z.line+1,de))}var Te=he(b,new Fe(z.line,K));S.visualMode&&Rn(b,!1),b.setCursor(Te)},newLineAndEnterInsertMode:function(b,M,S){S.insertMode=!0;var z=ze(b.getCursor());if(z.line===b.firstLine()&&!M.after)b.replaceRange(`
1442
+ `,new Fe(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{z.line=M.after?z.line:z.line-1,z.ch=Me(b,z.line),b.setCursor(z);var F=Ue.commands.newlineAndIndentContinueComment||Ue.commands.newlineAndIndent;F(b)}this.enterInsertMode(b,{repeat:M.repeat},S)},paste:function(b,M,S){var z=this,F=Ve.registerController.getRegister(M.registerName),W=function(){var G=F.toString();z.continuePaste(b,M,S,G,F)};M.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){z.continuePaste(b,M,S,G,F)},function(){W()}):W()},continuePaste:function(b,M,S,z,F){var W=ze(b.getCursor());if(z){if(M.matchIndent){var G=b.getOption("tabSize"),K=function(Jn){var V=Jn.split(" ").length-1,J=Jn.split(" ").length-1;return V*G+J*1},Z=b.getLine(b.getCursor().line),se=K(Z.match(/^\s*/)[0]),de=z.replace(/\n$/,""),ke=z!==de,Te=K(z.match(/^\s*/)[0]),z=de.replace(/^\s*/gm,function(Jn){var V=se+(K(Jn)-Te);if(V<0)return"";if(b.getOption("indentWithTabs")){var J=Math.floor(V/G);return Array(J+1).join(" ")}return Array(V+1).join(" ")});z+=ke?`
1443
+ `:""}if(M.repeat>1)var z=Array(M.repeat+1).join(z);var Ce=F.linewise,$e=F.blockwise;if($e){z=z.split(`
1444
+ `),Ce&&z.pop();for(var Be=0;Be<z.length;Be++)z[Be]=z[Be]==""?" ":z[Be];W.ch+=M.after?1:0,W.ch=Math.min(Me(b,W.line),W.ch)}else Ce?S.visualMode?z=S.visualLine?z.slice(0,-1):`
1445
+ `+z.slice(0,z.length-1)+`
1446
+ `:M.after?(z=`
1447
+ `+z.slice(0,z.length-1),W.ch=Me(b,W.line)):W.ch=0:W.ch+=M.after?1:0;var De;if(S.visualMode){S.lastPastedText=z;var et,Ct=it(b,S),ut=Ct[0],dt=Ct[1],Wn=b.getSelection(),Rt=b.listSelections(),ln=new Array(Rt.length).join("1").split("1");S.lastSelection&&(et=S.lastSelection.headMark.find()),Ve.registerController.unnamedRegister.setText(Wn),$e?(b.replaceSelections(ln),dt=new Fe(ut.line+z.length-1,ut.ch),b.setCursor(ut),un(b,dt),b.replaceSelections(z),De=ut):S.visualBlock?(b.replaceSelections(ln),b.setCursor(ut),b.replaceRange(z,ut,ut),De=ut):(b.replaceRange(z,ut,dt),De=b.posFromIndex(b.indexFromPos(ut)+z.length-1)),et&&(S.lastSelection.headMark=b.setBookmark(et)),Ce&&(De.ch=0)}else if($e){b.setCursor(W);for(var Be=0;Be<z.length;Be++){var Bt=W.line+Be;Bt>b.lastLine()&&b.replaceRange(`
1448
+ `,new Fe(Bt,0));var Ot=Me(b,Bt);Ot<W.ch&&Vt(b,Bt,W.ch)}b.setCursor(W),un(b,new Fe(W.line+z.length-1,W.ch)),b.replaceSelections(z),De=W}else if(b.replaceRange(z,W),Ce){var Bt=M.after?W.line+1:W.line;De=new Fe(Bt,hn(b.getLine(Bt)))}else De=ze(W),/\n/.test(z)||(De.ch+=z.length-(M.after?1:0));S.visualMode&&Rn(b,!1),b.setCursor(De)}},undo:function(b,M){b.operation(function(){Je(b,Ue.commands.undo,M.repeat)(),b.setCursor(he(b,b.getCursor("start")))})},redo:function(b,M){Je(b,Ue.commands.redo,M.repeat)()},setRegister:function(b,M,S){S.inputState.registerName=M.selectedCharacter},insertRegister:function(b,M,S){var z=M.selectedCharacter,F=Ve.registerController.getRegister(z),W=F&&F.toString();W&&b.replaceSelection(W)},oneNormalCommand:function(b,M,S){Nr(b,!0),S.insertModeReturn=!0,Ue.on(b,"vim-command-done",function z(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||ir.enterInsertMode(b,{},S)),Ue.off(b,"vim-command-done",z))})},setMark:function(b,M,S){var z=M.selectedCharacter;ar(b,S,z,b.getCursor())},replace:function(b,M,S){var z=M.selectedCharacter,F=b.getCursor(),W,G,K=b.listSelections();if(S.visualMode)F=b.getCursor("start"),G=b.getCursor("end");else{var Z=b.getLine(F.line);W=F.ch+M.repeat,W>Z.length&&(W=Z.length),G=new Fe(F.line,W)}var se=v(b,F,G);if(F=se.start,G=se.end,z==`
1449
+ `)S.visualMode||b.replaceRange("",F,G),(Ue.commands.newlineAndIndentContinueComment||Ue.commands.newlineAndIndent)(b);else{var de=b.getRange(F,G);if(de=de.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,z),de=de.replace(/[^\n]/g,z),S.visualBlock){var ke=new Array(b.getOption("tabSize")+1).join(" ");de=b.getSelection(),de=de.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,z),de=de.replace(/\t/g,ke).replace(/[^\n]/g,z).split(`
1450
+ `),b.replaceSelections(de)}else b.replaceRange(de,F,G);S.visualMode?(F=Ze(K[0].anchor,K[0].head)?K[0].anchor:K[0].head,b.setCursor(F),Rn(b,!1)):b.setCursor(ee(G,0,-1))}},incrementNumberToken:function(b,M){for(var S=b.getCursor(),z=b.getLine(S.line),F=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,W,G,K,Z;(W=F.exec(z))!==null&&(G=W.index,K=G+W[0].length,!(S.ch<K)););if(!(!M.backtrack&&K<=S.ch)&&W){var se=W[2]||W[4],de=W[3]||W[5],ke=M.increase?1:-1,Te={"0b":2,0:8,"":10,"0x":16}[se.toLowerCase()],Ce=parseInt(W[1]+de,Te)+ke*M.repeat;Z=Ce.toString(Te);var $e=se?new Array(de.length-Z.length+1+W[1].length).join("0"):"";Z.charAt(0)==="-"?Z="-"+se+$e+Z.substr(1):Z=se+$e+Z;var Be=new Fe(S.line,G),De=new Fe(S.line,K);b.replaceRange(Z,Be,De),b.setCursor(new Fe(S.line,G+Z.length-1))}},repeatLastEdit:function(b,M,S){var z=S.lastEditInputState;if(z){var F=M.repeat;F&&M.repeatIsExplicit?S.lastEditInputState.repeatOverride=F:F=S.lastEditInputState.repeatOverride||F,Cs(b,S,F,!1)}},indent:function(b,M){b.indentLine(b.getCursor().line,M.indentRight)},exitInsertMode:Nr},eo={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},to={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var M=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,M}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var M=b.lineText.match(/^#(\w+)/)[1];if(M==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(M==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(M==="else"&&b.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Lr.prototype={getQuery:function(){return Ve.query},setQuery:function(b){Ve.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return Ve.isReversed},setReversed:function(b){Ve.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var xo={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Ta={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},wn=0,bl=function(){this.buildCommandMap_()};bl.prototype={processCommand:function(b,M,S){var z=this;b.operation(function(){b.curOp.isVimOp=!0,z._processCommand(b,M,S)})},_processCommand:function(b,M,S){var z=b.state.vim,F=Ve.registerController.getRegister(":"),W=F.toString(),G=new Ue.StringStream(M);F.setText(M);var K=S||{};K.input=M;try{this.parseInput_(b,G,K)}catch(de){throw Dt(b,de.toString()),de}z.visualMode&&Rn(b);var Z,se;if(!K.commandName)K.line!==void 0&&(se="move");else if(Z=this.matchCommand_(K.commandName),Z){if(se=Z.name,Z.excludeFromCommandHistory&&F.setText(W),this.parseCommandArgs_(G,K,Z),Z.type=="exToKey"){k(b,Z.toKeys,Z);return}if(Z.type=="exToEx"){this.processCommand(b,Z.toInput);return}}if(!se){Dt(b,'Not an editor command ":'+M+'"');return}try{$r[se](b,K),(!Z||!Z.possiblyAsync)&&K.callback&&K.callback()}catch(de){throw Dt(b,de.toString()),de}},parseInput_:function(b,M,S){if(M.eatWhile(":"),M.eat("%")?(S.line=b.firstLine(),S.lineEnd=b.lastLine()):(S.line=this.parseLineSpec_(b,M),S.line!==void 0&&M.eat(",")&&(S.lineEnd=this.parseLineSpec_(b,M))),S.line==null)if(b.state.vim.visualMode){var z=fi(b,b.state.vim,"<");S.selectionLine=z&&z.line,z=fi(b,b.state.vim,">"),S.selectionLineEnd=z&&z.line}else S.selectionLine=b.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var F=M.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return F?S.commandName=F[1]:S.commandName=M.match(/.*/)[0],S},parseLineSpec_:function(b,M){var S=M.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(M.next()){case".":return this.parseLineSpecOffset_(M,b.getCursor().line);case"$":return this.parseLineSpecOffset_(M,b.lastLine());case"'":var z=M.next(),F=fi(b,b.state.vim,z);if(!F)throw new Error("Mark not set");return this.parseLineSpecOffset_(M,F.line);case"-":case"+":return M.backUp(1),this.parseLineSpecOffset_(M,b.getCursor().line);default:return M.backUp(1),void 0}},parseLineSpecOffset_:function(b,M){var S=b.match(/^([+-])?(\d+)/);if(S){var z=parseInt(S[2],10);S[1]=="-"?M-=z:M+=z}return M},parseCommandArgs_:function(b,M,S){if(!b.eol()){M.argString=b.match(/.*/)[0];var z=S.argDelimiter||/\s+/,F=xt(M.argString).split(z);F.length&&F[0]&&(M.args=F)}},matchCommand_:function(b){for(var M=b.length;M>0;M--){var S=b.substring(0,M);if(this.commandMap_[S]){var z=this.commandMap_[S];if(z.name.indexOf(b)===0)return z}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<gi.length;b++){var M=gi[b],S=M.shortName||M.name;this.commandMap_[S]=M}},map:function(b,M,S,z){if(b!=":"&&b.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var F=b.substring(1);M!=":"&&M.charAt(0)==":"?this.commandMap_[F]={name:F,type:"exToEx",toInput:M.substring(1),user:!0}:this.commandMap_[F]={name:F,type:"exToKey",toKeys:M,user:!0}}else{var W={keys:b,type:"keyToKey",toKeys:M,noremap:!!z};S&&(W.context=S),jn.unshift(W)}},unmap:function(b,M){if(b!=":"&&b.charAt(0)==":"){if(M)throw Error("Mode not supported for ex mappings");var S=b.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var z=b,F=0;F<jn.length;F++)if(z==jn[F].keys&&jn[F].context===M)return jn.splice(F,1),!0}};var $r={colorscheme:function(b,M){if(!M.args||M.args.length<1){Dt(b,b.getOption("theme"));return}b.setOption("theme",M.args[0])},map:function(b,M,S,z){var F=M.args;if(!F||F.length<2){b&&Dt(b,"Invalid mapping: "+M.input);return}ii.map(F[0],F[1],S,z)},imap:function(b,M){this.map(b,M,"insert")},nmap:function(b,M){this.map(b,M,"normal")},vmap:function(b,M){this.map(b,M,"visual")},omap:function(b,M){this.map(b,M,"operatorPending")},noremap:function(b,M){this.map(b,M,void 0,!0)},inoremap:function(b,M){this.map(b,M,"insert",!0)},nnoremap:function(b,M){this.map(b,M,"normal",!0)},vnoremap:function(b,M){this.map(b,M,"visual",!0)},onoremap:function(b,M){this.map(b,M,"operatorPending",!0)},unmap:function(b,M,S){var z=M.args;(!z||z.length<1||!ii.unmap(z[0],S))&&b&&Dt(b,"No such mapping: "+M.input)},mapclear:function(b,M){wt.mapclear()},imapclear:function(b,M){wt.mapclear("insert")},nmapclear:function(b,M){wt.mapclear("normal")},vmapclear:function(b,M){wt.mapclear("visual")},omapclear:function(b,M){wt.mapclear("operatorPending")},move:function(b,M){Xi.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:M.line+1})},set:function(b,M){var S=M.args,z=M.setCfg||{};if(!S||S.length<1){b&&Dt(b,"Invalid mapping: "+M.input);return}var F=S[0].split("="),W=F[0],G=F[1],K=!1,Z=!1;if(W.charAt(W.length-1)=="?"){if(G)throw Error("Trailing characters: "+M.argString);W=W.substring(0,W.length-1),K=!0}else W.charAt(W.length-1)=="!"&&(W=W.substring(0,W.length-1),Z=!0);G===void 0&&W.substring(0,2)=="no"&&(W=W.substring(2),G=!1);var se=rt[W]&&rt[W].type=="boolean";if(se&&(Z?G=!_(W,b,z):G==null&&(G=!0)),!se&&G===void 0||K){var de=_(W,b,z);de instanceof Error?Dt(b,de.message):de===!0||de===!1?Dt(b," "+(de?"":"no")+W):Dt(b," "+W+"="+de)}else{var ke=T(W,G,b,z);ke instanceof Error&&Dt(b,ke.message)}},setlocal:function(b,M){M.setCfg={scope:"local"},this.set(b,M)},setglobal:function(b,M){M.setCfg={scope:"global"},this.set(b,M)},registers:function(b,M){var S=M.args,z=Ve.registerController.registers,F=`----------Registers----------
1453
+
1454
+ `;if(S){var W;S=S.join("");for(var G=0;G<S.length;G++)if(W=S.charAt(G),!!Ve.registerController.isValidRegister(W)){var K=z[W]||new j;F+='"'+W+" "+K.toString()+`
1455
+ `}}else for(var W in z){var Z=z[W].toString();Z.length&&(F+='"'+W+" "+Z+`
1456
+ `)}Dt(b,F)},sort:function(b,M){function S(){if(M.argString){var Bt=new Ue.StringStream(M.argString);if(Bt.eat("!")&&(W=!0),Bt.eol())return;if(!Bt.eatSpace())return"Invalid arguments";var Ot=Bt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ot&&!Bt.eol())return"Invalid arguments";if(Ot[1]){G=Ot[1].indexOf("i")!=-1,K=Ot[1].indexOf("u")!=-1;var yr=Ot[1].indexOf("d")!=-1||Ot[1].indexOf("n")!=-1&&1,Sr=Ot[1].indexOf("x")!=-1&&1,Jn=Ot[1].indexOf("o")!=-1&&1;if(yr+Sr+Jn>1)return"Invalid arguments";Z=yr&&"decimal"||Sr&&"hex"||Jn&&"octal"}Ot[2]&&(se=new RegExp(Ot[2].substr(1,Ot[2].length-2),G?"i":""))}}function z(Bt,Ot){if(W){var yr;yr=Bt,Bt=Ot,Ot=yr}G&&(Bt=Bt.toLowerCase(),Ot=Ot.toLowerCase());var Sr=Z&&De.exec(Bt),Jn=Z&&De.exec(Ot);return Sr?(Sr=parseInt((Sr[1]+Sr[2]).toLowerCase(),et),Jn=parseInt((Jn[1]+Jn[2]).toLowerCase(),et),Sr-Jn):Bt<Ot?-1:1}function F(Bt,Ot){if(W){var yr;yr=Bt,Bt=Ot,Ot=yr}return G&&(Bt[0]=Bt[0].toLowerCase(),Ot[0]=Ot[0].toLowerCase()),Bt[0]<Ot[0]?-1:1}var W,G,K,Z,se,de=S();if(de){Dt(b,de+": "+M.argString);return}var ke=M.line||b.firstLine(),Te=M.lineEnd||M.line||b.lastLine();if(ke!=Te){var Ce=new Fe(ke,0),$e=new Fe(Te,Me(b,Te)),Be=b.getRange(Ce,$e).split(`
1457
+ `),De=se||(Z=="decimal"?/(-?)([\d]+)/:Z=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Z=="octal"?/([0-7]+)/:null),et=Z=="decimal"?10:Z=="hex"?16:Z=="octal"?8:null,Ct=[],ut=[];if(Z||se)for(var dt=0;dt<Be.length;dt++){var Wn=se?Be[dt].match(se):null;Wn&&Wn[0]!=""?Ct.push(Wn):!se&&De.exec(Be[dt])?Ct.push(Be[dt]):ut.push(Be[dt])}else ut=Be;if(Ct.sort(se?F:z),se)for(var dt=0;dt<Ct.length;dt++)Ct[dt]=Ct[dt].input;else Z||ut.sort(z);if(Be=W?Ct.concat(ut):ut.concat(Ct),K){var Rt=Be,ln;Be=[];for(var dt=0;dt<Rt.length;dt++)Rt[dt]!=ln&&Be.push(Rt[dt]),ln=Rt[dt]}b.replaceRange(Be.join(`
1458
+ `),Ce,$e)}},vglobal:function(b,M){this.global(b,M)},normal:function(b,M){var S=M.argString;if(S&&S[0]=="!"&&(S=S.slice(1),mi=!0),S=S.trimStart(),!S){Dt(b,"Argument is required.");return}var z=M.line;if(typeof z=="number")for(var F=isNaN(M.lineEnd)?z:M.lineEnd,W=z;W<=F;W++)b.setCursor(W,0),k(b,M.argString.trimStart()),b.state.vim.insertMode&&Nr(b,!0);else k(b,M.argString.trimStart()),b.state.vim.insertMode&&Nr(b,!0)},global:function(b,M){var S=M.argString;if(!S){Dt(b,"Regular Expression missing from global");return}var z=M.commandName[0]==="v";S[0]==="!"&&M.commandName[0]==="g"&&(z=!0,S=S.slice(1));var F=M.line!==void 0?M.line:b.firstLine(),W=M.lineEnd||M.line||b.lastLine(),G=Fn(S),K=S,Z;if(G.length&&(K=G[0],Z=G.slice(1,G.length).join("/")),K)try{dn(b,K,!0,!0)}catch{Dt(b,"Invalid regex: "+K);return}for(var se=gn(b).getQuery(),de=[],ke=F;ke<=W;ke++){var Te=b.getLine(ke),Ce=se.test(Te);Ce!==z&&de.push(Z?b.getLineHandle(ke):Te)}if(!Z){Dt(b,de.join(`
1459
+ `));return}var $e=0,Be=function(){if($e<de.length){var De=de[$e++],et=b.getLineNumber(De);if(et==null){Be();return}var Ct=et+1+Z;ii.processCommand(b,Ct,{callback:Be})}else b.releaseLineHandles&&b.releaseLineHandles()};Be()},substitute:function(b,M){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=M.argString,z=S?hi(S,S[0]):[],F,W="",G,K,Z,se=!1,de=!1;if(z.length)F=z[0],_("pcre")&&F!==""&&(F=new RegExp(F).source),W=z[1],W!==void 0&&(_("pcre")?W=bs(W.replace(/([^\\])&/g,"$1$$&")):W=ys(W),Ve.lastSubstituteReplacePart=W),G=z[2]?z[2].split(" "):[];else if(S&&S.length){Dt(b,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(K=G[0],Z=parseInt(G[1]),K&&(K.indexOf("c")!=-1&&(se=!0),K.indexOf("g")!=-1&&(de=!0),_("pcre")?F=F+"/"+K:F=F.replace(/\//g,"\\/")+"/"+K)),F)try{dn(b,F,!0,!0)}catch{Dt(b,"Invalid regex: "+F);return}if(W=W||Ve.lastSubstituteReplacePart,W===void 0){Dt(b,"No previous substitute regular expression");return}var ke=gn(b),Te=ke.getQuery(),Ce=M.line!==void 0?M.line:b.getCursor().line,$e=M.lineEnd||Ce;Ce==b.firstLine()&&$e==b.lastLine()&&($e=1/0),Z&&(Ce=$e,$e=Ce+Z-1);var Be=he(b,new Fe(Ce,0)),De=b.getSearchCursor(Te,Be);ti(b,se,de,Ce,$e,De,Te,W,M.callback)},startinsert:function(b,M){k(b,M.argString=="!"?"A":"i",{})},redo:Ue.commands.redo,undo:Ue.commands.undo,write:function(b){Ue.commands.save?Ue.commands.save(b):b.save&&b.save()},nohlsearch:function(b){Li(b)},yank:function(b){var M=ze(b.getCursor()),S=M.line,z=b.getLine(S);Ve.registerController.pushText("0","yank",z,!0,!0)},delete:function(b,M){var S=M.selectionLine,z=isNaN(M.selectionLineEnd)?S:M.selectionLineEnd;Us.delete(b,{linewise:!0},[{anchor:new Fe(S,0),head:new Fe(z+1,0)}])},join:function(b,M){var S=M.selectionLine,z=isNaN(M.selectionLineEnd)?S:M.selectionLineEnd;b.setCursor(new Fe(S,0)),ir.joinLines(b,{repeat:z-S},b.state.vim)},delmarks:function(b,M){if(!M.argString||!xt(M.argString)){Dt(b,"Argument required");return}for(var S=b.state.vim,z=new Ue.StringStream(xt(M.argString));!z.eol();){z.eatSpace();var F=z.pos;if(!z.match(/[a-zA-Z]/,!1)){Dt(b,"Invalid argument: "+M.argString.substring(F));return}var W=z.next();if(z.match("-",!0)){if(!z.match(/[a-zA-Z]/,!1)){Dt(b,"Invalid argument: "+M.argString.substring(F));return}var G=W,K=z.next();if(!(u(G)&&u(K)||p(G)&&p(K))){Dt(b,"Invalid argument: "+G+"-");return}var Z=G.charCodeAt(0),se=K.charCodeAt(0);if(Z>=se){Dt(b,"Invalid argument: "+M.argString.substring(F));return}for(var de=0;de<=se-Z;de++){var ke=String.fromCharCode(Z+de);delete S.marks[ke]}}else delete S.marks[W]}}},ii=new bl;R("insertModeEscKeysTimeout",200,"number"),Ue.Vim=wt;var os={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"},Wr=wt.handleKey.bind(wt);wt.handleKey=function(b,M,S){return b.operation(function(){return Wr(b,M,S)},!0)},O(),r.CodeMirror=Ue;var Di=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,M,S,z,F){var W=this.state.vim||{},G=M.width||S.characterWidth,K=S.lineHeight,Z=M.top,se=M.left;if(!W.insertMode){var de=z.cursor?rr.comparePoints(z.cursor,z.start)<=0:F.selection.isBackwards()||F.selection.isEmpty();!de&&se>G&&(se-=G)}!W.insertMode&&W.status&&(K/=2,Z+=K),Yn.translate(b,se,Z),Yn.setStyle(b.style,"width",G+"px"),Yn.setStyle(b.style,"height",K+"px")},$getDirectionForHighlight:function(b){var M=b.state.cm,S=Di(M);if(!S.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,M,S,z,F){var W=b.editor,G=W.state.cm,K=Di(G);if(z!=-1){if(K.insertMode||(M==-1?(S.charCodeAt(0)>255&&b.inputKey&&(S=b.inputKey,S&&b.inputHash==4&&(S=S.toUpperCase())),b.inputChar=S):M==4||M==0?b.inputKey==S&&b.inputHash==M&&b.inputChar?(S=b.inputChar,M=-1):(b.inputChar=null,b.inputKey=S,b.inputHash=M):b.inputChar=b.inputKey=null),G.state.overwrite&&K.insertMode&&S=="backspace"&&M==0)return{command:"gotoleft"};if(S=="c"&&M==1&&!Fo.isMac&&W.getCopyText())return W.once("copy",function(){K.insertMode?W.selection.clearSelection():G.operation(function(){Rn(G)})}),{command:"null",passEvent:!0};if(S=="esc"&&!K.insertMode&&!K.visualMode&&!G.ace.inMultiSelectMode){var Z=gn(G),se=Z.getOverlay();se&&G.removeOverlay(se)}if(M==-1||M&1||M===0&&S.length>1){var de=K.insertMode,ke=ks(M,S,F||{},K);K.status==null&&(K.status="");var Te=Qi(G,ke,"user");return K=Di(G),Te&&K.status!=null?K.status+=ke:K.status==null&&(K.status=""),G._signal("changeStatus"),!Te&&(M!=-1||de)?void 0:{command:"null",passEvent:!Te}}}},attach:function(b){function M(){var z=Di(S).insertMode;S.ace.renderer.setStyle("normal-mode",!z),b.textInput.setCommandMode(!z),b.renderer.$keepTextAreaAtCursor=z,b.renderer.$blockCursor=!z}b.state||(b.state={});var S=new Ue(b);b.state.cm=S,b.$vimModeHandler=this,s(S),Di(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(Di(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()||(M(),S._signal("changeStatus"))}),M(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(b){var M=b.state.cm;f(M),M.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var M=b.state.cm,S=Di(M);if(S.insertMode)return"INSERT";var z="";return S.visualMode&&(z+="VISUAL",S.visualLine&&(z+=" LINE"),S.visualBlock&&(z+=" BLOCK")),S.status&&(z+=(z?" ":"")+S.status),z}},wt.defineOption({name:"wrap",set:function(b,M){M&&M.ace.setOption("wrap",b)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),jn.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"}}),jn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(b,M,S,z,F){var W=S[0].anchor.line,G=S[0].head.line;return M.linewise&&G--,Zi(b.ace,{startRow:W,endRow:G}),Fe(G,0)}),R("textwidth",void 0,"number",["tw"],function(b,M){if(M!==void 0){if(b===void 0){var S=M.ace.getOption("printMarginColumn");return S}var z=Math.round(b);z>1&&M.ace.setOption("printMarginColumn",z)}}),ir.aceCommand=function(b,M,S){b.vimCmd=M,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",pi):pi(null,b.ace)},ir.fold=function(b,M,S){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(M.all?2:0)+(M.open?1:0)])},wo=jn.length,r.handler.defaultKeymap=jn,r.handler.actions=ir,r.Vim=wt}),(function(){ace.require(["ace/keyboard/vim"],function(t){e&&(e.exports=t)})})()})(dy)),dy.exports}lT();var py={},gy;function cT(){return gy||(gy=1,(function(e){(function(){var n={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 t(v){return c(g(v),arguments)}function r(v,s){return t.apply(null,[v].concat(s||[]))}function c(v,s){var f=1,a=v.length,l,u="",d,o,p,m,w,x,R,T;for(d=0;d<a;d++)if(typeof v[d]=="string")u+=v[d];else if(typeof v[d]=="object"){if(p=v[d],p.keys)for(l=s[f],o=0;o<p.keys.length;o++){if(l==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',p.keys[o],p.keys[o-1]));l=l[p.keys[o]]}else p.param_no?l=s[p.param_no]:l=s[f++];if(n.not_type.test(p.type)&&n.not_primitive.test(p.type)&&l instanceof Function&&(l=l()),n.numeric_arg.test(p.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(t("[sprintf] expecting number but found %T",l));switch(n.number.test(p.type)&&(R=l>=0),p.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,p.width?parseInt(p.width):0);break;case"e":l=p.precision?parseFloat(l).toExponential(p.precision):parseFloat(l).toExponential();break;case"f":l=p.precision?parseFloat(l).toFixed(p.precision):parseFloat(l);break;case"g":l=p.precision?String(Number(l.toPrecision(p.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=p.precision?l.substring(0,p.precision):l;break;case"t":l=String(!!l),l=p.precision?l.substring(0,p.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=p.precision?l.substring(0,p.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=p.precision?l.substring(0,p.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}n.json.test(p.type)?u+=l:(n.number.test(p.type)&&(!R||p.sign)?(T=R?"+":"-",l=l.toString().replace(n.sign,"")):T="",w=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",x=p.width-(T+l).length,m=p.width&&x>0?w.repeat(x):"",u+=p.align?T+l+m:w==="0"?T+m+l:m+T+l)}return u}var h=Object.create(null);function g(v){if(h[v])return h[v];for(var s=v,f,a=[],l=0;s;){if((f=n.text.exec(s))!==null)a.push(f[0]);else if((f=n.modulo.exec(s))!==null)a.push("%");else if((f=n.placeholder.exec(s))!==null){if(f[2]){l|=1;var u=[],d=f[2],o=[];if((o=n.key.exec(d))!==null)for(u.push(o[1]);(d=d.substring(o[0].length))!=="";)if((o=n.key_access.exec(d))!==null)u.push(o[1]);else if((o=n.index_access.exec(d))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=u}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(f[0].length)}return h[v]=a}e.sprintf=t,e.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()})(py)),py}cT();var ou={exports:{}},uT=ou.exports,my;function hT(){return my||(my=1,(function(e,n){(function(){var t,r="4.18.1",c=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",v="Invalid `variable` option passed into `_.template`",s="Invalid `imports` option passed into `_.template`",f="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",u=1,d=2,o=4,p=1,m=2,w=1,x=2,R=4,T=8,_=16,C=32,P=64,O=128,E=256,k=512,B=30,N="...",I=800,$=16,A=1,D=2,j=3,U=1/0,q=9007199254740991,Q=17976931348623157e292,re=NaN,le=4294967295,ne=le-1,ue=le>>>1,he=[["ary",O],["bind",w],["bindKey",x],["curry",T],["curryRight",_],["flip",k],["partial",C],["partialRight",P],["rearg",E]],oe="[object Arguments]",ee="[object Array]",ye="[object AsyncFunction]",we="[object Boolean]",Ae="[object Date]",Je="[object DOMException]",ze="[object Error]",qe="[object Function]",Ze="[object GeneratorFunction]",at="[object Map]",ct="[object Number]",Ft="[object Null]",Me="[object Object]",xt="[object Promise]",St="[object Proxy]",Vt="[object RegExp]",un="[object Set]",An="[object String]",ft="[object Symbol]",it="[object Undefined]",Gt="[object WeakMap]",Bn="[object WeakSet]",$n="[object ArrayBuffer]",Nn="[object DataView]",Un="[object Float32Array]",Rn="[object Float64Array]",Vn="[object Int8Array]",Xn="[object Int16Array]",hn="[object Int32Array]",Dn="[object Uint8Array]",Ti="[object Uint8ClampedArray]",Xr="[object Uint16Array]",ei="[object Uint32Array]",Ei=/\b__p \+= '';/g,ho=/\b(__p \+=) '' \+/g,mr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ki=/&(?:amp|lt|gt|quot|#39);/g,Fr=/[&<>"']/g,fo=RegExp(Ki.source),ar=RegExp(Fr.source),Ws=/<%-([\s\S]+?)%>/g,gs=/<%([\s\S]+?)%>/g,Ko=/<%=([\s\S]+?)%>/g,Mi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gn=/^\w*$/,Ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/[\\^$.*+?()[\]{}|]/g,gn=RegExp(Lr.source),Fn=/^\s+/,Ii=/\s/,hi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ms=/\{\n\/\* \[wrapped with (.+)\] \*/,vs=/,? & /,ys=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bs=/[()=,{}\[\]\/\s]/,di=/\\(\\)?/g,Ri=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Hs=/^[-+]0x[0-9a-f]+$/i,Or=/^0b[01]+$/i,Pt=/^\[object .+?Constructor\]$/,dn=/^0o[0-7]+$/i,qn=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,er=/($^)/,go=/['\n\r\u2028\u2029\\]/g,Li="\\ud800-\\udfff",ws="\\u0300-\\u036f",mo="\\ufe20-\\ufe2f",fi="\\u20d0-\\u20ff",Do=ws+mo+fi,ti="\\u2700-\\u27bf",Nr="a-z\\xdf-\\xf6\\xf8-\\xff",vo="\\xac\\xb1\\xd7\\xf7",Oi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jo="\\u2000-\\u206f",Po=" \\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",tr="A-Z\\xc0-\\xd6\\xd8-\\xde",zo="\\ufe0e\\ufe0f",Qo=vo+Oi+Jo+Po,Ji="['’]",xs="["+Li+"]",Zo="["+Qo+"]",Bo="["+Do+"]",Cs="\\d+",Xo="["+ti+"]",es="["+Nr+"]",ks="[^"+Li+Qo+Cs+ti+Nr+tr+"]",Ni="\\ud83c[\\udffb-\\udfff]",Qi="(?:"+Bo+"|"+Ni+")",pi="[^"+Li+"]",rr="(?:\\ud83c[\\udde6-\\uddff]){2}",yo="[\\ud800-\\udbff][\\udc00-\\udfff]",Yn="["+tr+"]",bo="\\u200d",Dr="(?:"+es+"|"+ks+")",ts="(?:"+Yn+"|"+ks+")",ni="(?:"+Ji+"(?:d|ll|m|re|s|t|ve))?",Fo="(?:"+Ji+"(?:D|LL|M|RE|S|T|VE))?",jo=Qi+"?",jr="["+zo+"]?",ns="(?:"+bo+"(?:"+[pi,rr,yo].join("|")+")"+jr+jo+")*",Zi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rs=jr+jo+ns,Fe="(?:"+[Xo,rr,yo].join("|")+")"+rs,jn="(?:"+[pi+Bo+"?",Bo,rr,yo,xs].join("|")+")",wo=RegExp(Ji,"g"),gi=RegExp(Bo,"g"),Sn=RegExp(Ni+"(?="+Ni+")|"+jn+rs,"g"),is=RegExp([Yn+"?"+es+"+"+ni+"(?="+[Zo,Yn,"$"].join("|")+")",ts+"+"+Fo+"(?="+[Zo,Yn+Dr,"$"].join("|")+")",Yn+"?"+Dr+"+"+ni,Yn+"+"+Fo,Ue,Zi,Cs,Fe].join("|"),"g"),X=RegExp("["+bo+Li+Do+zo+"]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ie=["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"],Oe=-1,Ye={};Ye[Un]=Ye[Rn]=Ye[Vn]=Ye[Xn]=Ye[hn]=Ye[Dn]=Ye[Ti]=Ye[Xr]=Ye[ei]=!0,Ye[oe]=Ye[ee]=Ye[$n]=Ye[we]=Ye[Nn]=Ye[Ae]=Ye[ze]=Ye[qe]=Ye[at]=Ye[ct]=Ye[Me]=Ye[Vt]=Ye[un]=Ye[An]=Ye[Gt]=!1;var We={};We[oe]=We[ee]=We[$n]=We[Nn]=We[we]=We[Ae]=We[Un]=We[Rn]=We[Vn]=We[Xn]=We[hn]=We[at]=We[ct]=We[Me]=We[Vt]=We[un]=We[An]=We[ft]=We[Dn]=We[Ti]=We[Xr]=We[ei]=!0,We[ze]=We[qe]=We[Gt]=!1;var rt={À:"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"},rn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,wt=parseInt,an=typeof Ds=="object"&&Ds&&Ds.Object===Object&&Ds,mi=typeof self=="object"&&self&&self.Object===Object&&self,qt=an||mi||Function("return this")(),ri=n&&!n.nodeType&&n,vr=ri&&!0&&e&&!e.nodeType&&e,Wo=vr&&vr.exports===ri,Xi=Wo&&an.process,Kn=(function(){try{var be=vr&&vr.require&&vr.require("util").types;return be||Xi&&Xi.binding&&Xi.binding("util")}catch{}})(),Us=Kn&&Kn.isArrayBuffer,ir=Kn&&Kn.isDate,eo=Kn&&Kn.isMap,to=Kn&&Kn.isRegExp,xo=Kn&&Kn.isSet,Ta=Kn&&Kn.isTypedArray;function wn(be,Re,Ee){switch(Ee.length){case 0:return be.call(Re);case 1:return be.call(Re,Ee[0]);case 2:return be.call(Re,Ee[0],Ee[1]);case 3:return be.call(Re,Ee[0],Ee[1],Ee[2])}return be.apply(Re,Ee)}function bl(be,Re,Ee,Xe){for(var kt=-1,Nt=be==null?0:be.length;++kt<Nt;){var mn=be[kt];Re(Xe,mn,Ee(mn),be)}return Xe}function $r(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe&&Re(be[Ee],Ee,be)!==!1;);return be}function ii(be,Re){for(var Ee=be==null?0:be.length;Ee--&&Re(be[Ee],Ee,be)!==!1;);return be}function os(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe;)if(!Re(be[Ee],Ee,be))return!1;return!0}function Wr(be,Re){for(var Ee=-1,Xe=be==null?0:be.length,kt=0,Nt=[];++Ee<Xe;){var mn=be[Ee];Re(mn,Ee,be)&&(Nt[kt++]=mn)}return Nt}function Di(be,Re){var Ee=be==null?0:be.length;return!!Ee&&ke(be,Re,0)>-1}function b(be,Re,Ee){for(var Xe=-1,kt=be==null?0:be.length;++Xe<kt;)if(Ee(Re,be[Xe]))return!0;return!1}function M(be,Re){for(var Ee=-1,Xe=be==null?0:be.length,kt=Array(Xe);++Ee<Xe;)kt[Ee]=Re(be[Ee],Ee,be);return kt}function S(be,Re){for(var Ee=-1,Xe=Re.length,kt=be.length;++Ee<Xe;)be[kt+Ee]=Re[Ee];return be}function z(be,Re,Ee,Xe){var kt=-1,Nt=be==null?0:be.length;for(Xe&&Nt&&(Ee=be[++kt]);++kt<Nt;)Ee=Re(Ee,be[kt],kt,be);return Ee}function F(be,Re,Ee,Xe){var kt=be==null?0:be.length;for(Xe&&kt&&(Ee=be[--kt]);kt--;)Ee=Re(Ee,be[kt],kt,be);return Ee}function W(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe;)if(Re(be[Ee],Ee,be))return!0;return!1}var G=Be("length");function K(be){return be.split("")}function Z(be){return be.match(ys)||[]}function se(be,Re,Ee){var Xe;return Ee(be,function(kt,Nt,mn){if(Re(kt,Nt,mn))return Xe=Nt,!1}),Xe}function de(be,Re,Ee,Xe){for(var kt=be.length,Nt=Ee+(Xe?1:-1);Xe?Nt--:++Nt<kt;)if(Re(be[Nt],Nt,be))return Nt;return-1}function ke(be,Re,Ee){return Re===Re?It(be,Re,Ee):de(be,Ce,Ee)}function Te(be,Re,Ee,Xe){for(var kt=Ee-1,Nt=be.length;++kt<Nt;)if(Xe(be[kt],Re))return kt;return-1}function Ce(be){return be!==be}function $e(be,Re){var Ee=be==null?0:be.length;return Ee?ut(be,Re)/Ee:re}function Be(be){return function(Re){return Re==null?t:Re[be]}}function De(be){return function(Re){return be==null?t:be[Re]}}function et(be,Re,Ee,Xe,kt){return kt(be,function(Nt,mn,Kt){Ee=Xe?(Xe=!1,Nt):Re(Ee,Nt,mn,Kt)}),Ee}function Ct(be,Re){var Ee=be.length;for(be.sort(Re);Ee--;)be[Ee]=be[Ee].value;return be}function ut(be,Re){for(var Ee,Xe=-1,kt=be.length;++Xe<kt;){var Nt=Re(be[Xe]);Nt!==t&&(Ee=Ee===t?Nt:Ee+Nt)}return Ee}function dt(be,Re){for(var Ee=-1,Xe=Array(be);++Ee<be;)Xe[Ee]=Re(Ee);return Xe}function Wn(be,Re){return M(Re,function(Ee){return[Ee,be[Ee]]})}function Rt(be){return be&&be.slice(0,At(be)+1).replace(Fn,"")}function ln(be){return function(Re){return be(Re)}}function Bt(be,Re){return M(Re,function(Ee){return be[Ee]})}function Ot(be,Re){return be.has(Re)}function yr(be,Re){for(var Ee=-1,Xe=be.length;++Ee<Xe&&ke(Re,be[Ee],0)>-1;);return Ee}function Sr(be,Re){for(var Ee=be.length;Ee--&&ke(Re,be[Ee],0)>-1;);return Ee}function Jn(be,Re){for(var Ee=be.length,Xe=0;Ee--;)be[Ee]===Re&&++Xe;return Xe}var V=De(rt),J=De(rn);function ae(be){return"\\"+Ve[be]}function ce(be,Re){return be==null?t:be[Re]}function ge(be){return X.test(be)}function Se(be){return xe.test(be)}function Le(be){for(var Re,Ee=[];!(Re=be.next()).done;)Ee.push(Re.value);return Ee}function He(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe,kt){Ee[++Re]=[kt,Xe]}),Ee}function Ge(be,Re){return function(Ee){return be(Re(Ee))}}function Qe(be,Re){for(var Ee=-1,Xe=be.length,kt=0,Nt=[];++Ee<Xe;){var mn=be[Ee];(mn===Re||mn===l)&&(be[Ee]=l,Nt[kt++]=Ee)}return Nt}function ot(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe){Ee[++Re]=Xe}),Ee}function ht(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe){Ee[++Re]=[Xe,Xe]}),Ee}function It(be,Re,Ee){for(var Xe=Ee-1,kt=be.length;++Xe<kt;)if(be[Xe]===Re)return Xe;return-1}function fn(be,Re,Ee){for(var Xe=Ee+1;Xe--;)if(be[Xe]===Re)return Xe;return Xe}function Yt(be){return ge(be)?Ln(be):G(be)}function Mt(be){return ge(be)?Qn(be):K(be)}function At(be){for(var Re=be.length;Re--&&Ii.test(be.charAt(Re)););return Re}var bt=De(yn);function Ln(be){for(var Re=Sn.lastIndex=0;Sn.test(be);)++Re;return Re}function Qn(be){return be.match(Sn)||[]}function br(be){return be.match(is)||[]}var xn=(function be(Re){Re=Re==null?qt:Tn.defaults(qt.Object(),Re,Tn.pick(qt,Ie));var Ee=Re.Array,Xe=Re.Date,kt=Re.Error,Nt=Re.Function,mn=Re.Math,Kt=Re.Object,Pi=Re.RegExp,Hr=Re.String,Pn=Re.TypeError,Co=Ee.prototype,Ur=Nt.prototype,_s=Kt.prototype,oh=Re["__core-js_shared__"],sh=Ur.toString,Cn=_s.hasOwnProperty,BD=0,p1=(function(){var i=/[^.]+$/.exec(oh&&oh.keys&&oh.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),ah=_s.toString,FD=sh.call(Kt),jD=qt._,WD=Pi("^"+sh.call(Cn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lh=Wo?Re.Buffer:t,Vs=Re.Symbol,ch=Re.Uint8Array,g1=lh?lh.allocUnsafe:t,uh=Ge(Kt.getPrototypeOf,Kt),m1=Kt.create,v1=_s.propertyIsEnumerable,hh=Co.splice,y1=Vs?Vs.isConcatSpreadable:t,_c=Vs?Vs.iterator:t,Ea=Vs?Vs.toStringTag:t,dh=(function(){try{var i=Oa(Kt,"defineProperty");return i({},"",{}),i}catch{}})(),HD=Re.clearTimeout!==qt.clearTimeout&&Re.clearTimeout,UD=Xe&&Xe.now!==qt.Date.now&&Xe.now,VD=Re.setTimeout!==qt.setTimeout&&Re.setTimeout,fh=mn.ceil,ph=mn.floor,Gp=Kt.getOwnPropertySymbols,GD=lh?lh.isBuffer:t,b1=Re.isFinite,qD=Co.join,YD=Ge(Kt.keys,Kt),Tr=mn.max,oi=mn.min,KD=Xe.now,JD=Re.parseInt,w1=mn.random,QD=Co.reverse,qp=Oa(Re,"DataView"),Ac=Oa(Re,"Map"),Yp=Oa(Re,"Promise"),wl=Oa(Re,"Set"),$c=Oa(Re,"WeakMap"),Sc=Oa(Kt,"create"),gh=$c&&new $c,xl={},ZD=Na(qp),XD=Na(Ac),eP=Na(Yp),tP=Na(wl),nP=Na($c),mh=Vs?Vs.prototype:t,Tc=mh?mh.valueOf:t,x1=mh?mh.toString:t;function te(i){if(or(i)&&!zt(i)&&!(i instanceof tn)){if(i instanceof ko)return i;if(Cn.call(i,"__wrapped__"))return CC(i)}return new ko(i)}var Cl=(function(){function i(){}return function(y){if(!nr(y))return{};if(m1)return m1(y);i.prototype=y;var L=new i;return i.prototype=t,L}})();function vh(){}function ko(i,y){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=t}te.templateSettings={escape:Ws,evaluate:gs,interpolate:Ko,variable:"",imports:{_:te}},te.prototype=vh.prototype,te.prototype.constructor=te,ko.prototype=Cl(vh.prototype),ko.prototype.constructor=ko;function tn(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function rP(){var i=new tn(this.__wrapped__);return i.__actions__=zi(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=zi(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=zi(this.__views__),i}function iP(){if(this.__filtered__){var i=new tn(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function oP(){var i=this.__wrapped__.value(),y=this.__dir__,L=zt(i),H=y<0,Y=L?i.length:0,ie=vz(0,Y,this.__views__),fe=ie.start,pe=ie.end,_e=pe-fe,Ne=H?pe:fe-1,Pe=this.__iteratees__,je=Pe.length,st=0,vt=oi(_e,this.__takeCount__);if(!L||!H&&Y==_e&&vt==_e)return V1(i,this.__actions__);var Et=[];e:for(;_e--&&st<vt;){Ne+=y;for(var Ut=-1,$t=i[Ne];++Ut<je;){var Zt=Pe[Ut],on=Zt.iteratee,io=Zt.type,bi=on($t);if(io==D)$t=bi;else if(!bi){if(io==A)continue e;break e}}Et[st++]=$t}return Et}tn.prototype=Cl(vh.prototype),tn.prototype.constructor=tn;function Ma(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function sP(){this.__data__=Sc?Sc(null):{},this.size=0}function aP(i){var y=this.has(i)&&delete this.__data__[i];return this.size-=y?1:0,y}function lP(i){var y=this.__data__;if(Sc){var L=y[i];return L===f?t:L}return Cn.call(y,i)?y[i]:t}function cP(i){var y=this.__data__;return Sc?y[i]!==t:Cn.call(y,i)}function uP(i,y){var L=this.__data__;return this.size+=this.has(i)?0:1,L[i]=Sc&&y===t?f:y,this}Ma.prototype.clear=sP,Ma.prototype.delete=aP,Ma.prototype.get=lP,Ma.prototype.has=cP,Ma.prototype.set=uP;function As(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function hP(){this.__data__=[],this.size=0}function dP(i){var y=this.__data__,L=yh(y,i);if(L<0)return!1;var H=y.length-1;return L==H?y.pop():hh.call(y,L,1),--this.size,!0}function fP(i){var y=this.__data__,L=yh(y,i);return L<0?t:y[L][1]}function pP(i){return yh(this.__data__,i)>-1}function gP(i,y){var L=this.__data__,H=yh(L,i);return H<0?(++this.size,L.push([i,y])):L[H][1]=y,this}As.prototype.clear=hP,As.prototype.delete=dP,As.prototype.get=fP,As.prototype.has=pP,As.prototype.set=gP;function $s(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function mP(){this.size=0,this.__data__={hash:new Ma,map:new(Ac||As),string:new Ma}}function vP(i){var y=Mh(this,i).delete(i);return this.size-=y?1:0,y}function yP(i){return Mh(this,i).get(i)}function bP(i){return Mh(this,i).has(i)}function wP(i,y){var L=Mh(this,i),H=L.size;return L.set(i,y),this.size+=L.size==H?0:1,this}$s.prototype.clear=mP,$s.prototype.delete=vP,$s.prototype.get=yP,$s.prototype.has=bP,$s.prototype.set=wP;function Ia(i){var y=-1,L=i==null?0:i.length;for(this.__data__=new $s;++y<L;)this.add(i[y])}function xP(i){return this.__data__.set(i,f),this}function CP(i){return this.__data__.has(i)}Ia.prototype.add=Ia.prototype.push=xP,Ia.prototype.has=CP;function Ho(i){var y=this.__data__=new As(i);this.size=y.size}function kP(){this.__data__=new As,this.size=0}function _P(i){var y=this.__data__,L=y.delete(i);return this.size=y.size,L}function AP(i){return this.__data__.get(i)}function $P(i){return this.__data__.has(i)}function SP(i,y){var L=this.__data__;if(L instanceof As){var H=L.__data__;if(!Ac||H.length<c-1)return H.push([i,y]),this.size=++L.size,this;L=this.__data__=new $s(H)}return L.set(i,y),this.size=L.size,this}Ho.prototype.clear=kP,Ho.prototype.delete=_P,Ho.prototype.get=AP,Ho.prototype.has=$P,Ho.prototype.set=SP;function C1(i,y){var L=zt(i),H=!L&&Da(i),Y=!L&&!H&&Js(i),ie=!L&&!H&&!Y&&$l(i),fe=L||H||Y||ie,pe=fe?dt(i.length,Hr):[],_e=pe.length;for(var Ne in i)(y||Cn.call(i,Ne))&&!(fe&&(Ne=="length"||Y&&(Ne=="offset"||Ne=="parent")||ie&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||Es(Ne,_e)))&&pe.push(Ne);return pe}function k1(i){var y=i.length;return y?i[og(0,y-1)]:t}function TP(i,y){return Ih(zi(i),Ra(y,0,i.length))}function EP(i){return Ih(zi(i))}function Kp(i,y,L){(L!==t&&!Vo(i[y],L)||L===t&&!(y in i))&&ss(i,y,L)}function Ec(i,y,L){var H=i[y];(!(Cn.call(i,y)&&Vo(H,L))||L===t&&!(y in i))&&ss(i,y,L)}function yh(i,y){for(var L=i.length;L--;)if(Vo(i[L][0],y))return L;return-1}function MP(i,y,L,H){return Gs(i,function(Y,ie,fe){y(H,Y,L(Y),fe)}),H}function _1(i,y){return i&&ls(y,Pr(y),i)}function IP(i,y){return i&&ls(y,Fi(y),i)}function ss(i,y,L){y=="__proto__"&&dh?dh(i,y,{configurable:!0,enumerable:!0,value:L,writable:!0}):i[y]=L}function Jp(i,y){for(var L=-1,H=y.length,Y=Ee(H),ie=i==null;++L<H;)Y[L]=ie?t:Ig(i,y[L]);return Y}function Ra(i,y,L){return i===i&&(L!==t&&(i=i<=L?i:L),y!==t&&(i=i>=y?i:y)),i}function _o(i,y,L,H,Y,ie){var fe,pe=y&u,_e=y&d,Ne=y&o;if(L&&(fe=Y?L(i,H,Y,ie):L(i)),fe!==t)return fe;if(!nr(i))return i;var Pe=zt(i);if(Pe){if(fe=bz(i),!pe)return zi(i,fe)}else{var je=si(i),st=je==qe||je==Ze;if(Js(i))return Y1(i,pe);if(je==Me||je==oe||st&&!Y){if(fe=_e||st?{}:fC(i),!pe)return _e?lz(i,IP(fe,i)):az(i,_1(fe,i))}else{if(!We[je])return Y?i:{};fe=wz(i,je,pe)}}ie||(ie=new Ho);var vt=ie.get(i);if(vt)return vt;ie.set(i,fe),WC(i)?i.forEach(function($t){fe.add(_o($t,y,L,$t,i,ie))}):FC(i)&&i.forEach(function($t,Zt){fe.set(Zt,_o($t,y,L,Zt,i,ie))});var Et=Ne?_e?mg:gg:_e?Fi:Pr,Ut=Pe?t:Et(i);return $r(Ut||i,function($t,Zt){Ut&&(Zt=$t,$t=i[Zt]),Ec(fe,Zt,_o($t,y,L,Zt,i,ie))}),fe}function RP(i){var y=Pr(i);return function(L){return A1(L,i,y)}}function A1(i,y,L){var H=L.length;if(i==null)return!H;for(i=Kt(i);H--;){var Y=L[H],ie=y[Y],fe=i[Y];if(fe===t&&!(Y in i)||!ie(fe))return!1}return!0}function $1(i,y,L){if(typeof i!="function")throw new Pn(g);return Dc(function(){i.apply(t,L)},y)}function Mc(i,y,L,H){var Y=-1,ie=Di,fe=!0,pe=i.length,_e=[],Ne=y.length;if(!pe)return _e;L&&(y=M(y,ln(L))),H?(ie=b,fe=!1):y.length>=c&&(ie=Ot,fe=!1,y=new Ia(y));e:for(;++Y<pe;){var Pe=i[Y],je=L==null?Pe:L(Pe);if(Pe=H||Pe!==0?Pe:0,fe&&je===je){for(var st=Ne;st--;)if(y[st]===je)continue e;_e.push(Pe)}else ie(y,je,H)||_e.push(Pe)}return _e}var Gs=X1(as),S1=X1(Zp,!0);function LP(i,y){var L=!0;return Gs(i,function(H,Y,ie){return L=!!y(H,Y,ie),L}),L}function bh(i,y,L){for(var H=-1,Y=i.length;++H<Y;){var ie=i[H],fe=y(ie);if(fe!=null&&(pe===t?fe===fe&&!ro(fe):L(fe,pe)))var pe=fe,_e=ie}return _e}function OP(i,y,L,H){var Y=i.length;for(L=Wt(L),L<0&&(L=-L>Y?0:Y+L),H=H===t||H>Y?Y:Wt(H),H<0&&(H+=Y),H=L>H?0:UC(H);L<H;)i[L++]=y;return i}function T1(i,y){var L=[];return Gs(i,function(H,Y,ie){y(H,Y,ie)&&L.push(H)}),L}function Vr(i,y,L,H,Y){var ie=-1,fe=i.length;for(L||(L=Cz),Y||(Y=[]);++ie<fe;){var pe=i[ie];y>0&&L(pe)?y>1?Vr(pe,y-1,L,H,Y):S(Y,pe):H||(Y[Y.length]=pe)}return Y}var Qp=eC(),E1=eC(!0);function as(i,y){return i&&Qp(i,y,Pr)}function Zp(i,y){return i&&E1(i,y,Pr)}function wh(i,y){return Wr(y,function(L){return Ms(i[L])})}function La(i,y){y=Ys(y,i);for(var L=0,H=y.length;i!=null&&L<H;)i=i[Uo(y[L++])];return L&&L==H?i:t}function M1(i,y,L){var H=y(i);return zt(i)?H:S(H,L(i))}function vi(i){return i==null?i===t?it:Ft:Ea&&Ea in Kt(i)?mz(i):Ez(i)}function Xp(i,y){return i>y}function NP(i,y){return i!=null&&Cn.call(i,y)}function DP(i,y){return i!=null&&y in Kt(i)}function PP(i,y,L){return i>=oi(y,L)&&i<Tr(y,L)}function eg(i,y,L){for(var H=L?b:Di,Y=i[0].length,ie=i.length,fe=ie,pe=Ee(ie),_e=1/0,Ne=[];fe--;){var Pe=i[fe];fe&&y&&(Pe=M(Pe,ln(y))),_e=oi(Pe.length,_e),pe[fe]=!L&&(y||Y>=120&&Pe.length>=120)?new Ia(fe&&Pe):t}Pe=i[0];var je=-1,st=pe[0];e:for(;++je<Y&&Ne.length<_e;){var vt=Pe[je],Et=y?y(vt):vt;if(vt=L||vt!==0?vt:0,!(st?Ot(st,Et):H(Ne,Et,L))){for(fe=ie;--fe;){var Ut=pe[fe];if(!(Ut?Ot(Ut,Et):H(i[fe],Et,L)))continue e}st&&st.push(Et),Ne.push(vt)}}return Ne}function zP(i,y,L,H){return as(i,function(Y,ie,fe){y(H,L(Y),ie,fe)}),H}function Ic(i,y,L){y=Ys(y,i),i=vC(i,y);var H=i==null?i:i[Uo($o(y))];return H==null?t:wn(H,i,L)}function I1(i){return or(i)&&vi(i)==oe}function BP(i){return or(i)&&vi(i)==$n}function FP(i){return or(i)&&vi(i)==Ae}function Rc(i,y,L,H,Y){return i===y?!0:i==null||y==null||!or(i)&&!or(y)?i!==i&&y!==y:jP(i,y,L,H,Rc,Y)}function jP(i,y,L,H,Y,ie){var fe=zt(i),pe=zt(y),_e=fe?ee:si(i),Ne=pe?ee:si(y);_e=_e==oe?Me:_e,Ne=Ne==oe?Me:Ne;var Pe=_e==Me,je=Ne==Me,st=_e==Ne;if(st&&Js(i)){if(!Js(y))return!1;fe=!0,Pe=!1}if(st&&!Pe)return ie||(ie=new Ho),fe||$l(i)?uC(i,y,L,H,Y,ie):pz(i,y,_e,L,H,Y,ie);if(!(L&p)){var vt=Pe&&Cn.call(i,"__wrapped__"),Et=je&&Cn.call(y,"__wrapped__");if(vt||Et){var Ut=vt?i.value():i,$t=Et?y.value():y;return ie||(ie=new Ho),Y(Ut,$t,L,H,ie)}}return st?(ie||(ie=new Ho),gz(i,y,L,H,Y,ie)):!1}function WP(i){return or(i)&&si(i)==at}function tg(i,y,L,H){var Y=L.length,ie=Y,fe=!H;if(i==null)return!ie;for(i=Kt(i);Y--;){var pe=L[Y];if(fe&&pe[2]?pe[1]!==i[pe[0]]:!(pe[0]in i))return!1}for(;++Y<ie;){pe=L[Y];var _e=pe[0],Ne=i[_e],Pe=pe[1];if(fe&&pe[2]){if(Ne===t&&!(_e in i))return!1}else{var je=new Ho;if(H)var st=H(Ne,Pe,_e,i,y,je);if(!(st===t?Rc(Pe,Ne,p|m,H,je):st))return!1}}return!0}function R1(i){if(!nr(i)||_z(i))return!1;var y=Ms(i)?WD:Pt;return y.test(Na(i))}function HP(i){return or(i)&&vi(i)==Vt}function UP(i){return or(i)&&si(i)==un}function VP(i){return or(i)&&Ph(i.length)&&!!Ye[vi(i)]}function L1(i){return typeof i=="function"?i:i==null?ji:typeof i=="object"?zt(i)?D1(i[0],i[1]):N1(i):nk(i)}function ng(i){if(!Nc(i))return YD(i);var y=[];for(var L in Kt(i))Cn.call(i,L)&&L!="constructor"&&y.push(L);return y}function GP(i){if(!nr(i))return Tz(i);var y=Nc(i),L=[];for(var H in i)H=="constructor"&&(y||!Cn.call(i,H))||L.push(H);return L}function rg(i,y){return i<y}function O1(i,y){var L=-1,H=Bi(i)?Ee(i.length):[];return Gs(i,function(Y,ie,fe){H[++L]=y(Y,ie,fe)}),H}function N1(i){var y=yg(i);return y.length==1&&y[0][2]?gC(y[0][0],y[0][1]):function(L){return L===i||tg(L,i,y)}}function D1(i,y){return wg(i)&&pC(y)?gC(Uo(i),y):function(L){var H=Ig(L,i);return H===t&&H===y?Rg(L,i):Rc(y,H,p|m)}}function xh(i,y,L,H,Y){i!==y&&Qp(y,function(ie,fe){if(Y||(Y=new Ho),nr(ie))qP(i,y,fe,L,xh,H,Y);else{var pe=H?H(Cg(i,fe),ie,fe+"",i,y,Y):t;pe===t&&(pe=ie),Kp(i,fe,pe)}},Fi)}function qP(i,y,L,H,Y,ie,fe){var pe=Cg(i,L),_e=Cg(y,L),Ne=fe.get(_e);if(Ne){Kp(i,L,Ne);return}var Pe=ie?ie(pe,_e,L+"",i,y,fe):t,je=Pe===t;if(je){var st=zt(_e),vt=!st&&Js(_e),Et=!st&&!vt&&$l(_e);Pe=_e,st||vt||Et?zt(pe)?Pe=pe:lr(pe)?Pe=zi(pe):vt?(je=!1,Pe=Y1(_e,!0)):Et?(je=!1,Pe=K1(_e,!0)):Pe=[]:Pc(_e)||Da(_e)?(Pe=pe,Da(pe)?Pe=VC(pe):(!nr(pe)||Ms(pe))&&(Pe=fC(_e))):je=!1}je&&(fe.set(_e,Pe),Y(Pe,_e,H,ie,fe),fe.delete(_e)),Kp(i,L,Pe)}function P1(i,y){var L=i.length;if(L)return y+=y<0?L:0,Es(y,L)?i[y]:t}function z1(i,y,L){y.length?y=M(y,function(ie){return zt(ie)?function(fe){return La(fe,ie.length===1?ie[0]:ie)}:ie}):y=[ji];var H=-1;y=M(y,ln(Tt()));var Y=O1(i,function(ie,fe,pe){var _e=M(y,function(Ne){return Ne(ie)});return{criteria:_e,index:++H,value:ie}});return Ct(Y,function(ie,fe){return sz(ie,fe,L)})}function YP(i,y){return B1(i,y,function(L,H){return Rg(i,H)})}function B1(i,y,L){for(var H=-1,Y=y.length,ie={};++H<Y;){var fe=y[H],pe=La(i,fe);L(pe,fe)&&Lc(ie,Ys(fe,i),pe)}return ie}function KP(i){return function(y){return La(y,i)}}function ig(i,y,L,H){var Y=H?Te:ke,ie=-1,fe=y.length,pe=i;for(i===y&&(y=zi(y)),L&&(pe=M(i,ln(L)));++ie<fe;)for(var _e=0,Ne=y[ie],Pe=L?L(Ne):Ne;(_e=Y(pe,Pe,_e,H))>-1;)pe!==i&&hh.call(pe,_e,1),hh.call(i,_e,1);return i}function F1(i,y){for(var L=i?y.length:0,H=L-1;L--;){var Y=y[L];if(L==H||Y!==ie){var ie=Y;Es(Y)?hh.call(i,Y,1):lg(i,Y)}}return i}function og(i,y){return i+ph(w1()*(y-i+1))}function JP(i,y,L,H){for(var Y=-1,ie=Tr(fh((y-i)/(L||1)),0),fe=Ee(ie);ie--;)fe[H?ie:++Y]=i,i+=L;return fe}function sg(i,y){var L="";if(!i||y<1||y>q)return L;do y%2&&(L+=i),y=ph(y/2),y&&(i+=i);while(y);return L}function Jt(i,y){return kg(mC(i,y,ji),i+"")}function QP(i){return k1(Sl(i))}function ZP(i,y){var L=Sl(i);return Ih(L,Ra(y,0,L.length))}function Lc(i,y,L,H){if(!nr(i))return i;y=Ys(y,i);for(var Y=-1,ie=y.length,fe=ie-1,pe=i;pe!=null&&++Y<ie;){var _e=Uo(y[Y]),Ne=L;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return i;if(Y!=fe){var Pe=pe[_e];Ne=H?H(Pe,_e,pe):t,Ne===t&&(Ne=nr(Pe)?Pe:Es(y[Y+1])?[]:{})}Ec(pe,_e,Ne),pe=pe[_e]}return i}var j1=gh?function(i,y){return gh.set(i,y),i}:ji,XP=dh?function(i,y){return dh(i,"toString",{configurable:!0,enumerable:!1,value:Og(y),writable:!0})}:ji;function ez(i){return Ih(Sl(i))}function Ao(i,y,L){var H=-1,Y=i.length;y<0&&(y=-y>Y?0:Y+y),L=L>Y?Y:L,L<0&&(L+=Y),Y=y>L?0:L-y>>>0,y>>>=0;for(var ie=Ee(Y);++H<Y;)ie[H]=i[H+y];return ie}function tz(i,y){var L;return Gs(i,function(H,Y,ie){return L=y(H,Y,ie),!L}),!!L}function Ch(i,y,L){var H=0,Y=i==null?H:i.length;if(typeof y=="number"&&y===y&&Y<=ue){for(;H<Y;){var ie=H+Y>>>1,fe=i[ie];fe!==null&&!ro(fe)&&(L?fe<=y:fe<y)?H=ie+1:Y=ie}return Y}return ag(i,y,ji,L)}function ag(i,y,L,H){var Y=0,ie=i==null?0:i.length;if(ie===0)return 0;y=L(y);for(var fe=y!==y,pe=y===null,_e=ro(y),Ne=y===t;Y<ie;){var Pe=ph((Y+ie)/2),je=L(i[Pe]),st=je!==t,vt=je===null,Et=je===je,Ut=ro(je);if(fe)var $t=H||Et;else Ne?$t=Et&&(H||st):pe?$t=Et&&st&&(H||!vt):_e?$t=Et&&st&&!vt&&(H||!Ut):vt||Ut?$t=!1:$t=H?je<=y:je<y;$t?Y=Pe+1:ie=Pe}return oi(ie,ne)}function W1(i,y){for(var L=-1,H=i.length,Y=0,ie=[];++L<H;){var fe=i[L],pe=y?y(fe):fe;if(!L||!Vo(pe,_e)){var _e=pe;ie[Y++]=fe===0?0:fe}}return ie}function H1(i){return typeof i=="number"?i:ro(i)?re:+i}function no(i){if(typeof i=="string")return i;if(zt(i))return M(i,no)+"";if(ro(i))return x1?x1.call(i):"";var y=i+"";return y=="0"&&1/i==-U?"-0":y}function qs(i,y,L){var H=-1,Y=Di,ie=i.length,fe=!0,pe=[],_e=pe;if(L)fe=!1,Y=b;else if(ie>=c){var Ne=y?null:dz(i);if(Ne)return ot(Ne);fe=!1,Y=Ot,_e=new Ia}else _e=y?[]:pe;e:for(;++H<ie;){var Pe=i[H],je=y?y(Pe):Pe;if(Pe=L||Pe!==0?Pe:0,fe&&je===je){for(var st=_e.length;st--;)if(_e[st]===je)continue e;y&&_e.push(je),pe.push(Pe)}else Y(_e,je,L)||(_e!==pe&&_e.push(je),pe.push(Pe))}return pe}function lg(i,y){y=Ys(y,i);var L=-1,H=y.length;if(!H)return!0;for(;++L<H;){var Y=Uo(y[L]);if(Y==="__proto__"&&!Cn.call(i,"__proto__")||(Y==="constructor"||Y==="prototype")&&L<H-1)return!1}var ie=vC(i,y);return ie==null||delete ie[Uo($o(y))]}function U1(i,y,L,H){return Lc(i,y,L(La(i,y)),H)}function kh(i,y,L,H){for(var Y=i.length,ie=H?Y:-1;(H?ie--:++ie<Y)&&y(i[ie],ie,i););return L?Ao(i,H?0:ie,H?ie+1:Y):Ao(i,H?ie+1:0,H?Y:ie)}function V1(i,y){var L=i;return L instanceof tn&&(L=L.value()),z(y,function(H,Y){return Y.func.apply(Y.thisArg,S([H],Y.args))},L)}function cg(i,y,L){var H=i.length;if(H<2)return H?qs(i[0]):[];for(var Y=-1,ie=Ee(H);++Y<H;)for(var fe=i[Y],pe=-1;++pe<H;)pe!=Y&&(ie[Y]=Mc(ie[Y]||fe,i[pe],y,L));return qs(Vr(ie,1),y,L)}function G1(i,y,L){for(var H=-1,Y=i.length,ie=y.length,fe={};++H<Y;){var pe=H<ie?y[H]:t;L(fe,i[H],pe)}return fe}function ug(i){return lr(i)?i:[]}function hg(i){return typeof i=="function"?i:ji}function Ys(i,y){return zt(i)?i:wg(i,y)?[i]:xC(kn(i))}var nz=Jt;function Ks(i,y,L){var H=i.length;return L=L===t?H:L,!y&&L>=H?i:Ao(i,y,L)}var q1=HD||function(i){return qt.clearTimeout(i)};function Y1(i,y){if(y)return i.slice();var L=i.length,H=g1?g1(L):new i.constructor(L);return i.copy(H),H}function dg(i){var y=new i.constructor(i.byteLength);return new ch(y).set(new ch(i)),y}function rz(i,y){var L=y?dg(i.buffer):i.buffer;return new i.constructor(L,i.byteOffset,i.byteLength)}function iz(i){var y=new i.constructor(i.source,Dt.exec(i));return y.lastIndex=i.lastIndex,y}function oz(i){return Tc?Kt(Tc.call(i)):{}}function K1(i,y){var L=y?dg(i.buffer):i.buffer;return new i.constructor(L,i.byteOffset,i.length)}function J1(i,y){if(i!==y){var L=i!==t,H=i===null,Y=i===i,ie=ro(i),fe=y!==t,pe=y===null,_e=y===y,Ne=ro(y);if(!pe&&!Ne&&!ie&&i>y||ie&&fe&&_e&&!pe&&!Ne||H&&fe&&_e||!L&&_e||!Y)return 1;if(!H&&!ie&&!Ne&&i<y||Ne&&L&&Y&&!H&&!ie||pe&&L&&Y||!fe&&Y||!_e)return-1}return 0}function sz(i,y,L){for(var H=-1,Y=i.criteria,ie=y.criteria,fe=Y.length,pe=L.length;++H<fe;){var _e=J1(Y[H],ie[H]);if(_e){if(H>=pe)return _e;var Ne=L[H];return _e*(Ne=="desc"?-1:1)}}return i.index-y.index}function Q1(i,y,L,H){for(var Y=-1,ie=i.length,fe=L.length,pe=-1,_e=y.length,Ne=Tr(ie-fe,0),Pe=Ee(_e+Ne),je=!H;++pe<_e;)Pe[pe]=y[pe];for(;++Y<fe;)(je||Y<ie)&&(Pe[L[Y]]=i[Y]);for(;Ne--;)Pe[pe++]=i[Y++];return Pe}function Z1(i,y,L,H){for(var Y=-1,ie=i.length,fe=-1,pe=L.length,_e=-1,Ne=y.length,Pe=Tr(ie-pe,0),je=Ee(Pe+Ne),st=!H;++Y<Pe;)je[Y]=i[Y];for(var vt=Y;++_e<Ne;)je[vt+_e]=y[_e];for(;++fe<pe;)(st||Y<ie)&&(je[vt+L[fe]]=i[Y++]);return je}function zi(i,y){var L=-1,H=i.length;for(y||(y=Ee(H));++L<H;)y[L]=i[L];return y}function ls(i,y,L,H){var Y=!L;L||(L={});for(var ie=-1,fe=y.length;++ie<fe;){var pe=y[ie],_e=H?H(L[pe],i[pe],pe,L,i):t;_e===t&&(_e=i[pe]),Y?ss(L,pe,_e):Ec(L,pe,_e)}return L}function az(i,y){return ls(i,bg(i),y)}function lz(i,y){return ls(i,hC(i),y)}function _h(i,y){return function(L,H){var Y=zt(L)?bl:MP,ie=y?y():{};return Y(L,i,Tt(H,2),ie)}}function kl(i){return Jt(function(y,L){var H=-1,Y=L.length,ie=Y>1?L[Y-1]:t,fe=Y>2?L[2]:t;for(ie=i.length>3&&typeof ie=="function"?(Y--,ie):t,fe&&yi(L[0],L[1],fe)&&(ie=Y<3?t:ie,Y=1),y=Kt(y);++H<Y;){var pe=L[H];pe&&i(y,pe,H,ie)}return y})}function X1(i,y){return function(L,H){if(L==null)return L;if(!Bi(L))return i(L,H);for(var Y=L.length,ie=y?Y:-1,fe=Kt(L);(y?ie--:++ie<Y)&&H(fe[ie],ie,fe)!==!1;);return L}}function eC(i){return function(y,L,H){for(var Y=-1,ie=Kt(y),fe=H(y),pe=fe.length;pe--;){var _e=fe[i?pe:++Y];if(L(ie[_e],_e,ie)===!1)break}return y}}function cz(i,y,L){var H=y&w,Y=Oc(i);function ie(){var fe=this&&this!==qt&&this instanceof ie?Y:i;return fe.apply(H?L:this,arguments)}return ie}function tC(i){return function(y){y=kn(y);var L=ge(y)?Mt(y):t,H=L?L[0]:y.charAt(0),Y=L?Ks(L,1).join(""):y.slice(1);return H[i]()+Y}}function _l(i){return function(y){return z(ek(XC(y).replace(wo,"")),i,"")}}function Oc(i){return function(){var y=arguments;switch(y.length){case 0:return new i;case 1:return new i(y[0]);case 2:return new i(y[0],y[1]);case 3:return new i(y[0],y[1],y[2]);case 4:return new i(y[0],y[1],y[2],y[3]);case 5:return new i(y[0],y[1],y[2],y[3],y[4]);case 6:return new i(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new i(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var L=Cl(i.prototype),H=i.apply(L,y);return nr(H)?H:L}}function uz(i,y,L){var H=Oc(i);function Y(){for(var ie=arguments.length,fe=Ee(ie),pe=ie,_e=Al(Y);pe--;)fe[pe]=arguments[pe];var Ne=ie<3&&fe[0]!==_e&&fe[ie-1]!==_e?[]:Qe(fe,_e);if(ie-=Ne.length,ie<L)return sC(i,y,Ah,Y.placeholder,t,fe,Ne,t,t,L-ie);var Pe=this&&this!==qt&&this instanceof Y?H:i;return wn(Pe,this,fe)}return Y}function nC(i){return function(y,L,H){var Y=Kt(y);if(!Bi(y)){var ie=Tt(L,3);y=Pr(y),L=function(pe){return ie(Y[pe],pe,Y)}}var fe=i(y,L,H);return fe>-1?Y[ie?y[fe]:fe]:t}}function rC(i){return Ts(function(y){var L=y.length,H=L,Y=ko.prototype.thru;for(i&&y.reverse();H--;){var ie=y[H];if(typeof ie!="function")throw new Pn(g);if(Y&&!fe&&Eh(ie)=="wrapper")var fe=new ko([],!0)}for(H=fe?H:L;++H<L;){ie=y[H];var pe=Eh(ie),_e=pe=="wrapper"?vg(ie):t;_e&&xg(_e[0])&&_e[1]==(O|T|C|E)&&!_e[4].length&&_e[9]==1?fe=fe[Eh(_e[0])].apply(fe,_e[3]):fe=ie.length==1&&xg(ie)?fe[pe]():fe.thru(ie)}return function(){var Ne=arguments,Pe=Ne[0];if(fe&&Ne.length==1&&zt(Pe))return fe.plant(Pe).value();for(var je=0,st=L?y[je].apply(this,Ne):Pe;++je<L;)st=y[je].call(this,st);return st}})}function Ah(i,y,L,H,Y,ie,fe,pe,_e,Ne){var Pe=y&O,je=y&w,st=y&x,vt=y&(T|_),Et=y&k,Ut=st?t:Oc(i);function $t(){for(var Zt=arguments.length,on=Ee(Zt),io=Zt;io--;)on[io]=arguments[io];if(vt)var bi=Al($t),oo=Jn(on,bi);if(H&&(on=Q1(on,H,Y,vt)),ie&&(on=Z1(on,ie,fe,vt)),Zt-=oo,vt&&Zt<Ne){var cr=Qe(on,bi);return sC(i,y,Ah,$t.placeholder,L,on,cr,pe,_e,Ne-Zt)}var Go=je?L:this,Rs=st?Go[i]:i;return Zt=on.length,pe?on=Mz(on,pe):Et&&Zt>1&&on.reverse(),Pe&&_e<Zt&&(on.length=_e),this&&this!==qt&&this instanceof $t&&(Rs=Ut||Oc(Rs)),Rs.apply(Go,on)}return $t}function iC(i,y){return function(L,H){return zP(L,i,y(H),{})}}function $h(i,y){return function(L,H){var Y;if(L===t&&H===t)return y;if(L!==t&&(Y=L),H!==t){if(Y===t)return H;typeof L=="string"||typeof H=="string"?(L=no(L),H=no(H)):(L=H1(L),H=H1(H)),Y=i(L,H)}return Y}}function fg(i){return Ts(function(y){return y=M(y,ln(Tt())),Jt(function(L){var H=this;return i(y,function(Y){return wn(Y,H,L)})})})}function Sh(i,y){y=y===t?" ":no(y);var L=y.length;if(L<2)return L?sg(y,i):y;var H=sg(y,fh(i/Yt(y)));return ge(y)?Ks(Mt(H),0,i).join(""):H.slice(0,i)}function hz(i,y,L,H){var Y=y&w,ie=Oc(i);function fe(){for(var pe=-1,_e=arguments.length,Ne=-1,Pe=H.length,je=Ee(Pe+_e),st=this&&this!==qt&&this instanceof fe?ie:i;++Ne<Pe;)je[Ne]=H[Ne];for(;_e--;)je[Ne++]=arguments[++pe];return wn(st,Y?L:this,je)}return fe}function oC(i){return function(y,L,H){return H&&typeof H!="number"&&yi(y,L,H)&&(L=H=t),y=Is(y),L===t?(L=y,y=0):L=Is(L),H=H===t?y<L?1:-1:Is(H),JP(y,L,H,i)}}function Th(i){return function(y,L){return typeof y=="string"&&typeof L=="string"||(y=So(y),L=So(L)),i(y,L)}}function sC(i,y,L,H,Y,ie,fe,pe,_e,Ne){var Pe=y&T,je=Pe?fe:t,st=Pe?t:fe,vt=Pe?ie:t,Et=Pe?t:ie;y|=Pe?C:P,y&=~(Pe?P:C),y&R||(y&=-4);var Ut=[i,y,Y,vt,je,Et,st,pe,_e,Ne],$t=L.apply(t,Ut);return xg(i)&&yC($t,Ut),$t.placeholder=H,bC($t,i,y)}function pg(i){var y=mn[i];return function(L,H){if(L=So(L),H=H==null?0:oi(Wt(H),292),H&&b1(L)){var Y=(kn(L)+"e").split("e"),ie=y(Y[0]+"e"+(+Y[1]+H));return Y=(kn(ie)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-H))}return y(L)}}var dz=wl&&1/ot(new wl([,-0]))[1]==U?function(i){return new wl(i)}:Pg;function aC(i){return function(y){var L=si(y);return L==at?He(y):L==un?ht(y):Wn(y,i(y))}}function Ss(i,y,L,H,Y,ie,fe,pe){var _e=y&x;if(!_e&&typeof i!="function")throw new Pn(g);var Ne=H?H.length:0;if(Ne||(y&=-97,H=Y=t),fe=fe===t?fe:Tr(Wt(fe),0),pe=pe===t?pe:Wt(pe),Ne-=Y?Y.length:0,y&P){var Pe=H,je=Y;H=Y=t}var st=_e?t:vg(i),vt=[i,y,L,H,Y,Pe,je,ie,fe,pe];if(st&&Sz(vt,st),i=vt[0],y=vt[1],L=vt[2],H=vt[3],Y=vt[4],pe=vt[9]=vt[9]===t?_e?0:i.length:Tr(vt[9]-Ne,0),!pe&&y&(T|_)&&(y&=-25),!y||y==w)var Et=cz(i,y,L);else y==T||y==_?Et=uz(i,y,pe):(y==C||y==(w|C))&&!Y.length?Et=hz(i,y,L,H):Et=Ah.apply(t,vt);var Ut=st?j1:yC;return bC(Ut(Et,vt),i,y)}function lC(i,y,L,H){return i===t||Vo(i,_s[L])&&!Cn.call(H,L)?y:i}function cC(i,y,L,H,Y,ie){return nr(i)&&nr(y)&&(ie.set(y,i),xh(i,y,t,cC,ie),ie.delete(y)),i}function fz(i){return Pc(i)?t:i}function uC(i,y,L,H,Y,ie){var fe=L&p,pe=i.length,_e=y.length;if(pe!=_e&&!(fe&&_e>pe))return!1;var Ne=ie.get(i),Pe=ie.get(y);if(Ne&&Pe)return Ne==y&&Pe==i;var je=-1,st=!0,vt=L&m?new Ia:t;for(ie.set(i,y),ie.set(y,i);++je<pe;){var Et=i[je],Ut=y[je];if(H)var $t=fe?H(Ut,Et,je,y,i,ie):H(Et,Ut,je,i,y,ie);if($t!==t){if($t)continue;st=!1;break}if(vt){if(!W(y,function(Zt,on){if(!Ot(vt,on)&&(Et===Zt||Y(Et,Zt,L,H,ie)))return vt.push(on)})){st=!1;break}}else if(!(Et===Ut||Y(Et,Ut,L,H,ie))){st=!1;break}}return ie.delete(i),ie.delete(y),st}function pz(i,y,L,H,Y,ie,fe){switch(L){case Nn:if(i.byteLength!=y.byteLength||i.byteOffset!=y.byteOffset)return!1;i=i.buffer,y=y.buffer;case $n:return!(i.byteLength!=y.byteLength||!ie(new ch(i),new ch(y)));case we:case Ae:case ct:return Vo(+i,+y);case ze:return i.name==y.name&&i.message==y.message;case Vt:case An:return i==y+"";case at:var pe=He;case un:var _e=H&p;if(pe||(pe=ot),i.size!=y.size&&!_e)return!1;var Ne=fe.get(i);if(Ne)return Ne==y;H|=m,fe.set(i,y);var Pe=uC(pe(i),pe(y),H,Y,ie,fe);return fe.delete(i),Pe;case ft:if(Tc)return Tc.call(i)==Tc.call(y)}return!1}function gz(i,y,L,H,Y,ie){var fe=L&p,pe=gg(i),_e=pe.length,Ne=gg(y),Pe=Ne.length;if(_e!=Pe&&!fe)return!1;for(var je=_e;je--;){var st=pe[je];if(!(fe?st in y:Cn.call(y,st)))return!1}var vt=ie.get(i),Et=ie.get(y);if(vt&&Et)return vt==y&&Et==i;var Ut=!0;ie.set(i,y),ie.set(y,i);for(var $t=fe;++je<_e;){st=pe[je];var Zt=i[st],on=y[st];if(H)var io=fe?H(on,Zt,st,y,i,ie):H(Zt,on,st,i,y,ie);if(!(io===t?Zt===on||Y(Zt,on,L,H,ie):io)){Ut=!1;break}$t||($t=st=="constructor")}if(Ut&&!$t){var bi=i.constructor,oo=y.constructor;bi!=oo&&"constructor"in i&&"constructor"in y&&!(typeof bi=="function"&&bi instanceof bi&&typeof oo=="function"&&oo instanceof oo)&&(Ut=!1)}return ie.delete(i),ie.delete(y),Ut}function Ts(i){return kg(mC(i,t,AC),i+"")}function gg(i){return M1(i,Pr,bg)}function mg(i){return M1(i,Fi,hC)}var vg=gh?function(i){return gh.get(i)}:Pg;function Eh(i){for(var y=i.name+"",L=xl[y],H=Cn.call(xl,y)?L.length:0;H--;){var Y=L[H],ie=Y.func;if(ie==null||ie==i)return Y.name}return y}function Al(i){var y=Cn.call(te,"placeholder")?te:i;return y.placeholder}function Tt(){var i=te.iteratee||Ng;return i=i===Ng?L1:i,arguments.length?i(arguments[0],arguments[1]):i}function Mh(i,y){var L=i.__data__;return kz(y)?L[typeof y=="string"?"string":"hash"]:L.map}function yg(i){for(var y=Pr(i),L=y.length;L--;){var H=y[L],Y=i[H];y[L]=[H,Y,pC(Y)]}return y}function Oa(i,y){var L=ce(i,y);return R1(L)?L:t}function mz(i){var y=Cn.call(i,Ea),L=i[Ea];try{i[Ea]=t;var H=!0}catch{}var Y=ah.call(i);return H&&(y?i[Ea]=L:delete i[Ea]),Y}var bg=Gp?function(i){return i==null?[]:(i=Kt(i),Wr(Gp(i),function(y){return v1.call(i,y)}))}:zg,hC=Gp?function(i){for(var y=[];i;)S(y,bg(i)),i=uh(i);return y}:zg,si=vi;(qp&&si(new qp(new ArrayBuffer(1)))!=Nn||Ac&&si(new Ac)!=at||Yp&&si(Yp.resolve())!=xt||wl&&si(new wl)!=un||$c&&si(new $c)!=Gt)&&(si=function(i){var y=vi(i),L=y==Me?i.constructor:t,H=L?Na(L):"";if(H)switch(H){case ZD:return Nn;case XD:return at;case eP:return xt;case tP:return un;case nP:return Gt}return y});function vz(i,y,L){for(var H=-1,Y=L.length;++H<Y;){var ie=L[H],fe=ie.size;switch(ie.type){case"drop":i+=fe;break;case"dropRight":y-=fe;break;case"take":y=oi(y,i+fe);break;case"takeRight":i=Tr(i,y-fe);break}}return{start:i,end:y}}function yz(i){var y=i.match(ms);return y?y[1].split(vs):[]}function dC(i,y,L){y=Ys(y,i);for(var H=-1,Y=y.length,ie=!1;++H<Y;){var fe=Uo(y[H]);if(!(ie=i!=null&&L(i,fe)))break;i=i[fe]}return ie||++H!=Y?ie:(Y=i==null?0:i.length,!!Y&&Ph(Y)&&Es(fe,Y)&&(zt(i)||Da(i)))}function bz(i){var y=i.length,L=new i.constructor(y);return y&&typeof i[0]=="string"&&Cn.call(i,"index")&&(L.index=i.index,L.input=i.input),L}function fC(i){return typeof i.constructor=="function"&&!Nc(i)?Cl(uh(i)):{}}function wz(i,y,L){var H=i.constructor;switch(y){case $n:return dg(i);case we:case Ae:return new H(+i);case Nn:return rz(i,L);case Un:case Rn:case Vn:case Xn:case hn:case Dn:case Ti:case Xr:case ei:return K1(i,L);case at:return new H;case ct:case An:return new H(i);case Vt:return iz(i);case un:return new H;case ft:return oz(i)}}function xz(i,y){var L=y.length;if(!L)return i;var H=L-1;return y[H]=(L>1?"& ":"")+y[H],y=y.join(L>2?", ":" "),i.replace(hi,`{
1460
+ /* [wrapped with `+y+`] */
1461
+ `)}function Cz(i){return zt(i)||Da(i)||!!(y1&&i&&i[y1])}function Es(i,y){var L=typeof i;return y=y??q,!!y&&(L=="number"||L!="symbol"&&qn.test(i))&&i>-1&&i%1==0&&i<y}function yi(i,y,L){if(!nr(L))return!1;var H=typeof y;return(H=="number"?Bi(L)&&Es(y,L.length):H=="string"&&y in L)?Vo(L[y],i):!1}function wg(i,y){if(zt(i))return!1;var L=typeof i;return L=="number"||L=="symbol"||L=="boolean"||i==null||ro(i)?!0:Gn.test(i)||!Mi.test(i)||y!=null&&i in Kt(y)}function kz(i){var y=typeof i;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?i!=="__proto__":i===null}function xg(i){var y=Eh(i),L=te[y];if(typeof L!="function"||!(y in tn.prototype))return!1;if(i===L)return!0;var H=vg(L);return!!H&&i===H[0]}function _z(i){return!!p1&&p1 in i}var Az=oh?Ms:Bg;function Nc(i){var y=i&&i.constructor,L=typeof y=="function"&&y.prototype||_s;return i===L}function pC(i){return i===i&&!nr(i)}function gC(i,y){return function(L){return L==null?!1:L[i]===y&&(y!==t||i in Kt(L))}}function $z(i){var y=Nh(i,function(H){return L.size===a&&L.clear(),H}),L=y.cache;return y}function Sz(i,y){var L=i[1],H=y[1],Y=L|H,ie=Y<(w|x|O),fe=H==O&&L==T||H==O&&L==E&&i[7].length<=y[8]||H==(O|E)&&y[7].length<=y[8]&&L==T;if(!(ie||fe))return i;H&w&&(i[2]=y[2],Y|=L&w?0:R);var pe=y[3];if(pe){var _e=i[3];i[3]=_e?Q1(_e,pe,y[4]):pe,i[4]=_e?Qe(i[3],l):y[4]}return pe=y[5],pe&&(_e=i[5],i[5]=_e?Z1(_e,pe,y[6]):pe,i[6]=_e?Qe(i[5],l):y[6]),pe=y[7],pe&&(i[7]=pe),H&O&&(i[8]=i[8]==null?y[8]:oi(i[8],y[8])),i[9]==null&&(i[9]=y[9]),i[0]=y[0],i[1]=Y,i}function Tz(i){var y=[];if(i!=null)for(var L in Kt(i))y.push(L);return y}function Ez(i){return ah.call(i)}function mC(i,y,L){return y=Tr(y===t?i.length-1:y,0),function(){for(var H=arguments,Y=-1,ie=Tr(H.length-y,0),fe=Ee(ie);++Y<ie;)fe[Y]=H[y+Y];Y=-1;for(var pe=Ee(y+1);++Y<y;)pe[Y]=H[Y];return pe[y]=L(fe),wn(i,this,pe)}}function vC(i,y){return y.length<2?i:La(i,Ao(y,0,-1))}function Mz(i,y){for(var L=i.length,H=oi(y.length,L),Y=zi(i);H--;){var ie=y[H];i[H]=Es(ie,L)?Y[ie]:t}return i}function Cg(i,y){if(!(y==="constructor"&&typeof i[y]=="function")&&y!="__proto__")return i[y]}var yC=wC(j1),Dc=VD||function(i,y){return qt.setTimeout(i,y)},kg=wC(XP);function bC(i,y,L){var H=y+"";return kg(i,xz(H,Iz(yz(H),L)))}function wC(i){var y=0,L=0;return function(){var H=KD(),Y=$-(H-L);if(L=H,Y>0){if(++y>=I)return arguments[0]}else y=0;return i.apply(t,arguments)}}function Ih(i,y){var L=-1,H=i.length,Y=H-1;for(y=y===t?H:y;++L<y;){var ie=og(L,Y),fe=i[ie];i[ie]=i[L],i[L]=fe}return i.length=y,i}var xC=$z(function(i){var y=[];return i.charCodeAt(0)===46&&y.push(""),i.replace(Ar,function(L,H,Y,ie){y.push(Y?ie.replace(di,"$1"):H||L)}),y});function Uo(i){if(typeof i=="string"||ro(i))return i;var y=i+"";return y=="0"&&1/i==-U?"-0":y}function Na(i){if(i!=null){try{return sh.call(i)}catch{}try{return i+""}catch{}}return""}function Iz(i,y){return $r(he,function(L){var H="_."+L[0];y&L[1]&&!Di(i,H)&&i.push(H)}),i.sort()}function CC(i){if(i instanceof tn)return i.clone();var y=new ko(i.__wrapped__,i.__chain__);return y.__actions__=zi(i.__actions__),y.__index__=i.__index__,y.__values__=i.__values__,y}function Rz(i,y,L){(L?yi(i,y,L):y===t)?y=1:y=Tr(Wt(y),0);var H=i==null?0:i.length;if(!H||y<1)return[];for(var Y=0,ie=0,fe=Ee(fh(H/y));Y<H;)fe[ie++]=Ao(i,Y,Y+=y);return fe}function Lz(i){for(var y=-1,L=i==null?0:i.length,H=0,Y=[];++y<L;){var ie=i[y];ie&&(Y[H++]=ie)}return Y}function Oz(){var i=arguments.length;if(!i)return[];for(var y=Ee(i-1),L=arguments[0],H=i;H--;)y[H-1]=arguments[H];return S(zt(L)?zi(L):[L],Vr(y,1))}var Nz=Jt(function(i,y){return lr(i)?Mc(i,Vr(y,1,lr,!0)):[]}),Dz=Jt(function(i,y){var L=$o(y);return lr(L)&&(L=t),lr(i)?Mc(i,Vr(y,1,lr,!0),Tt(L,2)):[]}),Pz=Jt(function(i,y){var L=$o(y);return lr(L)&&(L=t),lr(i)?Mc(i,Vr(y,1,lr,!0),t,L):[]});function zz(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Wt(y),Ao(i,y<0?0:y,H)):[]}function Bz(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Wt(y),y=H-y,Ao(i,0,y<0?0:y)):[]}function Fz(i,y){return i&&i.length?kh(i,Tt(y,3),!0,!0):[]}function jz(i,y){return i&&i.length?kh(i,Tt(y,3),!0):[]}function Wz(i,y,L,H){var Y=i==null?0:i.length;return Y?(L&&typeof L!="number"&&yi(i,y,L)&&(L=0,H=Y),OP(i,y,L,H)):[]}function kC(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=L==null?0:Wt(L);return Y<0&&(Y=Tr(H+Y,0)),de(i,Tt(y,3),Y)}function _C(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=H-1;return L!==t&&(Y=Wt(L),Y=L<0?Tr(H+Y,0):oi(Y,H-1)),de(i,Tt(y,3),Y,!0)}function AC(i){var y=i==null?0:i.length;return y?Vr(i,1):[]}function Hz(i){var y=i==null?0:i.length;return y?Vr(i,U):[]}function Uz(i,y){var L=i==null?0:i.length;return L?(y=y===t?1:Wt(y),Vr(i,y)):[]}function Vz(i){for(var y=-1,L=i==null?0:i.length,H={};++y<L;){var Y=i[y];ss(H,Y[0],Y[1])}return H}function $C(i){return i&&i.length?i[0]:t}function Gz(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=L==null?0:Wt(L);return Y<0&&(Y=Tr(H+Y,0)),ke(i,y,Y)}function qz(i){var y=i==null?0:i.length;return y?Ao(i,0,-1):[]}var Yz=Jt(function(i){var y=M(i,ug);return y.length&&y[0]===i[0]?eg(y):[]}),Kz=Jt(function(i){var y=$o(i),L=M(i,ug);return y===$o(L)?y=t:L.pop(),L.length&&L[0]===i[0]?eg(L,Tt(y,2)):[]}),Jz=Jt(function(i){var y=$o(i),L=M(i,ug);return y=typeof y=="function"?y:t,y&&L.pop(),L.length&&L[0]===i[0]?eg(L,t,y):[]});function Qz(i,y){return i==null?"":qD.call(i,y)}function $o(i){var y=i==null?0:i.length;return y?i[y-1]:t}function Zz(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=H;return L!==t&&(Y=Wt(L),Y=Y<0?Tr(H+Y,0):oi(Y,H-1)),y===y?fn(i,y,Y):de(i,Ce,Y,!0)}function Xz(i,y){return i&&i.length?P1(i,Wt(y)):t}var eB=Jt(SC);function SC(i,y){return i&&i.length&&y&&y.length?ig(i,y):i}function tB(i,y,L){return i&&i.length&&y&&y.length?ig(i,y,Tt(L,2)):i}function nB(i,y,L){return i&&i.length&&y&&y.length?ig(i,y,t,L):i}var rB=Ts(function(i,y){var L=i==null?0:i.length,H=Jp(i,y);return F1(i,M(y,function(Y){return Es(Y,L)?+Y:Y}).sort(J1)),H});function iB(i,y){var L=[];if(!(i&&i.length))return L;var H=-1,Y=[],ie=i.length;for(y=Tt(y,3);++H<ie;){var fe=i[H];y(fe,H,i)&&(L.push(fe),Y.push(H))}return F1(i,Y),L}function _g(i){return i==null?i:QD.call(i)}function oB(i,y,L){var H=i==null?0:i.length;return H?(L&&typeof L!="number"&&yi(i,y,L)?(y=0,L=H):(y=y==null?0:Wt(y),L=L===t?H:Wt(L)),Ao(i,y,L)):[]}function sB(i,y){return Ch(i,y)}function aB(i,y,L){return ag(i,y,Tt(L,2))}function lB(i,y){var L=i==null?0:i.length;if(L){var H=Ch(i,y);if(H<L&&Vo(i[H],y))return H}return-1}function cB(i,y){return Ch(i,y,!0)}function uB(i,y,L){return ag(i,y,Tt(L,2),!0)}function hB(i,y){var L=i==null?0:i.length;if(L){var H=Ch(i,y,!0)-1;if(Vo(i[H],y))return H}return-1}function dB(i){return i&&i.length?W1(i):[]}function fB(i,y){return i&&i.length?W1(i,Tt(y,2)):[]}function pB(i){var y=i==null?0:i.length;return y?Ao(i,1,y):[]}function gB(i,y,L){return i&&i.length?(y=L||y===t?1:Wt(y),Ao(i,0,y<0?0:y)):[]}function mB(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Wt(y),y=H-y,Ao(i,y<0?0:y,H)):[]}function vB(i,y){return i&&i.length?kh(i,Tt(y,3),!1,!0):[]}function yB(i,y){return i&&i.length?kh(i,Tt(y,3)):[]}var bB=Jt(function(i){return qs(Vr(i,1,lr,!0))}),wB=Jt(function(i){var y=$o(i);return lr(y)&&(y=t),qs(Vr(i,1,lr,!0),Tt(y,2))}),xB=Jt(function(i){var y=$o(i);return y=typeof y=="function"?y:t,qs(Vr(i,1,lr,!0),t,y)});function CB(i){return i&&i.length?qs(i):[]}function kB(i,y){return i&&i.length?qs(i,Tt(y,2)):[]}function _B(i,y){return y=typeof y=="function"?y:t,i&&i.length?qs(i,t,y):[]}function Ag(i){if(!(i&&i.length))return[];var y=0;return i=Wr(i,function(L){if(lr(L))return y=Tr(L.length,y),!0}),dt(y,function(L){return M(i,Be(L))})}function TC(i,y){if(!(i&&i.length))return[];var L=Ag(i);return y==null?L:M(L,function(H){return wn(y,t,H)})}var AB=Jt(function(i,y){return lr(i)?Mc(i,y):[]}),$B=Jt(function(i){return cg(Wr(i,lr))}),SB=Jt(function(i){var y=$o(i);return lr(y)&&(y=t),cg(Wr(i,lr),Tt(y,2))}),TB=Jt(function(i){var y=$o(i);return y=typeof y=="function"?y:t,cg(Wr(i,lr),t,y)}),EB=Jt(Ag);function MB(i,y){return G1(i||[],y||[],Ec)}function IB(i,y){return G1(i||[],y||[],Lc)}var RB=Jt(function(i){var y=i.length,L=y>1?i[y-1]:t;return L=typeof L=="function"?(i.pop(),L):t,TC(i,L)});function EC(i){var y=te(i);return y.__chain__=!0,y}function LB(i,y){return y(i),i}function Rh(i,y){return y(i)}var OB=Ts(function(i){var y=i.length,L=y?i[0]:0,H=this.__wrapped__,Y=function(ie){return Jp(ie,i)};return y>1||this.__actions__.length||!(H instanceof tn)||!Es(L)?this.thru(Y):(H=H.slice(L,+L+(y?1:0)),H.__actions__.push({func:Rh,args:[Y],thisArg:t}),new ko(H,this.__chain__).thru(function(ie){return y&&!ie.length&&ie.push(t),ie}))});function NB(){return EC(this)}function DB(){return new ko(this.value(),this.__chain__)}function PB(){this.__values__===t&&(this.__values__=HC(this.value()));var i=this.__index__>=this.__values__.length,y=i?t:this.__values__[this.__index__++];return{done:i,value:y}}function zB(){return this}function BB(i){for(var y,L=this;L instanceof vh;){var H=CC(L);H.__index__=0,H.__values__=t,y?Y.__wrapped__=H:y=H;var Y=H;L=L.__wrapped__}return Y.__wrapped__=i,y}function FB(){var i=this.__wrapped__;if(i instanceof tn){var y=i;return this.__actions__.length&&(y=new tn(this)),y=y.reverse(),y.__actions__.push({func:Rh,args:[_g],thisArg:t}),new ko(y,this.__chain__)}return this.thru(_g)}function jB(){return V1(this.__wrapped__,this.__actions__)}var WB=_h(function(i,y,L){Cn.call(i,L)?++i[L]:ss(i,L,1)});function HB(i,y,L){var H=zt(i)?os:LP;return L&&yi(i,y,L)&&(y=t),H(i,Tt(y,3))}function UB(i,y){var L=zt(i)?Wr:T1;return L(i,Tt(y,3))}var VB=nC(kC),GB=nC(_C);function qB(i,y){return Vr(Lh(i,y),1)}function YB(i,y){return Vr(Lh(i,y),U)}function KB(i,y,L){return L=L===t?1:Wt(L),Vr(Lh(i,y),L)}function MC(i,y){var L=zt(i)?$r:Gs;return L(i,Tt(y,3))}function IC(i,y){var L=zt(i)?ii:S1;return L(i,Tt(y,3))}var JB=_h(function(i,y,L){Cn.call(i,L)?i[L].push(y):ss(i,L,[y])});function QB(i,y,L,H){i=Bi(i)?i:Sl(i),L=L&&!H?Wt(L):0;var Y=i.length;return L<0&&(L=Tr(Y+L,0)),zh(i)?L<=Y&&i.indexOf(y,L)>-1:!!Y&&ke(i,y,L)>-1}var ZB=Jt(function(i,y,L){var H=-1,Y=typeof y=="function",ie=Bi(i)?Ee(i.length):[];return Gs(i,function(fe){ie[++H]=Y?wn(y,fe,L):Ic(fe,y,L)}),ie}),XB=_h(function(i,y,L){ss(i,L,y)});function Lh(i,y){var L=zt(i)?M:O1;return L(i,Tt(y,3))}function eF(i,y,L,H){return i==null?[]:(zt(y)||(y=y==null?[]:[y]),L=H?t:L,zt(L)||(L=L==null?[]:[L]),z1(i,y,L))}var tF=_h(function(i,y,L){i[L?0:1].push(y)},function(){return[[],[]]});function nF(i,y,L){var H=zt(i)?z:et,Y=arguments.length<3;return H(i,Tt(y,4),L,Y,Gs)}function rF(i,y,L){var H=zt(i)?F:et,Y=arguments.length<3;return H(i,Tt(y,4),L,Y,S1)}function iF(i,y){var L=zt(i)?Wr:T1;return L(i,Dh(Tt(y,3)))}function oF(i){var y=zt(i)?k1:QP;return y(i)}function sF(i,y,L){(L?yi(i,y,L):y===t)?y=1:y=Wt(y);var H=zt(i)?TP:ZP;return H(i,y)}function aF(i){var y=zt(i)?EP:ez;return y(i)}function lF(i){if(i==null)return 0;if(Bi(i))return zh(i)?Yt(i):i.length;var y=si(i);return y==at||y==un?i.size:ng(i).length}function cF(i,y,L){var H=zt(i)?W:tz;return L&&yi(i,y,L)&&(y=t),H(i,Tt(y,3))}var uF=Jt(function(i,y){if(i==null)return[];var L=y.length;return L>1&&yi(i,y[0],y[1])?y=[]:L>2&&yi(y[0],y[1],y[2])&&(y=[y[0]]),z1(i,Vr(y,1),[])}),Oh=UD||function(){return qt.Date.now()};function hF(i,y){if(typeof y!="function")throw new Pn(g);return i=Wt(i),function(){if(--i<1)return y.apply(this,arguments)}}function RC(i,y,L){return y=L?t:y,y=i&&y==null?i.length:y,Ss(i,O,t,t,t,t,y)}function LC(i,y){var L;if(typeof y!="function")throw new Pn(g);return i=Wt(i),function(){return--i>0&&(L=y.apply(this,arguments)),i<=1&&(y=t),L}}var $g=Jt(function(i,y,L){var H=w;if(L.length){var Y=Qe(L,Al($g));H|=C}return Ss(i,H,y,L,Y)}),OC=Jt(function(i,y,L){var H=w|x;if(L.length){var Y=Qe(L,Al(OC));H|=C}return Ss(y,H,i,L,Y)});function NC(i,y,L){y=L?t:y;var H=Ss(i,T,t,t,t,t,t,y);return H.placeholder=NC.placeholder,H}function DC(i,y,L){y=L?t:y;var H=Ss(i,_,t,t,t,t,t,y);return H.placeholder=DC.placeholder,H}function PC(i,y,L){var H,Y,ie,fe,pe,_e,Ne=0,Pe=!1,je=!1,st=!0;if(typeof i!="function")throw new Pn(g);y=So(y)||0,nr(L)&&(Pe=!!L.leading,je="maxWait"in L,ie=je?Tr(So(L.maxWait)||0,y):ie,st="trailing"in L?!!L.trailing:st);function vt(cr){var Go=H,Rs=Y;return H=Y=t,Ne=cr,fe=i.apply(Rs,Go),fe}function Et(cr){return Ne=cr,pe=Dc(Zt,y),Pe?vt(cr):fe}function Ut(cr){var Go=cr-_e,Rs=cr-Ne,rk=y-Go;return je?oi(rk,ie-Rs):rk}function $t(cr){var Go=cr-_e,Rs=cr-Ne;return _e===t||Go>=y||Go<0||je&&Rs>=ie}function Zt(){var cr=Oh();if($t(cr))return on(cr);pe=Dc(Zt,Ut(cr))}function on(cr){return pe=t,st&&H?vt(cr):(H=Y=t,fe)}function io(){pe!==t&&q1(pe),Ne=0,H=_e=Y=pe=t}function bi(){return pe===t?fe:on(Oh())}function oo(){var cr=Oh(),Go=$t(cr);if(H=arguments,Y=this,_e=cr,Go){if(pe===t)return Et(_e);if(je)return q1(pe),pe=Dc(Zt,y),vt(_e)}return pe===t&&(pe=Dc(Zt,y)),fe}return oo.cancel=io,oo.flush=bi,oo}var dF=Jt(function(i,y){return $1(i,1,y)}),fF=Jt(function(i,y,L){return $1(i,So(y)||0,L)});function pF(i){return Ss(i,k)}function Nh(i,y){if(typeof i!="function"||y!=null&&typeof y!="function")throw new Pn(g);var L=function(){var H=arguments,Y=y?y.apply(this,H):H[0],ie=L.cache;if(ie.has(Y))return ie.get(Y);var fe=i.apply(this,H);return L.cache=ie.set(Y,fe)||ie,fe};return L.cache=new(Nh.Cache||$s),L}Nh.Cache=$s;function Dh(i){if(typeof i!="function")throw new Pn(g);return function(){var y=arguments;switch(y.length){case 0:return!i.call(this);case 1:return!i.call(this,y[0]);case 2:return!i.call(this,y[0],y[1]);case 3:return!i.call(this,y[0],y[1],y[2])}return!i.apply(this,y)}}function gF(i){return LC(2,i)}var mF=nz(function(i,y){y=y.length==1&&zt(y[0])?M(y[0],ln(Tt())):M(Vr(y,1),ln(Tt()));var L=y.length;return Jt(function(H){for(var Y=-1,ie=oi(H.length,L);++Y<ie;)H[Y]=y[Y].call(this,H[Y]);return wn(i,this,H)})}),Sg=Jt(function(i,y){var L=Qe(y,Al(Sg));return Ss(i,C,t,y,L)}),zC=Jt(function(i,y){var L=Qe(y,Al(zC));return Ss(i,P,t,y,L)}),vF=Ts(function(i,y){return Ss(i,E,t,t,t,y)});function yF(i,y){if(typeof i!="function")throw new Pn(g);return y=y===t?y:Wt(y),Jt(i,y)}function bF(i,y){if(typeof i!="function")throw new Pn(g);return y=y==null?0:Tr(Wt(y),0),Jt(function(L){var H=L[y],Y=Ks(L,0,y);return H&&S(Y,H),wn(i,this,Y)})}function wF(i,y,L){var H=!0,Y=!0;if(typeof i!="function")throw new Pn(g);return nr(L)&&(H="leading"in L?!!L.leading:H,Y="trailing"in L?!!L.trailing:Y),PC(i,y,{leading:H,maxWait:y,trailing:Y})}function xF(i){return RC(i,1)}function CF(i,y){return Sg(hg(y),i)}function kF(){if(!arguments.length)return[];var i=arguments[0];return zt(i)?i:[i]}function _F(i){return _o(i,o)}function AF(i,y){return y=typeof y=="function"?y:t,_o(i,o,y)}function $F(i){return _o(i,u|o)}function SF(i,y){return y=typeof y=="function"?y:t,_o(i,u|o,y)}function TF(i,y){return y==null||A1(i,y,Pr(y))}function Vo(i,y){return i===y||i!==i&&y!==y}var EF=Th(Xp),MF=Th(function(i,y){return i>=y}),Da=I1((function(){return arguments})())?I1:function(i){return or(i)&&Cn.call(i,"callee")&&!v1.call(i,"callee")},zt=Ee.isArray,IF=Us?ln(Us):BP;function Bi(i){return i!=null&&Ph(i.length)&&!Ms(i)}function lr(i){return or(i)&&Bi(i)}function RF(i){return i===!0||i===!1||or(i)&&vi(i)==we}var Js=GD||Bg,LF=ir?ln(ir):FP;function OF(i){return or(i)&&i.nodeType===1&&!Pc(i)}function NF(i){if(i==null)return!0;if(Bi(i)&&(zt(i)||typeof i=="string"||typeof i.splice=="function"||Js(i)||$l(i)||Da(i)))return!i.length;var y=si(i);if(y==at||y==un)return!i.size;if(Nc(i))return!ng(i).length;for(var L in i)if(Cn.call(i,L))return!1;return!0}function DF(i,y){return Rc(i,y)}function PF(i,y,L){L=typeof L=="function"?L:t;var H=L?L(i,y):t;return H===t?Rc(i,y,t,L):!!H}function Tg(i){if(!or(i))return!1;var y=vi(i);return y==ze||y==Je||typeof i.message=="string"&&typeof i.name=="string"&&!Pc(i)}function zF(i){return typeof i=="number"&&b1(i)}function Ms(i){if(!nr(i))return!1;var y=vi(i);return y==qe||y==Ze||y==ye||y==St}function BC(i){return typeof i=="number"&&i==Wt(i)}function Ph(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=q}function nr(i){var y=typeof i;return i!=null&&(y=="object"||y=="function")}function or(i){return i!=null&&typeof i=="object"}var FC=eo?ln(eo):WP;function BF(i,y){return i===y||tg(i,y,yg(y))}function FF(i,y,L){return L=typeof L=="function"?L:t,tg(i,y,yg(y),L)}function jF(i){return jC(i)&&i!=+i}function WF(i){if(Az(i))throw new kt(h);return R1(i)}function HF(i){return i===null}function UF(i){return i==null}function jC(i){return typeof i=="number"||or(i)&&vi(i)==ct}function Pc(i){if(!or(i)||vi(i)!=Me)return!1;var y=uh(i);if(y===null)return!0;var L=Cn.call(y,"constructor")&&y.constructor;return typeof L=="function"&&L instanceof L&&sh.call(L)==FD}var Eg=to?ln(to):HP;function VF(i){return BC(i)&&i>=-q&&i<=q}var WC=xo?ln(xo):UP;function zh(i){return typeof i=="string"||!zt(i)&&or(i)&&vi(i)==An}function ro(i){return typeof i=="symbol"||or(i)&&vi(i)==ft}var $l=Ta?ln(Ta):VP;function GF(i){return i===t}function qF(i){return or(i)&&si(i)==Gt}function YF(i){return or(i)&&vi(i)==Bn}var KF=Th(rg),JF=Th(function(i,y){return i<=y});function HC(i){if(!i)return[];if(Bi(i))return zh(i)?Mt(i):zi(i);if(_c&&i[_c])return Le(i[_c]());var y=si(i),L=y==at?He:y==un?ot:Sl;return L(i)}function Is(i){if(!i)return i===0?i:0;if(i=So(i),i===U||i===-U){var y=i<0?-1:1;return y*Q}return i===i?i:0}function Wt(i){var y=Is(i),L=y%1;return y===y?L?y-L:y:0}function UC(i){return i?Ra(Wt(i),0,le):0}function So(i){if(typeof i=="number")return i;if(ro(i))return re;if(nr(i)){var y=typeof i.valueOf=="function"?i.valueOf():i;i=nr(y)?y+"":y}if(typeof i!="string")return i===0?i:+i;i=Rt(i);var L=Or.test(i);return L||dn.test(i)?wt(i.slice(2),L?2:8):Hs.test(i)?re:+i}function VC(i){return ls(i,Fi(i))}function QF(i){return i?Ra(Wt(i),-q,q):i===0?i:0}function kn(i){return i==null?"":no(i)}var ZF=kl(function(i,y){if(Nc(y)||Bi(y)){ls(y,Pr(y),i);return}for(var L in y)Cn.call(y,L)&&Ec(i,L,y[L])}),GC=kl(function(i,y){ls(y,Fi(y),i)}),qC=kl(function(i,y,L,H){ls(y,Fi(y),i,H)}),Mg=kl(function(i,y,L,H){ls(y,Pr(y),i,H)}),XF=Ts(Jp);function ej(i,y){var L=Cl(i);return y==null?L:_1(L,y)}var tj=Jt(function(i,y){i=Kt(i);var L=-1,H=y.length,Y=H>2?y[2]:t;for(Y&&yi(y[0],y[1],Y)&&(H=1);++L<H;)for(var ie=y[L],fe=Fi(ie),pe=-1,_e=fe.length;++pe<_e;){var Ne=fe[pe],Pe=i[Ne];(Pe===t||Vo(Pe,_s[Ne])&&!Cn.call(i,Ne))&&(i[Ne]=ie[Ne])}return i}),nj=Jt(function(i){return i.push(t,cC),wn(YC,t,i)});function rj(i,y){return se(i,Tt(y,3),as)}function ij(i,y){return se(i,Tt(y,3),Zp)}function oj(i,y){return i==null?i:Qp(i,Tt(y,3),Fi)}function sj(i,y){return i==null?i:E1(i,Tt(y,3),Fi)}function aj(i,y){return i&&as(i,Tt(y,3))}function lj(i,y){return i&&Zp(i,Tt(y,3))}function cj(i){return i==null?[]:wh(i,Pr(i))}function uj(i){return i==null?[]:wh(i,Fi(i))}function Ig(i,y,L){var H=i==null?t:La(i,y);return H===t?L:H}function hj(i,y){return i!=null&&dC(i,y,NP)}function Rg(i,y){return i!=null&&dC(i,y,DP)}var dj=iC(function(i,y,L){y!=null&&typeof y.toString!="function"&&(y=ah.call(y)),i[y]=L},Og(ji)),fj=iC(function(i,y,L){y!=null&&typeof y.toString!="function"&&(y=ah.call(y)),Cn.call(i,y)?i[y].push(L):i[y]=[L]},Tt),pj=Jt(Ic);function Pr(i){return Bi(i)?C1(i):ng(i)}function Fi(i){return Bi(i)?C1(i,!0):GP(i)}function gj(i,y){var L={};return y=Tt(y,3),as(i,function(H,Y,ie){ss(L,y(H,Y,ie),H)}),L}function mj(i,y){var L={};return y=Tt(y,3),as(i,function(H,Y,ie){ss(L,Y,y(H,Y,ie))}),L}var vj=kl(function(i,y,L){xh(i,y,L)}),YC=kl(function(i,y,L,H){xh(i,y,L,H)}),yj=Ts(function(i,y){var L={};if(i==null)return L;var H=!1;y=M(y,function(ie){return ie=Ys(ie,i),H||(H=ie.length>1),ie}),ls(i,mg(i),L),H&&(L=_o(L,u|d|o,fz));for(var Y=y.length;Y--;)lg(L,y[Y]);return L});function bj(i,y){return KC(i,Dh(Tt(y)))}var wj=Ts(function(i,y){return i==null?{}:YP(i,y)});function KC(i,y){if(i==null)return{};var L=M(mg(i),function(H){return[H]});return y=Tt(y),B1(i,L,function(H,Y){return y(H,Y[0])})}function xj(i,y,L){y=Ys(y,i);var H=-1,Y=y.length;for(Y||(Y=1,i=t);++H<Y;){var ie=i==null?t:i[Uo(y[H])];ie===t&&(H=Y,ie=L),i=Ms(ie)?ie.call(i):ie}return i}function Cj(i,y,L){return i==null?i:Lc(i,y,L)}function kj(i,y,L,H){return H=typeof H=="function"?H:t,i==null?i:Lc(i,y,L,H)}var JC=aC(Pr),QC=aC(Fi);function _j(i,y,L){var H=zt(i),Y=H||Js(i)||$l(i);if(y=Tt(y,4),L==null){var ie=i&&i.constructor;Y?L=H?new ie:[]:nr(i)?L=Ms(ie)?Cl(uh(i)):{}:L={}}return(Y?$r:as)(i,function(fe,pe,_e){return y(L,fe,pe,_e)}),L}function Aj(i,y){return i==null?!0:lg(i,y)}function $j(i,y,L){return i==null?i:U1(i,y,hg(L))}function Sj(i,y,L,H){return H=typeof H=="function"?H:t,i==null?i:U1(i,y,hg(L),H)}function Sl(i){return i==null?[]:Bt(i,Pr(i))}function Tj(i){return i==null?[]:Bt(i,Fi(i))}function Ej(i,y,L){return L===t&&(L=y,y=t),L!==t&&(L=So(L),L=L===L?L:0),y!==t&&(y=So(y),y=y===y?y:0),Ra(So(i),y,L)}function Mj(i,y,L){return y=Is(y),L===t?(L=y,y=0):L=Is(L),i=So(i),PP(i,y,L)}function Ij(i,y,L){if(L&&typeof L!="boolean"&&yi(i,y,L)&&(y=L=t),L===t&&(typeof y=="boolean"?(L=y,y=t):typeof i=="boolean"&&(L=i,i=t)),i===t&&y===t?(i=0,y=1):(i=Is(i),y===t?(y=i,i=0):y=Is(y)),i>y){var H=i;i=y,y=H}if(L||i%1||y%1){var Y=w1();return oi(i+Y*(y-i+jt("1e-"+((Y+"").length-1))),y)}return og(i,y)}var Rj=_l(function(i,y,L){return y=y.toLowerCase(),i+(L?ZC(y):y)});function ZC(i){return Lg(kn(i).toLowerCase())}function XC(i){return i=kn(i),i&&i.replace(po,V).replace(gi,"")}function Lj(i,y,L){i=kn(i),y=no(y);var H=i.length;L=L===t?H:Ra(Wt(L),0,H);var Y=L;return L-=y.length,L>=0&&i.slice(L,Y)==y}function Oj(i){return i=kn(i),i&&ar.test(i)?i.replace(Fr,J):i}function Nj(i){return i=kn(i),i&&gn.test(i)?i.replace(Lr,"\\$&"):i}var Dj=_l(function(i,y,L){return i+(L?"-":"")+y.toLowerCase()}),Pj=_l(function(i,y,L){return i+(L?" ":"")+y.toLowerCase()}),zj=tC("toLowerCase");function Bj(i,y,L){i=kn(i),y=Wt(y);var H=y?Yt(i):0;if(!y||H>=y)return i;var Y=(y-H)/2;return Sh(ph(Y),L)+i+Sh(fh(Y),L)}function Fj(i,y,L){i=kn(i),y=Wt(y);var H=y?Yt(i):0;return y&&H<y?i+Sh(y-H,L):i}function jj(i,y,L){i=kn(i),y=Wt(y);var H=y?Yt(i):0;return y&&H<y?Sh(y-H,L)+i:i}function Wj(i,y,L){return L||y==null?y=0:y&&(y=+y),JD(kn(i).replace(Fn,""),y||0)}function Hj(i,y,L){return(L?yi(i,y,L):y===t)?y=1:y=Wt(y),sg(kn(i),y)}function Uj(){var i=arguments,y=kn(i[0]);return i.length<3?y:y.replace(i[1],i[2])}var Vj=_l(function(i,y,L){return i+(L?"_":"")+y.toLowerCase()});function Gj(i,y,L){return L&&typeof L!="number"&&yi(i,y,L)&&(y=L=t),L=L===t?le:L>>>0,L?(i=kn(i),i&&(typeof y=="string"||y!=null&&!Eg(y))&&(y=no(y),!y&&ge(i))?Ks(Mt(i),0,L):i.split(y,L)):[]}var qj=_l(function(i,y,L){return i+(L?" ":"")+Lg(y)});function Yj(i,y,L){return i=kn(i),L=L==null?0:Ra(Wt(L),0,i.length),y=no(y),i.slice(L,L+y.length)==y}function Kj(i,y,L){var H=te.templateSettings;L&&yi(i,y,L)&&(y=t),i=kn(i),y=Mg({},y,H,lC);var Y=Mg({},y.imports,H.imports,lC),ie=Pr(Y),fe=Bt(Y,ie);$r(ie,function($t){if(bs.test($t))throw new kt(s)});var pe,_e,Ne=0,Pe=y.interpolate||er,je="__p += '",st=Pi((y.escape||er).source+"|"+Pe.source+"|"+(Pe===Ko?Ri:er).source+"|"+(y.evaluate||er).source+"|$","g"),vt="//# sourceURL="+(Cn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Oe+"]")+`
1462
+ `;i.replace(st,function($t,Zt,on,io,bi,oo){return on||(on=io),je+=i.slice(Ne,oo).replace(go,ae),Zt&&(pe=!0,je+=`' +
1463
+ __e(`+Zt+`) +
1464
+ '`),bi&&(_e=!0,je+=`';
1465
+ `+bi+`;
1466
+ __p += '`),on&&(je+=`' +
1467
+ ((__t = (`+on+`)) == null ? '' : __t) +
1468
+ '`),Ne=oo+$t.length,$t}),je+=`';
1469
+ `;var Et=Cn.call(y,"variable")&&y.variable;if(!Et)je=`with (obj) {
1470
+ `+je+`
1471
+ }
1472
+ `;else if(bs.test(Et))throw new kt(v);je=(_e?je.replace(Ei,""):je).replace(ho,"$1").replace(mr,"$1;"),je="function("+(Et||"obj")+`) {
1473
+ `+(Et?"":`obj || (obj = {});
1474
+ `)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(_e?`, __j = Array.prototype.join;
1475
+ function print() { __p += __j.call(arguments, '') }
1476
+ `:`;
1477
+ `)+je+`return __p
1478
+ }`;var Ut=tk(function(){return Nt(ie,vt+"return "+je).apply(t,fe)});if(Ut.source=je,Tg(Ut))throw Ut;return Ut}function Jj(i){return kn(i).toLowerCase()}function Qj(i){return kn(i).toUpperCase()}function Zj(i,y,L){if(i=kn(i),i&&(L||y===t))return Rt(i);if(!i||!(y=no(y)))return i;var H=Mt(i),Y=Mt(y),ie=yr(H,Y),fe=Sr(H,Y)+1;return Ks(H,ie,fe).join("")}function Xj(i,y,L){if(i=kn(i),i&&(L||y===t))return i.slice(0,At(i)+1);if(!i||!(y=no(y)))return i;var H=Mt(i),Y=Sr(H,Mt(y))+1;return Ks(H,0,Y).join("")}function eW(i,y,L){if(i=kn(i),i&&(L||y===t))return i.replace(Fn,"");if(!i||!(y=no(y)))return i;var H=Mt(i),Y=yr(H,Mt(y));return Ks(H,Y).join("")}function tW(i,y){var L=B,H=N;if(nr(y)){var Y="separator"in y?y.separator:Y;L="length"in y?Wt(y.length):L,H="omission"in y?no(y.omission):H}i=kn(i);var ie=i.length;if(ge(i)){var fe=Mt(i);ie=fe.length}if(L>=ie)return i;var pe=L-Yt(H);if(pe<1)return H;var _e=fe?Ks(fe,0,pe).join(""):i.slice(0,pe);if(Y===t)return _e+H;if(fe&&(pe+=_e.length-pe),Eg(Y)){if(i.slice(pe).search(Y)){var Ne,Pe=_e;for(Y.global||(Y=Pi(Y.source,kn(Dt.exec(Y))+"g")),Y.lastIndex=0;Ne=Y.exec(Pe);)var je=Ne.index;_e=_e.slice(0,je===t?pe:je)}}else if(i.indexOf(no(Y),pe)!=pe){var st=_e.lastIndexOf(Y);st>-1&&(_e=_e.slice(0,st))}return _e+H}function nW(i){return i=kn(i),i&&fo.test(i)?i.replace(Ki,bt):i}var rW=_l(function(i,y,L){return i+(L?" ":"")+y.toUpperCase()}),Lg=tC("toUpperCase");function ek(i,y,L){return i=kn(i),y=L?t:y,y===t?Se(i)?br(i):Z(i):i.match(y)||[]}var tk=Jt(function(i,y){try{return wn(i,t,y)}catch(L){return Tg(L)?L:new kt(L)}}),iW=Ts(function(i,y){return $r(y,function(L){L=Uo(L),ss(i,L,$g(i[L],i))}),i});function oW(i){var y=i==null?0:i.length,L=Tt();return i=y?M(i,function(H){if(typeof H[1]!="function")throw new Pn(g);return[L(H[0]),H[1]]}):[],Jt(function(H){for(var Y=-1;++Y<y;){var ie=i[Y];if(wn(ie[0],this,H))return wn(ie[1],this,H)}})}function sW(i){return RP(_o(i,u))}function Og(i){return function(){return i}}function aW(i,y){return i==null||i!==i?y:i}var lW=rC(),cW=rC(!0);function ji(i){return i}function Ng(i){return L1(typeof i=="function"?i:_o(i,u))}function uW(i){return N1(_o(i,u))}function hW(i,y){return D1(i,_o(y,u))}var dW=Jt(function(i,y){return function(L){return Ic(L,i,y)}}),fW=Jt(function(i,y){return function(L){return Ic(i,L,y)}});function Dg(i,y,L){var H=Pr(y),Y=wh(y,H);L==null&&!(nr(y)&&(Y.length||!H.length))&&(L=y,y=i,i=this,Y=wh(y,Pr(y)));var ie=!(nr(L)&&"chain"in L)||!!L.chain,fe=Ms(i);return $r(Y,function(pe){var _e=y[pe];i[pe]=_e,fe&&(i.prototype[pe]=function(){var Ne=this.__chain__;if(ie||Ne){var Pe=i(this.__wrapped__),je=Pe.__actions__=zi(this.__actions__);return je.push({func:_e,args:arguments,thisArg:i}),Pe.__chain__=Ne,Pe}return _e.apply(i,S([this.value()],arguments))})}),i}function pW(){return qt._===this&&(qt._=jD),this}function Pg(){}function gW(i){return i=Wt(i),Jt(function(y){return P1(y,i)})}var mW=fg(M),vW=fg(os),yW=fg(W);function nk(i){return wg(i)?Be(Uo(i)):KP(i)}function bW(i){return function(y){return i==null?t:La(i,y)}}var wW=oC(),xW=oC(!0);function zg(){return[]}function Bg(){return!1}function CW(){return{}}function kW(){return""}function _W(){return!0}function AW(i,y){if(i=Wt(i),i<1||i>q)return[];var L=le,H=oi(i,le);y=Tt(y),i-=le;for(var Y=dt(H,y);++L<i;)y(L);return Y}function $W(i){return zt(i)?M(i,Uo):ro(i)?[i]:zi(xC(kn(i)))}function SW(i){var y=++BD;return kn(i)+y}var TW=$h(function(i,y){return i+y},0),EW=pg("ceil"),MW=$h(function(i,y){return i/y},1),IW=pg("floor");function RW(i){return i&&i.length?bh(i,ji,Xp):t}function LW(i,y){return i&&i.length?bh(i,Tt(y,2),Xp):t}function OW(i){return $e(i,ji)}function NW(i,y){return $e(i,Tt(y,2))}function DW(i){return i&&i.length?bh(i,ji,rg):t}function PW(i,y){return i&&i.length?bh(i,Tt(y,2),rg):t}var zW=$h(function(i,y){return i*y},1),BW=pg("round"),FW=$h(function(i,y){return i-y},0);function jW(i){return i&&i.length?ut(i,ji):0}function WW(i,y){return i&&i.length?ut(i,Tt(y,2)):0}return te.after=hF,te.ary=RC,te.assign=ZF,te.assignIn=GC,te.assignInWith=qC,te.assignWith=Mg,te.at=XF,te.before=LC,te.bind=$g,te.bindAll=iW,te.bindKey=OC,te.castArray=kF,te.chain=EC,te.chunk=Rz,te.compact=Lz,te.concat=Oz,te.cond=oW,te.conforms=sW,te.constant=Og,te.countBy=WB,te.create=ej,te.curry=NC,te.curryRight=DC,te.debounce=PC,te.defaults=tj,te.defaultsDeep=nj,te.defer=dF,te.delay=fF,te.difference=Nz,te.differenceBy=Dz,te.differenceWith=Pz,te.drop=zz,te.dropRight=Bz,te.dropRightWhile=Fz,te.dropWhile=jz,te.fill=Wz,te.filter=UB,te.flatMap=qB,te.flatMapDeep=YB,te.flatMapDepth=KB,te.flatten=AC,te.flattenDeep=Hz,te.flattenDepth=Uz,te.flip=pF,te.flow=lW,te.flowRight=cW,te.fromPairs=Vz,te.functions=cj,te.functionsIn=uj,te.groupBy=JB,te.initial=qz,te.intersection=Yz,te.intersectionBy=Kz,te.intersectionWith=Jz,te.invert=dj,te.invertBy=fj,te.invokeMap=ZB,te.iteratee=Ng,te.keyBy=XB,te.keys=Pr,te.keysIn=Fi,te.map=Lh,te.mapKeys=gj,te.mapValues=mj,te.matches=uW,te.matchesProperty=hW,te.memoize=Nh,te.merge=vj,te.mergeWith=YC,te.method=dW,te.methodOf=fW,te.mixin=Dg,te.negate=Dh,te.nthArg=gW,te.omit=yj,te.omitBy=bj,te.once=gF,te.orderBy=eF,te.over=mW,te.overArgs=mF,te.overEvery=vW,te.overSome=yW,te.partial=Sg,te.partialRight=zC,te.partition=tF,te.pick=wj,te.pickBy=KC,te.property=nk,te.propertyOf=bW,te.pull=eB,te.pullAll=SC,te.pullAllBy=tB,te.pullAllWith=nB,te.pullAt=rB,te.range=wW,te.rangeRight=xW,te.rearg=vF,te.reject=iF,te.remove=iB,te.rest=yF,te.reverse=_g,te.sampleSize=sF,te.set=Cj,te.setWith=kj,te.shuffle=aF,te.slice=oB,te.sortBy=uF,te.sortedUniq=dB,te.sortedUniqBy=fB,te.split=Gj,te.spread=bF,te.tail=pB,te.take=gB,te.takeRight=mB,te.takeRightWhile=vB,te.takeWhile=yB,te.tap=LB,te.throttle=wF,te.thru=Rh,te.toArray=HC,te.toPairs=JC,te.toPairsIn=QC,te.toPath=$W,te.toPlainObject=VC,te.transform=_j,te.unary=xF,te.union=bB,te.unionBy=wB,te.unionWith=xB,te.uniq=CB,te.uniqBy=kB,te.uniqWith=_B,te.unset=Aj,te.unzip=Ag,te.unzipWith=TC,te.update=$j,te.updateWith=Sj,te.values=Sl,te.valuesIn=Tj,te.without=AB,te.words=ek,te.wrap=CF,te.xor=$B,te.xorBy=SB,te.xorWith=TB,te.zip=EB,te.zipObject=MB,te.zipObjectDeep=IB,te.zipWith=RB,te.entries=JC,te.entriesIn=QC,te.extend=GC,te.extendWith=qC,Dg(te,te),te.add=TW,te.attempt=tk,te.camelCase=Rj,te.capitalize=ZC,te.ceil=EW,te.clamp=Ej,te.clone=_F,te.cloneDeep=$F,te.cloneDeepWith=SF,te.cloneWith=AF,te.conformsTo=TF,te.deburr=XC,te.defaultTo=aW,te.divide=MW,te.endsWith=Lj,te.eq=Vo,te.escape=Oj,te.escapeRegExp=Nj,te.every=HB,te.find=VB,te.findIndex=kC,te.findKey=rj,te.findLast=GB,te.findLastIndex=_C,te.findLastKey=ij,te.floor=IW,te.forEach=MC,te.forEachRight=IC,te.forIn=oj,te.forInRight=sj,te.forOwn=aj,te.forOwnRight=lj,te.get=Ig,te.gt=EF,te.gte=MF,te.has=hj,te.hasIn=Rg,te.head=$C,te.identity=ji,te.includes=QB,te.indexOf=Gz,te.inRange=Mj,te.invoke=pj,te.isArguments=Da,te.isArray=zt,te.isArrayBuffer=IF,te.isArrayLike=Bi,te.isArrayLikeObject=lr,te.isBoolean=RF,te.isBuffer=Js,te.isDate=LF,te.isElement=OF,te.isEmpty=NF,te.isEqual=DF,te.isEqualWith=PF,te.isError=Tg,te.isFinite=zF,te.isFunction=Ms,te.isInteger=BC,te.isLength=Ph,te.isMap=FC,te.isMatch=BF,te.isMatchWith=FF,te.isNaN=jF,te.isNative=WF,te.isNil=UF,te.isNull=HF,te.isNumber=jC,te.isObject=nr,te.isObjectLike=or,te.isPlainObject=Pc,te.isRegExp=Eg,te.isSafeInteger=VF,te.isSet=WC,te.isString=zh,te.isSymbol=ro,te.isTypedArray=$l,te.isUndefined=GF,te.isWeakMap=qF,te.isWeakSet=YF,te.join=Qz,te.kebabCase=Dj,te.last=$o,te.lastIndexOf=Zz,te.lowerCase=Pj,te.lowerFirst=zj,te.lt=KF,te.lte=JF,te.max=RW,te.maxBy=LW,te.mean=OW,te.meanBy=NW,te.min=DW,te.minBy=PW,te.stubArray=zg,te.stubFalse=Bg,te.stubObject=CW,te.stubString=kW,te.stubTrue=_W,te.multiply=zW,te.nth=Xz,te.noConflict=pW,te.noop=Pg,te.now=Oh,te.pad=Bj,te.padEnd=Fj,te.padStart=jj,te.parseInt=Wj,te.random=Ij,te.reduce=nF,te.reduceRight=rF,te.repeat=Hj,te.replace=Uj,te.result=xj,te.round=BW,te.runInContext=be,te.sample=oF,te.size=lF,te.snakeCase=Vj,te.some=cF,te.sortedIndex=sB,te.sortedIndexBy=aB,te.sortedIndexOf=lB,te.sortedLastIndex=cB,te.sortedLastIndexBy=uB,te.sortedLastIndexOf=hB,te.startCase=qj,te.startsWith=Yj,te.subtract=FW,te.sum=jW,te.sumBy=WW,te.template=Kj,te.times=AW,te.toFinite=Is,te.toInteger=Wt,te.toLength=UC,te.toLower=Jj,te.toNumber=So,te.toSafeInteger=QF,te.toString=kn,te.toUpper=Qj,te.trim=Zj,te.trimEnd=Xj,te.trimStart=eW,te.truncate=tW,te.unescape=nW,te.uniqueId=SW,te.upperCase=rW,te.upperFirst=Lg,te.each=MC,te.eachRight=IC,te.first=$C,Dg(te,(function(){var i={};return as(te,function(y,L){Cn.call(te.prototype,L)||(i[L]=y)}),i})(),{chain:!1}),te.VERSION=r,$r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){te[i].placeholder=te}),$r(["drop","take"],function(i,y){tn.prototype[i]=function(L){L=L===t?1:Tr(Wt(L),0);var H=this.__filtered__&&!y?new tn(this):this.clone();return H.__filtered__?H.__takeCount__=oi(L,H.__takeCount__):H.__views__.push({size:oi(L,le),type:i+(H.__dir__<0?"Right":"")}),H},tn.prototype[i+"Right"]=function(L){return this.reverse()[i](L).reverse()}}),$r(["filter","map","takeWhile"],function(i,y){var L=y+1,H=L==A||L==j;tn.prototype[i]=function(Y){var ie=this.clone();return ie.__iteratees__.push({iteratee:Tt(Y,3),type:L}),ie.__filtered__=ie.__filtered__||H,ie}}),$r(["head","last"],function(i,y){var L="take"+(y?"Right":"");tn.prototype[i]=function(){return this[L](1).value()[0]}}),$r(["initial","tail"],function(i,y){var L="drop"+(y?"":"Right");tn.prototype[i]=function(){return this.__filtered__?new tn(this):this[L](1)}}),tn.prototype.compact=function(){return this.filter(ji)},tn.prototype.find=function(i){return this.filter(i).head()},tn.prototype.findLast=function(i){return this.reverse().find(i)},tn.prototype.invokeMap=Jt(function(i,y){return typeof i=="function"?new tn(this):this.map(function(L){return Ic(L,i,y)})}),tn.prototype.reject=function(i){return this.filter(Dh(Tt(i)))},tn.prototype.slice=function(i,y){i=Wt(i);var L=this;return L.__filtered__&&(i>0||y<0)?new tn(L):(i<0?L=L.takeRight(-i):i&&(L=L.drop(i)),y!==t&&(y=Wt(y),L=y<0?L.dropRight(-y):L.take(y-i)),L)},tn.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},tn.prototype.toArray=function(){return this.take(le)},as(tn.prototype,function(i,y){var L=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),Y=te[H?"take"+(y=="last"?"Right":""):y],ie=H||/^find/.test(y);Y&&(te.prototype[y]=function(){var fe=this.__wrapped__,pe=H?[1]:arguments,_e=fe instanceof tn,Ne=pe[0],Pe=_e||zt(fe),je=function(Zt){var on=Y.apply(te,S([Zt],pe));return H&&st?on[0]:on};Pe&&L&&typeof Ne=="function"&&Ne.length!=1&&(_e=Pe=!1);var st=this.__chain__,vt=!!this.__actions__.length,Et=ie&&!st,Ut=_e&&!vt;if(!ie&&Pe){fe=Ut?fe:new tn(this);var $t=i.apply(fe,pe);return $t.__actions__.push({func:Rh,args:[je],thisArg:t}),new ko($t,st)}return Et&&Ut?i.apply(this,pe):($t=this.thru(je),Et?H?$t.value()[0]:$t.value():$t)})}),$r(["pop","push","shift","sort","splice","unshift"],function(i){var y=Co[i],L=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);te.prototype[i]=function(){var Y=arguments;if(H&&!this.__chain__){var ie=this.value();return y.apply(zt(ie)?ie:[],Y)}return this[L](function(fe){return y.apply(zt(fe)?fe:[],Y)})}}),as(tn.prototype,function(i,y){var L=te[y];if(L){var H=L.name+"";Cn.call(xl,H)||(xl[H]=[]),xl[H].push({name:y,func:L})}}),xl[Ah(t,x).name]=[{name:"wrapper",func:t}],tn.prototype.clone=rP,tn.prototype.reverse=iP,tn.prototype.value=oP,te.prototype.at=OB,te.prototype.chain=NB,te.prototype.commit=DB,te.prototype.next=PB,te.prototype.plant=BB,te.prototype.reverse=FB,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=jB,te.prototype.first=te.prototype.head,_c&&(te.prototype[_c]=zB),te}),Tn=xn();vr?((vr.exports=Tn)._=Tn,ri._=Tn):qt._=Tn}).call(uT)})(ou,ou.exports)),ou.exports}var dT=hT();ur("T",iu(dT)).debounce(function(){this.rebuildDisplayText()},300);var vy={exports:{}},yy;function fT(){return yy||(yy=1,(function(e,n){(function(){ace.require(["ace/mode/text"],function(t){e&&(e.exports=t)})})()})(vy)),vy.exports}fT();const pT=!0,xr="u-",gT="uplot",mT=xr+"hz",vT=xr+"vt",yT=xr+"title",bT=xr+"wrap",wT=xr+"under",xT=xr+"over",CT=xr+"axis",ha=xr+"off",kT=xr+"select",_T=xr+"cursor-x",AT=xr+"cursor-y",$T=xr+"cursor-pt",ST=xr+"legend",TT=xr+"live",ET=xr+"inline",MT=xr+"series",IT=xr+"marker",by=xr+"label",RT=xr+"value",Yl="width",Kl="height",Jl="top",wy="bottom",Ka="left",xd="right",Cd="#000",xy=Cd+"0",kd="mousemove",Cy="mousedown",_d="mouseup",ky="mouseenter",_y="mouseleave",Ay="dblclick",LT="resize",OT="scroll",$y="change",su="dppxchange",Ad="--",Ja=typeof window<"u",$d=Ja?document:null,Qa=Ja?window:null,NT=Ja?navigator:null;let vn,au;function Sd(){let e=devicePixelRatio;vn!=e&&(vn=e,au&&Md($y,au,Sd),au=matchMedia(`(min-resolution: ${vn-.001}dppx) and (max-resolution: ${vn+.001}dppx)`),da($y,au,Sd),Qa.dispatchEvent(new CustomEvent(su)))}function Hi(e,n){if(n!=null){let t=e.classList;!t.contains(n)&&t.add(n)}}function Td(e,n){let t=e.classList;t.contains(n)&&t.remove(n)}function zn(e,n,t){e.style[n]=t+"px"}function Io(e,n,t,r){let c=$d.createElement(e);return n!=null&&Hi(c,n),t?.insertBefore(c,r),c}function ao(e,n){return Io("div",e,n)}const Sy=new WeakMap;function Yo(e,n,t,r,c){let h="translate("+n+"px,"+t+"px)",g=Sy.get(e);h!=g&&(e.style.transform=h,Sy.set(e,h),n<0||t<0||n>r||t>c?Hi(e,ha):Td(e,ha))}const Ty=new WeakMap;function Ey(e,n,t){let r=n+t,c=Ty.get(e);r!=c&&(Ty.set(e,r),e.style.background=n,e.style.borderColor=t)}const My=new WeakMap;function Iy(e,n,t,r){let c=n+""+t,h=My.get(e);c!=h&&(My.set(e,c),e.style.height=t+"px",e.style.width=n+"px",e.style.marginLeft=r?-n/2+"px":0,e.style.marginTop=r?-t/2+"px":0)}const Ed={passive:!0},DT={...Ed,capture:!0};function da(e,n,t,r){n.addEventListener(e,t,r?DT:Ed)}function Md(e,n,t,r){n.removeEventListener(e,t,Ed)}Ja&&Sd();function Ro(e,n,t,r){let c;t=t||0,r=r||n.length-1;let h=r<=2147483647;for(;r-t>1;)c=h?t+r>>1:Vi((t+r)/2),n[c]<e?t=c:r=c;return e-n[t]<=n[r]-e?t:r}function Ry(e){return(n,t,r)=>{let c=-1,h=-1;for(let g=t;g<=r;g++)if(e(n[g])){c=g;break}for(let g=r;g>=t;g--)if(e(n[g])){h=g;break}return[c,h]}}const Ly=e=>e!=null,Oy=e=>e!=null&&e>0,lu=Ry(Ly),PT=Ry(Oy);function zT(e,n,t,r=0,c=!1){let h=c?PT:lu,g=c?Oy:Ly;[n,t]=h(e,n,t);let v=e[n],s=e[n];if(n>-1)if(r==1)v=e[n],s=e[t];else if(r==-1)v=e[t],s=e[n];else for(let f=n;f<=t;f++){let a=e[f];g(a)&&(a<v?v=a:a>s&&(s=a))}return[v??Mn,s??-Mn]}function cu(e,n,t,r){let c=Py(e),h=Py(n);e==n&&(c==-1?(e*=t,n/=t):(e/=t,n*=t));let g=t==10?us:zy,v=c==1?Vi:lo,s=h==1?lo:Vi,f=v(g(Cr(e))),a=s(g(Cr(n))),l=Za(t,f),u=Za(t,a);return t==10&&(f<0&&(l=In(l,-f)),a<0&&(u=In(u,-a))),r||t==2?(e=l*c,n=u*h):(e=Vy(e,l),n=du(n,u)),[e,n]}function Id(e,n,t,r){let c=cu(e,n,t,r);return e==0&&(c[0]=0),n==0&&(c[1]=0),c}const Rd=.1,Ny={mode:3,pad:Rd},Ql={pad:0,soft:null,mode:0},BT={min:Ql,max:Ql};function uu(e,n,t,r){return fu(t)?Dy(e,n,t):(Ql.pad=t,Ql.soft=r?0:null,Ql.mode=r?3:0,Dy(e,n,BT))}function pn(e,n){return e??n}function FT(e,n,t){for(n=pn(n,0),t=pn(t,e.length-1);n<=t;){if(e[n]!=null)return!0;n++}return!1}function Dy(e,n,t){let r=t.min,c=t.max,h=pn(r.pad,0),g=pn(c.pad,0),v=pn(r.hard,-Mn),s=pn(c.hard,Mn),f=pn(r.soft,Mn),a=pn(c.soft,-Mn),l=pn(r.mode,0),u=pn(c.mode,0),d=n-e,o=us(d),p=ci(Cr(e),Cr(n)),m=us(p),w=Cr(m-o);(d<1e-24||w>10)&&(d=0,(e==0||n==0)&&(d=1e-24,l==2&&f!=Mn&&(h=0),u==2&&a!=-Mn&&(g=0)));let x=d||p||1e3,R=us(x),T=Za(10,Vi(R)),_=x*(d==0?e==0?.1:1:h),C=In(Vy(e-_,T/10),24),P=e>=f&&(l==1||l==3&&C<=f||l==2&&C>=f)?f:Mn,O=ci(v,C<P&&e>=P?P:Lo(P,C)),E=x*(d==0?n==0?.1:1:g),k=In(du(n+E,T/10),24),B=n<=a&&(u==1||u==3&&k>=a||u==2&&k<=a)?a:-Mn,N=Lo(s,k>B&&n<=B?B:ci(B,k));return O==N&&O==0&&(N=100),[O,N]}const jT=new Intl.NumberFormat(Ja?NT.language:"en-US"),Ld=e=>jT.format(e),Ui=Math,hu=Ui.PI,Cr=Ui.abs,Vi=Ui.floor,kr=Ui.round,lo=Ui.ceil,Lo=Ui.min,ci=Ui.max,Za=Ui.pow,Py=Ui.sign,us=Ui.log10,zy=Ui.log2,WT=(e,n=1)=>Ui.sinh(e)*n,Od=(e,n=1)=>Ui.asinh(e/n),Mn=1/0;function By(e){return(us((e^e>>31)-(e>>31))|0)+1}function Nd(e,n,t){return Lo(ci(e,n),t)}function Fy(e){return typeof e=="function"}function en(e){return Fy(e)?e:()=>e}const HT=()=>{},jy=e=>e,Wy=(e,n)=>n,UT=e=>null,Hy=e=>!0,Uy=(e,n)=>e==n,VT=/\.\d*?(?=9{6,}|0{6,})/gm,fa=e=>{if(qy(e)||Ps.has(e))return e;const n=`${e}`,t=n.match(VT);if(t==null)return e;let r=t[0].length-1;if(n.indexOf("e-")!=-1){let[c,h]=n.split("e");return+`${fa(c)}e${h}`}return In(e,r)};function pa(e,n){return fa(In(fa(e/n))*n)}function du(e,n){return fa(lo(fa(e/n))*n)}function Vy(e,n){return fa(Vi(fa(e/n))*n)}function In(e,n=0){if(qy(e))return e;let t=10**n,r=e*t*(1+Number.EPSILON);return kr(r)/t}const Ps=new Map;function Gy(e){return((""+e).split(".")[1]||"").length}function Zl(e,n,t,r){let c=[],h=r.map(Gy);for(let g=n;g<t;g++){let v=Cr(g),s=In(Za(e,g),v);for(let f=0;f<r.length;f++){let a=e==10?+`${r[f]}e${g}`:r[f]*s,l=(g>=0?0:v)+(g>=h[f]?0:h[f]),u=e==10?a:In(a,l);c.push(u),Ps.set(u,l)}}return c}const Xl={},Dd=[],Xa=[null,null],zs=Array.isArray,qy=Number.isInteger,GT=e=>e===void 0;function Yy(e){return typeof e=="string"}function fu(e){let n=!1;if(e!=null){let t=e.constructor;n=t==null||t==Object}return n}function qT(e){return e!=null&&typeof e=="object"}const YT=Object.getPrototypeOf(Uint8Array),Ky="__proto__";function el(e,n=fu){let t;if(zs(e)){let r=e.find(c=>c!=null);if(zs(r)||n(r)){t=Array(e.length);for(let c=0;c<e.length;c++)t[c]=el(e[c],n)}else t=e.slice()}else if(e instanceof YT)t=e.slice();else if(n(e)){t={};for(let r in e)r!=Ky&&(t[r]=el(e[r],n))}else t=e;return t}function fr(e){let n=arguments;for(let t=1;t<n.length;t++){let r=n[t];for(let c in r)c!=Ky&&(fu(e[c])?fr(e[c],el(r[c])):e[c]=el(r[c]))}return e}const KT=0,JT=1,QT=2;function ZT(e,n,t){for(let r=0,c,h=-1;r<n.length;r++){let g=n[r];if(g>h){for(c=g-1;c>=0&&e[c]==null;)e[c--]=null;for(c=g+1;c<t&&e[c]==null;)e[h=c++]=null}}}function XT(e,n){if(nE(e)){let g=e[0].slice();for(let v=1;v<e.length;v++)g.push(...e[v].slice(1));return rE(g[0])||(g=tE(g)),g}let t=new Set;for(let g=0;g<e.length;g++){let v=e[g][0],s=v.length;for(let f=0;f<s;f++)t.add(v[f])}let r=[Array.from(t).sort((g,v)=>g-v)],c=r[0].length,h=new Map;for(let g=0;g<c;g++)h.set(r[0][g],g);for(let g=0;g<e.length;g++){let v=e[g],s=v[0];for(let f=1;f<v.length;f++){let a=v[f],l=Array(c).fill(void 0),u=n?n[g][f]:JT,d=[];for(let o=0;o<a.length;o++){let p=a[o],m=h.get(s[o]);p===null?u!=KT&&(l[m]=p,u==QT&&d.push(m)):l[m]=p}ZT(l,d,c),r.push(l)}}return r}const eE=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function tE(e){let n=e[0],t=n.length,r=Array(t);for(let h=0;h<r.length;h++)r[h]=h;r.sort((h,g)=>n[h]-n[g]);let c=[];for(let h=0;h<e.length;h++){let g=e[h],v=Array(t);for(let s=0;s<t;s++)v[s]=g[r[s]];c.push(v)}return c}function nE(e){let n=e[0][0],t=n.length;for(let r=1;r<e.length;r++){let c=e[r][0];if(c.length!=t)return!1;if(c!=n){for(let h=0;h<t;h++)if(c[h]!=n[h])return!1}}return!0}function rE(e,n=100){const t=e.length;if(t<=1)return!0;let r=0,c=t-1;for(;r<=c&&e[r]==null;)r++;for(;c>=r&&e[c]==null;)c--;if(c<=r)return!0;const h=ci(1,Vi((c-r+1)/n));for(let g=e[r],v=r+h;v<=c;v+=h){const s=e[v];if(s!=null){if(s<=g)return!1;g=s}}return!0}const Jy=["January","February","March","April","May","June","July","August","September","October","November","December"],Qy=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Zy(e){return e.slice(0,3)}const iE=Qy.map(Zy),oE=Jy.map(Zy),sE={MMMM:Jy,MMM:oE,WWWW:Qy,WWW:iE};function ec(e){return(e<10?"0":"")+e}function aE(e){return(e<10?"00":e<100?"0":"")+e}const lE={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,n)=>n.MMMM[e.getMonth()],MMM:(e,n)=>n.MMM[e.getMonth()],MM:e=>ec(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>ec(e.getDate()),D:e=>e.getDate(),WWWW:(e,n)=>n.WWWW[e.getDay()],WWW:(e,n)=>n.WWW[e.getDay()],HH:e=>ec(e.getHours()),H:e=>e.getHours(),h:e=>{let n=e.getHours();return n==0?12:n>12?n-12:n},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>ec(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>ec(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>aE(e.getMilliseconds())};function Pd(e,n){n=n||sE;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,c;for(;c=r.exec(e);)t.push(c[0][0]=="{"?lE[c[1]]:c[0]);return h=>{let g="";for(let v=0;v<t.length;v++)g+=typeof t[v]=="string"?t[v]:t[v](h,n);return g}}const cE=new Intl.DateTimeFormat().resolvedOptions().timeZone;function uE(e,n){let t;return n=="UTC"||n=="Etc/UTC"?t=new Date(+e+e.getTimezoneOffset()*6e4):n==cE?t=e:(t=new Date(e.toLocaleString("en-US",{timeZone:n})),t.setMilliseconds(e.getMilliseconds())),t}const Xy=e=>e%1==0,pu=[1,2,2.5,5],hE=Zl(10,-32,0,pu),eb=Zl(10,0,32,pu),dE=eb.filter(Xy),ga=hE.concat(eb),zd=`
1479
+ `,tb="{YYYY}",nb=zd+tb,rb="{M}/{D}",tc=zd+rb,gu=tc+"/{YY}",ib="{aa}",fE="{h}:{mm}",tl=fE+ib,ob=zd+tl,sb=":{ss}",bn=null;function ab(e){let n=e*1e3,t=n*60,r=t*60,c=r*24,h=c*30,g=c*365,v=(e==1?Zl(10,0,3,pu).filter(Xy):Zl(10,-3,0,pu)).concat([n,n*5,n*10,n*15,n*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,c,c*2,c*3,c*4,c*5,c*6,c*7,c*8,c*9,c*10,c*15,h,h*2,h*3,h*4,h*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const s=[[g,tb,bn,bn,bn,bn,bn,bn,1],[c*28,"{MMM}",nb,bn,bn,bn,bn,bn,1],[c,rb,nb,bn,bn,bn,bn,bn,1],[r,"{h}"+ib,gu,bn,tc,bn,bn,bn,1],[t,tl,gu,bn,tc,bn,bn,bn,1],[n,sb,gu+" "+tl,bn,tc+" "+tl,bn,ob,bn,1],[e,sb+".{fff}",gu+" "+tl,bn,tc+" "+tl,bn,ob,bn,1]];function f(a){return(l,u,d,o,p,m)=>{let w=[],x=p>=g,R=p>=h&&p<g,T=a(d),_=In(T*e,3),C=Bd(T.getFullYear(),x?0:T.getMonth(),R||x?1:T.getDate()),P=In(C*e,3);if(R||x){let O=R?p/h:0,E=x?p/g:0,k=_==P?_:In(Bd(C.getFullYear()+E,C.getMonth()+O,1)*e,3),B=new Date(kr(k/e)),N=B.getFullYear(),I=B.getMonth();for(let $=0;k<=o;$++){let A=Bd(N+E*$,I+O*$,1),D=A-a(In(A*e,3));k=In((+A+D)*e,3),k<=o&&w.push(k)}}else{let O=p>=c?c:p,E=Vi(d)-Vi(_),k=P+E+du(_-P,O);w.push(k);let B=a(k),N=B.getHours()+B.getMinutes()/t+B.getSeconds()/r,I=p/r,$=l.axes[u]._space,A=m/$;for(;k=In(k+p,e==1?0:3),!(k>o);)if(I>1){let D=Vi(In(N+I,6))%24,j=a(k).getHours()-D;j>1&&(j=-1),k-=j*r,N=(N+I)%24;let U=w[w.length-1];In((k-U)/p,3)*A>=.7&&w.push(k)}else w.push(k)}return w}}return[v,s,f]}const[pE,gE,mE]=ab(1),[vE,yE,bE]=ab(.001);Zl(2,-53,53,[1]);function lb(e,n){return e.map(t=>t.map((r,c)=>c==0||c==8||r==null?r:n(c==1||t[8]==0?r:t[1]+r)))}function cb(e,n){return(t,r,c,h,g)=>{let v=n.find(o=>g>=o[0])||n[n.length-1],s,f,a,l,u,d;return r.map(o=>{let p=e(o),m=p.getFullYear(),w=p.getMonth(),x=p.getDate(),R=p.getHours(),T=p.getMinutes(),_=p.getSeconds(),C=m!=s&&v[2]||w!=f&&v[3]||x!=a&&v[4]||R!=l&&v[5]||T!=u&&v[6]||_!=d&&v[7]||v[1];return s=m,f=w,a=x,l=R,u=T,d=_,C(p)})}}function wE(e,n){let t=Pd(n);return(r,c,h,g,v)=>c.map(s=>t(e(s)))}function Bd(e,n,t){return new Date(e,n,t)}function ub(e,n){return n(e)}const xE="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function hb(e,n){return(t,r,c,h)=>h==null?Ad:n(e(r))}function CE(e,n){let t=e.series[n];return t.width?t.stroke(e,n):t.points.width?t.points.stroke(e,n):null}function kE(e,n){return e.series[n].fill(e,n)}const _E={show:!0,live:!0,isolate:!1,mount:HT,markers:{show:!0,width:2,stroke:CE,fill:kE,dash:"solid"},idx:null,idxs:null,values:[]};function AE(e,n){let t=e.cursor.points,r=ao(),c=t.size(e,n);zn(r,Yl,c),zn(r,Kl,c);let h=c/-2;zn(r,"marginLeft",h),zn(r,"marginTop",h);let g=t.width(e,n,c);return g&&zn(r,"borderWidth",g),r}function $E(e,n){let t=e.series[n].points;return t._fill||t._stroke}function SE(e,n){let t=e.series[n].points;return t._stroke||t._fill}function TE(e,n){return e.series[n].points.size}const Fd=[0,0];function EE(e,n,t){return Fd[0]=n,Fd[1]=t,Fd}function mu(e,n,t,r=!0){return c=>{c.button==0&&(!r||c.target==n)&&t(c)}}function jd(e,n,t,r=!0){return c=>{(!r||c.target==n)&&t(c)}}const ME={show:!0,x:!0,y:!0,lock:!1,move:EE,points:{one:!1,show:AE,size:TE,width:0,stroke:SE,fill:$E},bind:{mousedown:mu,mouseup:mu,click:mu,dblclick:mu,mousemove:jd,mouseleave:jd,mouseenter:jd},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,n,t,r,c)=>r-c,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},db={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Wd=fr({},db,{filter:Wy}),fb=fr({},Wd,{size:10}),pb=fr({},db,{show:!1}),Hd='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"',gb="bold "+Hd,mb=1.5,vb={show:!0,scale:"x",stroke:Cd,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:gb,side:2,grid:Wd,ticks:fb,border:pb,font:Hd,lineGap:mb,rotate:0},IE="Value",RE="Time",yb={show:!0,scale:"x",auto:!1,sorted:1,min:Mn,max:-Mn,idxs:[]};function LE(e,n,t,r,c){return n.map(h=>h==null?"":Ld(h))}function OE(e,n,t,r,c,h,g){let v=[],s=Ps.get(c)||0;t=g?t:In(du(t,c),s);for(let f=t;f<=r;f=In(f+c,s))v.push(Object.is(f,-0)?0:f);return v}function Ud(e,n,t,r,c,h,g){const v=[],s=e.scales[e.axes[n].scale].log,f=s==10?us:zy,a=Vi(f(t));c=Za(s,a),s==10&&(c=ga[Ro(c,ga)]);let l=t,u=c*s;s==10&&(u=ga[Ro(u,ga)]);do v.push(l),l=l+c,s==10&&!Ps.has(l)&&(l=In(l,Ps.get(c))),l>=u&&(c=l,u=c*s,s==10&&(u=ga[Ro(u,ga)]));while(l<=r);return v}function NE(e,n,t,r,c,h,g){let v=e.scales[e.axes[n].scale].asinh,s=r>v?Ud(e,n,ci(v,t),r,c):[v],f=r>=0&&t<=0?[0]:[];return(t<-v?Ud(e,n,ci(v,-r),-t,c):[v]).reverse().map(a=>-a).concat(f,s)}const bb=/./,DE=/[12357]/,PE=/[125]/,wb=/1/,Vd=(e,n,t,r)=>e.map((c,h)=>n==4&&c==0||h%r==0&&t.test(c.toExponential()[c<0?1:0])?c:null);function zE(e,n,t,r,c){let h=e.axes[t],g=h.scale,v=e.scales[g],s=e.valToPos,f=h._space,a=s(10,g),l=s(9,g)-a>=f?bb:s(7,g)-a>=f?DE:s(5,g)-a>=f?PE:wb;if(l==wb){let u=Cr(s(1,g)-a);if(u<f)return Vd(n.slice().reverse(),v.distr,l,lo(f/u)).reverse()}return Vd(n,v.distr,l,1)}function BE(e,n,t,r,c){let h=e.axes[t],g=h.scale,v=h._space,s=e.valToPos,f=Cr(s(1,g)-s(2,g));return f<v?Vd(n.slice().reverse(),3,bb,lo(v/f)).reverse():n}function FE(e,n,t,r){return r==null?Ad:n==null?"":Ld(n)}const xb={show:!0,scale:"y",stroke:Cd,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:gb,side:3,grid:Wd,ticks:fb,border:pb,font:Hd,lineGap:mb,rotate:0};function jE(e,n){let t=3+(e||1)*2;return In(t*n,3)}function WE(e,n){let{scale:t,idxs:r}=e.series[0],c=e._data[0],h=e.valToPos(c[r[0]],t,!0),g=e.valToPos(c[r[1]],t,!0),v=Cr(g-h),s=e.series[n],f=v/(s.points.space*vn);return r[1]-r[0]<=f}const Cb={scale:null,auto:!0,sorted:0,min:Mn,max:-Mn},kb=(e,n,t,r,c)=>c,_b={show:!0,auto:!0,sorted:0,gaps:kb,alpha:1,facets:[fr({},Cb,{scale:"x"}),fr({},Cb,{scale:"y"})]},Ab={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:kb,alpha:1,points:{show:WE,filter:null},values:null,min:Mn,max:-Mn,idxs:[],path:null,clip:null};function HE(e,n,t,r,c){return t/10}const $b={time:pT,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},UE=fr({},$b,{time:!1,ori:1}),Sb={};function Tb(e,n){let t=Sb[e];return t||(t={key:e,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(c=>c!=r)},pub(r,c,h,g,v,s,f){for(let a=0;a<t.plots.length;a++)t.plots[a]!=c&&t.plots[a].pub(r,c,h,g,v,s,f)}},e!=null&&(Sb[e]=t)),t}const nl=1,Gd=2;function ma(e,n,t){const r=e.mode,c=e.series[n],h=r==2?e._data[n]:e._data,g=e.scales,v=e.bbox;let s=h[0],f=r==2?h[1]:h[n],a=r==2?g[c.facets[0].scale]:g[e.series[0].scale],l=r==2?g[c.facets[1].scale]:g[c.scale],u=v.left,d=v.top,o=v.width,p=v.height,m=e.valToPosH,w=e.valToPosV;return a.ori==0?t(c,s,f,a,l,m,w,u,d,o,p,yu,rl,wu,Ib,Lb):t(c,s,f,a,l,w,m,d,u,p,o,bu,il,Kd,Rb,Ob)}function qd(e,n){let t=0,r=0,c=pn(e.bands,Dd);for(let h=0;h<c.length;h++){let g=c[h];g.series[0]==n?t=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function VE(e,n,t,r,c){let h=e.mode,g=e.series[n],v=h==2?g.facets[1].scale:g.scale,s=e.scales[v];return c==-1?s.min:c==1?s.max:s.distr==3?s.dir==1?s.min:s.max:0}function hs(e,n,t,r,c,h){return ma(e,n,(g,v,s,f,a,l,u,d,o,p,m)=>{let w=g.pxRound;const x=f.dir*(f.ori==0?1:-1),R=f.ori==0?rl:il;let T,_;x==1?(T=t,_=r):(T=r,_=t);let C=w(l(v[T],f,p,d)),P=w(u(s[T],a,m,o)),O=w(l(v[_],f,p,d)),E=w(u(h==1?a.max:a.min,a,m,o)),k=new Path2D(c);return R(k,O,E),R(k,C,E),R(k,C,P),k})}function vu(e,n,t,r,c,h){let g=null;if(e.length>0){g=new Path2D;const v=n==0?wu:Kd;let s=t;for(let l=0;l<e.length;l++){let u=e[l];if(u[1]>u[0]){let d=u[0]-s;d>0&&v(g,s,r,d,r+h),s=u[1]}}let f=t+c-s,a=10;f>0&&v(g,s,r-a/2,f,r+h+a)}return g}function GE(e,n,t){let r=e[e.length-1];r&&r[0]==n?r[1]=t:e.push([n,t])}function Yd(e,n,t,r,c,h,g){let v=[],s=e.length;for(let f=c==1?t:r;f>=t&&f<=r;f+=c)if(n[f]===null){let a=f,l=f;if(c==1)for(;++f<=r&&n[f]===null;)l=f;else for(;--f>=t&&n[f]===null;)l=f;let u=h(e[a]),d=l==a?u:h(e[l]),o=a-c;u=g<=0&&o>=0&&o<s?h(e[o]):u;let p=l+c;d=g>=0&&p>=0&&p<s?h(e[p]):d,d>=u&&v.push([u,d])}return v}function Eb(e){return e==0?jy:e==1?kr:n=>pa(n,e)}function Mb(e){let n=e==0?yu:bu,t=e==0?(c,h,g,v,s,f)=>{c.arcTo(h,g,v,s,f)}:(c,h,g,v,s,f)=>{c.arcTo(g,h,s,v,f)},r=e==0?(c,h,g,v,s)=>{c.rect(h,g,v,s)}:(c,h,g,v,s)=>{c.rect(g,h,s,v)};return(c,h,g,v,s,f=0,a=0)=>{f==0&&a==0?r(c,h,g,v,s):(f=Lo(f,v/2,s/2),a=Lo(a,v/2,s/2),n(c,h+f,g),t(c,h+v,g,h+v,g+s,f),t(c,h+v,g+s,h,g+s,a),t(c,h,g+s,h,g,a),t(c,h,g,h+v,g,f),c.closePath())}}const yu=(e,n,t)=>{e.moveTo(n,t)},bu=(e,n,t)=>{e.moveTo(t,n)},rl=(e,n,t)=>{e.lineTo(n,t)},il=(e,n,t)=>{e.lineTo(t,n)},wu=Mb(0),Kd=Mb(1),Ib=(e,n,t,r,c,h)=>{e.arc(n,t,r,c,h)},Rb=(e,n,t,r,c,h)=>{e.arc(t,n,r,c,h)},Lb=(e,n,t,r,c,h,g)=>{e.bezierCurveTo(n,t,r,c,h,g)},Ob=(e,n,t,r,c,h,g)=>{e.bezierCurveTo(t,n,c,r,g,h)};function Nb(e){return(n,t,r,c,h)=>ma(n,t,(g,v,s,f,a,l,u,d,o,p,m)=>{let{pxRound:w,points:x}=g,R,T;f.ori==0?(R=yu,T=Ib):(R=bu,T=Rb);const _=In(x.width*vn,3);let C=(x.size-x.width)/2*vn,P=In(C*2,3),O=new Path2D,E=new Path2D,{left:k,top:B,width:N,height:I}=n.bbox;wu(E,k-P,B-P,N+P*2,I+P*2);const $=A=>{if(s[A]!=null){let D=w(l(v[A],f,p,d)),j=w(u(s[A],a,m,o));R(O,D+C,j),T(O,D,j,C,0,hu*2)}};if(h)h.forEach($);else for(let A=r;A<=c;A++)$(A);return{stroke:_>0?O:null,fill:O,clip:E,flags:nl|Gd}})}function Db(e){return(n,t,r,c,h,g)=>{r!=c&&(h!=r&&g!=r&&e(n,t,r),h!=c&&g!=c&&e(n,t,c),e(n,t,g))}}const qE=Db(rl),YE=Db(il);function Pb(e){const n=pn(e?.alignGaps,0);return(t,r,c,h)=>ma(t,r,(g,v,s,f,a,l,u,d,o,p,m)=>{[c,h]=lu(s,c,h);let w=g.pxRound,x=N=>w(l(N,f,p,d)),R=N=>w(u(N,a,m,o)),T,_;f.ori==0?(T=rl,_=qE):(T=il,_=YE);const C=f.dir*(f.ori==0?1:-1),P={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:nl},O=P.stroke;let E=!1;if(h-c>=p*4){let N=le=>t.posToVal(le,f.key,!0),I=null,$=null,A,D,j,U=x(v[C==1?c:h]),q=x(v[c]),Q=x(v[h]),re=N(C==1?q+1:Q-1);for(let le=C==1?c:h;le>=c&&le<=h;le+=C){let ne=v[le],ue=(C==1?ne<re:ne>re)?U:x(ne),he=s[le];ue==U?he!=null?(D=he,I==null?(T(O,ue,R(D)),A=I=$=D):D<I?I=D:D>$&&($=D)):he===null&&(E=!0):(I!=null&&_(O,U,R(I),R($),R(A),R(D)),he!=null?(D=he,T(O,ue,R(D)),I=$=A=D):(I=$=null,he===null&&(E=!0)),U=ue,re=N(U+C))}I!=null&&I!=$&&j!=U&&_(O,U,R(I),R($),R(A),R(D))}else for(let N=C==1?c:h;N>=c&&N<=h;N+=C){let I=s[N];I===null?E=!0:I!=null&&T(O,x(v[N]),R(I))}let[k,B]=qd(t,r);if(g.fill!=null||k!=0){let N=P.fill=new Path2D(O),I=g.fillTo(t,r,g.min,g.max,k),$=R(I),A=x(v[c]),D=x(v[h]);C==-1&&([D,A]=[A,D]),T(N,D,$),T(N,A,$)}if(!g.spanGaps){let N=[];E&&N.push(...Yd(v,s,c,h,C,x,n)),P.gaps=N=g.gaps(t,r,c,h,N),P.clip=vu(N,f.ori,d,o,p,m)}return B!=0&&(P.band=B==2?[hs(t,r,c,h,O,-1),hs(t,r,c,h,O,1)]:hs(t,r,c,h,O,B)),P})}function KE(e){const n=pn(e.align,1),t=pn(e.ascDesc,!1),r=pn(e.alignGaps,0),c=pn(e.extend,!1);return(h,g,v,s)=>ma(h,g,(f,a,l,u,d,o,p,m,w,x,R)=>{[v,s]=lu(l,v,s);let T=f.pxRound,{left:_,width:C}=h.bbox,P=Q=>T(o(Q,u,x,m)),O=Q=>T(p(Q,d,R,w)),E=u.ori==0?rl:il;const k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:nl},B=k.stroke,N=u.dir*(u.ori==0?1:-1);let I=O(l[N==1?v:s]),$=P(a[N==1?v:s]),A=$,D=$;c&&n==-1&&(D=_,E(B,D,I)),E(B,$,I);for(let Q=N==1?v:s;Q>=v&&Q<=s;Q+=N){let re=l[Q];if(re==null)continue;let le=P(a[Q]),ne=O(re);n==1?E(B,le,I):E(B,A,ne),E(B,le,ne),I=ne,A=le}let j=A;c&&n==1&&(j=_+C,E(B,j,I));let[U,q]=qd(h,g);if(f.fill!=null||U!=0){let Q=k.fill=new Path2D(B),re=f.fillTo(h,g,f.min,f.max,U),le=O(re);E(Q,j,le),E(Q,D,le)}if(!f.spanGaps){let Q=[];Q.push(...Yd(a,l,v,s,N,P,r));let re=f.width*vn/2,le=t||n==1?re:-re,ne=t||n==-1?-re:re;Q.forEach(ue=>{ue[0]+=le,ue[1]+=ne}),k.gaps=Q=f.gaps(h,g,v,s,Q),k.clip=vu(Q,u.ori,m,w,x,R)}return q!=0&&(k.band=q==2?[hs(h,g,v,s,B,-1),hs(h,g,v,s,B,1)]:hs(h,g,v,s,B,q)),k})}function zb(e,n,t,r,c,h,g=Mn){if(e.length>1){let v=null;for(let s=0,f=1/0;s<e.length;s++)if(n[s]!==void 0){if(v!=null){let a=Cr(e[s]-e[v]);a<f&&(f=a,g=Cr(t(e[s],r,c,h)-t(e[v],r,c,h)))}v=s}}return g}function JE(e){e=e||Xl;const n=pn(e.size,[.6,Mn,1]),t=e.align||0,r=e.gap||0;let c=e.radius;c=c==null?[0,0]:typeof c=="number"?[c,0]:c;const h=en(c),g=1-n[0],v=pn(n[1],Mn),s=pn(n[2],1),f=pn(e.disp,Xl),a=pn(e.each,d=>{}),{fill:l,stroke:u}=f;return(d,o,p,m)=>ma(d,o,(w,x,R,T,_,C,P,O,E,k,B)=>{let N=w.pxRound,I=t,$=r*vn,A=v*vn,D=s*vn,j,U;T.ori==0?[j,U]=h(d,o):[U,j]=h(d,o);const q=T.dir*(T.ori==0?1:-1);let Q=T.ori==0?wu:Kd,re=T.ori==0?a:(it,Gt,Bn,$n,Nn,Un,Rn)=>{a(it,Gt,Bn,Nn,$n,Rn,Un)},le=pn(d.bands,Dd).find(it=>it.series[0]==o),ne=le!=null?le.dir:0,ue=w.fillTo(d,o,w.min,w.max,ne),he=N(P(ue,_,B,E)),oe,ee,ye,we=k,Ae=N(w.width*vn),Je=!1,ze=null,qe=null,Ze=null,at=null;l!=null&&(Ae==0||u!=null)&&(Je=!0,ze=l.values(d,o,p,m),qe=new Map,new Set(ze).forEach(it=>{it!=null&&qe.set(it,new Path2D)}),Ae>0&&(Ze=u.values(d,o,p,m),at=new Map,new Set(Ze).forEach(it=>{it!=null&&at.set(it,new Path2D)})));let{x0:ct,size:Ft}=f;if(ct!=null&&Ft!=null){I=1,x=ct.values(d,o,p,m),ct.unit==2&&(x=x.map(Gt=>d.posToVal(O+Gt*k,T.key,!0)));let it=Ft.values(d,o,p,m);Ft.unit==2?ee=it[0]*k:ee=C(it[0],T,k,O)-C(0,T,k,O),we=zb(x,R,C,T,k,O,we),ye=we-ee+$}else we=zb(x,R,C,T,k,O,we),ye=we*g+$,ee=we-ye;ye<1&&(ye=0),Ae>=ee/2&&(Ae=0),ye<5&&(N=jy);let Me=ye>0,xt=we-ye-(Me?Ae:0);ee=N(Nd(xt,D,A)),oe=(I==0?ee/2:I==q?0:ee)-I*q*((I==0?$/2:0)+(Me?Ae/2:0));const St={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Vt=Je?null:new Path2D;let un=null;if(le!=null)un=d.data[le.series[1]];else{let{y0:it,y1:Gt}=f;it!=null&&Gt!=null&&(R=Gt.values(d,o,p,m),un=it.values(d,o,p,m))}let An=j*ee,ft=U*ee;for(let it=q==1?p:m;it>=p&&it<=m;it+=q){let Gt=R[it];if(Gt==null)continue;if(un!=null){let hn=un[it]??0;if(Gt-hn==0)continue;he=P(hn,_,B,E)}let Bn=T.distr!=2||f!=null?x[it]:it,$n=C(Bn,T,k,O),Nn=P(pn(Gt,ue),_,B,E),Un=N($n-oe),Rn=N(ci(Nn,he)),Vn=N(Lo(Nn,he)),Xn=Rn-Vn;if(Gt!=null){let hn=Gt<0?ft:An,Dn=Gt<0?An:ft;Je?(Ae>0&&Ze[it]!=null&&Q(at.get(Ze[it]),Un,Vn+Vi(Ae/2),ee,ci(0,Xn-Ae),hn,Dn),ze[it]!=null&&Q(qe.get(ze[it]),Un,Vn+Vi(Ae/2),ee,ci(0,Xn-Ae),hn,Dn)):Q(Vt,Un,Vn+Vi(Ae/2),ee,ci(0,Xn-Ae),hn,Dn),re(d,o,it,Un-Ae/2,Vn,ee+Ae,Xn)}}return Ae>0?St.stroke=Je?at:Vt:Je||(St._fill=w.width==0?w._fill:w._stroke??w._fill,St.width=0),St.fill=Je?qe:Vt,St})}function QE(e,n){const t=pn(n?.alignGaps,0);return(r,c,h,g)=>ma(r,c,(v,s,f,a,l,u,d,o,p,m,w)=>{[h,g]=lu(f,h,g);let x=v.pxRound,R=j=>x(u(j,a,m,o)),T=j=>x(d(j,l,w,p)),_,C,P;a.ori==0?(_=yu,P=rl,C=Lb):(_=bu,P=il,C=Ob);const O=a.dir*(a.ori==0?1:-1);let E=R(s[O==1?h:g]),k=E,B=[],N=[];for(let j=O==1?h:g;j>=h&&j<=g;j+=O)if(f[j]!=null){let U=s[j],q=R(U);B.push(k=q),N.push(T(f[j]))}const I={stroke:e(B,N,_,P,C,x),fill:null,clip:null,band:null,gaps:null,flags:nl},$=I.stroke;let[A,D]=qd(r,c);if(v.fill!=null||A!=0){let j=I.fill=new Path2D($),U=v.fillTo(r,c,v.min,v.max,A),q=T(U);P(j,k,q),P(j,E,q)}if(!v.spanGaps){let j=[];j.push(...Yd(s,f,h,g,O,R,t)),I.gaps=j=v.gaps(r,c,h,g,j),I.clip=vu(j,a.ori,o,p,m,w)}return D!=0&&(I.band=D==2?[hs(r,c,h,g,$,-1),hs(r,c,h,g,$,1)]:hs(r,c,h,g,$,D)),I})}function ZE(e){return QE(XE,e)}function XE(e,n,t,r,c,h){const g=e.length;if(g<2)return null;const v=new Path2D;if(t(v,e[0],n[0]),g==2)r(v,e[1],n[1]);else{let s=Array(g),f=Array(g-1),a=Array(g-1),l=Array(g-1);for(let u=0;u<g-1;u++)a[u]=n[u+1]-n[u],l[u]=e[u+1]-e[u],f[u]=a[u]/l[u];s[0]=f[0];for(let u=1;u<g-1;u++)f[u]===0||f[u-1]===0||f[u-1]>0!=f[u]>0?s[u]=0:(s[u]=3*(l[u-1]+l[u])/((2*l[u]+l[u-1])/f[u-1]+(l[u]+2*l[u-1])/f[u]),isFinite(s[u])||(s[u]=0));s[g-1]=f[g-2];for(let u=0;u<g-1;u++)c(v,e[u]+l[u]/3,n[u]+s[u]*l[u]/3,e[u+1]-l[u]/3,n[u+1]-s[u+1]*l[u]/3,e[u+1],n[u+1])}return v}const Jd=new Set;function Bb(){for(let e of Jd)e.syncRect(!0)}Ja&&(da(LT,Qa,Bb),da(OT,Qa,Bb,!0),da(su,Qa,()=>{Jr.pxRatio=vn}));const eM=Pb(),tM=Nb();function Fb(e,n,t,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((c,h)=>Qd(c,h,n,t))}function nM(e,n){return e.map((t,r)=>r==0?{}:fr({},n,t))}function Qd(e,n,t,r){return fr({},n==0?t:r,e)}function jb(e,n,t){return n==null?Xa:[n,t]}const rM=jb;function iM(e,n,t){return n==null?Xa:uu(n,t,Rd,!0)}function Wb(e,n,t,r){return n==null?Xa:cu(n,t,e.scales[r].log,!1)}const oM=Wb;function Hb(e,n,t,r){return n==null?Xa:Id(n,t,e.scales[r].log,!1)}const sM=Hb;function aM(e,n,t,r,c){let h=ci(By(e),By(n)),g=n-e,v=Ro(c/r*g,t);do{let s=t[v],f=r*s/g;if(f>=c&&h+(s<5?Ps.get(s):0)<=17)return[s,f]}while(++v<t.length);return[0,0]}function Ub(e){let n,t;return e=e.replace(/(\d+)px/,(r,c)=>(n=kr((t=+c)*vn))+"px"),[e,n,t]}function lM(e){e.show&&[e.font,e.labelFont].forEach(n=>{let t=In(n[2]*vn,1);n[0]=n[0].replace(/[0-9.]+px/,t+"px"),n[1]=t})}function Jr(e,n,t){const r={mode:pn(e.mode,1)},c=r.mode;function h(V,J,ae,ce){let ge=J.valToPct(V);return ce+ae*(J.dir==-1?1-ge:ge)}function g(V,J,ae,ce){let ge=J.valToPct(V);return ce+ae*(J.dir==-1?ge:1-ge)}function v(V,J,ae,ce){return J.ori==0?h(V,J,ae,ce):g(V,J,ae,ce)}r.valToPosH=h,r.valToPosV=g;let s=!1;r.status=0;const f=r.root=ao(gT);if(e.id!=null&&(f.id=e.id),Hi(f,e.class),e.title){let V=ao(yT,f);V.textContent=e.title}const a=Io("canvas"),l=r.ctx=a.getContext("2d"),u=ao(bT,f);da("click",u,V=>{V.target===o&&(We!=xe||rt!=Ie)&&yn.click(r,V)},!0);const d=r.under=ao(wT,u);u.appendChild(a);const o=r.over=ao(xT,u);e=el(e);const p=+pn(e.pxAlign,1),m=Eb(p);(e.plugins||[]).forEach(V=>{V.opts&&(e=V.opts(r,e)||e)});const w=e.ms||.001,x=r.series=c==1?Fb(e.series||[],yb,Ab,!1):nM(e.series||[null],_b),R=r.axes=Fb(e.axes||[],vb,xb,!0),T=r.scales={},_=r.bands=e.bands||[];_.forEach(V=>{V.fill=en(V.fill||null),V.dir=pn(V.dir,-1)});const C=c==2?x[1].facets[0].scale:x[0].scale,P={axes:ts,series:Cs},O=(e.drawOrder||["axes","series"]).map(V=>P[V]);function E(V){const J=V.distr==3?ae=>us(ae>0?ae:V.clamp(r,ae,V.min,V.max,V.key)):V.distr==4?ae=>Od(ae,V.asinh):V.distr==100?ae=>V.fwd(ae):ae=>ae;return ae=>{let ce=J(ae),{_min:ge,_max:Se}=V,Le=Se-ge;return(ce-ge)/Le}}function k(V){let J=T[V];if(J==null){let ae=(e.scales||Xl)[V]||Xl;if(ae.from!=null){k(ae.from);let ce=fr({},T[ae.from],ae,{key:V});ce.valToPct=E(ce),T[V]=ce}else{J=T[V]=fr({},V==C?$b:UE,ae),J.key=V;let ce=J.time,ge=J.range,Se=zs(ge);if((V!=C||c==2&&!ce)&&(Se&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Ny:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Ny:{mode:1,hard:ge[1],soft:ge[1]}},Se=!1),!Se&&fu(ge))){let Le=ge;ge=(He,Ge,Qe)=>Ge==null?Xa:uu(Ge,Qe,Le)}J.range=en(ge||(ce?rM:V==C?J.distr==3?oM:J.distr==4?sM:jb:J.distr==3?Wb:J.distr==4?Hb:iM)),J.auto=en(Se?!1:J.auto),J.clamp=en(J.clamp||HE),J._min=J._max=null,J.valToPct=E(J)}}}k("x"),k("y"),c==1&&x.forEach(V=>{k(V.scale)}),R.forEach(V=>{k(V.scale)});for(let V in e.scales)k(V);const B=T[C],N=B.distr;let I,$;B.ori==0?(Hi(f,mT),I=h,$=g):(Hi(f,vT),I=g,$=h);const A={};for(let V in T){let J=T[V];(J.min!=null||J.max!=null)&&(A[V]={min:J.min,max:J.max},J.min=J.max=null)}const D=e.tzDate||(V=>new Date(kr(V/w))),j=e.fmtDate||Pd,U=w==1?mE(D):bE(D),q=cb(D,lb(w==1?gE:yE,j)),Q=hb(D,ub(xE,j)),re=[],le=r.legend=fr({},_E,e.legend),ne=r.cursor=fr({},ME,{drag:{y:c==2}},e.cursor),ue=le.show,he=ne.show,oe=le.markers;le.idxs=re,oe.width=en(oe.width),oe.dash=en(oe.dash),oe.stroke=en(oe.stroke),oe.fill=en(oe.fill);let ee,ye,we,Ae=[],Je=[],ze,qe=!1,Ze={};if(le.live){const V=x[1]?x[1].values:null;qe=V!=null,ze=qe?V(r,1,0):{_:0};for(let J in ze)Ze[J]=Ad}if(ue)if(ee=Io("table",ST,f),we=Io("tbody",null,ee),le.mount(r,ee),qe){ye=Io("thead",null,ee,we);let V=Io("tr",null,ye);Io("th",null,V);for(var at in ze)Io("th",by,V).textContent=at}else Hi(ee,ET),le.live&&Hi(ee,TT);const ct={show:!0},Ft={show:!1};function Me(V,J){if(J==0&&(qe||!le.live||c==2))return Xa;let ae=[],ce=Io("tr",MT,we,we.childNodes[J]);Hi(ce,V.class),V.show||Hi(ce,ha);let ge=Io("th",null,ce);if(oe.show){let He=ao(IT,ge);if(J>0){let Ge=oe.width(r,J);Ge&&(He.style.border=Ge+"px "+oe.dash(r,J)+" "+oe.stroke(r,J)),He.style.background=oe.fill(r,J)}}let Se=ao(by,ge);V.label instanceof HTMLElement?Se.appendChild(V.label):Se.textContent=V.label,J>0&&(oe.show||(Se.style.color=V.width>0?oe.stroke(r,J):oe.fill(r,J)),St("click",ge,He=>{if(ne._lock)return;Mi(He);let Ge=x.indexOf(V);if((He.ctrlKey||He.metaKey)!=le.isolate){let Qe=x.some((ot,ht)=>ht>0&&ht!=Ge&&ot.show);x.forEach((ot,ht)=>{ht>0&&vr(ht,Qe?ht==Ge?ct:Ft:ct,!0,Rt.setSeries)})}else vr(Ge,{show:!V.show},!0,Rt.setSeries)},!1),Lr&&St(ky,ge,He=>{ne._lock||(Mi(He),vr(x.indexOf(V),xo,!0,Rt.setSeries))},!1));for(var Le in ze){let He=Io("td",RT,ce);He.textContent="--",ae.push(He)}return[ce,ae]}const xt=new Map;function St(V,J,ae,ce=!0){const ge=xt.get(J)||{},Se=ne.bind[V](r,J,ae,ce);Se&&(da(V,J,ge[V]=Se),xt.set(J,ge))}function Vt(V,J,ae){const ce=xt.get(J)||{};for(let ge in ce)(V==null||ge==V)&&(Md(ge,J,ce[ge]),delete ce[ge]);V==null&&xt.delete(J)}let un=0,An=0,ft=0,it=0,Gt=0,Bn=0,$n=Gt,Nn=Bn,Un=ft,Rn=it,Vn=0,Xn=0,hn=0,Dn=0;r.bbox={};let Ti=!1,Xr=!1,ei=!1,Ei=!1,ho=!1,mr=!1;function Ki(V,J,ae){(ae||V!=r.width||J!=r.height)&&Fr(V,J),ni(!1),ei=!0,Xr=!0,Zi()}function Fr(V,J){r.width=un=ft=V,r.height=An=it=J,Gt=Bn=0,gs(),Ko();let ae=r.bbox;Vn=ae.left=pa(Gt*vn,.5),Xn=ae.top=pa(Bn*vn,.5),hn=ae.width=pa(ft*vn,.5),Dn=ae.height=pa(it*vn,.5)}const fo=3;function ar(){let V=!1,J=0;for(;!V;){J++;let ae=bo(J),ce=Dr(J);V=J==fo||ae&&ce,V||(Fr(r.width,r.height),Xr=!0)}}function Ws({width:V,height:J}){Ki(V,J)}r.setSize=Ws;function gs(){let V=!1,J=!1,ae=!1,ce=!1;R.forEach((ge,Se)=>{if(ge.show&&ge._show){let{side:Le,_size:He}=ge,Ge=Le%2,Qe=ge.label!=null?ge.labelSize:0,ot=He+Qe;ot>0&&(Ge?(ft-=ot,Le==3?(Gt+=ot,ce=!0):ae=!0):(it-=ot,Le==0?(Bn+=ot,V=!0):J=!0))}}),di[0]=V,di[1]=ae,di[2]=J,di[3]=ce,ft-=Or[1]+Or[3],Gt+=Or[3],it-=Or[2]+Or[0],Bn+=Or[0]}function Ko(){let V=Gt+ft,J=Bn+it,ae=Gt,ce=Bn;function ge(Se,Le){switch(Se){case 1:return V+=Le,V-Le;case 2:return J+=Le,J-Le;case 3:return ae-=Le,ae+Le;case 0:return ce-=Le,ce+Le}}R.forEach((Se,Le)=>{if(Se.show&&Se._show){let He=Se.side;Se._pos=ge(He,Se._size),Se.label!=null&&(Se._lpos=ge(He,Se.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,J=V.skip=new Set(V.skip??[]);J.add(void 0);let ae=V.prox=en(V.prox),ce=V.bias??=0;ne.dataIdx=(ge,Se,Le,He)=>{if(Se==0)return Le;let Ge=Le,Qe=ae(ge,Se,Le,He)??Mn,ot=Qe>=0&&Qe<Mn,ht=B.ori==0?ft:it,It=ne.left,fn=n[0],Yt=n[Se];if(J.has(Yt[Le])){Ge=null;let Mt=null,At=null,bt;if(ce==0||ce==-1)for(bt=Le;Mt==null&&bt-- >0;)J.has(Yt[bt])||(Mt=bt);if(ce==0||ce==1)for(bt=Le;At==null&&bt++<Yt.length;)J.has(Yt[bt])||(At=bt);if(Mt!=null||At!=null)if(ot){let Ln=Mt==null?-1/0:I(fn[Mt],B,ht,0),Qn=At==null?1/0:I(fn[At],B,ht,0),br=It-Ln,xn=Qn-It;br<=xn?br<=Qe&&(Ge=Mt):xn<=Qe&&(Ge=At)}else Ge=At==null?Mt:Mt==null?At:Le-Mt<=At-Le?Mt:At}else ot&&Cr(It-I(fn[Le],B,ht,0))>Qe&&(Ge=null);return Ge}}const Mi=V=>{ne.event=V};ne.idxs=re,ne._lock=!1;let Gn=ne.points;Gn.show=en(Gn.show),Gn.size=en(Gn.size),Gn.stroke=en(Gn.stroke),Gn.width=en(Gn.width),Gn.fill=en(Gn.fill);const Ar=r.focus=fr({},e.focus||{alpha:.3},ne.focus),Lr=Ar.prox>=0,gn=Lr&&Gn.one;let Fn=[],Ii=[],hi=[];function ms(V,J){let ae=Gn.show(r,J);if(ae instanceof HTMLElement)return Hi(ae,$T),Hi(ae,V.class),Yo(ae,-10,-10,ft,it),o.insertBefore(ae,Fn[J]),ae}function vs(V,J){if(c==1||J>0){let ae=c==1&&T[V.scale].time,ce=V.value;V.value=ae?Yy(ce)?hb(D,ub(ce,j)):ce||Q:ce||FE,V.label=V.label||(ae?RE:IE)}if(gn||J>0){V.width=V.width==null?1:V.width,V.paths=V.paths||eM||UT,V.fillTo=en(V.fillTo||VE),V.pxAlign=+pn(V.pxAlign,p),V.pxRound=Eb(V.pxAlign),V.stroke=en(V.stroke||null),V.fill=en(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ae=jE(ci(1,V.width),1),ce=V.points=fr({},{size:ae,width:ci(1,ae*.2),stroke:V.stroke,space:ae*2,paths:tM,_stroke:null,_fill:null},V.points);ce.show=en(ce.show),ce.filter=en(ce.filter),ce.fill=en(ce.fill),ce.stroke=en(ce.stroke),ce.paths=en(ce.paths),ce.pxAlign=V.pxAlign}if(ue){let ae=Me(V,J);Ae.splice(J,0,ae[0]),Je.splice(J,0,ae[1]),le.values.push(null)}if(he){re.splice(J,0,null);let ae=null;gn?J==0&&(ae=ms(V,J)):J>0&&(ae=ms(V,J)),Fn.splice(J,0,ae),Ii.splice(J,0,0),hi.splice(J,0,0)}dt("addSeries",J)}function ys(V,J){J=J??x.length,V=c==1?Qd(V,J,yb,Ab):Qd(V,J,{},_b),x.splice(J,0,V),vs(x[J],J)}r.addSeries=ys;function bs(V){if(x.splice(V,1),ue){le.values.splice(V,1),Je.splice(V,1);let J=Ae.splice(V,1)[0];Vt(null,J.firstChild),J.remove()}he&&(re.splice(V,1),Fn.splice(V,1)[0].remove(),Ii.splice(V,1),hi.splice(V,1)),dt("delSeries",V)}r.delSeries=bs;const di=[!1,!1,!1,!1];function Ri(V,J){if(V._show=V.show,V.show){let ae=V.side%2,ce=T[V.scale];ce==null&&(V.scale=ae?x[1].scale:C,ce=T[V.scale]);let ge=ce.time;V.size=en(V.size),V.space=en(V.space),V.rotate=en(V.rotate),zs(V.incrs)&&V.incrs.forEach(Le=>{!Ps.has(Le)&&Ps.set(Le,Gy(Le))}),V.incrs=en(V.incrs||(ce.distr==2?dE:ge?w==1?pE:vE:ga)),V.splits=en(V.splits||(ge&&ce.distr==1?U:ce.distr==3?Ud:ce.distr==4?NE:OE)),V.stroke=en(V.stroke),V.grid.stroke=en(V.grid.stroke),V.ticks.stroke=en(V.ticks.stroke),V.border.stroke=en(V.border.stroke);let Se=V.values;V.values=zs(Se)&&!zs(Se[0])?en(Se):ge?zs(Se)?cb(D,lb(Se,j)):Yy(Se)?wE(D,Se):Se||q:Se||LE,V.filter=en(V.filter||(ce.distr>=3&&ce.log==10?zE:ce.distr==3&&ce.log==2?BE:Wy)),V.font=Ub(V.font),V.labelFont=Ub(V.labelFont),V._size=V.size(r,null,J,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(di[J]=!0,V._el=ao(CT,u))}}function Dt(V,J,ae,ce){let[ge,Se,Le,He]=ae,Ge=J%2,Qe=0;return Ge==0&&(He||Se)&&(Qe=J==0&&!ge||J==2&&!Le?kr(vb.size/3):0),Ge==1&&(ge||Le)&&(Qe=J==1&&!Se||J==3&&!He?kr(xb.size/2):0),Qe}const Hs=r.padding=(e.padding||[Dt,Dt,Dt,Dt]).map(V=>en(pn(V,Dt))),Or=r._padding=Hs.map((V,J)=>V(r,J,di,0));let Pt,dn=null,qn=null;const po=c==1?x[0].idxs:null;let er=null,go=!1;function Li(V,J){if(n=V??[],r.data=r._data=n,c==2){Pt=0;for(let ae=1;ae<x.length;ae++)Pt+=n[ae][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),er=n[0],Pt=er.length;let ae=n;if(N==2){ae=n.slice();let ce=ae[0]=Array(Pt);for(let ge=0;ge<Pt;ge++)ce[ge]=ge}r._data=n=ae}if(ni(!0),dt("setData"),N==2&&(ei=!0),J!==!1){let ae=B;ae.auto(r,go)?ws():ri(C,ae.min,ae.max),Ei=Ei||ne.left>=0,mr=!0,Zi()}}r.setData=Li;function ws(){go=!0;let V,J;c==1&&(Pt>0?(dn=po[0]=0,qn=po[1]=Pt-1,V=n[0][dn],J=n[0][qn],N==2?(V=dn,J=qn):V==J&&(N==3?[V,J]=cu(V,V,B.log,!1):N==4?[V,J]=Id(V,V,B.log,!1):B.time?J=V+kr(86400/w):[V,J]=uu(V,J,Rd,!0))):(dn=po[0]=V=null,qn=po[1]=J=null)),ri(C,V,J)}let mo,fi,Do,ti,Nr,vo,Oi,Jo,Po,tr;function zo(V,J,ae,ce,ge,Se){V??=xy,ae??=Dd,ce??="butt",ge??=xy,Se??="round",V!=mo&&(l.strokeStyle=mo=V),ge!=fi&&(l.fillStyle=fi=ge),J!=Do&&(l.lineWidth=Do=J),Se!=Nr&&(l.lineJoin=Nr=Se),ce!=vo&&(l.lineCap=vo=ce),ae!=ti&&l.setLineDash(ti=ae)}function Qo(V,J,ae,ce){J!=fi&&(l.fillStyle=fi=J),V!=Oi&&(l.font=Oi=V),ae!=Jo&&(l.textAlign=Jo=ae),ce!=Po&&(l.textBaseline=Po=ce)}function Ji(V,J,ae,ce,ge=0){if(ce.length>0&&V.auto(r,go)&&(J==null||J.min==null)){let Se=pn(dn,0),Le=pn(qn,ce.length-1),He=ae.min==null?zT(ce,Se,Le,ge,V.distr==3):[ae.min,ae.max];V.min=Lo(V.min,ae.min=He[0]),V.max=ci(V.max,ae.max=He[1])}}const xs={min:null,max:null};function Zo(){for(let ce in T){let ge=T[ce];A[ce]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,go))&&(A[ce]=xs)}for(let ce in T){let ge=T[ce];A[ce]==null&&ge.from!=null&&A[ge.from]!=null&&(A[ce]=xs)}A[C]!=null&&ni(!0);let V={};for(let ce in A){let ge=A[ce];if(ge!=null){let Se=V[ce]=el(T[ce],qT);if(ge.min!=null)fr(Se,ge);else if(ce!=C||c==2)if(Pt==0&&Se.from==null){let Le=Se.range(r,null,null,ce);Se.min=Le[0],Se.max=Le[1]}else Se.min=Mn,Se.max=-Mn}}if(Pt>0){x.forEach((ce,ge)=>{if(c==1){let Se=ce.scale,Le=A[Se];if(Le==null)return;let He=V[Se];if(ge==0){let Ge=He.range(r,He.min,He.max,Se);He.min=Ge[0],He.max=Ge[1],dn=Ro(He.min,n[0]),qn=Ro(He.max,n[0]),qn-dn>1&&(n[0][dn]<He.min&&dn++,n[0][qn]>He.max&&qn--),ce.min=er[dn],ce.max=er[qn]}else ce.show&&ce.auto&&Ji(He,Le,ce,n[ge],ce.sorted);ce.idxs[0]=dn,ce.idxs[1]=qn}else if(ge>0&&ce.show&&ce.auto){let[Se,Le]=ce.facets,He=Se.scale,Ge=Le.scale,[Qe,ot]=n[ge],ht=V[He],It=V[Ge];ht!=null&&Ji(ht,A[He],Se,Qe,Se.sorted),It!=null&&Ji(It,A[Ge],Le,ot,Le.sorted),ce.min=Le.min,ce.max=Le.max}});for(let ce in V){let ge=V[ce],Se=A[ce];if(ge.from==null&&(Se==null||Se.min==null)){let Le=ge.range(r,ge.min==Mn?null:ge.min,ge.max==-Mn?null:ge.max,ce);ge.min=Le[0],ge.max=Le[1]}}}for(let ce in V){let ge=V[ce];if(ge.from!=null){let Se=V[ge.from];if(Se.min==null)ge.min=ge.max=null;else{let Le=ge.range(r,Se.min,Se.max,ce);ge.min=Le[0],ge.max=Le[1]}}}let J={},ae=!1;for(let ce in V){let ge=V[ce],Se=T[ce];if(Se.min!=ge.min||Se.max!=ge.max){Se.min=ge.min,Se.max=ge.max;let Le=Se.distr;Se._min=Le==3?us(Se.min):Le==4?Od(Se.min,Se.asinh):Le==100?Se.fwd(Se.min):Se.min,Se._max=Le==3?us(Se.max):Le==4?Od(Se.max,Se.asinh):Le==100?Se.fwd(Se.max):Se.max,J[ce]=ae=!0}}if(ae){x.forEach((ce,ge)=>{c==2?ge>0&&J.y&&(ce._paths=null):J[ce.scale]&&(ce._paths=null)});for(let ce in J)ei=!0,dt("setScale",ce);he&&ne.left>=0&&(Ei=mr=!0)}for(let ce in A)A[ce]=null}function Bo(V){let J=Nd(dn-1,0,Pt-1),ae=Nd(qn+1,0,Pt-1);for(;V[J]==null&&J>0;)J--;for(;V[ae]==null&&ae<Pt-1;)ae++;return[J,ae]}function Cs(){if(Pt>0){let V=x.some(J=>J._focus)&&tr!=Ar.alpha;V&&(l.globalAlpha=tr=Ar.alpha),x.forEach((J,ae)=>{if(ae>0&&J.show&&(Xo(ae,!1),Xo(ae,!0),J._paths==null)){let ce=tr;tr!=J.alpha&&(l.globalAlpha=tr=J.alpha);let ge=c==2?[0,n[ae][0].length-1]:Bo(n[ae]);J._paths=J.paths(r,ae,ge[0],ge[1]),tr!=ce&&(l.globalAlpha=tr=ce)}}),x.forEach((J,ae)=>{if(ae>0&&J.show){let ce=tr;tr!=J.alpha&&(l.globalAlpha=tr=J.alpha),J._paths!=null&&es(ae,!1);{let ge=J._paths!=null?J._paths.gaps:null,Se=J.points.show(r,ae,dn,qn,ge),Le=J.points.filter(r,ae,Se,ge);(Se||Le)&&(J.points._paths=J.points.paths(r,ae,dn,qn,Le),es(ae,!0))}tr!=ce&&(l.globalAlpha=tr=ce),dt("drawSeries",ae)}}),V&&(l.globalAlpha=tr=1)}}function Xo(V,J){let ae=J?x[V].points:x[V];ae._stroke=ae.stroke(r,V),ae._fill=ae.fill(r,V)}function es(V,J){let ae=J?x[V].points:x[V],{stroke:ce,fill:ge,clip:Se,flags:Le,_stroke:He=ae._stroke,_fill:Ge=ae._fill,_width:Qe=ae.width}=ae._paths;Qe=In(Qe*vn,3);let ot=null,ht=Qe%2/2;J&&Ge==null&&(Ge=Qe>0?"#fff":He);let It=ae.pxAlign==1&&ht>0;if(It&&l.translate(ht,ht),!J){let fn=Vn-Qe/2,Yt=Xn-Qe/2,Mt=hn+Qe,At=Dn+Qe;ot=new Path2D,ot.rect(fn,Yt,Mt,At)}J?Qi(He,Qe,ae.dash,ae.cap,Ge,ce,ge,Le,Se):ks(V,He,Qe,ae.dash,ae.cap,Ge,ce,ge,Le,ot,Se),It&&l.translate(-ht,-ht)}function ks(V,J,ae,ce,ge,Se,Le,He,Ge,Qe,ot){let ht=!1;Ge!=0&&_.forEach((It,fn)=>{if(It.series[0]==V){let Yt=x[It.series[1]],Mt=n[It.series[1]],At=(Yt._paths||Xl).band;zs(At)&&(At=It.dir==1?At[0]:At[1]);let bt,Ln=null;Yt.show&&At&&FT(Mt,dn,qn)?(Ln=It.fill(r,fn)||Se,bt=Yt._paths.clip):At=null,Qi(J,ae,ce,ge,Ln,Le,He,Ge,Qe,ot,bt,At),ht=!0}}),ht||Qi(J,ae,ce,ge,Se,Le,He,Ge,Qe,ot)}const Ni=nl|Gd;function Qi(V,J,ae,ce,ge,Se,Le,He,Ge,Qe,ot,ht){zo(V,J,ae,ce,ge),(Ge||Qe||ht)&&(l.save(),Ge&&l.clip(Ge),Qe&&l.clip(Qe)),ht?(He&Ni)==Ni?(l.clip(ht),ot&&l.clip(ot),rr(ge,Le),pi(V,Se,J)):He&Gd?(rr(ge,Le),l.clip(ht),pi(V,Se,J)):He&nl&&(l.save(),l.clip(ht),ot&&l.clip(ot),rr(ge,Le),l.restore(),pi(V,Se,J)):(rr(ge,Le),pi(V,Se,J)),(Ge||Qe||ht)&&l.restore()}function pi(V,J,ae){ae>0&&(J instanceof Map?J.forEach((ce,ge)=>{l.strokeStyle=mo=ge,l.stroke(ce)}):J!=null&&V&&l.stroke(J))}function rr(V,J){J instanceof Map?J.forEach((ae,ce)=>{l.fillStyle=fi=ce,l.fill(ae)}):J!=null&&V&&l.fill(J)}function yo(V,J,ae,ce){let ge=R[V],Se;if(ce<=0)Se=[0,0];else{let Le=ge._space=ge.space(r,V,J,ae,ce),He=ge._incrs=ge.incrs(r,V,J,ae,ce,Le);Se=aM(J,ae,He,ce,Le)}return ge._found=Se}function Yn(V,J,ae,ce,ge,Se,Le,He,Ge,Qe){let ot=Le%2/2;p==1&&l.translate(ot,ot),zo(He,Le,Ge,Qe,He),l.beginPath();let ht,It,fn,Yt,Mt=ge+(ce==0||ce==3?-Se:Se);ae==0?(It=ge,Yt=Mt):(ht=ge,fn=Mt);for(let At=0;At<V.length;At++)J[At]!=null&&(ae==0?ht=fn=V[At]:It=Yt=V[At],l.moveTo(ht,It),l.lineTo(fn,Yt));l.stroke(),p==1&&l.translate(-ot,-ot)}function bo(V){let J=!0;return R.forEach((ae,ce)=>{if(!ae.show)return;let ge=T[ae.scale];if(ge.min==null){ae._show&&(J=!1,ae._show=!1,ni(!1));return}else ae._show||(J=!1,ae._show=!0,ni(!1));let Se=ae.side,Le=Se%2,{min:He,max:Ge}=ge,[Qe,ot]=yo(ce,He,Ge,Le==0?ft:it);if(ot==0)return;let ht=ge.distr==2,It=ae._splits=ae.splits(r,ce,He,Ge,Qe,ot,ht),fn=ge.distr==2?It.map(bt=>er[bt]):It,Yt=ge.distr==2?er[It[1]]-er[It[0]]:Qe,Mt=ae._values=ae.values(r,ae.filter(r,fn,ce,ot,Yt),ce,ot,Yt);ae._rotate=Se==2?ae.rotate(r,Mt,ce,ot):0;let At=ae._size;ae._size=lo(ae.size(r,Mt,ce,V)),At!=null&&ae._size!=At&&(J=!1)}),J}function Dr(V){let J=!0;return Hs.forEach((ae,ce)=>{let ge=ae(r,ce,di,V);ge!=Or[ce]&&(J=!1),Or[ce]=ge}),J}function ts(){for(let V=0;V<R.length;V++){let J=R[V];if(!J.show||!J._show)continue;let ae=J.side,ce=ae%2,ge,Se,Le=J.stroke(r,V),He=ae==0||ae==3?-1:1,[Ge,Qe]=J._found;if(J.label!=null){let Hr=J.labelGap*He,Pn=kr((J._lpos+Hr)*vn);Qo(J.labelFont[0],Le,"center",ae==2?Jl:wy),l.save(),ce==1?(ge=Se=0,l.translate(Pn,kr(Xn+Dn/2)),l.rotate((ae==3?-hu:hu)/2)):(ge=kr(Vn+hn/2),Se=Pn);let Co=Fy(J.label)?J.label(r,V,Ge,Qe):J.label;l.fillText(Co,ge,Se),l.restore()}if(Qe==0)continue;let ot=T[J.scale],ht=ce==0?hn:Dn,It=ce==0?Vn:Xn,fn=J._splits,Yt=ot.distr==2?fn.map(Hr=>er[Hr]):fn,Mt=ot.distr==2?er[fn[1]]-er[fn[0]]:Ge,At=J.ticks,bt=J.border,Ln=At.show?At.size:0,Qn=kr(Ln*vn),br=kr((J.alignTo==2?J._size-Ln-J.gap:J.gap)*vn),xn=J._rotate*-hu/180,Tn=m(J._pos*vn),be=(Qn+br)*He,Re=Tn+be;Se=ce==0?Re:0,ge=ce==1?Re:0;let Ee=J.font[0],Xe=J.align==1?Ka:J.align==2?xd:xn>0?Ka:xn<0?xd:ce==0?"center":ae==3?xd:Ka,kt=xn||ce==1?"middle":ae==2?Jl:wy;Qo(Ee,Le,Xe,kt);let Nt=J.font[1]*J.lineGap,mn=fn.map(Hr=>m(v(Hr,ot,ht,It))),Kt=J._values;for(let Hr=0;Hr<Kt.length;Hr++){let Pn=Kt[Hr];if(Pn!=null){ce==0?ge=mn[Hr]:Se=mn[Hr],Pn=""+Pn;let Co=Pn.indexOf(`
1480
+ `)==-1?[Pn]:Pn.split(/\n/gm);for(let Ur=0;Ur<Co.length;Ur++){let _s=Co[Ur];xn?(l.save(),l.translate(ge,Se+Ur*Nt),l.rotate(xn),l.fillText(_s,0,0),l.restore()):l.fillText(_s,ge,Se+Ur*Nt)}}}At.show&&Yn(mn,At.filter(r,Yt,V,Qe,Mt),ce,ae,Tn,Qn,In(At.width*vn,3),At.stroke(r,V),At.dash,At.cap);let Pi=J.grid;Pi.show&&Yn(mn,Pi.filter(r,Yt,V,Qe,Mt),ce,ce==0?2:1,ce==0?Xn:Vn,ce==0?Dn:hn,In(Pi.width*vn,3),Pi.stroke(r,V),Pi.dash,Pi.cap),bt.show&&Yn([Tn],[1],ce==0?1:0,ce==0?1:2,ce==1?Xn:Vn,ce==1?Dn:hn,In(bt.width*vn,3),bt.stroke(r,V),bt.dash,bt.cap)}dt("drawAxes")}function ni(V){x.forEach((J,ae)=>{ae>0&&(J._paths=null,V&&(c==1?(J.min=null,J.max=null):J.facets.forEach(ce=>{ce.min=null,ce.max=null})))})}let Fo=!1,jo=!1,jr=[];function ns(){jo=!1;for(let V=0;V<jr.length;V++)dt(...jr[V]);jr.length=0}function Zi(){Fo||(eE(rs),Fo=!0)}function Ue(V,J=!1){Fo=!0,jo=J,V(r),rs(),J&&jr.length>0&&queueMicrotask(ns)}r.batch=Ue;function rs(){if(Ti&&(Zo(),Ti=!1),ei&&(ar(),ei=!1),Xr){if(zn(d,Ka,Gt),zn(d,Jl,Bn),zn(d,Yl,ft),zn(d,Kl,it),zn(o,Ka,Gt),zn(o,Jl,Bn),zn(o,Yl,ft),zn(o,Kl,it),zn(u,Yl,un),zn(u,Kl,An),a.width=kr(un*vn),a.height=kr(An*vn),R.forEach(({_el:V,_show:J,_size:ae,_pos:ce,side:ge})=>{if(V!=null)if(J){let Se=ge===3||ge===0?ae:0,Le=ge%2==1;zn(V,Le?"left":"top",ce-Se),zn(V,Le?"width":"height",ae),zn(V,Le?"top":"left",Le?Bn:Gt),zn(V,Le?"height":"width",Le?it:ft),Td(V,ha)}else Hi(V,ha)}),mo=fi=Do=Nr=vo=Oi=Jo=Po=ti=null,tr=1,F(!0),Gt!=$n||Bn!=Nn||ft!=Un||it!=Rn){ni(!1);let V=ft/Un,J=it/Rn;if(he&&!Ei&&ne.left>=0){ne.left*=V,ne.top*=J,gi&&Yo(gi,kr(ne.left),0,ft,it),Sn&&Yo(Sn,0,kr(ne.top),ft,it);for(let ae=0;ae<Fn.length;ae++){let ce=Fn[ae];ce!=null&&(Ii[ae]*=V,hi[ae]*=J,Yo(ce,lo(Ii[ae]),lo(hi[ae]),ft,it))}}if(wt.show&&!ho&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=J,wt.height*=J;for(let ae in K)zn(an,ae,wt[ae])}$n=Gt,Nn=Bn,Un=ft,Rn=it}dt("setSize"),Xr=!1}un>0&&An>0&&(l.clearRect(0,0,a.width,a.height),dt("drawClear"),O.forEach(V=>V()),dt("draw")),wt.show&&ho&&(mi(wt),ho=!1),he&&Ei&&(S(null,!0,!1),Ei=!1),le.show&&le.live&&mr&&(b(),mr=!1),s||(s=!0,r.status=1,dt("ready")),go=!1,Fo=!1}r.redraw=(V,J)=>{ei=J||!1,V!==!1?ri(C,B.min,B.max):Zi()};function Fe(V,J){let ae=T[V];if(ae.from==null){if(Pt==0){let ce=ae.range(r,J.min,J.max,V);J.min=ce[0],J.max=ce[1]}if(J.min>J.max){let ce=J.min;J.min=J.max,J.max=ce}if(Pt>1&&J.min!=null&&J.max!=null&&J.max-J.min<1e-16)return;V==C&&ae.distr==2&&Pt>0&&(J.min=Ro(J.min,n[0]),J.max=Ro(J.max,n[0]),J.min==J.max&&J.max++),A[V]=J,Ti=!0,Zi()}}r.setScale=Fe;let jn,wo,gi,Sn,is,X,xe,Ie,Oe,Ye,We,rt,rn=!1;const yn=ne.drag;let Ve=yn.x,jt=yn.y;he&&(ne.x&&(jn=ao(_T,o)),ne.y&&(wo=ao(AT,o)),B.ori==0?(gi=jn,Sn=wo):(gi=wo,Sn=jn),We=ne.left,rt=ne.top);const wt=r.select=fr({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),an=wt.show?ao(kT,wt.over?o:d):null;function mi(V,J){if(wt.show){for(let ae in V)wt[ae]=V[ae],ae in K&&zn(an,ae,V[ae]);J!==!1&&dt("setSelect")}}r.setSelect=mi;function qt(V){if(x[V].show)ue&&Td(Ae[V],ha);else if(ue&&Hi(Ae[V],ha),he){let J=gn?Fn[0]:Fn[V];J!=null&&Yo(J,-10,-10,ft,it)}}function ri(V,J,ae){Fe(V,{min:J,max:ae})}function vr(V,J,ae,ce){J.focus!=null&&Ta(V),J.show!=null&&x.forEach((ge,Se)=>{Se>0&&(V==Se||V==null)&&(ge.show=J.show,qt(Se),c==2?(ri(ge.facets[0].scale,null,null),ri(ge.facets[1].scale,null,null)):ri(ge.scale,null,null),Zi())}),ae!==!1&&dt("setSeries",V,J),ce&&Ot("setSeries",r,V,J)}r.setSeries=vr;function Wo(V,J){fr(_[V],J)}function Xi(V,J){V.fill=en(V.fill||null),V.dir=pn(V.dir,-1),J=J??_.length,_.splice(J,0,V)}function Kn(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Xi,r.setBand=Wo,r.delBand=Kn;function Us(V,J){x[V].alpha=J,he&&Fn[V]!=null&&(Fn[V].style.opacity=J),ue&&Ae[V]&&(Ae[V].style.opacity=J)}let ir,eo,to;const xo={focus:!0};function Ta(V){if(V!=to){let J=V==null,ae=Ar.alpha!=1;x.forEach((ce,ge)=>{if(c==1||ge>0){let Se=J||ge==0||ge==V;ce._focus=J?null:Se,ae&&Us(ge,Se?1:Ar.alpha)}}),to=V,ae&&Zi()}}ue&&Lr&&St(_y,ee,V=>{ne._lock||(Mi(V),to!=null&&vr(null,xo,!0,Rt.setSeries))});function wn(V,J,ae){let ce=T[J];ae&&(V=V/vn-(ce.ori==1?Bn:Gt));let ge=ft;ce.ori==1&&(ge=it,V=ge-V),ce.dir==-1&&(V=ge-V);let Se=ce._min,Le=ce._max,He=V/ge,Ge=Se+(Le-Se)*He,Qe=ce.distr;return Qe==3?Za(10,Ge):Qe==4?WT(Ge,ce.asinh):Qe==100?ce.bwd(Ge):Ge}function bl(V,J){let ae=wn(V,C,J);return Ro(ae,n[0],dn,qn)}r.valToIdx=V=>Ro(V,n[0]),r.posToIdx=bl,r.posToVal=wn,r.valToPos=(V,J,ae)=>T[J].ori==0?h(V,T[J],ae?hn:ft,ae?Vn:0):g(V,T[J],ae?Dn:it,ae?Xn:0),r.setCursor=(V,J,ae)=>{We=V.left,rt=V.top,S(null,J,ae)};function $r(V,J){zn(an,Ka,wt.left=V),zn(an,Yl,wt.width=J)}function ii(V,J){zn(an,Jl,wt.top=V),zn(an,Kl,wt.height=J)}let os=B.ori==0?$r:ii,Wr=B.ori==1?$r:ii;function Di(){if(ue&&le.live)for(let V=c==2?1:0;V<x.length;V++){if(V==0&&qe)continue;let J=le.values[V],ae=0;for(let ce in J)Je[V][ae++].firstChild.nodeValue=J[ce]}}function b(V,J){if(V!=null&&(V.idxs?V.idxs.forEach((ae,ce)=>{re[ce]=ae}):GT(V.idx)||re.fill(V.idx),le.idx=re[0]),ue&&le.live){for(let ae=0;ae<x.length;ae++)(ae>0||c==1&&!qe)&&M(ae,re[ae]);Di()}mr=!1,J!==!1&&dt("setLegend")}r.setLegend=b;function M(V,J){let ae=x[V],ce=V==0&&N==2?er:n[V],ge;qe?ge=ae.values(r,V,J)??Ze:(ge=ae.value(r,J==null?null:ce[J],V,J),ge=ge==null?Ze:{_:ge}),le.values[V]=ge}function S(V,J,ae){Oe=We,Ye=rt,[We,rt]=ne.move(r,We,rt),ne.left=We,ne.top=rt,he&&(gi&&Yo(gi,kr(We),0,ft,it),Sn&&Yo(Sn,0,kr(rt),ft,it));let ce,ge=dn>qn;ir=Mn,eo=null;let Se=B.ori==0?ft:it,Le=B.ori==1?ft:it;if(We<0||Pt==0||ge){ce=ne.idx=null;for(let He=0;He<x.length;He++){let Ge=Fn[He];Ge!=null&&Yo(Ge,-10,-10,ft,it)}Lr&&vr(null,xo,!0,V==null&&Rt.setSeries),le.live&&(re.fill(ce),mr=!0)}else{let He,Ge,Qe;c==1&&(He=B.ori==0?We:rt,Ge=wn(He,C),ce=ne.idx=Ro(Ge,n[0],dn,qn),Qe=I(n[0][ce],B,Se,0));let ot=-10,ht=-10,It=0,fn=0,Yt=!0,Mt="",At="";for(let bt=c==2?1:0;bt<x.length;bt++){let Ln=x[bt],Qn=re[bt],br=Qn==null?null:c==1?n[bt][Qn]:n[bt][1][Qn],xn=ne.dataIdx(r,bt,ce,Ge),Tn=xn==null?null:c==1?n[bt][xn]:n[bt][1][xn];if(mr=mr||Tn!=br||xn!=Qn,re[bt]=xn,bt>0&&Ln.show){let be=xn==null?-10:xn==ce?Qe:I(c==1?n[0][xn]:n[bt][0][xn],B,Se,0),Re=Tn==null?-10:$(Tn,c==1?T[Ln.scale]:T[Ln.facets[1].scale],Le,0);if(Lr&&Tn!=null){let Ee=B.ori==1?We:rt,Xe=Cr(Ar.dist(r,bt,xn,Re,Ee));if(Xe<ir){let kt=Ar.bias;if(kt!=0){let Nt=wn(Ee,Ln.scale),mn=Tn>=0?1:-1,Kt=Nt>=0?1:-1;Kt==mn&&(Kt==1?kt==1?Tn>=Nt:Tn<=Nt:kt==1?Tn<=Nt:Tn>=Nt)&&(ir=Xe,eo=bt)}else ir=Xe,eo=bt}}if(mr||gn){let Ee,Xe;B.ori==0?(Ee=be,Xe=Re):(Ee=Re,Xe=be);let kt,Nt,mn,Kt,Pi,Hr,Pn=!0,Co=Gn.bbox;if(Co!=null){Pn=!1;let Ur=Co(r,bt);mn=Ur.left,Kt=Ur.top,kt=Ur.width,Nt=Ur.height}else mn=Ee,Kt=Xe,kt=Nt=Gn.size(r,bt);if(Hr=Gn.fill(r,bt),Pi=Gn.stroke(r,bt),gn)bt==eo&&ir<=Ar.prox&&(ot=mn,ht=Kt,It=kt,fn=Nt,Yt=Pn,Mt=Hr,At=Pi);else{let Ur=Fn[bt];Ur!=null&&(Ii[bt]=mn,hi[bt]=Kt,Iy(Ur,kt,Nt,Pn),Ey(Ur,Hr,Pi),Yo(Ur,lo(mn),lo(Kt),ft,it))}}}}if(gn){let bt=Ar.prox,Ln=to==null?ir<=bt:ir>bt||eo!=to;if(mr||Ln){let Qn=Fn[0];Qn!=null&&(Ii[0]=ot,hi[0]=ht,Iy(Qn,It,fn,Yt),Ey(Qn,Mt,At),Yo(Qn,lo(ot),lo(ht),ft,it))}}}if(wt.show&&rn)if(V!=null){let[He,Ge]=Rt.scales,[Qe,ot]=Rt.match,[ht,It]=V.cursor.sync.scales,fn=V.cursor.drag;if(Ve=fn._x,jt=fn._y,Ve||jt){let{left:Yt,top:Mt,width:At,height:bt}=V.select,Ln=V.scales[ht].ori,Qn=V.posToVal,br,xn,Tn,be,Re,Ee=He!=null&&Qe(He,ht),Xe=Ge!=null&&ot(Ge,It);Ee&&Ve?(Ln==0?(br=Yt,xn=At):(br=Mt,xn=bt),Tn=T[He],be=I(Qn(br,ht),Tn,Se,0),Re=I(Qn(br+xn,ht),Tn,Se,0),os(Lo(be,Re),Cr(Re-be))):os(0,Se),Xe&&jt?(Ln==1?(br=Yt,xn=At):(br=Mt,xn=bt),Tn=T[Ge],be=$(Qn(br,It),Tn,Le,0),Re=$(Qn(br+xn,It),Tn,Le,0),Wr(Lo(be,Re),Cr(Re-be))):Wr(0,Le)}else Z()}else{let He=Cr(Oe-is),Ge=Cr(Ye-X);if(B.ori==1){let It=He;He=Ge,Ge=It}Ve=yn.x&&He>=yn.dist,jt=yn.y&&Ge>=yn.dist;let Qe=yn.uni;Qe!=null?Ve&&jt&&(Ve=He>=Qe,jt=Ge>=Qe,!Ve&&!jt&&(Ge>He?jt=!0:Ve=!0)):yn.x&&yn.y&&(Ve||jt)&&(Ve=jt=!0);let ot,ht;Ve&&(B.ori==0?(ot=xe,ht=We):(ot=Ie,ht=rt),os(Lo(ot,ht),Cr(ht-ot)),jt||Wr(0,Le)),jt&&(B.ori==1?(ot=xe,ht=We):(ot=Ie,ht=rt),Wr(Lo(ot,ht),Cr(ht-ot)),Ve||os(0,Se)),!Ve&&!jt&&(os(0,0),Wr(0,0))}if(yn._x=Ve,yn._y=jt,V==null){if(ae){if(ln!=null){let[He,Ge]=Rt.scales;Rt.values[0]=He!=null?wn(B.ori==0?We:rt,He):null,Rt.values[1]=Ge!=null?wn(B.ori==1?We:rt,Ge):null}Ot(kd,r,We,rt,ft,it,ce)}if(Lr){let He=ae&&Rt.setSeries,Ge=Ar.prox;to==null?ir<=Ge&&vr(eo,xo,!0,He):ir>Ge?vr(null,xo,!0,He):eo!=to&&vr(eo,xo,!0,He)}}mr&&(le.idx=ce,b()),J!==!1&&dt("setCursor")}let z=null;Object.defineProperty(r,"rect",{get(){return z==null&&F(!1),z}});function F(V=!1){V?z=null:(z=o.getBoundingClientRect(),dt("syncRect",z))}function W(V,J,ae,ce,ge,Se,Le){ne._lock||rn&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,J,ae,ce,ge,Se,Le,!1,V!=null),V!=null?S(null,!0,!0):S(J,!0,!1))}function G(V,J,ae,ce,ge,Se,Le,He,Ge){if(z==null&&F(!1),Mi(V),V!=null)ae=V.clientX-z.left,ce=V.clientY-z.top;else{if(ae<0||ce<0){We=-10,rt=-10;return}let[Qe,ot]=Rt.scales,ht=J.cursor.sync,[It,fn]=ht.values,[Yt,Mt]=ht.scales,[At,bt]=Rt.match,Ln=J.axes[0].side%2==1,Qn=B.ori==0?ft:it,br=B.ori==1?ft:it,xn=Ln?Se:ge,Tn=Ln?ge:Se,be=Ln?ce:ae,Re=Ln?ae:ce;if(Yt!=null?ae=At(Qe,Yt)?v(It,T[Qe],Qn,0):-10:ae=Qn*(be/xn),Mt!=null?ce=bt(ot,Mt)?v(fn,T[ot],br,0):-10:ce=br*(Re/Tn),B.ori==1){let Ee=ae;ae=ce,ce=Ee}}Ge&&(J==null||J.cursor.event.type==kd)&&((ae<=1||ae>=ft-1)&&(ae=pa(ae,ft)),(ce<=1||ce>=it-1)&&(ce=pa(ce,it))),He?(is=ae,X=ce,[xe,Ie]=ne.move(r,ae,ce)):(We=ae,rt=ce)}const K={width:0,height:0,left:0,top:0};function Z(){mi(K,!1)}let se,de,ke,Te;function Ce(V,J,ae,ce,ge,Se,Le){rn=!0,Ve=jt=yn._x=yn._y=!1,G(V,J,ae,ce,ge,Se,Le,!0,!1),V!=null&&(St(_d,$d,$e,!1),Ot(Cy,r,xe,Ie,ft,it,null));let{left:He,top:Ge,width:Qe,height:ot}=wt;se=He,de=Ge,ke=Qe,Te=ot}function $e(V,J,ae,ce,ge,Se,Le){rn=yn._x=yn._y=!1,G(V,J,ae,ce,ge,Se,Le,!1,!0);let{left:He,top:Ge,width:Qe,height:ot}=wt,ht=Qe>0||ot>0,It=se!=He||de!=Ge||ke!=Qe||Te!=ot;if(ht&&It&&mi(wt),yn.setScale&&ht&&It){let fn=He,Yt=Qe,Mt=Ge,At=ot;if(B.ori==1&&(fn=Ge,Yt=ot,Mt=He,At=Qe),Ve&&ri(C,wn(fn,C),wn(fn+Yt,C)),jt)for(let bt in T){let Ln=T[bt];bt!=C&&Ln.from==null&&Ln.min!=Mn&&ri(bt,wn(Mt+At,bt),wn(Mt,bt))}Z()}else ne.lock&&(ne._lock=!ne._lock,S(J,!0,V!=null));V!=null&&(Vt(_d,$d),Ot(_d,r,We,rt,ft,it,null))}function Be(V,J,ae,ce,ge,Se,Le){if(ne._lock)return;Mi(V);let He=rn;if(rn){let Ge=!0,Qe=!0,ot=10,ht,It;B.ori==0?(ht=Ve,It=jt):(ht=jt,It=Ve),ht&&It&&(Ge=We<=ot||We>=ft-ot,Qe=rt<=ot||rt>=it-ot),ht&&Ge&&(We=We<xe?0:ft),It&&Qe&&(rt=rt<Ie?0:it),S(null,!0,!0),rn=!1}We=-10,rt=-10,re.fill(null),S(null,!0,!0),He&&(rn=He)}function De(V,J,ae,ce,ge,Se,Le){ne._lock||(Mi(V),ws(),Z(),V!=null&&Ot(Ay,r,We,rt,ft,it,null))}function et(){R.forEach(lM),Ki(r.width,r.height,!0)}da(su,Qa,et);const Ct={};Ct.mousedown=Ce,Ct.mousemove=W,Ct.mouseup=$e,Ct.dblclick=De,Ct.setSeries=(V,J,ae,ce)=>{let ge=Rt.match[2];ae=ge(r,J,ae),ae!=-1&&vr(ae,ce,!0,!1)},he&&(St(Cy,o,Ce),St(kd,o,W),St(ky,o,V=>{Mi(V),F(!1)}),St(_y,o,Be),St(Ay,o,De),Jd.add(r),r.syncRect=F);const ut=r.hooks=e.hooks||{};function dt(V,J,ae){jo?jr.push([V,J,ae]):V in ut&&ut[V].forEach(ce=>{ce.call(null,r,J,ae)})}(e.plugins||[]).forEach(V=>{for(let J in V.hooks)ut[J]=(ut[J]||[]).concat(V.hooks[J])});const Wn=(V,J,ae)=>ae,Rt=fr({key:null,setSeries:!1,filters:{pub:Hy,sub:Hy},scales:[C,x[1]?x[1].scale:null],match:[Uy,Uy,Wn],values:[null,null]},ne.sync);Rt.match.length==2&&Rt.match.push(Wn),ne.sync=Rt;const ln=Rt.key,Bt=Tb(ln);function Ot(V,J,ae,ce,ge,Se,Le){Rt.filters.pub(V,J,ae,ce,ge,Se,Le)&&Bt.pub(V,J,ae,ce,ge,Se,Le)}Bt.sub(r);function yr(V,J,ae,ce,ge,Se,Le){Rt.filters.sub(V,J,ae,ce,ge,Se,Le)&&Ct[V](null,J,ae,ce,ge,Se,Le)}r.pub=yr;function Sr(){Bt.unsub(r),Jd.delete(r),xt.clear(),Md(su,Qa,et),f.remove(),ee?.remove(),dt("destroy")}r.destroy=Sr;function Jn(){dt("init",e,n),Li(n||e.data,!1),A[C]?Fe(C,A[C]):ws(),ho=wt.show&&(wt.width>0||wt.height>0),Ei=mr=!0,Ki(e.width,e.height)}return x.forEach(vs),R.forEach(Ri),t?t instanceof HTMLElement?(t.appendChild(f),Jn()):t(r,Jn):Jn(),r}Jr.assign=fr,Jr.fmtNum=Ld,Jr.rangeNum=uu,Jr.rangeLog=cu,Jr.rangeAsinh=Id,Jr.orient=ma,Jr.pxRatio=vn,Jr.join=XT,Jr.fmtDate=Pd,Jr.tzDate=uE,Jr.sync=Tb;{Jr.addGap=GE,Jr.clipGaps=vu;let e=Jr.paths={points:Nb};e.linear=Pb,e.stepped=KE,e.bars=JE,e.spline=ZE}var Vb,Gb;function cM(){return Gb||(Gb=1,Vb=function(e,n,t,r,c){var h,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=e.length)throw new RangeError("invalid lower bound");if(c===void 0)c=e.length-1;else if(c=c|0,c<r||c>=e.length)throw new RangeError("invalid upper bound");for(;r<=c;)if(h=r+(c-r>>>1),g=+t(e[h],n,h,e),g<0)r=h+1;else if(g>0)c=h-1;else return h;return~r}),Vb}var uM=cM();const g3=ur("y",iu(uM));var Zd,qb;function hM(){if(qb)return Zd;qb=1;function e(n,t,r){var c=-1,h=n.length;t<0&&(t=-t>h?0:h+t),r=r>h?h:r,r<0&&(r+=h),h=t>r?0:r-t>>>0,t>>>=0;for(var g=Array(h);++c<h;)g[c]=n[c+t];return g}return Zd=e,Zd}var Xd,Yb;function dM(){if(Yb)return Xd;Yb=1;var e=hM();function n(t,r,c){var h=t.length;return c=c===void 0?h:c,!r&&c>=h?t:e(t,r,c)}return Xd=n,Xd}var ef,Kb;function Jb(){if(Kb)return ef;Kb=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,h="\\ufe0e\\ufe0f",g="\\u200d",v=RegExp("["+g+e+c+h+"]");function s(f){return v.test(f)}return ef=s,ef}var tf,Qb;function fM(){if(Qb)return tf;Qb=1;function e(n){return n.split("")}return tf=e,tf}var nf,Zb;function pM(){if(Zb)return nf;Zb=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,h="\\ufe0e\\ufe0f",g="["+e+"]",v="["+c+"]",s="\\ud83c[\\udffb-\\udfff]",f="(?:"+v+"|"+s+")",a="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",o=f+"?",p="["+h+"]?",m="(?:"+d+"(?:"+[a,l,u].join("|")+")"+p+o+")*",w=p+o+m,x="(?:"+[a+v+"?",v,l,u,g].join("|")+")",R=RegExp(s+"(?="+s+")|"+x+w,"g");function T(_){return _.match(R)||[]}return nf=T,nf}var rf,Xb;function gM(){if(Xb)return rf;Xb=1;var e=fM(),n=Jb(),t=pM();function r(c){return n(c)?t(c):e(c)}return rf=r,rf}var of,e0;function mM(){if(e0)return of;e0=1;var e=typeof Ds=="object"&&Ds&&Ds.Object===Object&&Ds;return of=e,of}var sf,t0;function vM(){if(t0)return sf;t0=1;var e=mM(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return sf=t,sf}var af,n0;function lf(){if(n0)return af;n0=1;var e=vM(),n=e.Symbol;return af=n,af}var cf,r0;function yM(){if(r0)return cf;r0=1;function e(n,t){for(var r=-1,c=n==null?0:n.length,h=Array(c);++r<c;)h[r]=t(n[r],r,n);return h}return cf=e,cf}var uf,i0;function bM(){if(i0)return uf;i0=1;var e=Array.isArray;return uf=e,uf}var hf,o0;function wM(){if(o0)return hf;o0=1;var e=lf(),n=Object.prototype,t=n.hasOwnProperty,r=n.toString,c=e?e.toStringTag:void 0;function h(g){var v=t.call(g,c),s=g[c];try{g[c]=void 0;var f=!0}catch{}var a=r.call(g);return f&&(v?g[c]=s:delete g[c]),a}return hf=h,hf}var df,s0;function xM(){if(s0)return df;s0=1;var e=Object.prototype,n=e.toString;function t(r){return n.call(r)}return df=t,df}var ff,a0;function CM(){if(a0)return ff;a0=1;var e=lf(),n=wM(),t=xM(),r="[object Null]",c="[object Undefined]",h=e?e.toStringTag:void 0;function g(v){return v==null?v===void 0?c:r:h&&h in Object(v)?n(v):t(v)}return ff=g,ff}var pf,l0;function kM(){if(l0)return pf;l0=1;function e(n){return n!=null&&typeof n=="object"}return pf=e,pf}var gf,c0;function _M(){if(c0)return gf;c0=1;var e=CM(),n=kM(),t="[object Symbol]";function r(c){return typeof c=="symbol"||n(c)&&e(c)==t}return gf=r,gf}var mf,u0;function AM(){if(u0)return mf;u0=1;var e=lf(),n=yM(),t=bM(),r=_M(),c=e?e.prototype:void 0,h=c?c.toString:void 0;function g(v){if(typeof v=="string")return v;if(t(v))return n(v,g)+"";if(r(v))return h?h.call(v):"";var s=v+"";return s=="0"&&1/v==-1/0?"-0":s}return mf=g,mf}var vf,h0;function xu(){if(h0)return vf;h0=1;var e=AM();function n(t){return t==null?"":e(t)}return vf=n,vf}var yf,d0;function $M(){if(d0)return yf;d0=1;var e=dM(),n=Jb(),t=gM(),r=xu();function c(h){return function(g){g=r(g);var v=n(g)?t(g):void 0,s=v?v[0]:g.charAt(0),f=v?e(v,1).join(""):g.slice(1);return s[h]()+f}}return yf=c,yf}var bf,f0;function p0(){if(f0)return bf;f0=1;var e=$M(),n=e("toUpperCase");return bf=n,bf}var SM=p0();const TM=iu(SM);var wf,g0;function EM(){if(g0)return wf;g0=1;var e=xu(),n=p0();function t(r){return n(e(r).toLowerCase())}return wf=t,wf}var xf,m0;function MM(){if(m0)return xf;m0=1;function e(n,t,r,c){var h=-1,g=n==null?0:n.length;for(c&&g&&(r=n[++h]);++h<g;)r=t(r,n[h],h,n);return r}return xf=e,xf}var Cf,v0;function IM(){if(v0)return Cf;v0=1;function e(n){return function(t){return n?.[t]}}return Cf=e,Cf}var kf,y0;function RM(){if(y0)return kf;y0=1;var e=IM(),n={À:"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"},t=e(n);return kf=t,kf}var _f,b0;function LM(){if(b0)return _f;b0=1;var e=RM(),n=xu(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",h="\\u20d0-\\u20ff",g=r+c+h,v="["+g+"]",s=RegExp(v,"g");function f(a){return a=n(a),a&&a.replace(t,e).replace(s,"")}return _f=f,_f}var Af,w0;function OM(){if(w0)return Af;w0=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}return Af=n,Af}var $f,x0;function NM(){if(x0)return $f;x0=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}return $f=n,$f}var Sf,C0;function DM(){if(C0)return Sf;C0=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,h="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\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",d=v+s+f+a,o="['’]",p="["+d+"]",m="["+c+"]",w="\\d+",x="["+h+"]",R="["+g+"]",T="[^"+e+d+w+h+g+l+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+_+")",P="[^"+e+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",k="["+l+"]",B="\\u200d",N="(?:"+R+"|"+T+")",I="(?:"+k+"|"+T+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+u+"]?",U="(?:"+B+"(?:"+[P,O,E].join("|")+")"+j+D+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",re=j+D+U,le="(?:"+[x,O,E].join("|")+")"+re,ne=RegExp([k+"?"+R+"+"+$+"(?="+[p,k,"$"].join("|")+")",I+"+"+A+"(?="+[p,k+N,"$"].join("|")+")",k+"?"+N+"+"+$,k+"+"+A,Q,q,w,le].join("|"),"g");function ue(he){return he.match(ne)||[]}return Sf=ue,Sf}var Tf,k0;function PM(){if(k0)return Tf;k0=1;var e=OM(),n=NM(),t=xu(),r=DM();function c(h,g,v){return h=t(h),g=v?void 0:g,g===void 0?n(h)?r(h):e(h):h.match(g)||[]}return Tf=c,Tf}var Ef,_0;function zM(){if(_0)return Ef;_0=1;var e=MM(),n=LM(),t=PM(),r="['’]",c=RegExp(r,"g");function h(g){return function(v){return e(t(n(v).replace(c,"")),g,"")}}return Ef=h,Ef}var Mf,A0;function BM(){if(A0)return Mf;A0=1;var e=EM(),n=zM(),t=n(function(r,c,h){return c=c.toLowerCase(),r+(h?e(c):c)});return Mf=t,Mf}var FM=BM();const jM=iu(FM),WM=Object.assign({"./ArrayWidget.vue":()=>mt(()=>pt.import("./ArrayWidget-9OSo49r--15f0c6ee609dd2e7acf7.js"),void 0),"./ArrayplotWidget.vue":()=>mt(()=>pt.import("./ArrayplotWidget-D5C_WTX2-d9551b6536cf93fea8d6.js"),void 0),"./BlockWidget.vue":()=>mt(()=>pt.import("./BlockWidget-DuEDZ4dJ-d02d17ac12a76a1eead3.js"),void 0),"./ButtonWidget.vue":()=>mt(()=>pt.import("./ButtonWidget-CZIUtd9z-2cb1e24f34b883fc28f0.js"),void 0),"./CanvasWidget.vue":()=>mt(()=>pt.import("./CanvasWidget-C4-pXiKY-778ab562504820d71140.js"),void 0),"./CanvasdotWidget.vue":()=>mt(()=>pt.import("./CanvasdotWidget-Bh0HHx67-9334939465a7df436c30.js"),void 0),"./CanvasimageWidget.vue":()=>mt(()=>pt.import("./CanvasimageWidget-Bu5NmsDs-9b1a8510f094cd0378b5.js"),void 0),"./CanvasimagevalueWidget.vue":()=>mt(()=>pt.import("./CanvasimagevalueWidget-Dv8dQrnj-79c5001f658c86253a43.js"),void 0),"./CanvaslabelWidget.vue":()=>mt(()=>pt.import("./CanvaslabelWidget-68IeeM3a-9d4ce78e712f8bc7d1f8.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>mt(()=>pt.import("./CanvaslabelvalueWidget-C6j_A4z6-0d0534e4749365f37a33.js"),void 0),"./CanvaslineWidget.vue":()=>mt(()=>pt.import("./CanvaslineWidget-BgQ6wLDv-eb8681a83f7823c3ca3f.js"),void 0),"./CanvaslinevalueWidget.vue":()=>mt(()=>pt.import("./CanvaslinevalueWidget-C6-HkTJp-0c0a81707daa50b20b9b.js"),void 0),"./CheckbuttonWidget.vue":()=>mt(()=>pt.import("./CheckbuttonWidget-DJmT73t9-5201fab99a575afa217a.js"),void 0),"./ComboboxWidget.vue":()=>mt(()=>pt.import("./ComboboxWidget-vTtsjxRm-05e9d125b97d7a82e255.js"),void 0),"./DateWidget.vue":()=>mt(()=>pt.import("./DateWidget-BjKIDtsf-a7c3b47e6febb0ab2a95.js"),void 0),"./DynamicWidget.vue":()=>mt(()=>pt.import("./DynamicWidget-yna_ejyc-dbde16c7adf17f697f08.js"),void 0),"./FilechecksumWidget.vue":()=>mt(()=>pt.import("./FilechecksumWidget-obppYSP4-bf72bd952e6555565983.js"),void 0),"./FiledisplayWidget.vue":()=>mt(()=>pt.import("./FiledisplayWidget-BstroKFo-ab39aede57c77cffc59e.js"),void 0),"./FormatvalueWidget.vue":()=>mt(()=>pt.import("./FormatvalueWidget-MJIJg6Bf-239dd8e45b24e8ff89d5.js"),void 0),"./HorizontalWidget.vue":()=>mt(()=>pt.import("./HorizontalWidget-Cn9qnYVh-7fc941fa86502633c93b.js"),void 0),"./HorizontalboxWidget.vue":()=>mt(()=>pt.import("./HorizontalboxWidget-gz8uYYFZ-ec9133099e85b940dfff.js"),void 0),"./HorizontallineWidget.vue":()=>mt(()=>pt.import("./HorizontallineWidget-CrDua5-L-a5ca042af4afa96fb271.js"),void 0),"./IframeWidget.vue":()=>mt(()=>pt.import("./IframeWidget-CtS7MjKL-f25b744ad00030d36bc4.js"),void 0),"./ImageviewerWidget.vue":()=>mt(()=>pt.import("./ImageviewerWidget-Kmzt8wuP-38f617facfe3163e0540.js"),void 0),"./LabelWidget.vue":()=>mt(()=>pt.import("./LabelWidget-DIZpHxYX-f79fa51a02adeb34ea27.js"),void 0),"./LabelledWidget.vue":()=>mt(()=>pt.import("./LabelledWidget-CGxDI8XZ-13ae7060655bea1e7721.js"),void 0),"./LabelprogressbarWidget.vue":()=>mt(()=>pt.import("./LabelprogressbarWidget-CXOc5p8G-dbbd02aec439d7536240.js"),void 0),"./LabelsparklineWidget.vue":()=>mt(()=>pt.import("./LabelsparklineWidget-B_LuqFcA-8fb032d473f95add4a78.js"),void 0),"./LabelvalueWidget.vue":()=>mt(()=>pt.import("./LabelvalueWidget--G4wHMZL-06d376e7a31f6618bbff.js"),void 0),"./LabelvaluedescWidget.vue":()=>mt(()=>pt.import("./LabelvaluedescWidget-DqLK0wvi-783aa42cd48635db341f.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>mt(()=>pt.import("./LabelvaluelimitsbarWidget-BWOQJkLP-b113a9a7f9b15f2989dc.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>mt(()=>pt.import("./LabelvaluelimitscolumnWidget-BfF73Y2F-8d1ec1d2b6c4f94252dd.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>mt(()=>pt.import("./LabelvaluerangebarWidget-CKsFRW6t-9605273563a7feeb1889.js"),void 0),"./LedWidget.vue":()=>mt(()=>pt.import("./LedWidget-DrAJ8_fN-8d01ecb6df21e2761f69.js"),void 0),"./LimitsbarWidget.vue":()=>mt(()=>pt.import("./LimitsbarWidget-1IayV5D7-8c80dfad614b19b6fb49.js"),void 0),"./LimitscolorWidget.vue":()=>mt(()=>pt.import("./LimitscolorWidget-C7LY3BQ7-3565617131c900283d55.js"),void 0),"./LimitscolumnWidget.vue":()=>mt(()=>pt.import("./LimitscolumnWidget-JhIc5Sjl-9c2e6b8a72595b695ba6.js"),void 0),"./LinegraphWidget.vue":()=>mt(()=>pt.import("./LinegraphWidget-BaROxuUn-15179f2d4add58e313ab.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>mt(()=>pt.import("./MatrixbycolumnsWidget-i0gGPMOV-e67305e8543241175300.js"),void 0),"./ProgressbarWidget.vue":()=>mt(()=>pt.import("./ProgressbarWidget-QxEq8C4A-69c742d7e5b462892e85.js"),void 0),"./RadiobuttonWidget.vue":()=>mt(()=>pt.import("./RadiobuttonWidget-DYf3qvBq-2a9bd12c4cdd061adf51.js"),void 0),"./RadiogroupWidget.vue":()=>mt(()=>pt.import("./RadiogroupWidget-C0b_ckej-7634b998978efeddc266.js"),void 0),"./RangebarWidget.vue":()=>mt(()=>pt.import("./RangebarWidget-DcSEHktI-aaa148d3a3afca2d5f9a.js"),void 0),"./RollupWidget.vue":()=>mt(()=>pt.import("./RollupWidget-AVS4drYX-8a62066dec922a413c42.js"),void 0),"./ScrollwindowWidget.vue":()=>mt(()=>pt.import("./ScrollwindowWidget-Dpf3BScA-b44f82a74e8ae3ecdb0f.js"),void 0),"./SignalWidget.vue":()=>mt(()=>pt.import("./SignalWidget-Q1YtPsNw-a84815d984cf394605ec.js"),void 0),"./SpacerWidget.vue":()=>mt(()=>pt.import("./SpacerWidget-DGEOqhu_-850bf6476c003142779f.js"),void 0),"./SparklineWidget.vue":()=>mt(()=>pt.import("./SparklineWidget-DbNWbNzY-36aa6e804523cc2ecc5a.js"),void 0),"./TabbookWidget.vue":()=>mt(()=>pt.import("./TabbookWidget-CrkPPZIF-2d473b0f1995c46fafb9.js"),void 0),"./TextboxWidget.vue":()=>mt(()=>pt.import("./TextboxWidget-CfQEzaRr-219d37ed0d8cd1cb8b13.js"),void 0),"./TextfieldWidget.vue":()=>mt(()=>pt.import("./TextfieldWidget-BQL8dOTg-331783b1d384fe948fd5.js"),void 0),"./TimeWidget.vue":()=>mt(()=>pt.import("./TimeWidget-DiE_oc7J-44fd9195cb6e71101e89.js"),void 0),"./TitleWidget.vue":()=>mt(()=>pt.import("./TitleWidget-C5a_ZsqM-2396fbf868359df63e77.js"),void 0),"./ValueWidget.vue":()=>mt(()=>pt.import("./ValueWidget-9JNo-Sk8-ce6de648c290b396b11f.js"),void 0),"./ValuelimitsbarWidget.vue":()=>mt(()=>pt.import("./ValuelimitsbarWidget-CqiFVnaT-df98be46622621079dff.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>mt(()=>pt.import("./ValuelimitscolumnWidget-DWDFVRNg-5e781288bcc6f71fafc2.js"),void 0),"./ValuerangebarWidget.vue":()=>mt(()=>pt.import("./ValuerangebarWidget-BAVMrD0L-831272b3b2fce07512c2.js"),void 0),"./VerticalWidget.vue":()=>mt(()=>pt.import("./VerticalWidget-Dw0j42K2-7bb3ed93472e1c238aff.js"),void 0),"./VerticalboxWidget.vue":()=>mt(()=>pt.import("./VerticalboxWidget-xusQtXo0-f05e9ada6ac664ccc1b0.js"),void 0)}),HM=Object.entries(WM).reduce((e,[n,t])=>{n=n.split("/").pop();const r=TM(jM(n.replace(/\.\w+$/,"")));return{...e,[r]:jg(t)}},{}),m3=ur("w",{components:HM});function $0(){return Object.assign({},Ga())}function UM(e,n,t){const r=li(e,t?.in);return r.setTime(r.getTime()+n*ru),r}function VM(e,n){const t=()=>qo(n?.in,NaN),r=KM(e);let c;if(r.date){const s=JM(r.date,2);c=QM(s.restDateString,s.year)}if(!c||isNaN(+c))return t();const h=+c;let g=0,v;if(r.time&&(g=ZM(r.time),isNaN(g)))return t();if(r.timezone){if(v=XM(r.timezone),isNaN(v))return t()}else{const s=new Date(h+g),f=li(0,n?.in);return f.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),f.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),f}return li(h+g+v,n?.in)}const Cu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},GM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,qM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,YM=/^([+-])(\d{2})(?::?(\d{2}))?$/;function KM(e){const n={},t=e.split(Cu.dateTimeDelimiter);let r;if(t.length>2)return n;if(/:/.test(t[0])?r=t[0]:(n.date=t[0],r=t[1],Cu.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Cu.timeZoneDelimiter)[0],r=e.substr(n.date.length,e.length))),r){const c=Cu.timezone.exec(r);c?(n.time=r.replace(c[1],""),n.timezone=c[1]):n.time=r}return n}function JM(e,n){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=e.match(t);if(!r)return{year:NaN,restDateString:""};const c=r[1]?parseInt(r[1]):null,h=r[2]?parseInt(r[2]):null;return{year:h===null?c:h*100,restDateString:e.slice((r[1]||r[2]).length)}}function QM(e,n){if(n===null)return new Date(NaN);const t=e.match(GM);if(!t)return new Date(NaN);const r=!!t[4],c=nc(t[1]),h=nc(t[2])-1,g=nc(t[3]),v=nc(t[4]),s=nc(t[5])-1;if(r)return iI(n,v,s)?eI(n,v,s):new Date(NaN);{const f=new Date(0);return!nI(n,h,g)||!rI(n,c)?new Date(NaN):(f.setUTCFullYear(n,h,Math.max(c,g)),f)}}function nc(e){return e?parseInt(e):1}function ZM(e){const n=e.match(qM);if(!n)return NaN;const t=If(n[1]),r=If(n[2]),c=If(n[3]);return oI(t,r,c)?t*vd+r*ru+c*1e3:NaN}function If(e){return e&&parseFloat(e.replace(",","."))||0}function XM(e){if(e==="Z")return 0;const n=e.match(YM);if(!n)return 0;const t=n[1]==="+"?-1:1,r=parseInt(n[2]),c=n[3]&&parseInt(n[3])||0;return sI(r,c)?t*(r*vd+c*ru):NaN}function eI(e,n,t){const r=new Date(0);r.setUTCFullYear(e,0,4);const c=r.getUTCDay()||7,h=(n-1)*7+t+1-c;return r.setUTCDate(r.getUTCDate()+h),r}const tI=[31,null,31,30,31,30,31,31,30,31,30,31];function S0(e){return e%400===0||e%4===0&&e%100!==0}function nI(e,n,t){return n>=0&&n<=11&&t>=1&&t<=(tI[n]||(S0(e)?29:28))}function rI(e,n){return n>=1&&n<=(S0(e)?366:365)}function iI(e,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function oI(e,n,t){return e===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&e>=0&&e<25}function sI(e,n){return n>=0&&n<=59}function aI(e,n,t){return UM(e,-n,t)}function T0(e,n,t){const r=$0(),c=uI(e,t.timeZone,t.locale??r.locale);return"formatToParts"in c?lI(c,n):cI(c,n)}function lI(e,n){const t=e.formatToParts(n);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function cI(e,n){const t=e.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function uI(e,n,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:n,timeZoneName:e})}function hI(e,n){const t=mI(n);return"formatToParts"in t?fI(t,e):pI(t,e)}const dI={year:0,month:1,day:2,hour:3,minute:4,second:5};function fI(e,n){try{const t=e.formatToParts(n),r=[];for(let c=0;c<t.length;c++){const h=dI[t[c].type];h!==void 0&&(r[h]=parseInt(t[c].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function pI(e,n){const t=e.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);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 Rf={},E0=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")),gI=E0==="06/25/2014, 00:00:00"||E0==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function mI(e){return Rf[e]||(Rf[e]=gI?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Rf[e]}function M0(e,n,t,r,c,h,g){const v=new Date(0);return v.setUTCFullYear(e,n,t),v.setUTCHours(r,c,h,g),v}const I0=36e5,vI=6e4,Lf={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Of(e,n,t){if(!e)return 0;let r=Lf.timezoneZ.exec(e);if(r)return 0;let c,h;if(r=Lf.timezoneHH.exec(e),r)return c=parseInt(r[1],10),R0(c)?-(c*I0):NaN;if(r=Lf.timezoneHHMM.exec(e),r){c=parseInt(r[2],10);const g=parseInt(r[3],10);return R0(c,g)?(h=Math.abs(c)*I0+g*vI,r[1]==="+"?-h:h):NaN}if(wI(e)){n=new Date(n||Date.now());const g=t?n:yI(n),v=Nf(g,e);return-(t?v:bI(n,v,e))}return NaN}function yI(e){return M0(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Nf(e,n){const t=hI(e,n),r=M0(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let c=e.getTime();const h=c%1e3;return c-=h>=0?h:1e3+h,r-c}function bI(e,n,t){let r=e.getTime()-n;const c=Nf(new Date(r),t);if(n===c)return n;r-=c-n;const h=Nf(new Date(r),t);return c===h?c:Math.max(c,h)}function R0(e,n){return-23<=e&&e<=23&&(n==null||0<=n&&n<=59)}const L0={};function wI(e){if(L0[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),L0[e]=!0,!0}catch{return!1}}const xI=60*1e3,CI={X:function(e,n,t){const r=Df(t.timeZone,e);if(r===0)return"Z";switch(n){case"X":return O0(r);case"XXXX":case"XX":return ol(r);default:return ol(r,":")}},x:function(e,n,t){const r=Df(t.timeZone,e);switch(n){case"x":return O0(r);case"xxxx":case"xx":return ol(r);default:return ol(r,":")}},O:function(e,n,t){const r=Df(t.timeZone,e);switch(n){case"O":case"OO":case"OOO":return"GMT"+kI(r,":");default:return"GMT"+ol(r,":")}},z:function(e,n,t){switch(n){case"z":case"zz":case"zzz":return T0("short",e,t);default:return T0("long",e,t)}}};function Df(e,n){const t=e?Of(e,n,!0)/xI:n?.getTimezoneOffset()??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+e);return t}function ku(e,n){const t=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<n;)r="0"+r;return t+r}function ol(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=ku(Math.floor(r/60),2),h=ku(Math.floor(r%60),2);return t+c+n+h}function O0(e,n){return e%60===0?(e>0?"-":"+")+ku(Math.abs(e)/60,2):ol(e,n)}function kI(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=Math.floor(r/60),h=r%60;return h===0?t+String(c):t+String(c)+n+ku(h,2)}function N0(e){const n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+e-+n}const _I=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Pf=36e5,D0=6e4,AI=2,ui={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:_I};function P0(e,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const t=n.additionalDigits==null?AI:Number(n.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=$I(e),{year:c,restDateString:h}=SI(r.date,t),g=TI(h,c);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const v=g.getTime();let s=0,f;if(r.time&&(s=EI(r.time),s===null||isNaN(s)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=Of(r.timeZone||n.timeZone,new Date(v+s)),isNaN(f))return new Date(NaN)}else f=N0(new Date(v+s)),f=N0(new Date(v+s+f));return new Date(v+s+f)}else return new Date(NaN)}function $I(e){const n={};let t=ui.dateTimePattern.exec(e),r;if(t?(n.date=t[1],r=t[3]):(t=ui.datePattern.exec(e),t?(n.date=t[1],r=t[2]):(n.date=null,r=e)),r){const c=ui.timeZone.exec(r);c?(n.time=r.replace(c[1],""),n.timeZone=c[1].trim()):n.time=r}return n}function SI(e,n){if(e){const t=ui.YYY[n],r=ui.YYYYY[n];let c=ui.YYYY.exec(e)||r.exec(e);if(c){const h=c[1];return{year:parseInt(h,10),restDateString:e.slice(h.length)}}if(c=ui.YY.exec(e)||t.exec(e),c){const h=c[1];return{year:parseInt(h,10)*100,restDateString:e.slice(h.length)}}}return{year:null}}function TI(e,n){if(n===null)return null;let t,r,c;if(!e||!e.length)return t=new Date(0),t.setUTCFullYear(n),t;let h=ui.MM.exec(e);if(h)return t=new Date(0),r=parseInt(h[1],10)-1,F0(n,r)?(t.setUTCFullYear(n,r),t):new Date(NaN);if(h=ui.DDD.exec(e),h){t=new Date(0);const g=parseInt(h[1],10);return RI(n,g)?(t.setUTCFullYear(n,0,g),t):new Date(NaN)}if(h=ui.MMDD.exec(e),h){t=new Date(0),r=parseInt(h[1],10)-1;const g=parseInt(h[2],10);return F0(n,r,g)?(t.setUTCFullYear(n,r,g),t):new Date(NaN)}if(h=ui.Www.exec(e),h)return c=parseInt(h[1],10)-1,j0(c)?z0(n,c):new Date(NaN);if(h=ui.WwwD.exec(e),h){c=parseInt(h[1],10)-1;const g=parseInt(h[2],10)-1;return j0(c,g)?z0(n,c,g):new Date(NaN)}return null}function EI(e){let n,t,r=ui.HH.exec(e);if(r)return n=parseFloat(r[1].replace(",",".")),zf(n)?n%24*Pf:NaN;if(r=ui.HHMM.exec(e),r)return n=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),zf(n,t)?n%24*Pf+t*D0:NaN;if(r=ui.HHMMSS.exec(e),r){n=parseInt(r[1],10),t=parseInt(r[2],10);const c=parseFloat(r[3].replace(",","."));return zf(n,t,c)?n%24*Pf+t*D0+c*1e3:NaN}return null}function z0(e,n,t){n=n||0,t=t||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const c=r.getUTCDay()||7,h=n*7+t+1-c;return r.setUTCDate(r.getUTCDate()+h),r}const MI=[31,28,31,30,31,30,31,31,30,31,30,31],II=[31,29,31,30,31,30,31,31,30,31,30,31];function B0(e){return e%400===0||e%4===0&&e%100!==0}function F0(e,n,t){if(n<0||n>11)return!1;if(t!=null){if(t<1)return!1;const r=B0(e);if(r&&t>II[n]||!r&&t>MI[n])return!1}return!0}function RI(e,n){if(n<1)return!1;const t=B0(e);return!(t&&n>366||!t&&n>365)}function j0(e,n){return!(e<0||e>52||n!=null&&(n<0||n>6))}function zf(e,n,t){return!(e<0||e>=25||n!=null&&(n<0||n>=60)||t!=null&&(t<0||t>=60))}const LI=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function OI(e,n,t={}){n=String(n);const r=n.match(LI);if(r){const c=P0(t.originalDate||e,t);n=r.reduce(function(h,g){if(g[0]==="'")return h;const v=h.indexOf(g),s=h[v-1]==="'",f=h.replace(g,"'"+CI[g[0]](c,g,t)+"'");return s?f.substring(0,v-1)+f.substring(v+1):f},n)}return ua(e,n,t)}function NI(e,n,t){e=P0(e,t);const r=Of(n,e,!0),c=new Date(e.getTime()-r),h=new Date(0);return h.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),h.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),h}function _u(e,n,t,r){return r={...r,timeZone:n,originalDate:e},OI(NI(e,n,{timeZone:r.timeZone}),t,r)}const Au="yyyy-MM-dd",W0="HH:mm:ss.SSS",H0="HH:mm:ss",$u=`${Au} ${W0}`,U0=`${Au} ${H0}`,v3=ur("R",{methods:{parseDateTime(e,n){return e.includes(" ")&&(e=e.replace(" ","T")),n&&n==="UTC"&&(e+="Z"),Date.parse(e)},formatUtcToLocal(e,n){return ua(!n||n==="local"?aI(e,e.getTimezoneOffset()):e,$u)},formatDateTime(e,n){return!n||n==="local"?ua(e,$u):_u(e,n,$u)},formatDateTimeHMS(e,n){return!n||n==="local"?ua(e,U0):_u(e,n,U0)},formatDate:function(e,n){return!n||n==="local"?ua(e,Au):_u(e,this.timeZone,Au)},formatTime:function(e,n,t=W0){return!n||n==="local"?ua(e,t):_u(e,this.timeZone,t)},formatTimeHMS:function(e,n){return this.formatTime(e,n,H0)},formatTimestamp(e,n){return this.formatDateTime(VM(e),n)},formatSeconds(e,n){return this.formatDateTime(new Date(e*1e3),n)},formatNanoseconds(e,n){return this.formatDateTime(new Date(parseInt(e)/1e6),n)}}}),V0=100,G0=ur("f",im("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:e=>n=>e.namedWidgets[n]},actions:{notifyAddHistory(e){this.notifyHistory.length>=V0&&(this.notifyHistory.length=V0-1),this.notifyHistory.unshift(e)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(e){Object.assign(this.namedWidgets,e)},clearNamedWidget(e){delete this.namedWidgets[e]},updatePlayback(e){Object.assign(this.playback,e)}}})),sl=om();sl.use(({store:e})=>{e.commit=(n,t)=>{typeof e[n]=="function"&&e[n](t)},e.dispatch=(n,t)=>{if(typeof e[n]=="function")return e[n](t)}});const DI=sl.install.bind(sl);sl.install=e=>{DI(e);const n=G0(sl);e.config.globalProperties.$store={state:new Proxy({},{get(t,r){return n.$state}}),getters:new Proxy({},{get(t,r){if(r.includes("/")){const[,c]=r.split("/");return n[c]}return n[r]}}),commit(t,r){if(t.includes("/")){const[,c]=t.split("/");n[c]?.(r)}else n[t]?.(r)},dispatch(t,r){if(t.includes("/")){const[,c]=t.split("/");return n[c]?.(r)}else return n[t]?.(r)}}};function q0(e,n){return function(){return e.apply(n,arguments)}}const{toString:PI}=Object.prototype,{getPrototypeOf:Bs}=Object,{iterator:rc,toStringTag:Y0}=Symbol,ic=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),K0=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),J0=(e,n,t)=>e===Object.prototype||!t&&n===null,zI=e=>{if(!Object.isExtensible(e))return!1;const n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&n.push(...Object.getOwnPropertySymbols(e)),n.every(t=>{if(K0(t))return!1;const r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&r.writable===!0})},oc=(e,n)=>{let t=e;const r=[];for(;t!=null;){if(r.indexOf(t)!==-1)return!1;r.push(t);const c=Bs(t);if(J0(t,c,t===e))return!1;if(ic(t,n))return!0;t=c}return!1},BI=(e,n)=>e!=null&&oc(e,n)?e[n]:void 0,FI=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const n=Bs(e);if(n===null&&zI(e))return e;const t=Object.create(null),r=Object.create(null),c=[];let h=e;for(;h!=null&&c.indexOf(h)===-1;){c.push(h);const g=h===e?n:Bs(h);if(J0(h,g,h===e))break;const v=Object.getOwnPropertyNames(h);Object.getOwnPropertySymbols&&v.push(...Object.getOwnPropertySymbols(h));for(const s of v)K0(s)||ic(r,s)||(t[s]=e[s],r[s]=!0);h=g}return t},Bf=(e=>n=>{const t=PI.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),co=e=>(e=e.toLowerCase(),n=>Bf(n)===e),Su=e=>n=>typeof n===e,{isArray:va}=Array,ya=Su("undefined");function al(e){return e!==null&&!ya(e)&&e.constructor!==null&&!ya(e.constructor)&&ki(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Q0=co("ArrayBuffer");function jI(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Q0(e.buffer),n}const WI=Su("string"),ki=Su("function"),Z0=Su("number"),ll=e=>e!==null&&typeof e=="object",HI=e=>e===!0||e===!1,Tu=e=>{if(!ll(e))return!1;const n=Bs(e);return(n===null||n===Object.prototype||Bs(n)===null)&&!oc(e,Y0)&&!oc(e,rc)},UI=e=>{if(!ll(e)||al(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},VI=co("Date"),GI=co("File"),qI=e=>!!(e&&typeof e.uri<"u"),YI=e=>e&&typeof e.getParts<"u",KI=co("Blob"),JI=co("FileList"),QI=co("Set"),ZI=e=>ll(e)&&ki(e.pipe);function XI(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const X0=XI(),ew=typeof X0.FormData<"u"?X0.FormData:void 0,eR=e=>{if(!e)return!1;if(ew&&e instanceof ew)return!0;const n=Bs(e);if(!n||n===Object.prototype||!ki(e.append))return!1;const t=Bf(e);return t==="formdata"||t==="object"&&ki(e.toString)&&e.toString()==="[object FormData]"},tR=co("URLSearchParams"),[nR,rR,iR,oR]=["ReadableStream","Request","Response","Headers"].map(co),sR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sc(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,c;if(typeof e!="object"&&(e=[e]),va(e))for(r=0,c=e.length;r<c;r++)n.call(null,e[r],r,e);else{if(al(e))return;const h=t?Object.getOwnPropertyNames(e):Object.keys(e),g=h.length;let v;for(r=0;r<g;r++)v=h[r],n.call(null,e[v],v,e)}}function tw(e,n){if(al(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,c;for(;r-- >0;)if(c=t[r],n===c.toLowerCase())return c;return null}const ba=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nw=e=>!ya(e)&&e!==ba;function Ff(...e){const{caseless:n,skipUndefined:t}=nw(this)&&this||{},r={},c=(h,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&tw(r,g)||g,s=ic(r,v)?r[v]:void 0;Tu(s)&&Tu(h)?r[v]=Ff(s,h):Tu(h)?r[v]=Ff({},h):va(h)?r[v]=h.slice():(!t||!ya(h))&&(r[v]=h)};for(let h=0,g=e.length;h<g;h++){const v=e[h];if(!v||al(v)||(sc(v,c),typeof v!="object"||va(v)))continue;const s=Object.getOwnPropertySymbols(v);for(let f=0;f<s.length;f++){const a=s[f];yR.call(v,a)&&c(v[a],a)}}return r}const aR=(e,n,t,{allOwnKeys:r}={})=>(sc(n,(c,h)=>{t&&ki(c)?Object.defineProperty(e,h,{__proto__:null,value:q0(c,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,h,{__proto__:null,value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),lR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cR=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},uR=(e,n,t,r)=>{let c,h,g;const v={};if(n=n||{},e==null)return n;do{for(c=Object.getOwnPropertyNames(e),h=c.length;h-- >0;)g=c[h],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&Bs(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},hR=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},dR=e=>{if(!e)return null;if(va(e))return e;let n=e.length;if(!Z0(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},fR=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Bs(Uint8Array)),pR=(e,n)=>{const t=(e&&e[rc]).call(e);let r;for(;(r=t.next())&&!r.done;){const c=r.value;n.call(e,c[0],c[1])}},gR=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},mR=co("HTMLFormElement"),vR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:yR}=Object.prototype,bR=co("RegExp"),rw=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};sc(t,(c,h)=>{let g;(g=n(c,h,e))!==!1&&(r[h]=g||c)}),Object.defineProperties(e,r)},wR=e=>{rw(e,(n,t)=>{if(ki(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];if(ki(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},xR=(e,n)=>{const t={},r=c=>{c.forEach(h=>{t[h]=!0})};return va(e)?r(e):r(String(e).split(n)),t},CR=()=>{},kR=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function _R(e){return!!(e&&ki(e.append)&&e[Y0]==="FormData"&&e[rc])}const AR=e=>{const n=new WeakSet,t=r=>{if(ll(r)){if(n.has(r))return;if(al(r))return r;if(!("toJSON"in r)){n.add(r);let c;if(QI(r)){c=[];for(const h of r){const g=t(h);!ya(g)&&c.push(g)}}else c=va(r)?[]:{},sc(r,(h,g)=>{const v=t(h);!ya(v)&&(c[g]=v)});return n.delete(r),c}}return r};return t(e)},$R=co("AsyncFunction"),SR=e=>e&&(ll(e)||ki(e))&&ki(e.then)&&ki(e.catch),iw=((e,n)=>e?setImmediate:n?((t,r)=>(ba.addEventListener("message",({source:c,data:h})=>{c===ba&&h===t&&r.length&&r.shift()()},!1),c=>{r.push(c),ba.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ki(ba.postMessage)),TR=typeof queueMicrotask<"u"?queueMicrotask.bind(ba):typeof process<"u"&&process.nextTick||iw,ow=e=>e!=null&&ki(e[rc]),ER=e=>e!=null&&oc(e,rc)&&ow(e),ve={isArray:va,isArrayBuffer:Q0,isBuffer:al,isFormData:eR,isArrayBufferView:jI,isString:WI,isNumber:Z0,isBoolean:HI,isObject:ll,isPlainObject:Tu,isEmptyObject:UI,isReadableStream:nR,isRequest:rR,isResponse:iR,isHeaders:oR,isUndefined:ya,isDate:VI,isFile:GI,isReactNativeBlob:qI,isReactNative:YI,isBlob:KI,isRegExp:bR,isFunction:ki,isStream:ZI,isURLSearchParams:tR,isTypedArray:fR,isFileList:JI,forEach:sc,merge:Ff,extend:aR,trim:sR,stripBOM:lR,inherits:cR,toFlatObject:uR,kindOf:Bf,kindOfTest:co,endsWith:hR,toArray:dR,forEachEntry:pR,matchAll:gR,isHTMLForm:mR,hasOwnProperty:ic,hasOwnProp:ic,hasOwnInPrototypeChain:oc,getSafeProp:BI,toSafeFlatObject:FI,reduceDescriptors:rw,freezeMethods:wR,toObjectSet:xR,toCamelCase:vR,noop:CR,toFiniteNumber:kR,findKey:tw,global:ba,isContextDefined:nw,isSpecCompliantForm:_R,toJSONObject:AR,isAsyncFn:$R,isThenable:SR,setImmediate:iw,asap:TR,isIterable:ow,isSafeIterable:ER},MR=ve.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"]),IR=e=>{const n={};let t,r,c;return e&&e.split(`
1481
+ `).forEach(function(h){c=h.indexOf(":"),t=h.substring(0,c).trim().toLowerCase(),r=h.substring(c+1).trim();const g=ve.hasOwnProp(n,t);!t||g&&ve.hasOwnProp(MR,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function RR(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const LR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),OR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function jf(e,n){return ve.isArray(e)?e.map(t=>jf(t,n)):RR(String(e).replace(n,""))}const NR=e=>jf(e,LR),DR=e=>jf(e,OR);function sw(e){const n=Object.create(null);return ve.forEach(e.toJSON(),(t,r)=>{n[r]=DR(t)}),n}const aw=Symbol("internals");function ac(e){return e&&String(e).trim().toLowerCase()}function Eu(e){return e===!1||e==null?e:ve.isArray(e)?e.map(Eu):NR(String(e))}function PR(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const zR=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Wf(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function BR(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const c=e.charCodeAt(r);if(c===34||c===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function FR(e){const n=Object.create(null),t=String(e);let r=0,c=!1,h=!1;function g(v){const s=Wf(t.slice(r,v)),f=s.indexOf("=");if(f<1)return;const a=Wf(s.slice(0,f));if(!zR.test(a))return;const l=a.toLowerCase();if(l==="__proto__"||l==="constructor"||l==="prototype")return;const u=Wf(s.slice(f+1));n[l]=BR(u)}for(let v=0;v<t.length;v++){const s=t.charCodeAt(v);c?h?h=!1:s===92?h=!0:s===34&&(c=!1):s===34?c=!0:(s===44||s===59)&&(g(v),r=v+1)}return g(t.length),n}const jR=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hf(e,n,t,r,c){if(ve.isFunction(r))return r.call(this,n,t);if(c&&(n=t),!!ve.isString(n)){if(ve.isString(r))return n.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(n)}}function WR(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function HR(e,n){const t=ve.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(c,h,g){return this[r].call(this,n,c,h,g)},configurable:!0})})}let Qr=class{constructor(e){e&&this.set(e)}set(e,n,t){const r=this;function c(g,v,s){const f=ac(v);if(!f)return;const a=ve.findKey(r,f);(!a||r[a]===void 0||s===!0||s===void 0&&r[a]!==!1)&&(r[a||v]=Eu(g))}const h=(g,v)=>ve.forEach(g,(s,f)=>c(s,f,v));if(ve.isPlainObject(e)||e instanceof this.constructor)h(e,n);else if(ve.isString(e)&&(e=e.trim())&&!jR(e))h(IR(e),n);else if(ve.isObject(e)&&ve.isSafeIterable(e)){let g=Object.create(null),v,s;for(const f of e){if(!ve.isArray(f))throw new TypeError("Object iterator must return a key-value pair");s=f[0],ve.hasOwnProp(g,s)?(v=g[s],g[s]=ve.isArray(v)?[...v,f[1]]:[v,f[1]]):g[s]=f[1]}h(g,n)}else e!=null&&c(n,e,t);return this}get(e,n){if(e=ac(e),e){const t=ve.findKey(this,e);if(t){const r=this[t];if(!n)return r;if(n===!0)return PR(r);if(ve.isFunction(n))return n.call(this,r,t);if(ve.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ac(e),e){const t=ve.findKey(this,e);return!!(t&&this[t]!==void 0&&(!n||Hf(this,this[t],t,n)))}return!1}delete(e,n){const t=this;let r=!1;function c(h){if(h=ac(h),h){const g=ve.findKey(t,h);g&&(!n||Hf(t,t[g],g,n))&&(delete t[g],r=!0)}}return ve.isArray(e)?e.forEach(c):c(e),r}clear(e){const n=Object.keys(this);let t=n.length,r=!1;for(;t--;){const c=n[t];(!e||Hf(this,this[c],c,e,!0))&&(delete this[c],r=!0)}return r}normalize(e){const n=this,t={};return ve.forEach(this,(r,c)=>{const h=ve.findKey(t,c);if(h){n[h]=Eu(r),delete n[c];return}const g=e?WR(c):String(c).trim();g!==c&&delete n[c],n[g]=Eu(r),t[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ve.forEach(this,(t,r)=>{t!=null&&t!==!1&&(n[r]=e&&ve.isArray(t)?t.join(", "):t)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1482
+ `)}getSetCookie(){const e=this.get("set-cookie");return ve.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return FR(e)}static concat(e,...n){const t=new this(e);return n.forEach(r=>t.set(r)),t}static accessor(e){const n=(this[aw]=this[aw]={accessors:{}}).accessors,t=this.prototype;function r(c){const h=ac(c);n[h]||(HR(t,c),n[h]=!0)}return ve.isArray(e)?e.forEach(r):r(e),this}};Qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(Qr.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),ve.freezeMethods(Qr);const Mu="[REDACTED ****]";function UR(e){if(ve.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(ve.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function VR(e,n){const t=new Set(n.map(h=>String(h).toLowerCase())),r=[],c=h=>{if(h===null||typeof h!="object"||ve.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof Qr&&(h=h.toJSON()),r.push(h);let g;if(ve.isArray(h))g=[],h.forEach((v,s)=>{const f=c(v);ve.isUndefined(f)||(g[s]=f)});else{if(!ve.isPlainObject(h)&&UR(h))return r.pop(),h;g=Object.create(null);for(const[v,s]of Object.entries(h)){const f=t.has(v.toLowerCase())?Mu:c(s);ve.isUndefined(f)||(g[v]=f)}}return r.pop(),g};return c(e)}function lw(e){try{return String(e)}catch{return""}}function GR(e){return e.errors.map(n=>{try{return n&&n.message?lw(n.message):lw(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let nt=class sk extends Error{static from(n,t,r,c,h,g){let v=n.message;!v&&ve.isArray(n.errors)&&n.errors.length&&(v=GR(n));const s=new sk(v,t||n.code,r,c,h);return Object.defineProperty(s,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),s.name=n.name,n.status!=null&&s.status==null&&(s.status=n.status),g&&Object.assign(s,g),s}constructor(n,t,r,c,h){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),c&&(this.request=c),h&&(this.response=h,this.status=h.status)}toJSON(){const n=this.config,t=n&&ve.hasOwnProp(n,"redact")?n.redact:void 0,r=ve.isArray(t)&&t.length>0?VR(n,t):ve.toJSONObject(n);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:r,code:this.code,status:this.status}}};nt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nt.ERR_BAD_OPTION="ERR_BAD_OPTION",nt.ECONNABORTED="ECONNABORTED",nt.ETIMEDOUT="ETIMEDOUT",nt.ECONNREFUSED="ECONNREFUSED",nt.ERR_NETWORK="ERR_NETWORK",nt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nt.ERR_DEPRECATED="ERR_DEPRECATED",nt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nt.ERR_CANCELED="ERR_CANCELED",nt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nt.ERR_INVALID_URL="ERR_INVALID_URL",nt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const qR=null,cw=100;function Uf(e){return ve.isPlainObject(e)||ve.isArray(e)}function uw(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function Vf(e,n,t){return e?e.concat(n).map(function(r,c){return r=uw(r),!t&&c?"["+r+"]":r}).join(t?".":""):n}function YR(e){return ve.isArray(e)&&!e.some(Uf)}const KR=ve.toFlatObject(ve,{},null,function(e){return/^is[A-Z]/.test(e)});function Iu(e,n,t){if(!ve.isObject(e))throw new TypeError("target must be an object");n=n||new FormData;const r=(x,R)=>{const T=ve.getSafeProp(t,x);return ve.isUndefined(T)?R:T},c=r("metaTokens",!0),h=r("visitor")||p,g=r("dots",!1),v=r("indexes",!1),s=r("Blob")||typeof Blob<"u"&&Blob,f=r("maxDepth",cw),a=s&&ve.isSpecCompliantForm(n),l=[];if(!ve.isFunction(h))throw new TypeError("visitor must be a function");function u(x){if(x===null)return"";if(ve.isDate(x))return x.toISOString();if(ve.isBoolean(x))return x.toString();if(!a&&ve.isBlob(x))throw new nt("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(x)||ve.isTypedArray(x)){if(a&&typeof s=="function")return new s([x]);throw new nt("Blob is not supported. Use a Buffer instead.",nt.ERR_NOT_SUPPORT)}return x}function d(x){if(x>f)throw new nt("Object is too deeply nested ("+x+" levels). Max depth: "+f,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function o(x,R){if(f===1/0)return JSON.stringify(x);const T=[];return JSON.stringify(x,function(_,C){if(!ve.isObject(C))return C;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(C),d(R+T.length-1),C})}function p(x,R,T){let _=x;if(ve.isReactNative(n)&&ve.isReactNativeBlob(x))return n.append(Vf(T,R,g),u(x)),!1;if(x&&!T&&typeof x=="object"){if(ve.endsWith(R,"{}"))R=c?R:R.slice(0,-2),x=o(x,1);else if(ve.isArray(x)&&YR(x)||(ve.isFileList(x)||ve.endsWith(R,"[]"))&&(_=ve.toArray(x)))return R=uw(R),_.forEach(function(C,P){!(ve.isUndefined(C)||C===null)&&n.append(v===!0?Vf([R],P,g):v===null?R:R+"[]",u(C))}),!1}return Uf(x)?!0:(n.append(Vf(T,R,g),u(x)),!1)}const m=Object.assign(KR,{defaultVisitor:p,convertValue:u,isVisitable:Uf});function w(x,R,T=0){if(!ve.isUndefined(x)){if(d(T),l.indexOf(x)!==-1)throw new Error("Circular reference detected in "+R.join("."));l.push(x),ve.forEach(x,function(_,C){(!(ve.isUndefined(_)||_===null)&&h.call(n,_,ve.isString(C)?C.trim():C,R,m))===!0&&w(_,R?R.concat(C):[C],T+1)}),l.pop()}}if(!ve.isObject(e))throw new TypeError("data must be an object");return w(e),n}function hw(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function Gf(e,n){this._pairs=[],e&&Iu(e,this,n)}const dw=Gf.prototype;dw.append=function(e,n){this._pairs.push([e,n])},dw.toString=function(e){const n=e?t=>e.call(this,t,hw):hw;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function JR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fw(e,n,t){if(!n)return e;e=e||"";const r=ve.isFunction(t)?{serialize:t}:t,c=ve.getSafeProp(r,"encode")||JR,h=ve.getSafeProp(r,"serialize");let g;if(h?g=h(n,r):g=ve.isURLSearchParams(n)?n.toString():new Gf(n,r).toString(c),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}const lc=Symbol("internals");function pw(e){return e?e.length:0}function gw(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function cc(e,n){const t=e.handlers,r=pw(t);t!==n.handlersRef?(n.handlersRef=t,n.handlerEntries.clear()):r!==n.handlersLength&&(r?n.handlerEntries.forEach(function(c,h){t[c.index]!==c.handler&&n.handlerEntries.delete(h)}):n.handlerEntries.clear()),n.handlersLength=r}let mw=class{constructor(){this.handlers=[],this[lc]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(n,t,r){const c={fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},h=this[lc];this.handlers==null&&(this.handlers=[]),cc(this,h);const g=h.nextId++;return this.handlers.push(c),h.handlerEntries.set(g,{handler:c,index:this.handlers.length-1}),h.handlersLength=this.handlers.length,g}eject(n){const t=this[lc];cc(this,t);const r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(gw(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],cc(this,this[lc]))}forEach(n){const t=this[lc];cc(this,t),t.iterationDepth++;try{ve.forEach(this.handlers,function(r){r!==null&&n(r)})}finally{--t.iterationDepth||(cc(this,t),gw(this.handlers),t.handlersLength=pw(this.handlers))}}};const qf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},QR=typeof URLSearchParams<"u"?URLSearchParams:Gf,ZR=typeof FormData<"u"?FormData:null,XR=typeof Blob<"u"?Blob:null,eL={isBrowser:!0,classes:{URLSearchParams:QR,FormData:ZR,Blob:XR},protocols:["http","https","file","blob","url","data"]},Yf=typeof window<"u"&&typeof document<"u",Kf=typeof navigator=="object"&&navigator||void 0,tL=Yf&&(!Kf||["ReactNative","NativeScript","NS"].indexOf(Kf.product)<0),nL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rL=Yf&&window.location.href||"http://localhost",iL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yf,hasStandardBrowserEnv:tL,hasStandardBrowserWebWorkerEnv:nL,navigator:Kf,origin:rL},Symbol.toStringTag,{value:"Module"})),Ir={...iL,...eL};function oL(e,n){return Iu(e,new Ir.classes.URLSearchParams,{visitor:function(t,r,c,h){return Ir.isNode&&ve.isBuffer(t)?(this.append(r,t.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...n})}const vw=cw;function yw(e){if(e>vw)throw new nt("FormData field is too deeply nested ("+e+" levels). Max depth: "+vw,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function sL(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)yw(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function aL(e){const n={},t=Object.keys(e);let r;const c=t.length;let h;for(r=0;r<c;r++)h=t[r],n[h]=e[h];return n}function bw(e){function n(t,r,c,h){yw(h);let g=t[h++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),s=h>=t.length;return g=!g&&ve.isArray(c)?c.length:g,s?(ve.hasOwnProp(c,g)?c[g]=ve.isArray(c[g])?c[g].concat(r):[c[g],r]:c[g]=r,!v):((!ve.hasOwnProp(c,g)||!ve.isObject(c[g]))&&(c[g]=[]),n(t,r,c[g],h)&&ve.isArray(c[g])&&(c[g]=aL(c[g])),!v)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){const t={};return ve.forEachEntry(e,(r,c)=>{n(sL(r),c,t,0)}),t}return null}const ww=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),cl=(e,n)=>e!=null&&ve.hasOwnProp(e,n)?e[n]:void 0;function lL(e,n,t){if(ve.isString(e))try{return(n||JSON.parse)(e),ve.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const uc={transitional:qf,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,c=ve.isObject(e);if(c&&ve.isHTMLForm(e)&&(e=new FormData(e)),ve.isFormData(e))return r?JSON.stringify(bw(e)):e;if(ve.isArrayBuffer(e)||ve.isBuffer(e)||ve.isStream(e)||ve.isFile(e)||ve.isBlob(e)||ve.isReadableStream(e))return e;if(ve.isArrayBufferView(e))return e.buffer;if(ve.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let h;if(c){const g=cl(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return oL(e,g).toString();if((h=ve.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=cl(this,"env"),s=v&&v.FormData;return Iu(h?{"files[]":e}:e,s&&new s,g)}}return c||r?(n.setContentType("application/json",!1),lL(e)):e}],transformResponse:[function(e){const n=cl(this,"transitional")||uc.transitional,t=n&&n.forcedJSONParsing,r=cl(this,"responseType"),c=r==="json";if(ve.isResponse(e)||ve.isReadableStream(e))return e;if(e&&ve.isString(e)&&(t&&!r||c)){const h=!(n&&n.silentJSONParsing)&&c;try{return JSON.parse(e,cl(this,"parseReviver"))}catch(g){if(h)throw g.name==="SyntaxError"?nt.from(g,nt.ERR_BAD_RESPONSE,this,null,cl(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ir.classes.FormData,Blob:Ir.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(ww,e=>{uc.headers[e]={}});function Jf(e,n){const t=this||uc,r=n||t,c=Qr.from(r.headers);let h=r.data;return ve.forEach(e,function(g){h=g.call(t,h,c.normalize(),n?n.status:void 0)}),c.normalize(),h}function xw(e){return!!(e&&e.__CANCEL__)}let hc=class extends nt{constructor(n,t,r){super(n??"canceled",nt.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Cw(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new nt("Request failed with status code "+t.status,t.status>=400&&t.status<500?nt.ERR_BAD_REQUEST:nt.ERR_BAD_RESPONSE,t.config,t.request,t))}const cL=/[\t\n\r]/g;function kw(e){if(typeof e!="string")return e;let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n).replace(cL,"")}function Qf(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function uL(e,n){e=e||10;const t=new Array(e),r=new Array(e);let c=0,h=0,g;return n=n!==void 0?n:1e3,function(v){const s=Date.now(),f=r[h];g||(g=s),t[c]=v,r[c]=s;let a=h,l=0;for(;a!==c;)l+=t[a++],a=a%e;if(c=(c+1)%e,c===h&&(h=(h+1)%e),s-g<n)return;const u=f&&s-f;return u?Math.round(l*1e3/u):void 0}}function hL(e,n){let t=0,r=1e3/n,c,h;const g=(v,s=Date.now())=>{t=s,c=null,h&&(clearTimeout(h),h=null),e(...v)};return[(...v)=>{const s=Date.now(),f=s-t;f>=r?g(v,s):(c=v,h||(h=setTimeout(()=>{h=null,g(c)},r-f)))},()=>c&&g(c),(...v)=>g(v)]}const Ru=(e,n,t=3)=>{let r=0;const c=uL(50,250);return hL(h=>{if(!h||!ve.isNumber(h.loaded))return;const g=h.loaded,v=h.lengthComputable?h.total:void 0,s=Math.max(0,v!=null?Math.min(g,v):g),f=Math.max(0,s-r),a=c(f);r=Math.max(r,s);const l={loaded:s,total:v,progress:v?s/v:void 0,bytes:f,rate:a||void 0,estimated:a&&v?(v-s)/a:void 0,event:h,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(l)},t)},_w=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Aw=(e,n=ve.asap)=>(...t)=>n(()=>e(...t)),dL=Ir.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Ir.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Ir.origin),Ir.navigator&&/(msie|trident)/i.test(Ir.navigator.userAgent)):()=>!0,fL=Ir.hasStandardBrowserEnv?{write(e,n,t,r,c,h,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];ve.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),ve.isString(r)&&v.push(`path=${r}`),ve.isString(c)&&v.push(`domain=${c}`),h===!0&&v.push("secure"),ve.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),c=r.indexOf("=");if(c!==-1&&r.slice(0,c)===e)try{return decodeURIComponent(r.slice(c+1))}catch{return r.slice(c+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pL(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gL(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const mL=/^https?:(?!\/\/)/i;function vL(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${Mu}`)}function yL(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Mu}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Mu}`);return t===-1?r:`${r}#${vL(n.slice(t+1))}`}function $w(e,n){if(typeof e=="string"){const t=kw(e);if(mL.test(t))throw new nt(`Invalid URL ${JSON.stringify(yL(t))}: missing "//" after protocol`,nt.ERR_INVALID_URL,n)}}function Sw(e,n,t,r){$w(n,r);let c=!pL(n);return e&&(c||t===!1)?($w(e,r),gL(e,n)):n}const Tw=e=>e instanceof Qr?{...e}:e,bL=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function wa(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,l,u,d){return ve.isPlainObject(a)&&ve.isPlainObject(l)?ve.merge.call({caseless:d},a,l):ve.isPlainObject(l)?ve.merge({},l):ve.isArray(l)?l.slice():l}function c(a,l,u,d){if(ve.isUndefined(l)){if(!ve.isUndefined(a))return r(void 0,a,u,d)}else return r(a,l,u,d)}function h(a,l){if(!ve.isUndefined(l))return r(void 0,l)}function g(a,l){if(ve.isUndefined(l)){if(!ve.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function v(a){const l=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ve.isUndefined(l))if(ve.isPlainObject(l)){if(ve.hasOwnProp(l,a))return l[a]}else return;const u=ve.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ve.isPlainObject(u)&&ve.hasOwnProp(u,a))return u[a]}function s(a,l,u){if(ve.hasOwnProp(n,u))return r(a,l);if(ve.hasOwnProp(e,u))return r(void 0,a)}const f={url:h,method:h,data:h,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutErrorMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:s,headers:(a,l,u)=>c(Tw(a),Tw(l),u,!0)};return ve.forEach(bL({...e,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=ve.hasOwnProp(f,a)?f[a]:c,u=ve.hasOwnProp(e,a)?e[a]:void 0,d=ve.hasOwnProp(n,a)?n[a]:void 0,o=l(u,d,a);ve.isUndefined(o)&&l!==s||(t[a]=o)}),ve.hasOwnProp(n,"validateStatus")&&ve.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const wL=["content-type","content-length"];function xL(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,c])=>{wL.includes(r.toLowerCase())&&e.set(r,c)})}const CL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function Ew(e){const n=wa({},e),t=u=>ve.hasOwnProp(n,u)?n[u]:void 0,r=t("data");let c=t("withXSRFToken");const h=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const s=t("auth"),f=t("baseURL"),a=t("allowAbsoluteUrls"),l=t("url");if(n.headers=v=Qr.from(v),n.url=fw(Sw(f,l,a,n),t("params"),t("paramsSerializer")),s){const u=ve.getSafeProp(s,"username")||"",d=ve.getSafeProp(s,"password")||"";try{v.set("Authorization","Basic "+btoa(u+":"+(d?CL(d):"")))}catch(o){throw nt.from(o,nt.ERR_BAD_OPTION_VALUE,e)}}if(ve.isFormData(r)){const u=ve.getSafeProp(r,"getHeaders");Ir.hasStandardBrowserEnv||Ir.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?v.setContentType(void 0):ve.isFunction(u)&&xL(v,u.call(r),t("formDataHeaderPolicy"))}if(Ir.hasStandardBrowserEnv&&(ve.isFunction(c)&&(c=c(n)),c===!0||c==null&&dL(n.url))){const u=h&&g&&fL.read(g);u&&v.set(h,u)}return n}const kL=typeof XMLHttpRequest<"u",_L=kL&&function(e){return new Promise(function(n,t){const r=Ew(e);let c=r.data;const h=Qr.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:s}=r,f,a,l,u,d,o;function p(){u&&u(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function w(R){if(!m)return;if(m.status===0&&(Qf(kw(r.url))||Qf(Ir.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){t(new nt("Request aborted",nt.ECONNABORTED,e,m)),p(),m=null;return}try{R?o&&o(R):d&&d()}catch(C){setTimeout(()=>{throw C})}if(!m)return;const T=Qr.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!g||g==="text"||g==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};Cw(function(C){n(C),p()},function(C){t(C),p()},_),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(w)},m.onabort=function(){m&&(t(new nt("Request aborted",nt.ECONNABORTED,e,m)),p(),m=null)},m.onerror=function(R){const T=R&&R.message?R.message:"Network Error",_=new nt(T,nt.ERR_NETWORK,e,m);_.event=R||null,t(_),p(),m=null},m.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||qf;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),t(new nt(R,T.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,e,m)),p(),m=null},c===void 0&&h.setContentType(null),"setRequestHeader"in m&&ve.forEach(sw(h),function(R,T){m.setRequestHeader(T,R)}),ve.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),g&&g!=="json"&&(m.responseType=r.responseType),s&&([l,d,o]=Ru(s,!0),m.addEventListener("progress",l)),v&&m.upload&&([a,u]=Ru(v),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=R=>{m&&(t(!R||R.type?new hc(null,e,m):R),m.abort(),p(),m=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const x=Qf(r.url);if(x&&!Ir.protocols.includes(x)){t(new nt("Unsupported protocol "+x+":",nt.ERR_BAD_REQUEST,e)),p();return}m.send(c||null)})},AL=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const c=function(s){if(!r){r=!0,g();const f=s instanceof Error?s:this.reason;t.abort(f instanceof nt?f:new hc(f instanceof Error?f.message:f))}};let h=n&&setTimeout(()=>{h=null,c(new nt(`timeout of ${n}ms exceeded`,nt.ETIMEDOUT))},n);const g=()=>{e&&(h&&clearTimeout(h),h=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(c):s.removeEventListener("abort",c)}),e=null)};e.forEach(s=>{if(!r){if(s.aborted){c.call(s);return}s.addEventListener("abort",c,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>ve.asap(g),v},$L=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,c;for(;r<t;)c=r+n,yield e.slice(r,c),r=c},SL=async function*(e,n){for await(const t of TL(e))yield*$L(t,n)},TL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Mw=(e,n,t,r)=>{const c=SL(e,n);let h=0,g,v=s=>{g||(g=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:f,value:a}=await c.next();if(f){v(),s.close();return}let l=a.byteLength;if(t){let u=h+=l;t(u)}s.enqueue(new Uint8Array(a))}catch(f){throw v(f),f}},cancel(s){return v(s),c.return()}},{highWaterMark:2})},Iw=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Rw=(e,n,t)=>n+2<t&&Iw(e.charCodeAt(n+1))&&Iw(e.charCodeAt(n+2)),Lw=e=>e<=57?e-48:(e&223)-55,EL=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ML=e=>e===9||e===10||e===12||e===13||e===32,IL=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},RL=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},LL=e=>{const n=e.length;let t=0,r=0,c=!1;for(let h=0;h<n;h++){let g=e.charCodeAt(h);if(g===37&&Rw(e,h,n)&&(g=Lw(e.charCodeAt(h+1))*16+Lw(e.charCodeAt(h+2)),h+=2),!ML(g)){if(g===61){r++;continue}if(!EL(g)||r>0){c=!0;continue}t++}}return c||r>2||r>0&&(t+r)%4!==0||t%4===1?RL(e):IL(t)},OL=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),c=e.slice(t+1);if(/;base64/i.test(r))return n(c);let h=0;for(let g=0,v=c.length;g<v;g++){const s=c.charCodeAt(g);if(s===37&&Rw(c,g,v))h+=1,g+=2;else if(s<128)h+=1;else if(s<2048)h+=2;else if(s>=55296&&s<=56319&&g+1<v){const f=c.charCodeAt(g+1);f>=56320&&f<=57343?(h+=4,g++):h+=3}else h+=3}return h};function NL(e){const n=typeof e=="string"?e.indexOf("#"):-1;return OL(n===-1?e:e.slice(0,n),LL)}const Zf="1.20.0",Ow=64*1024,DL={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Lu}=ve,PL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),Nw=e=>{if(!ve.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Dw=(e,...n)=>{try{return!!e(...n)}catch{return!1}},zL=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},BL=e=>{const n=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=ve.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:c,Request:h,Response:g}=e,v=c?Lu(c):typeof fetch=="function",s=Lu(h),f=Lu(g);if(!v)return!1;const a=v&&Lu(t),l=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=s&&a&&Dw(()=>{let w=!1;const x=new h(Ir.origin,{body:new t,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),d=f&&a&&Dw(()=>ve.isReadableStream(new g("").body)),o={stream:d&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let T=x&&x[w];if(T)return T.call(x);throw new nt(`Response type '${w}' is not supported`,nt.ERR_NOT_SUPPORT,R)})});const p=async w=>{if(w==null)return 0;if(ve.isBlob(w))return w.size;if(ve.isSpecCompliantForm(w))return(await new h(Ir.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(ve.isArrayBufferView(w)||ve.isArrayBuffer(w))return w.byteLength;if(ve.isURLSearchParams(w)&&(w=w+""),ve.isString(w))return(await l(w)).byteLength},m=async(w,x)=>ve.toFiniteNumber(w.getContentLength())??p(x);return async w=>{let{url:x,method:R,data:T,signal:_,cancelToken:C,timeout:P,onDownloadProgress:O,onUploadProgress:E,responseType:k,headers:B,withCredentials:N="same-origin",fetchOptions:I,maxContentLength:$,maxBodyLength:A,maxRedirects:D}=Ew(w);const j=ve.isNumber($)&&$>-1,U=ve.isNumber(A)&&A>-1,q=ee=>ve.hasOwnProp(w,ee)?w[ee]:void 0;let Q=c||fetch;k=k?(k+"").toLowerCase():"text";let re=AL([_,C&&C.toAbortSignal()],P),le=null;const ne=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let ue,he=null;const oe=()=>new nt("Request body larger than maxBodyLength limit",nt.ERR_BAD_REQUEST,w,le);try{let ee;const ye=q("auth");if(ye){const Me=ve.getSafeProp(ye,"username")||"",xt=ve.getSafeProp(ye,"password")||"";ee={username:Me,password:xt}}if(zL(x)){const Me=new URL(x,Ir.origin);if(!ee&&(Me.username||Me.password)){const xt=Nw(Me.username),St=Nw(Me.password);ee={username:xt,password:St}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ee&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(PL((ee.username||"")+":"+(ee.password||""))))),j&&typeof x=="string"&&x.startsWith("data:")&&NL(x)>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le);if(U&&R!=="get"&&R!=="head"){const Me=await p(T);if(typeof Me=="number"&&isFinite(Me)&&(ue=Me,Me>A))throw oe()}const we=U&&(ve.isReadableStream(T)||ve.isStream(T)),Ae=(Me,xt,St)=>Mw(Me,Ow,Vt=>{if(U&&Vt>A)throw he=oe();xt&&xt(Vt)},St);if(u&&R!=="get"&&R!=="head"&&(E||we)){if(ue=ue??await m(B,T),ue!==0||we){let Me=new h(x,{method:"POST",body:T,duplex:"half"}),xt;if(ve.isFormData(T)&&(xt=Me.headers.get("content-type"))&&B.setContentType(xt),Me.body){const[St,Vt]=E&&_w(ue,Ru(Aw(E)))||[];T=Ae(Me.body,St,Vt)}}}else if(we&&!s&&a&&R!=="get"&&R!=="head")T=Ae(T);else if(we&&s&&!u&&R!=="get"&&R!=="head")throw new nt("Stream request bodies are not supported by the current fetch implementation",nt.ERR_NOT_SUPPORT,w,le);ve.isString(N)||(N=N?"include":"omit");const Je=s&&"credentials"in h.prototype;if(ve.isFormData(T)){const Me=B.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&B.delete("content-type")}B.set("User-Agent","axios/"+Zf,!1);const ze=I==null?I:Object.assign(Object.create(null),I);ze&&(delete ze.body,delete ze.headers,delete ze.method,delete ze.signal,delete ze.duplex,delete ze.credentials);const qe=Object.assign(Object.create(null),ze,{signal:re,method:R.toUpperCase(),headers:sw(B.normalize()),body:T,duplex:"half",credentials:Je?N:void 0});s&&(ve.forEach(DL,(Me,xt)=>{qe[xt]===void 0&&(qe[xt]=Me)}),qe.signal===void 0&&(qe.signal=null),qe.body===void 0&&(qe.body=null)),D===0&&(qe.redirect="manual",ze&&(ze.redirect="manual")),le=s&&new h(x,qe);let Ze=await(s?Q(le,ze):Q(x,qe));const at=Qr.from(Ze.headers);if(j){const Me=ve.toFiniteNumber(at.getContentLength());if(Me!=null&&Me>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le)}const ct=d&&(k==="stream"||k==="response");if(d&&Ze.body&&(O||j||ct&&ne)){const Me={};["status","statusText","headers"].forEach(ft=>{Me[ft]=Ze[ft]});const xt=ve.toFiniteNumber(at.getContentLength()),[St,Vt]=O&&_w(xt,Ru(Aw(O),!0))||[];let un=0;const An=ft=>{if(j&&(un=ft,un>$))throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le);St&&St(ft)};Ze=new g(Mw(Ze.body,Ow,An,()=>{Vt&&Vt(),ne&&ne()}),Me)}k=k||"text";let Ft=await o[ve.findKey(o,k)||"text"](Ze,w);if(j&&!d&&!ct){let Me;if(Ft!=null&&(typeof Ft.byteLength=="number"?Me=Ft.byteLength:typeof Ft.size=="number"?Me=Ft.size:typeof Ft=="string"&&(Me=typeof r=="function"?new r().encode(Ft).byteLength:Ft.length)),typeof Me=="number"&&Me>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le)}return!ct&&ne&&ne(),await new Promise((Me,xt)=>{Cw(Me,xt,{data:Ft,headers:Qr.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:w,request:le})})}catch(ee){if(ne&&ne(),re&&re.aborted&&re.reason instanceof nt){const ye=re.reason;throw ye.config=w,le&&(ye.request=le),ee!==ye&&Object.defineProperty(ye,"cause",{__proto__:null,value:ee,writable:!0,enumerable:!1,configurable:!0}),ye}if(he)throw le&&!he.request&&(he.request=le),he;if(ee instanceof nt)throw le&&!ee.request&&(ee.request=le),ee;if(ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)){const ye=new nt("Network Error",nt.ERR_NETWORK,w,le,ee&&ee.response);throw Object.defineProperty(ye,"cause",{__proto__:null,value:ee.cause||ee,writable:!0,enumerable:!1,configurable:!0}),ye}throw nt.from(ee,ee&&ee.code,w,le,ee&&ee.response)}}},FL=new Map,Pw=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:c}=n,h=[r,c,t];let g=h.length,v=g,s,f,a=FL;for(;v--;)s=h[v],f=a.get(s),f===void 0&&a.set(s,f=v?new Map:BL(n)),a=f;return f};Pw();const Xf={http:qR,xhr:_L,fetch:{get:Pw}};ve.forEach(Xf,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const zw=e=>`- ${e}`,jL=e=>ve.isFunction(e)||e===null||e===!1;function WL(e,n){e=ve.isArray(e)?e:[e];const{length:t}=e;let r,c;const h={};for(let g=0;g<t;g++){r=e[g];let v;if(c=r,!jL(r)&&(c=Xf[(v=String(r)).toLowerCase()],c===void 0))throw new nt(`Unknown adapter '${v}'`);if(c&&(ve.isFunction(c)||(c=c.get(n))))break;h[v||"#"+g]=c}if(!c){const g=Object.entries(h).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
1483
+ `+g.map(zw).join(`
1484
+ `):" "+zw(g[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+v,nt.ERR_NOT_SUPPORT)}return c}const Bw={getAdapter:WL,adapters:Xf};function ep(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hc(null,e)}function tp(e){const n=ve.toSafeFlatObject(e);return ep(n),n.headers=Qr.from(ve.getSafeProp(n,"headers")),n.data=Jf.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bw.getAdapter(n.adapter||uc.adapter,n)(n).then(function(t){ep(n),n.response=t;try{t.data=Jf.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Qr.from(t.headers),t},function(t){if(!xw(t)&&(ep(n),t&&t.response)){n.response=t.response;try{t.response.data=Jf.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Qr.from(t.response.headers)}return Promise.reject(t)})}const Ou={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Ou[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const Fw={};Ou.transitional=function(e,n,t){function r(c,h){return"[Axios v"+Zf+"] Transitional option '"+c+"'"+h+(t?". "+t:"")}return(c,h,g)=>{if(e===!1)throw new nt(r(h," has been removed"+(n?" in "+n:"")),nt.ERR_DEPRECATED);return n&&!Fw[h]&&(Fw[h]=!0,console.warn(r(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,h,g):!0}},Ou.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function HL(e,n,t){if(typeof e!="object"||e===null)throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let c=r.length;for(;c-- >0;){const h=r[c],g=Object.prototype.hasOwnProperty.call(n,h)?n[h]:void 0;if(g){const v=e[h],s=v===void 0||g(v,h,e);if(s!==!0)throw new nt("option "+h+" must be "+s,nt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new nt("Unknown option "+h,nt.ERR_BAD_OPTION)}}const Nu={assertOptions:HL,validators:Ou},Zr=Nu.validators;let xa=class{constructor(e){this.defaults=e||{},this.interceptors={request:new mw,response:new mw}}async request(e,n){try{return await this._request(e,n)}catch(t){if(t instanceof Error)try{let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const c=r.stack;let h="";if(typeof c=="string"){const g=c.indexOf(`
1485
+ `);h=g===-1?"":c.slice(g+1)}if(!t.stack)t.stack=h;else if(h){const g=h.indexOf(`
1486
+ `),v=g===-1?-1:h.indexOf(`
1487
+ `,g+1),s=v===-1?"":h.slice(v+1);String(t.stack).endsWith(s)||(t.stack+=`
1488
+ `+h)}}catch{}throw t}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=wa(this.defaults,n);const{transitional:t,paramsSerializer:r,headers:c}=n;t!==void 0&&Nu.assertOptions(t,{silentJSONParsing:Zr.transitional(Zr.boolean),forcedJSONParsing:Zr.transitional(Zr.boolean),clarifyTimeoutError:Zr.transitional(Zr.boolean),legacyInterceptorReqResOrdering:Zr.transitional(Zr.boolean),advertiseZstdAcceptEncoding:Zr.transitional(Zr.boolean),validateStatusUndefinedResolves:Zr.transitional(Zr.boolean)},!1),r!=null&&(ve.isFunction(r)?n.paramsSerializer={serialize:r}:Nu.assertOptions(r,{encode:Zr.function,serialize:Zr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Nu.assertOptions(n,{baseUrl:Zr.spelling("baseURL"),withXsrfToken:Zr.spelling("withXSRFToken")},!0),n.method=(ve.getSafeProp(n,"method")||ve.getSafeProp(this.defaults,"method")||"get").toLowerCase();let h=c&&ve.merge(c.common,c[n.method]);c&&ve.forEach(ww.concat("common"),d=>{delete c[d]}),n.headers=Qr.concat(h,c);const g=[];let v=!0;this.interceptors.request.forEach(function(d){if(typeof d.runWhen=="function"&&d.runWhen(n)===!1)return;v=v&&d.synchronous;const o=n.transitional||qf;o&&o.legacyInterceptorReqResOrdering?g.unshift(d.fulfilled,d.rejected):g.push(d.fulfilled,d.rejected)});const s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});let f,a=0,l;if(!v){const d=[tp.bind(this),void 0];for(d.unshift(...g),d.push(...s),l=d.length,f=Promise.resolve(n);a<l;)f=f.then(d[a++],d[a++]);return f}l=g.length;let u=n;for(;a<l;){const d=g[a++],o=g[a++];try{u=d?d(u):u}catch(p){if(!o){f=Promise.reject(p);break}try{const m=o.call(this,p);ve.isThenable(m)&&(f=Promise.resolve(m).then(()=>tp.call(this,u)))}catch(m){f=Promise.reject(m)}break}}if(!f)try{f=tp.call(this,u)}catch(d){f=Promise.reject(d)}for(a=0,l=s.length;a<l;)f=f.then(s[a++],s[a++]);return f}getUri(e){e=wa(this.defaults,e);const n=Sw(e.baseURL,e.url,e.allowAbsoluteUrls,e);return fw(n,e.params,e.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(e){xa.prototype[e]=function(n,t){return this.request(wa(t||{},{method:e,url:n,data:t&&ve.hasOwnProp(t,"data")?t.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,c,h){return this.request(wa(h||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:c}))}}xa.prototype[e]=n(),e!=="query"&&(xa.prototype[e+"Form"]=n(!0))});let UL=class ak{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(c){t=c});const r=this;this.promise.then(c=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](c);r._listeners=null}),this.promise.then=c=>{let h;const g=new Promise(v=>{r.subscribe(v),h=v}).then(c);return g.cancel=function(){r.unsubscribe(h)},g},n(function(c,h,g){r.reason||(r.reason=new hc(c,h,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new ak(function(t){n=t}),cancel:n}}};function VL(e){return function(n){return e.apply(null,n)}}function GL(e){return ve.isObject(e)&&e.isAxiosError===!0}const Du={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Du).forEach(([e,n])=>{Du[n]===void 0&&(Du[n]=e)});function jw(e){const n=new xa(e),t=q0(xa.prototype.request,n);return ve.extend(t,xa.prototype,n,{allOwnKeys:!0}),ve.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return jw(wa(e,r))},t}const pr=ur("A",jw(uc));pr.Axios=xa,pr.CanceledError=hc,pr.CancelToken=UL,pr.isCancel=xw,pr.VERSION=Zf,pr.toFormData=Iu,pr.AxiosError=nt,pr.Cancel=pr.CanceledError,pr.all=function(e){return Promise.all(e)},pr.spread=VL,pr.isAxiosError=GL,pr.mergeConfig=wa,pr.AxiosHeaders=Qr,pr.formToJSON=e=>bw(ve.isHTMLForm(e)?new FormData(e):e),pr.getAdapter=Bw.getAdapter,pr.HttpStatusCode=Du,pr.default=pr;const{Axios:y3,AxiosError:b3,CanceledError:w3,isCancel:x3,CancelToken:C3,VERSION:k3,all:_3,Cancel:A3,isAxiosError:$3,spread:S3,toFormData:T3,AxiosHeaders:E3,HttpStatusCode:M3,formToJSON:I3,getAdapter:R3,mergeConfig:L3,create:O3}=pr,qL="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=",YL={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return qL},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const e=tO.indexOf(np[this.status]),n=1-(e-1)*.05,t=224*this.scaleFactor*n,r=32*this.scaleFactor*n,c=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${e*c}px;`,`background-size: ${t}px ${r}px;`,`height: ${c}px;`,`width: ${c}px;`,`padding-top: ${e-1}px;`].join("")}}};function KL(e,n,t,r,c,h){return _t(),Xt("div",{style:Zn(h.iconStyle)},null,4)}const JL=ja(YL,[["render",KL]]),QL={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function ZL(e,n,t,r,c,h){const g=wr("rux-icon");return _t(),hr(g,{size:t.size,icon:t.icon,style:Zn(h.colorStyle)},null,8,["size","icon","style"])}const XL=ja(QL,[["render",ZL],["__scopeId","data-v-bb4cd487"]]),np={fatal:"fatal",FATAL:"fatal",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"},rp={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},eO=function(e){const n="#000000",t="#ffffff",r=rp[np[e]];if(r){const c=+`0x${r.slice(1,3)}`,h=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((c*299+h*587+g*114)/1e3>128)return n}return t},tO=Object.keys(rp),nO={astro:{component:e=>To(XL,{...e})},"astro-status":{component:e=>To(JL,{...e,status:e.icon})}},rO={extras:{component:e=>To(_k,{...e})}},iO=50,oO=2e3,Ww="single-spa:app-change",sO={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Ww,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},oO)},unmounted(){window.removeEventListener(Ww,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(e){this.show=!e.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Hh().length>0,Hh().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},iO)}}},aO={class:"mx-1"},lO={key:1,class:"d-flex justify-center align-center"};function cO(e,n,t,r,c,h){const g=wr("v-card-title"),v=wr("v-card-text"),s=wr("v-card"),f=wr("v-progress-circular");return _t(),Xt(Er,null,[c.show?(_t(),hr(s,{key:0},{default:En(()=>[Ke(g,null,{default:En(()=>[...n[0]||(n[0]=[Eo(" 404 Not Found ",-1)])]),_:1}),Ke(v,{class:"d-flex align-center mt-3"},{default:En(()=>[n[1]||(n[1]=Eo(" The requested URL ",-1)),yt("code",aO,Gr(e.$route.fullPath),1),n[2]||(n[2]=Eo(" was not routable. ",-1)),n[3]||(n[3]=yt("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):qr("",!0),h.showSpinner?(_t(),Xt("div",lO,[Ke(f,{indeterminate:""})])):qr("",!0)],64)}const Hw=[{path:"/",name:"TableManager",component:()=>mt(()=>pt.import("./TableManager-8b04ea028c333295b337.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:ja(sO,[["render",cO]])}];Hw.forEach(e=>lm(e));const uO=nm({history:rm(),routes:Hw});function Uw(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function hO(e){if(Array.isArray(e))return e}function dO(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,c,h,g,v=[],s=!0,f=!1;try{if(h=(t=t.call(e)).next,n!==0)for(;!(s=(r=h.call(t)).done)&&(v.push(r.value),v.length!==n);s=!0);}catch(a){f=!0,c=a}finally{try{if(!s&&t.return!=null&&(g=t.return(),Object(g)!==g))return}finally{if(f)throw c}}return v}}function fO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1489
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pO(e,n){return hO(e)||dO(e,n)||gO(e,n)||fO()}function gO(e,n){if(e){if(typeof e=="string")return Uw(e,n);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Uw(e,n):void 0}}const Vw=Object.entries,Gw=Object.setPrototypeOf,mO=Object.isFrozen,qw=Object.getPrototypeOf,Yw=Object.getOwnPropertyDescriptor;let Rr=Object.freeze,zr=Object.seal,ul=Object.create,Kw=typeof Reflect<"u"&&Reflect,ip=Kw.apply,op=Kw.construct;Rr||(Rr=function(e){return e}),zr||(zr=function(e){return e}),ip||(ip=function(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),c=2;c<t;c++)r[c-2]=arguments[c];return e.apply(n,r)}),op||(op=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return new e(...t)});const ds=Hn(Array.prototype.forEach),vO=Hn(Array.prototype.lastIndexOf),Jw=Hn(Array.prototype.pop),dc=Hn(Array.prototype.push),yO=Hn(Array.prototype.slice),bO=Hn(Array.prototype.splice),hl=Array.isArray,sp=tx(Set),ap=Hn(Set.prototype.add),fc=Hn(Set.prototype.has),Ca=Hn(String.prototype.toLowerCase),lp=Hn(String.prototype.toString),Qw=Hn(String.prototype.match),pc=Hn(String.prototype.replace),Zw=Hn(String.prototype.indexOf),wO=Hn(String.prototype.trim),xO=Hn(Number.prototype.toString),CO=Hn(Boolean.prototype.toString),Xw=typeof BigInt>"u"?null:Hn(BigInt.prototype.toString),ex=typeof Symbol>"u"?null:Hn(Symbol.prototype.toString),_i=Hn(Object.prototype.hasOwnProperty),gc=Hn(Object.prototype.toString),Br=Hn(RegExp.prototype.test),fs=tx(TypeError);function Hn(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),c=1;c<t;c++)r[c-1]=arguments[c];return ip(e,n,r)}}function tx(e){return function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return op(e,t)}}function cn(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ca;if(Gw&&Gw(e,null),!hl(n))return e;let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const h=t(c);h!==c&&(mO(n)||(n[r]=h),c=h)}e[c]=!0}return e}function kO(e){for(let n=0;n<e.length;n++)_i(e,n)||(e[n]=null);return e}function Gi(e){const n=ul(null);for(const r of Vw(e)){var t=pO(r,2);const c=t[0],h=t[1];_i(e,c)&&(hl(h)?n[c]=kO(h):h&&typeof h=="object"&&h.constructor===Object?n[c]=Gi(h):n[c]=h)}return n}function _O(e){switch(typeof e){case"string":return e;case"number":return xO(e);case"boolean":return CO(e);case"bigint":return Xw?Xw(e):"0";case"symbol":return ex?ex(e):"Symbol()";case"undefined":return gc(e);case"function":case"object":{if(e===null)return gc(e);const n=e,t=uo(n,"toString");if(typeof t=="function"){const r=t(n);return typeof r=="string"?r:gc(r)}return gc(e)}default:return gc(e)}}function uo(e,n){for(;e!==null;){const r=Yw(e,n);if(r){if(r.get)return Hn(r.get);if(typeof r.value=="function")return Hn(r.value)}e=qw(e)}function t(){return null}return t}function AO(e,n){for(;e!==null;){const t=Yw(e,n);if(t)return t.get?Hn(t.get):null;e=qw(e)}return null}function $O(e){try{return Br(e,""),!0}catch{return!1}}const nx=Rr(["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"]),cp=Rr(["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"]),up=Rr(["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"]),SO=Rr(["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"]),hp=Rr(["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"]),TO=Rr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rx=Rr(["#text"]),ix=Rr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),dp=Rr(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),ox=Rr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Pu=Rr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),EO=zr(/{{[\w\W]*|^[\w\W]*}}/g),MO=zr(/<%[\w\W]*|^[\w\W]*%>/g),IO=zr(/\${[\w\W]*/g),RO=zr(/^data-[\-\w.\u00B7-\uFFFF]+$/),LO=zr(/^aria-[\-\w]+$/),sx=zr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),OO=zr(/^(?:\w+script|data):/i),NO=zr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DO=zr(/^html$/i),PO=zr(/^[a-z][.\w]*(-[.\w]+)+$/i),fp=zr(/<[/\w!]/g),ax=zr(/<[/\w]/g),zO=zr(/<\/no(script|embed|frames)/i),lx=zr(/\/>/i),gr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},BO=Rr(cn({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),FO=function(){return typeof window>"u"?null:window},jO=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let t=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));const c="dompurify"+(t?"#"+t:"");try{return e.createPolicy(c,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},cx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Fs=function(e,n,t,r){return _i(e,n)&&hl(e[n])?cn(r.base?Gi(r.base):{},e[n],r.transform):t},pp=function(e,n,t){const r=_i(e,n)?e[n]:void 0;return r&&typeof r=="object"?Gi(r):t()};function ux(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:FO();const n=X=>ux(X);if(n.version="3.4.17",n.removed=[],!e||!e.document||e.document.nodeType!==gr.document||!e.Element)return n.isSupported=!1,n;let t=e.document;const r=t,c=r.currentScript;e.DocumentFragment;const h=e.HTMLTemplateElement,g=e.Node,v=e.Element,s=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,a=e.trustedTypes,l=v.prototype,u=uo(l,"cloneNode"),d=uo(l,"remove"),o=uo(l,"removeAttributeNode"),p=uo(l,"nextSibling"),m=uo(l,"childNodes"),w=uo(l,"parentNode"),x=uo(l,"shadowRoot"),R=uo(l,"attributes"),T=g&&g.prototype?uo(g.prototype,"nodeType"):null,_=g&&g.prototype?uo(g.prototype,"nodeName"):null,C=g&&g.prototype?uo(g.prototype,"ownerDocument"):null,P=function(X){return T?T(X):X.nodeType},O=function(X){return _?_(X):X.nodeName},E=AO(l,"namespaceURI"),k=function(X){return E?E(X):X.namespaceURI};if(typeof h=="function"){const X=t.createElement("template");X.content&&X.content.ownerDocument&&(t=X.content.ownerDocument)}let B,N="",I,$=!1,A=0;const D=function(){if(A>0)throw fs('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},j=function(X){D(),A++;try{return B.createHTML(X)}finally{A--}},U=function(X){D(),A++;try{return B.createScriptURL(X)}finally{A--}},q=function(){return $||(I=jO(a,c),$=!0),I},Q=t,re=Q.implementation,le=Q.createNodeIterator,ne=Q.createDocumentFragment,ue=Q.getElementsByTagName,he=r.importNode;let oe=cx();n.isSupported=typeof Vw=="function"&&typeof w=="function"&&re&&re.createHTMLDocument!==void 0;const ee=EO,ye=MO,we=IO,Ae=RO,Je=LO,ze=OO,qe=NO,Ze=PO;let at=sx,ct=null;const Ft=cn({},[...nx,...cp,...up,...hp,...rx]);let Me=null;const xt=cn({},[...ix,...dp,...ox,...Pu]);let St=Object.seal(ul(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}})),Vt=null,un=null;const An=Object.seal(ul(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ft=!0,it=!0,Gt=!1,Bn=!0,$n=!1,Nn=!0,Un=!1,Rn=!1,Vn=null,Xn=null,hn=!1,Dn=!1,Ti=!1,Xr=!1,ei=!0,Ei=!1;const ho="user-content-";let mr=!0,Ki=!1,Fr=null,fo={},ar=null;const Ws=cn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gs=null;const Ko=cn({},["audio","video","img","source","image","track"]);let Mi=null;const Gn=cn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ar="http://www.w3.org/1998/Math/MathML",Lr="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml";let Fn=gn,Ii=!1,hi=null;const ms=cn({},[Ar,Lr,gn],lp),vs=Rr(["mi","mo","mn","ms","mtext"]);let ys=cn({},vs);const bs=Rr(["annotation-xml"]);let di=cn({},bs);const Ri=cn({},["title","style","font","a","script"]);let Dt=null;const Hs=["application/xhtml+xml","text/html"],Or="text/html";let Pt=null,dn=null;const qn=t.createElement("form"),po=function(X){return X instanceof RegExp||X instanceof Function},er=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dn&&dn===X)return;(!X||typeof X!="object")&&(X={}),X=Gi(X),Dt=Hs.indexOf(X.PARSER_MEDIA_TYPE)===-1?Or:X.PARSER_MEDIA_TYPE,Pt=Dt==="application/xhtml+xml"?lp:Ca,ct=Fs(X,"ALLOWED_TAGS",Ft,{transform:Pt}),Me=Fs(X,"ALLOWED_ATTR",xt,{transform:Pt}),hi=Fs(X,"ALLOWED_NAMESPACES",ms,{transform:lp}),Mi=Fs(X,"ADD_URI_SAFE_ATTR",Gn,{transform:Pt,base:Gn}),gs=Fs(X,"ADD_DATA_URI_TAGS",Ko,{transform:Pt,base:Ko}),ar=Fs(X,"FORBID_CONTENTS",Ws,{transform:Pt}),Vt=Fs(X,"FORBID_TAGS",Gi({}),{transform:Pt}),un=Fs(X,"FORBID_ATTR",Gi({}),{transform:Pt}),fo=_i(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?Gi(X.USE_PROFILES):X.USE_PROFILES:!1,ft=X.ALLOW_ARIA_ATTR!==!1,it=X.ALLOW_DATA_ATTR!==!1,Gt=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Bn=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$n=X.SAFE_FOR_TEMPLATES||!1,Nn=X.SAFE_FOR_XML!==!1,Un=X.WHOLE_DOCUMENT||!1,Dn=X.RETURN_DOM||!1,Ti=X.RETURN_DOM_FRAGMENT||!1,Xr=X.RETURN_TRUSTED_TYPE||!1,hn=X.FORCE_BODY||!1,ei=X.SANITIZE_DOM!==!1,Ei=X.SANITIZE_NAMED_PROPS||!1,mr=X.KEEP_CONTENT!==!1,Ki=X.IN_PLACE||!1,at=$O(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:sx,Fn=typeof X.NAMESPACE=="string"?X.NAMESPACE:gn,ys=pp(X,"MATHML_TEXT_INTEGRATION_POINTS",()=>cn({},vs)),di=pp(X,"HTML_INTEGRATION_POINTS",()=>cn({},bs));const xe=pp(X,"CUSTOM_ELEMENT_HANDLING",()=>ul(null));if(St=ul(null),_i(xe,"tagNameCheck")&&po(xe.tagNameCheck)&&(St.tagNameCheck=xe.tagNameCheck),_i(xe,"attributeNameCheck")&&po(xe.attributeNameCheck)&&(St.attributeNameCheck=xe.attributeNameCheck),_i(xe,"allowCustomizedBuiltInElements")&&typeof xe.allowCustomizedBuiltInElements=="boolean"&&(St.allowCustomizedBuiltInElements=xe.allowCustomizedBuiltInElements),zr(St),$n&&(it=!1),Ti&&(Dn=!0),fo&&(ct=cn({},rx),Me=ul(null),fo.html===!0&&(cn(ct,nx),cn(Me,ix)),fo.svg===!0&&(cn(ct,cp),cn(Me,dp),cn(Me,Pu)),fo.svgFilters===!0&&(cn(ct,up),cn(Me,dp),cn(Me,Pu)),fo.mathMl===!0&&(cn(ct,hp),cn(Me,ox),cn(Me,Pu))),An.tagCheck=null,An.attributeCheck=null,_i(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?An.tagCheck=X.ADD_TAGS:hl(X.ADD_TAGS)&&(ct===Ft&&(ct=Gi(ct)),cn(ct,X.ADD_TAGS,Pt))),_i(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?An.attributeCheck=X.ADD_ATTR:hl(X.ADD_ATTR)&&(Me===xt&&(Me=Gi(Me)),cn(Me,X.ADD_ATTR,Pt))),_i(X,"ADD_FORBID_CONTENTS")&&hl(X.ADD_FORBID_CONTENTS)&&(ar===Ws&&(ar=Gi(ar)),cn(ar,X.ADD_FORBID_CONTENTS,Pt)),mr&&(ct["#text"]=!0),Un&&cn(ct,["html","head","body"]),ct.table&&(cn(ct,["tbody"]),delete Vt.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ie=B;B=X.TRUSTED_TYPES_POLICY;try{N=j("")}catch(Oe){throw B=Ie,Oe}}else X.TRUSTED_TYPES_POLICY===null?(B=void 0,N=""):(B===void 0&&(B=q()),B&&typeof N=="string"&&(N=j("")));Rr&&Rr(X),dn=X},go=cn({},[...cp,...up,...SO]),Li=cn({},[...hp,...TO]),ws=function(X,xe,Ie){return xe.namespaceURI===gn?X==="svg":xe.namespaceURI===Ar?X==="svg"&&(Ie==="annotation-xml"||ys[Ie]):!!go[X]},mo=function(X,xe,Ie){return xe.namespaceURI===gn?X==="math":xe.namespaceURI===Lr?X==="math"&&di[Ie]:!!Li[X]},fi=function(X,xe,Ie){return xe.namespaceURI===Lr&&!di[Ie]||xe.namespaceURI===Ar&&!ys[Ie]?!1:!Li[X]&&(Ri[X]||!go[X])},Do=function(X){const xe=k(X),Ie=Ca(O(X)),Oe=w(X);let Ye,We;return Oe&&P(Oe)===gr.element?(Ye={namespaceURI:k(Oe)},We=Ca(O(Oe))):(Ye={namespaceURI:Fn},We="template"),hi[xe]?xe===Lr?ws(Ie,Ye,We):xe===Ar?mo(Ie,Ye,We):xe===gn?fi(Ie,Ye,We):!!(Dt==="application/xhtml+xml"&&hi[xe]):!1},ti=function(X){dc(n.removed,{element:X});try{w(X).removeChild(X)}catch{if(d(X),!w(X))throw fs("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Nr=function(X,xe,Ie){try{o(X,xe)}catch{try{X.removeAttribute(Ie)}catch{}}},vo=function(X){tr(X);const xe=m(X);xe&&ds(yO(xe),Oe=>{try{d(Oe)}catch{}});const Ie=P(X)===gr.element?R(X):null;if(Ie)for(let Oe=Ie.length-1;Oe>=0;--Oe){const Ye=Ie[Oe],We=Ye&&Ye.name;typeof We=="string"&&Nr(X,Ye,We)}},Oi=function(X,xe,Ie){if(!Ie)try{Ie=xe.getAttributeNode(X)}catch{Ie=null}dc(n.removed,{attribute:Ie||null,from:xe});try{Ie?o(xe,Ie):xe.removeAttribute(X)}catch{try{xe.removeAttribute(X)}catch{}}if(X==="is")if(Dn||Ti)try{ti(xe)}catch{}else try{xe.setAttribute(X,"")}catch{}},Jo=function(X){const xe=R(X);if(xe)for(let Ie=xe.length-1;Ie>=0;--Ie){const Oe=xe[Ie],Ye=Oe&&Oe.name;typeof Ye!="string"||Me[Pt(Ye)]||Nr(X,Oe,Ye)}},Po=function(X,xe){let Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Oe=[X];for(;Oe.length>0;){const Ye=Oe.pop();if(xe(Ye)===!1)continue;if(Ie&&P(Ye)===gr.element){const rt=x(Ye);Yn(rt)&&Oe.push(rt)}const We=m(Ye);if(We)for(let rt=We.length-1;rt>=0;--rt)Oe.push(We[rt])}},tr=function(X){Po(X,xe=>{P(xe)===gr.element&&Jo(xe)})},zo=function(X){const xe=[];return Po(X,Ie=>{xe.push(Ie)},!0),xe},Qo=function(X,xe){const Ie=sp();ds(zo(X),Oe=>{P(Oe)===gr.element&&ap(Ie,Oe)}),ds(xe,Oe=>{P(Oe)===gr.element&&!fc(Ie,Oe)&&Jo(Oe)})},Ji=function(X,xe){let Ie=!1;return ds(n.removed,Oe=>{Oe.element&&(Ie=Ie||Oe.element===X,tr(Oe.element))}),Qo(X,xe),Ie},xs=8,Zo=function(X,xe){const Ie=Fr;let Oe=null;const Ye=()=>(Oe||(Oe=sp(),ds(xe,We=>{ap(Oe,We)})),Oe);for(let We=0;;We++){const rt=zo(X),rn=[X];let yn=!1;if(ds(rt,Ve=>{P(Ve)===gr.documentFragment?dc(rn,Ve):!yn&&!fc(Ie,Ve)&&(yn=fc(Ye(),Ve))}),!yn)return;if(We>=xs)throw fs("the tree kept changing during in-place sanitization; refusing to return it");ds(rn,(Ve,jt)=>{Bo(Ve,jt>0,X,Ye())})}},Bo=function(X,xe,Ie,Oe){const Ye=Ni(X);let We;for(;We=Ye.nextNode();)!fc(Oe,We)||fc(Fr,We)||(xe&&Dr(oe.uponSanitizeShadowNode,We,null),ns(We,Ie),gi(We,Ie),Yn(We.content)&&Sn(We.content))},Cs=function(X){Fr&&ap(Fr,X)},Xo=function(X,xe){return Nn?X==="patchsrc"?!0:X==="for"&&xe!=="label"&&xe!=="output":!1},es=function(X){Nn&&Po(X,xe=>{const Ie=P(xe);if(Ie===gr.processingInstruction||Ie===gr.comment&&Br(ax,xe.data)){try{d(xe)}catch{}return!1}if(Ie===gr.element){const Oe=xe,Ye=Pt(O(xe));try{Oe.hasAttribute&&Oe.hasAttribute("patchsrc")&&Oe.removeAttribute("patchsrc"),Oe.hasAttribute&&Oe.hasAttribute("for")&&Xo("for",Ye)&&Oe.removeAttribute("for")}catch{}}return!0})},ks=function(X){let xe=null,Ie=null;if(hn)X="<remove></remove>"+X;else{const We=Qw(X,/^[\r\n\t ]+/);Ie=We&&We[0]}Dt==="application/xhtml+xml"&&Fn===gn&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const Oe=B?j(X):X;if(Fn===gn)try{xe=new f().parseFromString(Oe,Dt)}catch{}if(!xe||!xe.documentElement){xe=re.createDocument(Fn,"template",null);try{xe.documentElement.innerHTML=Ii?N:Oe}catch{}}const Ye=xe.body||xe.documentElement;return X&&Ie&&Ye.insertBefore(t.createTextNode(Ie),Ye.childNodes[0]||null),Fn===gn?ue.call(xe,Un?"html":"body")[0]:Un?xe.documentElement:Ye},Ni=function(X){const xe=C?C(X):X.ownerDocument;return le.call(xe||X,X,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Qi=function(X){return X=pc(X,ee," "),X=pc(X,ye," "),X=pc(X,we," "),X},pi=function(X){var xe;rr(X);const Ie=(xe=X.querySelectorAll)===null||xe===void 0?void 0:xe.call(X,"template");Ie&&ds(Ie,Oe=>{Yn(Oe.content)&&pi(Oe.content)})},rr=function(X){X.normalize();const xe=C?C(X):X.ownerDocument,Ie=le.call(xe||X,X,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let Oe=Ie.nextNode();for(;Oe;)Oe.data=Qi(Oe.data),Oe=Ie.nextNode()},yo=function(X){const xe=_?_(X):null;return typeof xe!="string"||Pt(xe)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==R(X)||typeof X.removeAttribute!="function"||typeof X.removeAttributeNode!="function"||typeof X.getAttributeNode!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==T(X)||X.childNodes!==m(X)},Yn=function(X){if(!T||typeof X!="object"||X===null)return!1;try{return T(X)===gr.documentFragment}catch{return!1}},bo=function(X){if(!T||typeof X!="object"||X===null)return!1;try{return typeof T(X)=="number"}catch{return!1}};function Dr(X,xe,Ie){X.length!==0&&ds(X,Oe=>{Oe.call(n,xe,Ie,dn)})}const ts=function(X,xe){return!!(Nn&&X.hasChildNodes()&&!bo(X.firstElementChild)&&Br(fp,X.textContent)&&Br(fp,X.innerHTML)||Nn&&BO[xe]&&P(X)===gr.element&&k(X)===gn&&(bo(X.firstElementChild)||typeof X.textContent=="string"&&Br(fp,X.textContent))||X.nodeType===gr.processingInstruction||Nn&&X.nodeType===gr.comment&&Br(ax,X.data))},ni=function(X,xe){if(X instanceof RegExp)return Br(X,xe);if(X instanceof Function){for(var Ie=arguments.length,Oe=new Array(Ie>2?Ie-2:0),Ye=2;Ye<Ie;Ye++)Oe[Ye-2]=arguments[Ye];return!!X(xe,...Oe)}return!1},Fo=function(X,xe,Ie){if(!Vt[xe]&&rs(xe)&&ni(St.tagNameCheck,xe))return!1;if(mr&&!ar[xe]&&!ar[Ca(xe)]){const Oe=w(X),Ye=m(X);if(Ye&&Oe){const We=Ye.length;for(let rt=We-1;rt>=0;--rt){const rn=X===Ie?u(Ye[rt],!0):Ye[rt];Oe.insertBefore(rn,p(X))}}}return ti(X),!0},jo=function(X,xe,Ie,Oe){return X.length===0?xe:xe===Ie||xe===Oe?Gi(xe):xe},jr=function(X,xe){return X===xe||w(X)!==null?!1:(Ki&&tr(X),!0)},ns=function(X,xe){if(Cs(X),Dr(oe.beforeSanitizeElements,X,null),jr(X,xe))return!0;if(yo(X))return ti(X),!0;const Ie=Pt(O(X));if(ct=jo(oe.uponSanitizeElement,ct,Ft,Vn),Dr(oe.uponSanitizeElement,X,{tagName:Ie,allowedTags:ct}),jr(X,xe))return!0;if(ts(X,Ie))return ti(X),!0;if(Vt[Ie]||!(An.tagCheck instanceof Function&&An.tagCheck(Ie))&&!ct[Ie]){const Oe=Fo(X,Ie,xe);return Oe===!1&&(Dr(oe.afterSanitizeElements,X,null),jr(X,xe))?!0:Oe}if(P(X)===gr.element&&!Do(X)||(Ie==="noscript"||Ie==="noembed"||Ie==="noframes")&&Br(zO,X.innerHTML))return ti(X),!0;if($n&&X.nodeType===gr.text){const Oe=Qi(X.textContent);X.textContent!==Oe&&(dc(n.removed,{element:X.cloneNode()}),X.textContent=Oe)}return Dr(oe.afterSanitizeElements,X,null),jr(X,xe)},Zi=function(X,xe,Ie){if(un[xe]||Xo(xe,X)||ei&&(xe==="id"||xe==="name")&&(Ie in t||Ie in qn))return!1;const Oe=Me[xe]||An.attributeCheck instanceof Function&&An.attributeCheck(xe,X);return it&&Br(Ae,xe)||ft&&Br(Je,xe)?!0:Oe?Mi[xe]||Br(at,pc(Ie,qe,""))||(xe==="src"||xe==="xlink:href"||xe==="href")&&X!=="script"&&Zw(Ie,"data:")===0&&gs[X]||Gt&&!Br(ze,pc(Ie,qe,""))?!0:!Ie:rs(X)&&ni(St.tagNameCheck,X)&&ni(St.attributeNameCheck,xe,X)||xe==="is"&&St.allowCustomizedBuiltInElements&&ni(St.tagNameCheck,Ie)},Ue=cn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rs=function(X){return!Ue[Ca(X)]&&Br(Ze,X)},Fe=function(X,xe,Ie,Oe){if(B&&typeof a=="object"&&typeof a.getAttributeType=="function"&&!Ie)switch(a.getAttributeType(X,xe)){case"TrustedHTML":return j(Oe);case"TrustedScriptURL":return U(Oe)}return Oe},jn=function(X,xe,Ie,Oe){try{return Ie?X.setAttributeNS(Ie,xe,Oe):X.setAttribute(xe,Oe),yo(X)?(ti(X),!1):!0}catch{return Oi(xe,X),!1}},wo=function(X,xe){return Nn&&Br(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xe)?!0:Ca(X)==="attributename"&&Qw(xe,"href")!==null},gi=function(X,xe){if(Dr(oe.beforeSanitizeAttributes,X,null),jr(X,xe))return;const Ie=X.attributes;if(!Ie||yo(X))return;Me=jo(oe.uponSanitizeAttribute,Me,xt,Xn);const Oe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Me,forceKeepAttr:void 0};let Ye=Ie.length;const We=Pt(X.nodeName);for(;Ye--;){const rt=Ie[Ye],rn=rt.name,yn=rt.namespaceURI,Ve=rt.value,jt=Pt(rn),wt=Ve;let an=rn==="value"?wt:wO(wt),mi=!1;if(Oe.attrName=jt,Oe.attrValue=an,Oe.keepAttr=!0,Oe.forceKeepAttr=void 0,Dr(oe.uponSanitizeAttribute,X,Oe),an=Oe.attrValue,Ei&&(jt==="id"||jt==="name")&&Zw(an,ho)!==0&&(Oi(rn,X,rt),an=ho+an,mi=!0),wo(rn,an)){Oi(rn,X,rt);continue}if(!Oe.forceKeepAttr){if(!Oe.keepAttr){Oi(rn,X,rt);continue}if(!Bn&&Br(lx,an)){Oi(rn,X,rt);continue}if($n&&(an=Qi(an)),!Zi(We,jt,an)){Oi(rn,X,rt);continue}an=Fe(We,jt,yn,an),an!==wt&&jn(X,rn,yn,an)&&mi&&Jw(n.removed)}}Dr(oe.afterSanitizeAttributes,X,null),jr(X,xe)},Sn=function(X){let xe=null;const Ie=Ni(X);for(Dr(oe.beforeSanitizeShadowDOM,X,null);xe=Ie.nextNode();)if(Dr(oe.uponSanitizeShadowNode,xe,null),ns(xe,X),gi(xe,X),Yn(xe.content)&&Sn(xe.content),P(xe)===gr.element){const Oe=x(xe);Yn(Oe)&&(is(Oe),Sn(Oe))}$n&&rr(X),Dr(oe.afterSanitizeShadowDOM,X,null)},is=function(X){const xe=[{node:X,shadow:null}];for(;xe.length>0;){const Ie=xe.pop();if(Ie.shadow){Sn(Ie.shadow);continue}const Oe=Ie.node,Ye=P(Oe)===gr.element,We=m(Oe);if(We)for(let rt=We.length-1;rt>=0;--rt)xe.push({node:We[rt],shadow:null});if(Ye){const rt=_?_(Oe):null;if(typeof rt=="string"&&Pt(rt)==="template"){const rn=Oe.content;Yn(rn)&&xe.push({node:rn,shadow:null})}}if(Ye){const rt=x(Oe);Yn(rt)&&xe.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return n.sanitize=function(X){let xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ie=null,Oe=null,Ye=null,We=null;if(Ii=!X,Ii&&(X="<!-->"),typeof X!="string"&&!bo(X)&&(X=_O(X),typeof X!="string"))throw fs("dirty is not a string, aborting");if(!n.isSupported)return X;Rn?(ct=Vn,Me=Xn):er(xe),(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&(ct=Gi(ct)),oe.uponSanitizeAttribute.length>0&&(Me=Gi(Me)),n.removed=[];const rt=Ki&&typeof X!="string"&&bo(X);let rn=[];const yn=Fr;if(rt){es(X);const wt=O(X);if(typeof wt=="string"){const an=Pt(wt);if(!ct[an]||Vt[an])throw vo(X),fs("root node is forbidden and cannot be sanitized in-place")}if(yo(X))throw vo(X),fs("root node is clobbered and cannot be sanitized in-place");rn=zo(X),Fr=sp()}else if(bo(X))Ie=ks("<!---->"),Oe=Ie.ownerDocument.importNode(X,!0),Oe.nodeType===gr.element&&Oe.nodeName==="BODY"||Oe.nodeName==="HTML"?Ie=Oe:Ie.appendChild(Oe),is(Ie);else{if(!Dn&&!$n&&!Un&&X.indexOf("<")===-1)return B&&Xr?j(X):X;if(Ie=ks(X),!Ie)return Dn?null:Xr?N:""}Ie&&hn&&ti(Ie.firstChild);const Ve=rt?X:Ie;try{rt&&is(X);const wt=Ni(Ve);for(;Ye=wt.nextNode();)ns(Ye,Ve),gi(Ye,Ve),Yn(Ye.content)&&Sn(Ye.content);rt&&Zo(X,rn)}catch(wt){throw rt&&(vo(X),Ji(X,rn)),wt}finally{Fr=yn}if(rt){if(Ji(X,rn))throw fs("a node selected for removal could not be safely returned; refusing to sanitize in place");return $n&&pi(X),X}if(Dn){if($n&&pi(Ie),Ti)for(We=ne.call(Ie.ownerDocument);Ie.firstChild;)We.appendChild(Ie.firstChild);else We=Ie;return(Me.shadowroot||Me.shadowrootmode)&&(We=he.call(r,We,!0)),We}let jt=Un?Ie.outerHTML:Ie.innerHTML;return Un&&ct["!doctype"]&&Ie.ownerDocument&&Ie.ownerDocument.doctype&&Ie.ownerDocument.doctype.name&&Br(DO,Ie.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+Ie.ownerDocument.doctype.name+`>
1490
+ `+jt),$n&&(jt=Qi(jt)),B&&Xr?j(jt):jt},n.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};er(X),Rn=!0,Vn=ct,Xn=Me},n.clearConfig=function(){dn=null,Rn=!1,Vn=null,Xn=null,B=I,N=""},n.isValidAttribute=function(X,xe,Ie){dn||er({});const Oe=Pt(X),Ye=Pt(xe);return typeof Ie=="string"&&(wo(xe,Ie)||!Bn&&Br(lx,Ie))?!1:Zi(Oe,Ye,Ie)},n.addHook=function(X,xe){typeof xe=="function"&&_i(oe,X)&&dc(oe[X],xe)},n.removeHook=function(X,xe){if(_i(oe,X)){if(xe!==void 0){const Ie=vO(oe[X],xe);return Ie===-1?void 0:bO(oe[X],Ie,1)[0]}return Jw(oe[X])}},n.removeHooks=function(X){_i(oe,X)&&(oe[X]=[])},n.removeAllHooks=function(){oe=cx()},n}var hx=ux();const WO={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"}},HO={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:e=>!!e||"Required.",match:e=>e===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 hx.sanitize(this.params.text)}},methods:{dialog:function(e,n,t){this.params=e,this.show=!0,this.resolve=n,this.reject=t},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=""}}},UO=["innerHTML"],VO={key:2},GO={key:3,class:"validate mt-4"};function qO(e,n,t,r,c,h){const g=wr("v-spacer"),v=wr("v-toolbar"),s=wr("v-icon"),f=wr("v-text-field"),a=wr("v-card-text"),l=wr("v-btn"),u=wr("v-card-actions"),d=wr("v-card"),o=wr("v-dialog"),p=wr("v-app");return _t(),hr(p,null,{default:En(()=>[Ke(o,{modelValue:e.show,"onUpdate:modelValue":n[1]||(n[1]=m=>e.show=m),persistent:"",width:"600",onKeydown:Xg(h.cancel,["esc"])},{default:En(()=>[Ke(d,null,{default:En(()=>[Ke(v,{height:"24"},{default:En(()=>[Ke(g),yt("span",null,Gr(e.params.title),1),Ke(g)]),_:1}),Ke(a,{class:"mt-4 pa-3"},{default:En(()=>[e.params.validateText?(_t(),hr(s,{key:0,class:"mr-2"},{default:En(()=>[...n[2]||(n[2]=[Eo(" mdi-alert ",-1)])]),_:1})):qr("",!0),e.params.html?(_t(),Xt("span",{key:1,innerHTML:h.sanitizedText},null,8,UO)):(_t(),Xt("span",VO,Gr(h.sanitizedText),1)),e.params.validateText?(_t(),Xt("div",GO,[Eo(" Enter "+Gr(e.params.validateText)+" to confirm! ",1),Ke(f,{modelValue:e.validationText,"onUpdate:modelValue":n[0]||(n[0]=m=>e.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[e.rules.required,e.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):qr("",!0)]),_:1}),Ke(u,{class:"px-2"},{default:En(()=>[Ke(g),e.params.cancelText?(_t(),hr(l,{key:0,variant:"outlined","data-test":h.dataTestCancel,onClick:h.cancel},{default:En(()=>[Eo(Gr(e.params.cancelText),1)]),_:1},8,["data-test","onClick"])):qr("",!0),Ke(l,{variant:"flat",color:e.params.okClass,"data-test":h.dataTestOk,onClick:h.ok},{default:En(()=>[Eo(Gr(e.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const YO=ja(HO,[["render",qO],["__scopeId","data-v-53691296"]]);class KO{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(YO);n.use(Up);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({title:n,text:t,okText:r,okClass:c,validateText:h,cancelText:g,html:v}){return this.mount(),new Promise((s,f)=>{this.$root.dialog({title:n,text:t,okText:r,okClass:c,validateText:h,cancelText:g,html:v},s,f)})}confirm(n,{okText:t="Ok",cancelText:r="Cancel",okClass:c="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:c,validateText:null,cancelText:r,html:!1})}alert(n,{okText:t="Ok",html:r=!1,okClass:c="primary"}){return this.open({title:"Alert",text:n,okText:t,okClass:c,validateText:null,cancelText:null,html:r})}validate(n,{okText:t="Ok",validateText:r="CONFIRM",cancelText:c="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:h,validateText:r,cancelText:c,html:!1})}}const JO={install(e,n){const t=new KO;e.provide("dialog",t),e.config.globalProperties.hasOwnProperty("$dialog")||(e.config.globalProperties.$dialog=t)}};let gp=1;var QO=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)});publish=e=>{this.subscribers.forEach(n=>n(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:n,...t}=e,r=typeof e.id=="number"||e.id&&e.id?.length>0?e.id:gp++,c=this.toasts.find(g=>g.id===r),h=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),c?this.toasts=this.toasts.map(g=>g.id===r?(this.publish({...g,...e,id:r,title:n}),{...g,...e,id:r,dismissible:h,title:n}):g):this.addToast({title:n,...t,dismissible:h,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(t=>t({id:n.id,dismiss:!0}))}),e);message=(e,n)=>this.create({...n,message:e,type:"default"});error=(e,n)=>this.create({...n,type:"error",message:e});success=(e,n)=>this.create({...n,type:"success",message:e});info=(e,n)=>this.create({...n,type:"info",message:e});warning=(e,n)=>this.create({...n,type:"warning",message:e});loading=(e,n)=>this.create({...n,type:"loading",message:e});promise=(e,n)=>{if(!n)return;let t;n.loading!==void 0&&(t=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let c=t!==void 0,h;const g=r.then(async s=>{if(h=["resolve",s],Pa(s))c=!1,this.create({id:t,type:"default",message:s});else if(XO(s)&&!s.ok){c=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${s.status}`):n.error,a=typeof n.description=="function"?await n.description(`HTTP error! status: ${s.status}`):n.description,l=typeof f=="object"&&!Pa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}else if(s instanceof Error){c=!1;const f=typeof n.error=="function"?await n.error(s):n.error,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof f=="object"&&!Pa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}else if(n.success!==void 0){c=!1;const f=typeof n.success=="function"?await n.success(s):n.success,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof f=="object"&&!Pa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"success",description:a,...l})}}).catch(async s=>{if(h=["reject",s],n.error!==void 0){c=!1;const f=typeof n.error=="function"?await n.error(s):n.error,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof f=="object"&&!Pa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}}).finally(()=>{c&&(this.dismiss(t),t=void 0),n.finally?.()}),v=()=>new Promise((s,f)=>g.then(()=>h[0]==="reject"?f(h[1]):s(h[1])).catch(f));return typeof t!="string"&&typeof t!="number"?{unwrap:v}:Object.assign(t,{unwrap:v})};custom=(e,n)=>{const t=n?.id||gp++,r=this.toasts.find(h=>h.id===t),c=n?.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(t)&&this.dismissedToasts.delete(t),r?this.toasts=this.toasts.map(h=>h.id===t?(this.publish({...h,component:e,dismissible:c,id:t,...n}),{...h,component:e,dismissible:c,id:t,...n}):h):this.addToast({component:e,dismissible:c,id:t,...n}),t};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const Ai=new QO;function ZO(e,n){const t=n?.id||gp++;return Ai.create({message:e,id:t,type:"default",...n}),t}const XO=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",e2=ZO,t2=()=>Ai.toasts,n2=()=>Ai.getActiveToasts(),mp=Object.assign(e2,{success:Ai.success,info:Ai.info,warning:Ai.warning,error:Ai.error,custom:Ai.custom,message:Ai.message,promise:Ai.promise,dismiss:Ai.dismiss,loading:Ai.loading},{getHistory:t2,getToasts:n2});function zu(e){return e.label!==void 0}const r2=3,dx="24px",fx="16px",px=4e3,i2=356,o2=14,s2=45,gx=200;function a2(){const e=nn(!1);return ai(()=>{const n=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)}),{isDocumentHidden:e}}function js(...e){return e.filter(Boolean).join(" ")}function l2(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}function c2(e,n){const t={};return[e,n].forEach((r,c)=>{const h=c===1,g=h?"--mobile-offset":"--offset",v=h?fx:dx;function s(f){["top","right","bottom","left"].forEach(a=>{t[`${g}-${a}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?s(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?t[`${g}-${f}`]=v:t[`${g}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):s(v)}),t}const u2=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],h2=["aria-label","data-disabled","data-close-button-position"];var d2=Ls({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:n}){const t=e,r=n,c=nn(null),h=nn(null),g=nn(!1),v=nn(!1),s=nn(!1),f=nn(!1),a=nn(!1),l=nn(0),u=nn(0),d=nn(t.toast.duration||t.duration||px),o=nn(null),p=nn(null),m=gt(()=>t.index===0),w=gt(()=>t.index+1<=t.visibleToasts),x=gt(()=>t.toast.type),R=gt(()=>t.toast.dismissible!==!1),T=gt(()=>t.toast.class||""),_=gt(()=>t.descriptionClass||""),C=gt(()=>{const ee=t.toast.position||t.position,ye=t.heights.filter(we=>we.position===ee).findIndex(we=>we.toastId===t.toast.id);return ye>=0?ye:0}),P=gt(()=>{const ee=t.toast.position||t.position;return t.heights.filter(ye=>ye.position===ee).reduce((ye,we,Ae)=>Ae>=C.value?ye:ye+we.height,0)}),O=gt(()=>C.value*t.gap+P.value||0),E=gt(()=>t.toast.closeButton??t.closeButton),k=gt(()=>t.toast.duration||t.duration||px),B=nn(0),N=nn(0),I=nn(null),$=gt(()=>t.position.split("-")),A=gt(()=>$.value[0]),D=gt(()=>$.value[1]),j=gt(()=>typeof t.toast.title!="string"),U=gt(()=>typeof t.toast.description!="string"),{isDocumentHidden:q}=a2(),Q=gt(()=>x.value&&x.value==="loading");Ba(()=>{g.value=!0,d.value=k.value}),ai(async()=>{if(!g.value||!p.value)return;await Tl();const ee=p.value,ye=ee.style.height;ee.style.height="auto";const we=ee.getBoundingClientRect().height;ee.style.height=ye,u.value=we,r("update:height",{toastId:t.toast.id,height:we,position:t.toast.position||t.position})});function re(){v.value=!0,l.value=O.value,setTimeout(()=>{r("removeToast",t.toast)},gx)}function le(){if(Q.value||!R.value)return{};re(),t.toast.onDismiss?.(t.toast)}function ne(ee){ee.button!==2&&(Q.value||!R.value||(o.value=new Date,l.value=O.value,ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(s.value=!0,I.value={x:ee.clientX,y:ee.clientY})))}function ue(){if(f.value||!R.value)return;I.value=null;const ee=Number(p.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),ye=Number(p.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),we=new Date().getTime()-(o.value?.getTime()||0),Ae=c.value==="x"?ee:ye,Je=Math.abs(Ae)/we;if(Math.abs(Ae)>=s2||Je>.11){l.value=O.value,t.toast.onDismiss?.(t.toast),c.value==="x"?h.value=ee>0?"right":"left":h.value=ye>0?"down":"up",re(),f.value=!0;return}else p.value?.style.setProperty("--swipe-amount-x","0px"),p.value?.style.setProperty("--swipe-amount-y","0px");a.value=!1,s.value=!1,c.value=null}function he(ee){if(!I.value||!R.value||(window?.getSelection()?.toString()?.length??!1))return;const ye=ee.clientY-I.value.y,we=ee.clientX-I.value.x,Ae=t.swipeDirections??l2(t.position);!c.value&&(Math.abs(we)>1||Math.abs(ye)>1)&&(c.value=Math.abs(we)>Math.abs(ye)?"x":"y");let Je={x:0,y:0};const ze=qe=>1/(1.5+Math.abs(qe)/20);if(c.value==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ye<0||Ae.includes("bottom")&&ye>0)Je.y=ye;else{const qe=ye*ze(ye);Je.y=Math.abs(qe)<Math.abs(ye)?qe:ye}}else if(c.value==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&we<0||Ae.includes("right")&&we>0)Je.x=we;else{const qe=we*ze(we);Je.x=Math.abs(qe)<Math.abs(we)?qe:we}(Math.abs(Je.x)>0||Math.abs(Je.y)>0)&&(a.value=!0),p.value?.style.setProperty("--swipe-amount-x",`${Je.x}px`),p.value?.style.setProperty("--swipe-amount-y",`${Je.y}px`)}Ba(()=>{if(g.value=!0,!p.value)return;const ee=p.value.getBoundingClientRect().height;u.value=ee;const ye=[{toastId:t.toast.id,height:ee,position:t.toast.position},...t.heights];r("update:heights",ye)}),Qs(()=>{p.value&&r("removeToast",t.toast)}),ai(ee=>{if(t.toast.promise&&x.value==="loading"||t.toast.duration===1/0||t.toast.type==="loading")return;let ye;const we=()=>{if(N.value<B.value){const Je=new Date().getTime()-B.value;d.value=d.value-Je}N.value=new Date().getTime()},Ae=()=>{d.value!==1/0&&(B.value=new Date().getTime(),ye=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),re()},d.value))};t.expanded||t.interacting||q.value?we():Ae(),ee(()=>{clearTimeout(ye)})}),wi(()=>t.toast.delete,ee=>{ee!==void 0&&ee&&(re(),t.toast.onDismiss?.(t.toast))},{deep:!0});function oe(){s.value=!1,c.value=null,I.value=null}return(ee,ye)=>(_t(),Xt("li",{tabindex:"0",ref_key:"toastRef",ref:p,class:sn(Ht(js)(t.class,T.value,ee.classes?.toast,ee.toast.classes?.toast,ee.classes?.[x.value],ee.toast?.classes?.[x.value])),"data-sonner-toast":"","data-rich-colors":ee.toast.richColors??ee.defaultRichColors,"data-styled":!(ee.toast.component||ee.toast?.unstyled||ee.unstyled),"data-mounted":g.value,"data-promise":!!ee.toast.promise,"data-swiped":a.value,"data-removed":v.value,"data-visible":w.value,"data-y-position":A.value,"data-x-position":D.value,"data-index":ee.index,"data-front":m.value,"data-swiping":s.value,"data-dismissible":R.value,"data-type":x.value,"data-invert":ee.toast.invert||ee.invert,"data-swipe-out":f.value,"data-swipe-direction":h.value,"data-expanded":!!(ee.expanded||ee.expandByDefault&&g.value),"data-testid":ee.toast.testId,style:Zn({"--index":ee.index,"--toasts-before":ee.index,"--z-index":ee.toasts.length-ee.index,"--offset":`${v.value?l.value:O.value}px`,"--initial-height":ee.expandByDefault?"auto":`${u.value}px`,...ee.style,...t.toast.style}),onDragend:oe,onPointerdown:ne,onPointerup:ue,onPointermove:he},[E.value&&!ee.toast.component&&x.value!=="loading"?(_t(),Xt("button",{key:0,"aria-label":ee.closeButtonAriaLabel||"Close toast","data-disabled":Q.value,"data-close-button":"true","data-close-button-position":ee.closeButtonPosition,class:sn(Ht(js)(ee.classes?.closeButton,ee.toast?.classes?.closeButton)),onClick:le},[ee.icons?.close?(_t(),hr(Xs(ee.icons?.close),{key:0})):xi(ee.$slots,"close-icon",{key:1})],10,h2)):qr("v-if",!0),ee.toast.component?(_t(),hr(Xs(ee.toast.component),dr({key:1},ee.toast.componentProps,{onCloseToast:le,isPaused:ee.$props.expanded||ee.$props.interacting||Ht(q)}),null,16,["isPaused"])):(_t(),Xt(Er,{key:2},[x.value!=="default"||ee.toast.icon||ee.toast.promise?(_t(),Xt("div",{key:0,"data-icon":"",class:sn(Ht(js)(ee.classes?.icon,ee.toast?.classes?.icon))},[ee.toast.icon?(_t(),hr(Xs(ee.toast.icon),{key:0})):(_t(),Xt(Er,{key:1},[x.value==="loading"?xi(ee.$slots,"loading-icon",{key:0}):x.value==="success"?xi(ee.$slots,"success-icon",{key:1}):x.value==="error"?xi(ee.$slots,"error-icon",{key:2}):x.value==="warning"?xi(ee.$slots,"warning-icon",{key:3}):x.value==="info"?xi(ee.$slots,"info-icon",{key:4}):qr("v-if",!0)],64))],2)):qr("v-if",!0),yt("div",{"data-content":"",class:sn(Ht(js)(ee.classes?.content,ee.toast?.classes?.content))},[yt("div",{"data-title":"",class:sn(Ht(js)(ee.classes?.title,ee.toast.classes?.title))},[j.value?(_t(),hr(Xs(ee.toast.title),Fc(dr({key:0},ee.toast.componentProps)),null,16)):(_t(),Xt(Er,{key:1},[Eo(Gr(ee.toast.title),1)],64))],2),ee.toast.description?(_t(),Xt("div",{key:0,"data-description":"",class:sn(Ht(js)(ee.descriptionClass,_.value,ee.classes?.description,ee.toast.classes?.description))},[U.value?(_t(),hr(Xs(ee.toast.description),Fc(dr({key:0},ee.toast.componentProps)),null,16)):(_t(),Xt(Er,{key:1},[Eo(Gr(ee.toast.description),1)],64))],2)):qr("v-if",!0)],2),ee.toast.cancel?(_t(),Xt("button",{key:1,style:Zn(ee.toast.cancelButtonStyle||ee.cancelButtonStyle),class:sn(Ht(js)(ee.classes?.cancelButton,ee.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:ye[0]||(ye[0]=we=>{Ht(zu)(ee.toast.cancel)&&R.value&&(ee.toast.cancel.onClick?.(we),re())})},Gr(Ht(zu)(ee.toast.cancel)?ee.toast.cancel?.label:ee.toast.cancel),7)):qr("v-if",!0),ee.toast.action?(_t(),Xt("button",{key:2,style:Zn(ee.toast.actionButtonStyle||ee.actionButtonStyle),class:sn(Ht(js)(ee.classes?.actionButton,ee.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:ye[1]||(ye[1]=we=>{Ht(zu)(ee.toast.action)&&(ee.toast.action.onClick?.(we),!we.defaultPrevented&&re())})},Gr(Ht(zu)(ee.toast.action)?ee.toast.action?.label:ee.toast.action),7)):qr("v-if",!0)],64))],46,u2))}}),f2=d2,mc=(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t};const p2={},g2={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function m2(e,n){return _t(),Xt("svg",g2,n[0]||(n[0]=[yt("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),yt("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var v2=mc(p2,[["render",m2]]);const y2=["data-visible"],b2={class:"sonner-spinner"};var w2=Ls({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const n=Array(12).fill(0);return(t,r)=>(_t(),Xt("div",{class:"sonner-loading-wrapper","data-visible":t.visible},[yt("div",b2,[(_t(!0),Xt(Er,null,Il(Ht(n),c=>(_t(),Xt("div",{key:`spinner-bar-${c}`,class:"sonner-loading-bar"}))),128))])],8,y2))}}),x2=w2;const C2={},k2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function _2(e,n){return _t(),Xt("svg",k2,n[0]||(n[0]=[yt("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var A2=mc(C2,[["render",_2]]);const $2={},S2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function T2(e,n){return _t(),Xt("svg",S2,n[0]||(n[0]=[yt("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var E2=mc($2,[["render",T2]]);const M2={},I2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function R2(e,n){return _t(),Xt("svg",I2,n[0]||(n[0]=[yt("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var L2=mc(M2,[["render",R2]]);const O2={},N2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function D2(e,n){return _t(),Xt("svg",N2,n[0]||(n[0]=[yt("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var P2=mc(O2,[["render",D2]]);const z2=["aria-label"],B2=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],F2=typeof window<"u"&&typeof document<"u";function j2(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var W2=Ls({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:o2},visibleToasts:{default:r2},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:dx},mobileOffset:{default:fx},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const n=e,t=em(),r=nn([]),c=gt(()=>n.id?r.value.filter(k=>k.toasterId===n.id):r.value.filter(k=>!k.toasterId));function h(k,B){return c.value.filter(N=>!N.position&&B===0||N.position===k)}const g=gt(()=>{const k=c.value.filter(B=>B.position).map(B=>B.position);return k.length>0?Array.from(new Set([n.position].concat(k))):[n.position]}),v=gt(()=>{const k={};return g.value.forEach(B=>{k[B]=r.value.filter(N=>N.position===B)}),k}),s=nn([]),f=nn({}),a=nn(!1);ai(()=>{g.value.forEach(k=>{k in f.value||(f.value[k]=!1)})});const l=nn(n.theme!=="system"?n.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),u=nn(null),d=nn(null),o=nn(!1),p=n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function m(k){r.value.find(B=>B.id===k.id)?.delete||Ai.dismiss(k.id),r.value=r.value.filter(({id:B})=>B!==k.id),setTimeout(()=>{r.value.find(B=>B.id===k.id)||(s.value=s.value.filter(B=>B.toastId!==k.id))},gx+50)}function w(k){o.value&&!k.currentTarget?.contains?.(k.relatedTarget)&&(o.value=!1,d.value&&(d.value.focus({preventScroll:!0}),d.value=null))}function x(k){k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||o.value||(o.value=!0,d.value=k.relatedTarget)}function R(k){k.target&&k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||(a.value=!0)}ai(k=>{const B=Ai.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(I=>I.id===N.id?{...I,delete:!0}:I)});return}Tl(()=>{const I=r.value.findIndex($=>$.id===N.id);I!==-1?r.value=[...r.value.slice(0,I),{...r.value[I],...N},...r.value.slice(I+1)]:r.value=[N,...r.value]})});k(B)}),ai(k=>{if(typeof window>"u")return;if(n.theme!=="system"){l.value=n.theme;return}const B=window.matchMedia("(prefers-color-scheme: dark)"),N=$=>{l.value=$?"dark":"light"};N(B.matches);const I=$=>{N($.matches)};try{B.addEventListener("change",I)}catch{B.addListener(I)}k(()=>{try{B.removeEventListener("change",I)}catch{B.removeListener(I)}})}),ai(()=>{u.value&&d.value&&(d.value.focus({preventScroll:!0}),d.value=null,o.value=!1)}),ai(()=>{r.value.length<=1&&Object.keys(f.value).forEach(k=>{f.value[k]=!1})}),ai(k=>{function B(N){const I=n.hotkey.every(D=>N[D]||N.code===D),$=Array.isArray(u.value)?u.value[0]:u.value;I&&(g.value.forEach(D=>{f.value[D]=!0}),$?.focus());const A=document.activeElement===u.value||$?.contains(document.activeElement);N.code==="Escape"&&A&&g.value.forEach(D=>{f.value[D]=!1})}F2&&(document.addEventListener("keydown",B),k(()=>{document.removeEventListener("keydown",B)}))});function T(k){const B=k.currentTarget,N=B.getAttribute("data-y-position")+"-"+B.getAttribute("data-x-position");f.value[N]=!0}function _(k){if(!a.value){const B=k.currentTarget,N=B.getAttribute("data-y-position")+"-"+B.getAttribute("data-x-position");f.value[N]=!1}}function C(){Object.keys(f.value).forEach(k=>{f.value[k]=!1})}function P(){a.value=!1}function O(k){s.value=k}function E(k){const B=s.value.findIndex(N=>N.toastId===k.toastId);if(B!==-1)s.value[B]=k;else{const N=s.value.findIndex(I=>I.position===k.position);N!==-1?s.value.splice(N,0,k):s.value.unshift(k)}}return(k,B)=>(_t(),Xt(Er,null,[qr(" Remove item from normal navigation flow, only available via hotkey "),yt("section",{"aria-label":`${k.containerAriaLabel} ${Ht(p)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(_t(!0),Xt(Er,null,Il(g.value,(N,I)=>(_t(),Xt("ol",dr({key:N,ref_for:!0,ref_key:"listRef",ref:u,"data-sonner-toaster":"","data-sonner-theme":l.value,class:n.class,dir:k.dir==="auto"?j2():k.dir,tabIndex:-1,"data-theme":k.theme,"data-rich-colors":k.richColors,"data-y-position":N.split("-")[0],"data-x-position":N.split("-")[1],style:{"--front-toast-height":`${s.value[0]?.height||0}px`,"--width":`${Ht(i2)}px`,"--gap":`${k.gap}px`,...k.style,...Ht(t).style,...Ht(c2)(k.offset,k.mobileOffset)}},{ref_for:!0},k.$attrs,{onBlur:w,onFocus:x,onMouseenter:T,onMousemove:T,onMouseleave:_,onDragend:C,onPointerdown:R,onPointerup:P}),[(_t(!0),Xt(Er,null,Il(h(N,I),($,A)=>(_t(),hr(f2,{key:$.id,heights:s.value,icons:k.icons,index:A,toast:$,defaultRichColors:k.richColors,duration:k.toastOptions?.duration??k.duration,class:sn(k.toastOptions?.class??""),descriptionClass:k.toastOptions?.descriptionClass,invert:k.invert,visibleToasts:k.visibleToasts,closeButton:k.toastOptions?.closeButton??k.closeButton,interacting:a.value,position:N,closeButtonPosition:k.toastOptions?.closeButtonPosition??k.closeButtonPosition,style:Zn(k.toastOptions?.style),unstyled:k.toastOptions?.unstyled,classes:k.toastOptions?.classes,cancelButtonStyle:k.toastOptions?.cancelButtonStyle,actionButtonStyle:k.toastOptions?.actionButtonStyle,"close-button-aria-label":k.toastOptions?.closeButtonAriaLabel,toasts:v.value[N],expandByDefault:k.expand,gap:k.gap,expanded:f.value[N]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":O,"onUpdate:height":E,onRemoveToast:m},{"close-icon":En(()=>[xi(k.$slots,"close-icon",{},()=>[Ke(v2)])]),"loading-icon":En(()=>[xi(k.$slots,"loading-icon",{},()=>[Ke(x2,{visible:$.type==="loading"},null,8,["visible"])])]),"success-icon":En(()=>[xi(k.$slots,"success-icon",{},()=>[Ke(A2)])]),"error-icon":En(()=>[xi(k.$slots,"error-icon",{},()=>[Ke(P2)])]),"warning-icon":En(()=>[xi(k.$slots,"warning-icon",{},()=>[Ke(L2)])]),"info-icon":En(()=>[xi(k.$slots,"info-icon",{},()=>[Ke(E2)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,B2))),128))],8,z2)],2112))}}),H2=W2;function Qt(e,n){return t=>Object.keys(e).reduce((r,c)=>{const h=typeof e[c]=="object"&&e[c]!=null&&!Array.isArray(e[c])?e[c]:{type:e[c]};return t&&c in t?r[c]={...h,default:t[c]}:r[c]=h,n&&!r[c].source&&(r[c].source=n),r},{})}const $i=Qt({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function dl(e){Qg(`Vuetify: ${e}`)}const Bu=typeof window<"u",vp=Bu&&"IntersectionObserver"in window,U2=Bu&&"matchMedia"in window&&typeof window.matchMedia=="function",mx=()=>U2&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Bu&&CSS?.supports?.("-webkit-backdrop-filter","none");function On(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const t=Number(e);return isNaN(t)?String(e):isFinite(t)?`${t}${n}`:void 0}function yp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function vx(e){let n;return e!==null&&typeof e=="object"&&((n=Object.getPrototypeOf(e))===Object.prototype||n===null)}function V2(e){if(e&&"$el"in e){const n=e.$el;return n?.nodeType===Node.TEXT_NODE?n.nextElementSibling:n}return e}function bp(e,n){return n.every(t=>e.hasOwnProperty(t))}function G2(e,n){const t={};for(const r of n)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function q2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Fu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(n,Math.min(t,e))}function yx(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+t.repeat(Math.max(0,n-e.length))}function Y2(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let r=0;for(;r<e.length;)t.push(e.substr(r,n)),r+=n;return t}function fl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const r={};for(const c in e)r[c]=e[c];for(const c in n){const h=e[c],g=n[c];if(vx(h)&&vx(g)){r[c]=fl(h,g,t);continue}if(t&&Array.isArray(h)&&Array.isArray(g)){r[c]=t(h,g);continue}r[c]=g}return r}function bx(e){return e.map(n=>n.type===Er?bx(n.children):n).flat()}function ka(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(ka.cache.has(e))return ka.cache.get(e);const n=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return ka.cache.set(e,n),n}ka.cache=new Map;function vc(e,n){if(!n||typeof n!="object")return[];if(Array.isArray(n))return n.map(t=>vc(e,t)).flat(1);if(n.suspense)return vc(e,n.ssContent);if(Array.isArray(n.children))return n.children.map(t=>vc(e,t)).flat(1);if(n.component){if(Object.getOwnPropertyDescriptor(n.component.provides,e))return[n.component];if(n.component.subTree)return vc(e,n.component.subTree).flat(1)}return[]}function wx(e){const n=Ml({});ai(()=>{const r=e();for(const c in r)n[c]=r[c]},{flush:"sync"});const t={};for(const r in n)t[r]=Lt(()=>n[r]);return t}function wp(e,n){return e.includes(n)}function xx(e,n){return n="on"+Fh(n),!!(e[n]||e[`${n}Once`]||e[`${n}Capture`]||e[`${n}OnceCapture`]||e[`${n}CaptureOnce`])}function K2(){const e=Wi(),n=t=>{e.value=t};return Object.defineProperty(n,"value",{enumerable:!0,get:()=>e.value,set:t=>e.value=t}),Object.defineProperty(n,"el",{enumerable:!0,get:()=>V2(e.value)}),n}function ju(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function J2(e){const n=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(t=>{let[r,c]=t;return n.includes(r)?!!c:c!==void 0}))}const Q2=["top","bottom"],Z2=["start","end","left","right"];function X2(e,n){let[t,r]=e.split(" ");return r||(r=wp(Q2,t)?"start":wp(Z2,t)?"top":"center"),{side:Cx(t,n),align:Cx(r,n)}}function Cx(e,n){return e==="start"?n?"right":"left":e==="end"?n?"left":"right":e}class xp{constructor(n){const t=document.body.currentCSSZoom??1,r=n instanceof Element,c=r?1+(1-t)/t:1,{x:h,y:g,width:v,height:s}=r?n.getBoundingClientRect():n;this.x=h*c,this.y=g*c,this.width=v*c,this.height=s*c}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function eN(e){if(Array.isArray(e)){const n=document.body.currentCSSZoom??1,t=1+(1-n)/n;return new xp({x:e[0]*t,y:e[1]*t,width:0*t,height:0*t})}else return new xp(e)}const pl=2.4,kx=.2126729,_x=.7151522,Ax=.072175,tN=.55,nN=.58,rN=.57,iN=.62,Wu=.03,$x=1.45,oN=5e-4,sN=1.25,aN=1.25,Sx=.078,Tx=12.82051282051282,Hu=.06,Ex=.001;function Mx(e,n){const t=(e.r/255)**pl,r=(e.g/255)**pl,c=(e.b/255)**pl,h=(n.r/255)**pl,g=(n.g/255)**pl,v=(n.b/255)**pl;let s=t*kx+r*_x+c*Ax,f=h*kx+g*_x+v*Ax;if(s<=Wu&&(s+=(Wu-s)**$x),f<=Wu&&(f+=(Wu-f)**$x),Math.abs(f-s)<oN)return 0;let a;if(f>s){const l=(f**tN-s**nN)*sN;a=l<Ex?0:l<Sx?l-l*Tx*Hu:l-Hu}else{const l=(f**iN-s**rN)*aN;a=l>-Ex?0:l>-Sx?l-l*Tx*Hu:l+Hu}return a*100}function Cp(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function lN(e){return Cp(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Ix=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,cN={rgb:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),rgba:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),hsl:(e,n,t,r)=>Rx({h:e,s:n,l:t,a:r}),hsla:(e,n,t,r)=>Rx({h:e,s:n,l:t,a:r}),hsv:(e,n,t,r)=>bc({h:e,s:n,v:t,a:r}),hsva:(e,n,t,r)=>bc({h:e,s:n,v:t,a:r})};function yc(e){if(typeof e=="number")return(isNaN(e)||e<0||e>16777215)&&dl(`'${e}' is not a valid hex color`),{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Ix.test(e)){const{groups:n}=e.match(Ix),{fn:t,values:r}=n,c=r.split(/,\s*|\s*\/\s*|\s+/).map((h,g)=>h.endsWith("%")||g>0&&g<3&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(h)/100:parseFloat(h));return cN[t](...c)}else if(typeof e=="string"){let n=e.startsWith("#")?e.slice(1):e;[3,4].includes(n.length)?n=n.split("").map(r=>r+r).join(""):[6,8].includes(n.length)||dl(`'${e}' is not a valid hex(a) color`);const t=parseInt(n,16);return(isNaN(t)||t<0||t>4294967295)&&dl(`'${e}' is not a valid hex(a) color`),uN(n)}else if(typeof e=="object"){if(bp(e,["r","g","b"]))return e;if(bp(e,["h","s","l"]))return bc(Lx(e));if(bp(e,["h","s","v"]))return bc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
1491
+ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function bc(e){const{h:n,s:t,v:r,a:c}=e,h=v=>{const s=(v+n/60)%6;return r-r*t*Math.max(Math.min(s,4-s,1),0)},g=[h(5),h(3),h(1)].map(v=>Math.round(v*255));return{r:g[0],g:g[1],b:g[2],a:c}}function Rx(e){return bc(Lx(e))}function Lx(e){const{h:n,s:t,l:r,a:c}=e,h=r+t*Math.min(r,1-r),g=h===0?0:2-2*r/h;return{h:n,s:g,v:h,a:c}}function uN(e){e=hN(e);let[n,t,r,c]=Y2(e,2).map(h=>parseInt(h,16));return c=c===void 0?c:c/255,{r:n,g:t,b:r,a:c}}function hN(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(n=>n+n).join("")),e.length!==6&&(e=yx(yx(e,6),8,"F")),e}function dN(e){const n=Math.abs(Mx(yc(0),yc(e)));return Math.abs(Mx(yc(16777215),yc(e)))>Math.min(n,50)?"#fff":"#000"}function Oo(e,n){const t=Ug();if(!t)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return t}function _a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const n=Oo(e).type;return ka(n?.aliasName||n?.name)}function fN(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oo("injectSelf");const{provides:t}=n;if(t&&e in t)return t[e]}const Uu=Symbol.for("vuetify:defaults");function kp(){const e=Zs(Uu);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function _p(e,n){const t=kp(),r=nn(e),c=gt(()=>{if(Ht(n?.disabled))return t.value;const h=Ht(n?.scoped),g=Ht(n?.reset),v=Ht(n?.root);if(r.value==null&&!(h||g||v))return t.value;let s=fl(r.value,{prev:t.value});if(h)return s;if(g||v){const f=Number(g||1/0);for(let a=0;a<=f&&!(!s||!("prev"in s));a++)s=s.prev;return s&&typeof v=="string"&&v in s&&(s=fl(fl(s,{prev:s}),s[v])),s}return s.prev?fl(s.prev,s):s});return za(Uu,c),c}function pN(e,n){return e.props&&(typeof e.props[n]<"u"||typeof e.props[ka(n)]<"u")}function gN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kp();const r=Oo("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const c=gt(()=>t.value?.[e._as??n]),h=new Proxy(e,{get(s,f){const a=Reflect.get(s,f);if(f==="class"||f==="style")return[c.value?.[f],a].filter(d=>d!=null);if(pN(r.vnode,f))return a;const l=c.value?.[f];if(l!==void 0)return l;const u=t.value?.global?.[f];return u!==void 0?u:a}}),g=Wi();ai(()=>{if(c.value){const s=Object.entries(c.value).filter(f=>{let[a]=f;return a.startsWith(a[0].toUpperCase())});g.value=s.length?Object.fromEntries(s):void 0}else g.value=void 0});function v(){const s=fN(Uu,r);za(Uu,gt(()=>g.value?fl(s?.value??{},g.value):s?.value))}return{props:h,provideSubDefaults:v}}function Vu(e){if(e._setup=e._setup??e.setup,!e.name)return dl("The component is missing an explicit name, unable to generate default prop value"),e;if(e._setup){e.props=Qt(e.props??{},e.name)();const n=Object.keys(e.props).filter(t=>t!=="class"&&t!=="style");e.filterProps=function(t){return G2(t,n)},e.props._as=String,e.setup=function(t,r){const c=kp();if(!c.value)return e._setup(t,r);const{props:h,provideSubDefaults:g}=gN(t,t._as??e.name,c),v=e._setup(h,r);return g(),v}}return e}function _r(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(e?Vu:Ls)(n)}function Ox(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return _r()({name:t??Fh(Kg(e.replace(/__/g,"-"))),props:{tag:{type:String,default:n},...$i()},setup(r,c){let{slots:h}=c;return()=>To(r.tag,{class:[e,r.class],style:r.style},h.default?.())}})}function mN(e,n,t,r){if(!t||ju(e)||ju(n))return;const c=t.get(e);if(c)c.set(n,r);else{const h=new WeakMap;h.set(n,r),t.set(e,h)}}function vN(e,n,t){if(!t||ju(e)||ju(n))return null;const r=t.get(e)?.get(n);if(typeof r=="boolean")return r;const c=t.get(n)?.get(e);return typeof c=="boolean"?c:null}function Ap(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;if(e===n)return!0;if(e instanceof Date&&n instanceof Date&&e.getTime()!==n.getTime()||e!==Object(e)||n!==Object(n))return!1;const r=Object.keys(e);return r.length!==Object.keys(n).length?!1:vN(e,n,t)||(mN(e,n,t,!0),r.every(h=>Ap(e[h],n[h],t)))}function Si(e){const n=Oo("useRender");n.render=e}function Nx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const t=K2(),r=nn();if(Bu){const c=new ResizeObserver(h=>{e?.(h,c),h.length&&(n==="content"?r.value=h[0].contentRect:r.value=h[0].target.getBoundingClientRect())});Qs(()=>{c.disconnect()}),wi(()=>t.el,(h,g)=>{g&&(c.unobserve(g),r.value=void 0),h&&c.observe(h)},{flush:"post"})}return{resizeRef:t,contentRect:Gg(r)}}function Dx(e,n){let t;function r(){t=Zg(),t.run(()=>n.length?n(()=>{t?.stop(),r()}):n())}wi(e,c=>{c&&!t?r():c||(t?.stop(),t=void 0)},{immediate:!0}),Bh(()=>{t?.stop()})}function Px(e,n,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:a=>a,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:a=>a;const h=Oo("useProxiedModel"),g=nn(e[n]!==void 0?e[n]:t),v=ka(n),s=gt(v!==n?()=>(e[n],!!((h.vnode.props?.hasOwnProperty(n)||h.vnode.props?.hasOwnProperty(v))&&(h.vnode.props?.hasOwnProperty(`onUpdate:${n}`)||h.vnode.props?.hasOwnProperty(`onUpdate:${v}`)))):()=>(e[n],!!(h.vnode.props?.hasOwnProperty(n)&&h.vnode.props?.hasOwnProperty(`onUpdate:${n}`))));Dx(()=>!s.value,()=>{wi(()=>e[n],a=>{g.value=a})});const f=gt({get(){const a=e[n];return r(s.value?a:g.value)},set(a){const l=c(a),u=qg(s.value?e[n]:g.value);u===l||r(u)===a||(g.value=l,h?.emit(`update:${n}`,l))}});return Object.defineProperty(f,"externalValue",{get:()=>s.value?e[n]:g.value}),f}const yN=Symbol.for("vuetify:locale");function zx(){const e=Zs(yN);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const $p=Symbol.for("vuetify:theme"),Aa=Qt({theme:String},"theme");function gl(e){Oo("provideTheme");const n=Zs($p,null);if(!n)throw new Error("Could not find Vuetify theme injection");const t=Lt(()=>e.theme??n.name.value),r=Lt(()=>n.themes.value[t.value]),c=Lt(()=>n.isDisabled?void 0:`${n.prefix}theme--${t.value}`),h={...n,name:t,current:r,themeClasses:c};return za($p,h),h}function bN(){Oo("useTheme");const e=Zs($p,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}const No=Qt({tag:{type:[String,Object,Function],default:"div"}},"tag"),wN=Qt({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function qi(e,n,t){return _r()({name:e,props:wN({mode:t,origin:n}),setup(r,c){let{slots:h}=c;const g={onBeforeEnter(v){r.origin&&(v.style.transformOrigin=r.origin)},onLeave(v){if(r.leaveAbsolute){const{offsetTop:s,offsetLeft:f,offsetWidth:a,offsetHeight:l}=v;v._transitionInitialStyles={position:v.style.position,top:v.style.top,left:v.style.left,width:v.style.width,height:v.style.height},v.style.position="absolute",v.style.top=`${s}px`,v.style.left=`${f}px`,v.style.width=`${a}px`,v.style.height=`${l}px`}r.hideOnLeave&&v.style.setProperty("display","none","important")},onAfterLeave(v){if(r.leaveAbsolute&&v?._transitionInitialStyles){const{position:s,top:f,left:a,width:l,height:u}=v._transitionInitialStyles;delete v._transitionInitialStyles,v.style.position=s||"",v.style.top=f||"",v.style.left=a||"",v.style.width=l||"",v.style.height=u||""}}};return()=>{const v=r.group?zc:El;return To(v,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:g},h.default)}}})}function Sp(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return _r()({name:e,props:{mode:{type:String,default:t},disabled:{type:Boolean,default:mx()},group:Boolean,hideOnLeave:Boolean},setup(r,c){let{slots:h}=c;const g=r.group?zc:El;return()=>To(g,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:{...n,onLeave:v=>{r.hideOnLeave?v.style.setProperty("display","none","important"):n.onLeave?.(v)}}},h.default)}})}function Tp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(c){c._parent=c.parentNode,c._initialStyle={transition:c.style.transition,overflow:c.style.overflow,width:c.style.width,height:c.style.height}},onEnter(c){const h=c._initialStyle;if(!h)return;c.style.setProperty("transition","none","important"),c.style.overflow="hidden";const g=`${c.offsetWidth}px`,v=`${c.offsetHeight}px`;["x","both"].includes(n)&&(c.style.width="0"),["y","both"].includes(n)&&(c.style.height="0"),c.offsetHeight,c.style.transition=h.transition,e&&c._parent&&c._parent.classList.add(e),requestAnimationFrame(()=>{["x","both"].includes(n)&&(c.style.width=g),["y","both"].includes(n)&&(c.style.height=v)})},onAfterEnter:r,onEnterCancelled:r,onLeave(c){c._initialStyle={transition:"",overflow:c.style.overflow,width:c.style.width,height:c.style.height},c.style.overflow="hidden",["x","both"].includes(n)&&(c.style.width=`${c.offsetWidth}px`),["y","both"].includes(n)&&(c.style.height=`${c.offsetHeight}px`),c.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(n)&&(c.style.width="0"),["y","both"].includes(n)&&(c.style.height="0")})},onAfterLeave:t,onLeaveCancelled:t};function t(c){e&&c._parent&&c._parent.classList.remove(e),r(c)}function r(c){if(!c._initialStyle)return;const{width:h,height:g}=c._initialStyle;c.style.overflow=c._initialStyle.overflow,h!=null&&["x","both"].includes(n)&&(c.style.width=h),g!=null&&["y","both"].includes(n)&&(c.style.height=g),delete c._initialStyle}}qi("fab-transition","center center","out-in"),qi("dialog-bottom-transition"),qi("dialog-top-transition"),qi("fade-transition"),qi("scale-transition"),qi("scroll-x-transition"),qi("scroll-x-reverse-transition"),qi("scroll-y-transition"),qi("scroll-y-reverse-transition"),qi("slide-x-transition"),qi("slide-x-reverse-transition"),qi("slide-y-transition"),qi("slide-y-reverse-transition");const xN=Sp("expand-transition",Tp());Sp("expand-x-transition",Tp("","x")),Sp("expand-both-transition",Tp("","both"));const CN=Qt({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),$a=_r(!1)({name:"VDefaultsProvider",props:CN(),setup(e,n){let{slots:t}=n;const{defaults:r,disabled:c,reset:h,root:g,scoped:v}=Wg(e);return _p(r,{reset:h,root:g,scoped:v,disabled:c}),()=>t.default?.()}}),Ep=Qt({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Mp(e){return{dimensionStyles:gt(()=>{const n={},t=On(e.height),r=On(e.maxHeight),c=On(e.maxWidth),h=On(e.minHeight),g=On(e.minWidth),v=On(e.width);return t!=null&&(n.height=t),r!=null&&(n.maxHeight=r),c!=null&&(n.maxWidth=c),h!=null&&(n.minHeight=h),g!=null&&(n.minWidth=g),v!=null&&(n.width=v),n})}}function kN(e){return{aspectStyles:gt(()=>{const n=Number(e.aspectRatio);return n?{paddingBottom:String(1/n*100)+"%"}:void 0})}}const Bx=Qt({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...$i(),...Ep()},"VResponsive"),Fx=_r()({name:"VResponsive",props:Bx(),setup(e,n){let{slots:t}=n;const{aspectStyles:r}=kN(e),{dimensionStyles:c}=Mp(e);return Si(()=>yt("div",{class:sn(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Zn([c.value,e.style])},[yt("div",{class:"v-responsive__sizer",style:Zn(r.value)},null),t.additional?.(),t.default&&yt("div",{class:sn(["v-responsive__content",e.contentClass])},[t.default()])])),{}}});function Ip(e){return wx(()=>{const{class:n,style:t}=AN(e);return{colorClasses:n,colorStyles:t}})}function Gu(e){const{colorClasses:n,colorStyles:t}=Ip(()=>({text:cs(e)}));return{textColorClasses:n,textColorStyles:t}}function qu(e){const{colorClasses:n,colorStyles:t}=Ip(()=>({background:cs(e)}));return{backgroundColorClasses:n,backgroundColorStyles:t}}function _N(e){return{text:typeof e.text=="string"?e.text.replace(/^text-/,""):e.text,background:typeof e.background=="string"?e.background.replace(/^bg-/,""):e.background}}function AN(e){const n=_N(cs(e)),t=[],r={};if(n.background)if(Cp(n.background)){if(r.backgroundColor=n.background,!n.text&&lN(n.background)){const c=yc(n.background);if(c.a==null||c.a===1){const h=dN(c);r.color=h,r.caretColor=h}}}else t.push(`bg-${n.background}`);return n.text&&(Cp(n.text)?(r.color=n.text,r.caretColor=n.text):t.push(`text-${n.text}`)),{class:t,style:r}}const ml=Qt({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function vl(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return{roundedClasses:gt(()=>{const t=Bc(e)?e.value:e.rounded,r=Bc(e)?!1:e.tile,c=[];if(r||t===!1)c.push("rounded-0");else if(t===!0||t==="")c.push(`${n}--rounded`);else if(typeof t=="string"||t===0)for(const h of String(t).split(" "))c.push(`rounded-${h}`);return c})}}const $N=Qt({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),Yu=(e,n)=>{let{slots:t}=n;const{transition:r,disabled:c,group:h,target:g,...v}=e,{component:s=h?zc:El,...f}=yp(r)?r:{};let a;return yp(r)?a=dr(f,J2({disabled:c,group:h,target:g}),v):a=dr({name:c||!r?"":r},v),To(s,a,t)};function jx(e,n){if(!vp)return;const t=n.modifiers||{},r=n.value,{handler:c,options:h}=typeof r=="object"?r:{handler:r,options:{}},g=new IntersectionObserver(function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;const f=e._observe?.[n.instance.$.uid];if(!f)return;const a=v.some(l=>l.isIntersecting);c&&(!t.quiet||f.init)&&(!t.once||a||f.init)&&c(a,v,s),a&&t.once?Rp(e,n):f.init=!0},h);e._observe=Object(e._observe),e._observe[n.instance.$.uid]={init:!1,observer:g},g.observe(e)}function Rp(e,n){const t=e._observe?.[n.instance.$.uid];t&&(t.observer.unobserve(e),delete e._observe[n.instance.$.uid])}const Wx={mounted:jx,unmounted:Rp,updated:(e,n)=>{e._observe?.[n.instance.$.uid]&&(Rp(e,n),jx(e,n))}},SN=Qt({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,imageClass:null,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...Bx(),...$i(),...ml(),...$N()},"VImg"),Ku=_r()({name:"VImg",directives:{vIntersect:Wx},props:SN(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,n){let{emit:t,slots:r}=n;const{backgroundColorClasses:c,backgroundColorStyles:h}=qu(()=>e.color),{roundedClasses:g}=vl(e),v=Oo("VImg"),s=Wi(""),f=nn(),a=Wi(e.eager?"loading":"idle"),l=Wi(),u=Wi();let d=!1;const o=gt(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),p=gt(()=>o.value.aspect||l.value/u.value||0);wi(()=>e.src,()=>{m(a.value!=="idle")}),wi(p,(I,$)=>{!I&&$&&f.value&&_(f.value)}),wi(f,I=>{!I||a.value==="idle"||(p.value||_(I),R(I),d&&(d=!1,t("load",I.currentSrc||o.value.src)))}),Hg(()=>m());function m(I){if(!(e.eager&&I)&&!(vp&&!I&&!e.eager)){if(a.value="loading",o.value.lazySrc){const $=new Image;$.src=o.value.lazySrc,_($,null)}o.value.src&&Tl(()=>{t("loadstart",f.value?.currentSrc||o.value.src),setTimeout(()=>{if(!v.isUnmounted)if(f.value?.complete){if(f.value.naturalWidth||x(),a.value==="error")return;p.value||_(f.value,null),a.value==="loading"&&w()}else f.value&&(p.value||_(f.value),R(f.value))})})}}function w(){v.isUnmounted||(f.value?(R(f.value),_(f.value),t("load",f.value.currentSrc||o.value.src)):d=!0,a.value="loaded")}function x(){v.isUnmounted||(a.value="error",t("error",f.value?.currentSrc||o.value.src))}function R(I){s.value=I.currentSrc||I.src}let T=-1;Qs(()=>{clearTimeout(T)});function _(I){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const A=()=>{if(clearTimeout(T),v.isUnmounted)return;const{naturalHeight:D,naturalWidth:j}=I;D||j?(l.value=j,u.value=D):!I.complete&&a.value==="loading"&&$!=null?T=window.setTimeout(A,$):(I.currentSrc.endsWith(".svg")||I.currentSrc.startsWith("data:image/svg+xml"))&&(l.value=1,u.value=1)};A()}const C=Lt(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),P=()=>{if(!o.value.src||a.value==="idle")return null;const I=yt("img",{class:sn(["v-img__img",C.value,e.imageClass]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:o.value.src,srcset:o.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:f,onLoad:w,onError:x},null),$=r.sources?.();return Ke(Yu,{transition:e.transition,appear:!0},{default:()=>[Fa($?yt("picture",{class:"v-img__picture"},[$,I]):I,[[Wh,a.value==="loaded"]])]})},O=()=>Ke(Yu,{transition:e.transition},{default:()=>[o.value.lazySrc&&a.value!=="loaded"&&yt("img",{class:sn(["v-img__img","v-img__img--preload",C.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:o.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),E=()=>r.placeholder?Ke(Yu,{transition:e.transition,appear:!0},{default:()=>[(a.value==="loading"||a.value==="error"&&!r.error)&&yt("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,k=()=>r.error?Ke(Yu,{transition:e.transition,appear:!0},{default:()=>[a.value==="error"&&yt("div",{class:"v-img__error"},[r.error()])]}):null,B=()=>e.gradient?yt("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,N=Wi(!1);{const I=wi(p,$=>{$&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{N.value=!0})}),I())})}return Si(()=>{const I=Fx.filterProps(e);return Fa(Ke(Fx,dr({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!N.value,"v-img--fit-content":e.width==="fit-content"},c.value,g.value,e.class],style:[{width:On(e.width==="auto"?l.value:e.width)},h.value,e.style]},I,{aspectRatio:p.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>yt(Er,null,[Ke(P,null,null),Ke(O,null,null),Ke(B,null,null),Ke(E,null,null),Ke(k,null,null)]),default:r.default}),[[Wx,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:s,image:f,state:a,naturalWidth:l,naturalHeight:u}}}),Ju=Qt({border:[Boolean,Number,String]},"border");function Qu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return{borderClasses:gt(()=>{const t=e.border;return t===!0||t===""?`${n}--border`:typeof t=="string"||t===0?String(t).split(" ").map(r=>`border-${r}`):[]})}}const Lp=Qt({elevation:{type:[Number,String],validator(e){const n=parseInt(e);return!isNaN(n)&&n>=0&&n<=24}}},"elevation");function Op(e){return{elevationClasses:Lt(()=>{const n=Bc(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Hx={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Np=Qt({location:String},"location");function Dp(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=zx();return{locationStyles:gt(()=>{if(!e.location)return{};const{side:c,align:h}=X2(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function g(s){return t?t(s):0}const v={};return c!=="center"&&(n?v[Hx[c]]=`calc(100% - ${g(c)}px)`:v[c]=0),h!=="center"?n?v[Hx[h]]=`calc(100% - ${g(h)}px)`:v[h]=0:(c==="center"?v.top=v.left="50%":v[{top:"left",bottom:"left",left:"top",right:"top"}[c]]="50%",v.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[c]),v})}}const TN=[null,"default","comfortable","compact"],wc=Qt({density:{type:String,default:"default",validator:e=>TN.includes(e)}},"density");function Zu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return{densityClasses:Lt(()=>`${n}--density-${e.density}`)}}const EN=["x-small","small","default","large","x-large"],xc=Qt({size:{type:[String,Number],default:"default"}},"size");function Xu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return wx(()=>{const t=e.size;let r,c;return wp(EN,t)?r=`${n}--size-${t}`:t&&(c={width:On(t),height:On(t)}),{sizeClasses:r,sizeStyles:c}})}const MN=["elevated","flat","tonal","outlined","text","plain"];function Pp(e,n){return yt(Er,null,[e&&yt("span",{key:"overlay",class:sn(`${n}__overlay`)},null),yt("span",{key:"underlay",class:sn(`${n}__underlay`)},null)])}const eh=Qt({color:String,variant:{type:String,default:"elevated",validator:e=>MN.includes(e)}},"variant");function zp(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();const t=Lt(()=>{const{variant:h}=cs(e);return`${n}--variant-${h}`}),{colorClasses:r,colorStyles:c}=Ip(()=>{const{variant:h,color:g}=cs(e);return{[["elevated","flat"].includes(h)?"background":"text"]:g}});return{colorClasses:r,colorStyles:c,variantClasses:t}}const Ux=Qt({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...Ju(),...$i(),...wc(),...Lp(),...ml(),...xc({size:void 0}),...No(),...Aa(),...eh()},"VBtnGroup"),Vx=_r()({name:"VBtnGroup",props:Ux(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=gl(e),{densityClasses:c}=Zu(e),{borderClasses:h}=Qu(e),{elevationClasses:g}=Op(e),{roundedClasses:v}=vl(e);_p({VBtn:{height:Lt(()=>e.direction==="horizontal"&&e.size==null?"auto":null),baseColor:Lt(()=>e.baseColor),color:Lt(()=>e.color),density:Lt(()=>e.density),flat:!0,size:Lt(()=>e.size),variant:Lt(()=>e.variant)}}),Si(()=>Ke(e.tag,{class:sn(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided,"v-btn-group--has-size":e.size!=null},r.value,h.value,c.value,g.value,v.value,e.class]),style:Zn(e.style)},t))}}),IN=Qt({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),RN=Qt({value:null,disabled:Boolean,selectedClass:String},"group-item");function LN(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=Oo("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const c=Yg();za(Symbol.for(`${n.description}:id`),c);const h=Zs(n,null);if(!h){if(!t)return h;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${n.description}`)}const g=Lt(()=>e.value),v=gt(()=>!!(h.disabled.value||e.disabled));function s(){h?.register({id:c,value:g,disabled:v},r)}function f(){h?.unregister(c)}s(),Qs(()=>f());const a=gt(()=>h.isSelected(c)),l=gt(()=>h.items.value[0].id===c),u=gt(()=>h.items.value[h.items.value.length-1].id===c),d=gt(()=>a.value&&[h.selectedClass.value,e.selectedClass]);return wi(a,o=>{r.emit("group:selected",{value:o})},{flush:"sync"}),{id:c,isSelected:a,isFirst:l,isLast:u,toggle:()=>h.select(c,!a.value),select:o=>h.select(c,o),selectedClass:d,value:g,disabled:v,group:h,register:s,unregister:f}}function ON(e,n){let t=!1;const r=Ml([]),c=Px(e,"modelValue",[],u=>u===void 0?[]:Gx(r,u===null?[null]:q2(u)),u=>{const d=DN(r,u);return e.multiple?d:d[0]}),h=Oo("useGroup");function g(u,d){const o=u,p=Symbol.for(`${n.description}:id`),m=vc(p,h?.vnode).indexOf(d);Ht(o.value)===void 0&&(o.value=m,o.useIndexAsValue=!0),m>-1?r.splice(m,0,o):r.push(o)}function v(u){if(t)return;s();const d=r.findIndex(o=>o.id===u);r.splice(d,1)}function s(){const u=r.find(d=>!d.disabled);u&&e.mandatory==="force"&&!c.value.length&&(c.value=[u.id])}Ba(()=>{s()}),Qs(()=>{t=!0}),Vg(()=>{for(let u=0;u<r.length;u++)r[u].useIndexAsValue&&(r[u].value=u)});function f(u,d){const o=r.find(p=>p.id===u);if(!(d&&o?.disabled))if(e.multiple){const p=c.value.slice(),m=p.findIndex(x=>x===u),w=~m;if(d=d??!w,w&&e.mandatory&&p.length<=1||!w&&e.max!=null&&p.length+1>e.max)return;m<0&&d?p.push(u):m>=0&&!d&&p.splice(m,1),c.value=p}else{const p=c.value.includes(u);if(e.mandatory&&p||!p&&!d)return;c.value=d??!p?[u]:[]}}function a(u){if(e.multiple&&dl('This method is not supported when using "multiple" prop'),c.value.length){const d=c.value[0],o=r.findIndex(w=>w.id===d);let p=(o+u)%r.length,m=r[p];for(;m.disabled&&p!==o;)p=(p+u)%r.length,m=r[p];if(m.disabled)return;c.value=[r[p].id]}else{const d=r.find(o=>!o.disabled);d&&(c.value=[d.id])}}const l={register:g,unregister:v,selected:c,select:f,disabled:Lt(()=>e.disabled),prev:()=>a(r.length-1),next:()=>a(1),isSelected:u=>c.value.includes(u),selectedClass:Lt(()=>e.selectedClass),items:Lt(()=>r),getItemIndex:u=>NN(r,u)};return za(n,l),l}function NN(e,n){const t=Gx(e,[n]);return t.length?e.findIndex(r=>r.id===t[0]):-1}function Gx(e,n){const t=[];return n.forEach(r=>{const c=e.find(g=>Ap(r,g.value)),h=e[r];c?.value!==void 0?t.push(c.id):h?.useIndexAsValue&&t.push(h.id)}),t}function DN(e,n){const t=[];return n.forEach(r=>{const c=e.findIndex(h=>h.id===r);if(~c){const h=e[c];t.push(h.value!==void 0?h.value:c)}}),t}const qx=Symbol.for("vuetify:v-btn-toggle"),PN=Qt({...Ux(),...IN()},"VBtnToggle");_r()({name:"VBtnToggle",props:PN(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const{isSelected:r,next:c,prev:h,select:g,selected:v}=ON(e,qx);return Si(()=>{const s=Vx.filterProps(e);return Ke(Vx,dr({class:["v-btn-toggle",e.class]},s,{style:e.style}),{default:()=>[t.default?.({isSelected:r,next:c,prev:h,select:g,selected:v})]})}),{next:c,prev:h,select:g}}});const ps=[String,Function,Object,Array],zN=Symbol.for("vuetify:icons"),th=Qt({icon:{type:ps},tag:{type:[String,Object,Function],required:!0}},"icon"),Yx=_r()({name:"VComponentIcon",props:th(),setup(e,n){let{slots:t}=n;return()=>{const r=e.icon;return Ke(e.tag,null,{default:()=>[e.icon?Ke(r,null,null):t.default?.()]})}}}),BN=Vu({name:"VSvgIcon",inheritAttrs:!1,props:th(),setup(e,n){let{attrs:t}=n;return()=>Ke(e.tag,dr(t,{style:null}),{default:()=>[yt("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?yt("path",{d:r[0],"fill-opacity":r[1]},null):yt("path",{d:r},null)):yt("path",{d:e.icon},null)])]})}});Vu({name:"VLigatureIcon",props:th(),setup(e){return()=>Ke(e.tag,null,{default:()=>[e.icon]})}});const FN=Vu({name:"VClassIcon",props:th(),setup(e){return()=>Ke(e.tag,{class:sn(e.icon)},null)}}),jN=e=>{const n=Zs(zN);if(!n)throw new Error("Missing Vuetify Icons provide!");return{iconData:gt(()=>{const t=cs(e);if(!t)return{component:Yx};let r=t;if(typeof r=="string"&&(r=r.trim(),r.startsWith("$")&&(r=n.aliases?.[r.slice(1)])),r||dl(`Could not find aliased icon "${t}"`),Array.isArray(r))return{component:BN,icon:r};if(typeof r!="string")return{component:Yx,icon:r};const c=Object.keys(n.sets).find(g=>typeof r=="string"&&r.startsWith(`${g}:`)),h=c?r.slice(c.length+1):r;return{component:n.sets[c??n.defaultSet].component,icon:h}})}},WN=Qt({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:ps,opacity:[String,Number],...$i(),...xc(),...No({tag:"i"}),...Aa()},"VIcon"),Sa=_r()({name:"VIcon",props:WN(),setup(e,n){let{attrs:t,slots:r}=n;const c=Wi(),{themeClasses:h}=bN(),{iconData:g}=jN(()=>c.value||e.icon),{sizeClasses:v}=Xu(e),{textColorClasses:s,textColorStyles:f}=Gu(()=>e.color);return Si(()=>{const a=r.default?.();a&&(c.value=bx(a).filter(u=>u.type===tm&&u.children&&typeof u.children=="string")[0]?.children);const l=!!(t.onClick||t.onClickOnce);return Ke(g.value.component,{tag:e.tag,icon:g.value.icon,class:sn(["v-icon","notranslate",h.value,v.value,s.value,{"v-icon--clickable":l,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:Zn([{"--v-icon-opacity":e.opacity},v.value?void 0:{fontSize:On(e.size),height:On(e.size),width:On(e.size)},f.value,e.style]),role:l?"button":void 0,"aria-hidden":!l,tabindex:l?e.disabled?-1:0:void 0},{default:()=>[a]})}),{}}});function Kx(e,n){const t=nn(),r=Wi(!1);if(vp){const c=new IntersectionObserver(h=>{r.value=!!h.find(g=>g.isIntersecting)},n);Bh(()=>{c.disconnect()}),wi(t,(h,g)=>{g&&(c.unobserve(g),r.value=!1),h&&c.observe(h)},{flush:"post"})}return{intersectionRef:t,isIntersecting:r}}const HN=Qt({reveal:{type:[Boolean,Object],default:!1}},"reveal");function UN(e){const n=Lt(()=>typeof e.reveal=="object"?Math.max(0,Number(e.reveal.duration??900)):900),t=Wi(e.reveal?"initial":"disabled");return Ba(async()=>{e.reveal&&(t.value="initial",await new Promise(r=>requestAnimationFrame(r)),t.value="pending",await new Promise(r=>setTimeout(r,n.value)),t.value="done")}),{duration:n,state:t}}const VN=Qt({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...$i(),...HN(),...xc(),...No({tag:"div"}),...Aa()},"VProgressCircular"),Bp=_r()({name:"VProgressCircular",props:VN(),setup(e,n){let{slots:t}=n;const r=20,c=2*Math.PI*r,h=nn(),{themeClasses:g}=gl(e),{sizeClasses:v,sizeStyles:s}=Xu(e),{textColorClasses:f,textColorStyles:a}=Gu(()=>e.color),{textColorClasses:l,textColorStyles:u}=Gu(()=>e.bgColor),{intersectionRef:d,isIntersecting:o}=Kx(),{resizeRef:p,contentRect:m}=Nx(),{state:w,duration:x}=UN(e),R=Lt(()=>w.value==="initial"?0:Fu(parseFloat(e.modelValue),0,100)),T=Lt(()=>Number(e.width)),_=Lt(()=>s.value?Number(e.size):m.value?m.value.width:Math.max(T.value,32)),C=Lt(()=>r/(1-T.value/_.value)*2),P=Lt(()=>T.value/_.value*C.value),O=Lt(()=>{const k=(100-R.value)/100*c;return e.rounded&&R.value>0&&R.value<100?On(Math.min(c-.01,k+P.value)):On(k)}),E=gt(()=>{const k=Number(e.rotate);return e.rounded?k+P.value/2/c*360:k});return ai(()=>{d.value=h.value,p.value=h.value}),Si(()=>Ke(e.tag,{ref:h,class:sn(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":o.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||mx()),"v-progress-circular--revealing":["initial","pending"].includes(w.value)},g.value,v.value,f.value,e.class]),style:Zn([s.value,a.value,{"--progress-reveal-duration":`${x.value}ms`},e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:R.value},{default:()=>[yt("svg",{style:{transform:`rotate(calc(-90deg + ${E.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${C.value} ${C.value}`},[yt("circle",{class:sn(["v-progress-circular__underlay",l.value]),style:Zn(u.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":c,"stroke-dashoffset":0},null),yt("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":c,"stroke-dashoffset":O.value,"stroke-linecap":e.rounded?"round":void 0},null)]),t.default&&yt("div",{class:"v-progress-circular__content"},[t.default({value:R.value})])]})),{}}}),GN=Qt({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function qN(e,n){const t=Lt(()=>!!e.chunkCount||!!e.chunkWidth),r=gt(()=>{const v=cs(n);if(!v)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const s=Number(e.chunkCount);return(v-Number(e.chunkGap)*(s-1))/s}),c=Lt(()=>Number(e.chunkGap)),h=gt(()=>{if(!t.value)return{};const v=On(c.value),s=On(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${s}, transparent ${s}, transparent)`,maskSize:`calc(${s} + ${v}) 100%`}});function g(v){const s=cs(n);if(!s)return v;const f=100*c.value/s,a=100*(r.value+c.value)/s,l=Math.floor((v+f)/a+1e-9);return Fu(l*a-f/2,0,100)}return{hasChunks:t,chunksMaskStyles:h,snapValueToChunk:g}}const YN=Qt({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...GN(),...$i(),...Np({location:"top"}),...ml(),...No(),...Aa()},"VProgressLinear"),Jx=_r()({name:"VProgressLinear",props:YN(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const r=nn(),c=Px(e,"modelValue"),{isRtl:h,rtlClasses:g}=zx(),{themeClasses:v}=gl(e),{locationStyles:s}=Dp(e),{textColorClasses:f,textColorStyles:a}=Gu(()=>e.color),{backgroundColorClasses:l,backgroundColorStyles:u}=qu(()=>e.bgColor||e.color),{backgroundColorClasses:d,backgroundColorStyles:o}=qu(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:p,backgroundColorStyles:m}=qu(()=>e.color),{roundedClasses:w}=vl(e),{intersectionRef:x,isIntersecting:R}=Kx(),T=gt(()=>parseFloat(e.max)),_=gt(()=>parseFloat(e.height)),C=gt(()=>Fu(parseFloat(e.bufferValue)/T.value*100,0,100)),P=gt(()=>Fu(parseFloat(c.value)/T.value*100,0,100)),O=gt(()=>h.value!==e.reverse),E=gt(()=>e.indeterminate?"fade-transition":"slide-x-transition"),k=Wi(0),{hasChunks:B,chunksMaskStyles:N,snapValueToChunk:I}=qN(e,k);Dx(B,()=>{const{resizeRef:j}=Nx(U=>k.value=U[0].contentRect.width);ai(()=>j.value=r.value)});const $=gt(()=>B.value?I(C.value):C.value),A=gt(()=>B.value?I(P.value):P.value);function D(j){if(!x.value)return;const{left:U,right:q,width:Q}=x.value.getBoundingClientRect(),re=O.value?Q-j.clientX+(q-Q):j.clientX-U;c.value=Math.round(re/Q*T.value)}return ai(()=>{x.value=r.value}),Si(()=>Ke(e.tag,{ref:r,class:sn(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&R.value,"v-progress-linear--reverse":O.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},w.value,v.value,g.value,e.class]),style:Zn([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?On(_.value):0,"--v-progress-linear-height":On(_.value),...e.absolute?s.value:{}},N.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(c.value),T.value),onClick:e.clickable&&D},{default:()=>[e.stream&&yt("div",{key:"stream",class:sn(["v-progress-linear__stream",f.value]),style:{...a.value,[O.value?"left":"right"]:On(-_.value),borderTop:`${On(_.value/2)} dotted`,opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,top:`calc(50% - ${On(_.value/4)})`,width:On(100-C.value,"%"),"--v-progress-linear-stream-to":On(_.value*(O.value?1:-1))}},null),yt("div",{class:sn(["v-progress-linear__background",l.value]),style:Zn([u.value,{opacity:e.bgOpacity!=null?parseFloat(e.bgOpacity):void 0,width:e.stream?0:void 0}])},null),yt("div",{class:sn(["v-progress-linear__buffer",d.value]),style:Zn([o.value,{opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,width:On($.value,"%")}])},null),Ke(El,{name:E.value},{default:()=>[e.indeterminate?yt("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(j=>yt("div",{key:j,class:sn(["v-progress-linear__indeterminate",j,p.value]),style:Zn(m.value)},null))]):yt("div",{class:sn(["v-progress-linear__determinate",p.value]),style:Zn([m.value,{width:On(A.value,"%")}])},null)]}),t.default&&yt("div",{class:"v-progress-linear__content"},[t.default({value:P.value,buffer:C.value})])]})),{}}}),Qx=Qt({loading:[Boolean,String]},"loader");function Zx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return{loaderClasses:Lt(()=>({[`${n}--loading`]:e.loading}))}}function KN(e,n){let{slots:t}=n;return yt("div",{class:sn(`${e.name}__loader`)},[t.default?.({color:e.color,isActive:e.active})||Ke(Jx,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const JN=["static","relative","fixed","absolute","sticky"],Xx=Qt({position:{type:String,validator:(e=>JN.includes(e))}},"position");function e1(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a();return{positionClasses:Lt(()=>e.position?`${n}--${e.position}`:void 0)}}function QN(){const e=Oo("useRoute");return gt(()=>e?.proxy?.$route)}function t1(e,n){const t=Xs("RouterLink"),r=Lt(()=>!!(e.href||e.to)),c=gt(()=>r?.value||xx(n,"click")||xx(e,"click"));if(typeof t=="string"||!("useLink"in t)){const l=Lt(()=>e.href);return{isLink:r,isRouterLink:Lt(()=>!1),isClickable:c,href:l,linkProps:Ml({href:l}),route:Lt(()=>{}),navigate:Lt(()=>{})}}const h=t.useLink({to:Lt(()=>e.to||""),replace:Lt(()=>e.replace)}),g=gt(()=>e.to?h:void 0),v=QN(),s=gt(()=>g.value?e.exact?v.value?g.value.isExactActive?.value&&Ap(g.value.route.value.query,v.value.query):g.value.isExactActive?.value??!1:g.value.isActive?.value??!1:!1),f=gt(()=>e.to?g.value?.route.value.href:e.href),a=Lt(()=>!!e.to);return{isLink:r,isRouterLink:a,isClickable:c,isActive:s,route:Lt(()=>g.value?.route.value),navigate:Lt(()=>g.value?.navigate),href:f,linkProps:Ml({href:f,"aria-current":Lt(()=>s.value?"page":void 0),"aria-disabled":Lt(()=>e.disabled&&r.value?"true":void 0),tabindex:Lt(()=>e.disabled&&r.value?"-1":void 0)})}}const n1=Qt({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");function ZN(e,n){wi(()=>e.isActive?.value,t=>{e.isLink.value&&t!=null&&n&&Tl(()=>{n(t)})},{immediate:!0})}const Fp=Symbol("rippleStop"),XN=80;function r1(e,n){e.style.transform=n,e.style.webkitTransform=n}function jp(e){return e.constructor.name==="TouchEvent"}function i1(e){return e.constructor.name==="KeyboardEvent"}const eD=function(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,c=0;if(!i1(e)){const l=new xp(n),u=jp(e)?e.touches[e.touches.length-1]:e,d=eN([u.clientX,u.clientY]);r=d.x-l.left,c=d.y-l.top}let h=0,g=.3;n._ripple?.circle?(g=.15,h=n.clientWidth/2,h=t.center?h:h+Math.sqrt((r-h)**2+(c-h)**2)/4):h=Math.sqrt(n.clientWidth**2+n.clientHeight**2)/2;const v=`${(n.clientWidth-h*2)/2}px`,s=`${(n.clientHeight-h*2)/2}px`,f=t.center?v:`${r-h}px`,a=t.center?s:`${c-h}px`;return{radius:h,scale:g,x:f,y:a,centerX:v,centerY:s}},nh={show(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!n?._ripple?.enabled)return;const r=document.createElement("span"),c=document.createElement("span");r.appendChild(c),r.className="v-ripple__container",t.class&&(r.className+=` ${t.class}`);const{radius:h,scale:g,x:v,y:s,centerX:f,centerY:a}=eD(e,n,t),l=`${h*2}px`;c.className="v-ripple__animation",c.style.width=l,c.style.height=l,n.appendChild(r);const u=window.getComputedStyle(n);u&&u.position==="static"&&(n.style.position="relative",n.dataset.previousPosition="static"),c.classList.add("v-ripple__animation--enter"),c.classList.add("v-ripple__animation--visible"),r1(c,`translate(${v}, ${s}) scale3d(${g},${g},${g})`),c.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.classList.remove("v-ripple__animation--enter"),c.classList.add("v-ripple__animation--in"),r1(c,`translate(${f}, ${a}) scale3d(1,1,1)`)})})},hide(e){if(!e?._ripple?.enabled)return;const n=e.getElementsByClassName("v-ripple__animation");if(n.length===0)return;const t=Array.from(n).findLast(h=>!h.dataset.isHiding);if(t)t.dataset.isHiding="true";else return;const r=performance.now()-Number(t.dataset.activated),c=Math.max(250-r,0);setTimeout(()=>{t.classList.remove("v-ripple__animation--in"),t.classList.add("v-ripple__animation--out"),setTimeout(()=>{e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),t.parentNode?.parentNode===e&&e.removeChild(t.parentNode)},300)},c)}};function o1(e){return typeof e>"u"||!!e}function Cc(e){const n={},t=e.currentTarget;if(!(!t?._ripple||t._ripple.touched||e[Fp])){if(e[Fp]=!0,jp(e))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(n.center=t._ripple.centered||i1(e),t._ripple.class&&(n.class=t._ripple.class),jp(e)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{nh.show(e,t,n)},t._ripple.showTimer=window.setTimeout(()=>{t?._ripple?.showTimerCommit&&(t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null)},XN)}else nh.show(e,t,n)}}function rh(e){e[Fp]=!0}function Yi(e){const n=e.currentTarget;if(n?._ripple){if(window.clearTimeout(n._ripple.showTimer),e.type==="touchend"&&n._ripple.showTimerCommit){n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null,n._ripple.showTimer=window.setTimeout(()=>{Yi(e)});return}window.setTimeout(()=>{n._ripple&&(n._ripple.touched=!1)}),nh.hide(n)}}function s1(e){const n=e.currentTarget;n?._ripple&&(n._ripple.showTimerCommit&&(n._ripple.showTimerCommit=null),window.clearTimeout(n._ripple.showTimer))}let kc=!1;function tD(e,n){!kc&&n.includes(e.key)&&(kc=!0,Cc(e))}function a1(e){kc=!1,Yi(e)}function l1(e){kc&&(kc=!1,Yi(e))}function c1(e,n,t){const{value:r,modifiers:c}=n,h=o1(r);h||nh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=h,e._ripple.centered=c.center,e._ripple.circle=c.circle;const g=yp(r)?r:{};g.class&&(e._ripple.class=g.class);const v=g.keys??["Enter","Space"];if(e._ripple.keyDownHandler=s=>tD(s,v),h&&!t){if(c.stop){e.addEventListener("touchstart",rh,{passive:!0}),e.addEventListener("mousedown",rh);return}e.addEventListener("touchstart",Cc,{passive:!0}),e.addEventListener("touchend",Yi,{passive:!0}),e.addEventListener("touchmove",s1,{passive:!0}),e.addEventListener("touchcancel",Yi),e.addEventListener("mousedown",Cc),e.addEventListener("mouseup",Yi),e.addEventListener("mouseleave",Yi),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",a1),e.addEventListener("blur",l1),e.addEventListener("dragstart",Yi,{passive:!0})}else!h&&t&&u1(e)}function u1(e){e.removeEventListener("touchstart",rh),e.removeEventListener("mousedown",rh),e.removeEventListener("touchstart",Cc),e.removeEventListener("touchend",Yi),e.removeEventListener("touchmove",s1),e.removeEventListener("touchcancel",Yi),e.removeEventListener("mousedown",Cc),e.removeEventListener("mouseup",Yi),e.removeEventListener("mouseleave",Yi),e._ripple?.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",a1),e.removeEventListener("blur",l1),e.removeEventListener("dragstart",Yi)}function nD(e,n){c1(e,n,!1)}function rD(e){u1(e),delete e._ripple}function iD(e,n){if(n.value===n.oldValue)return;const t=o1(n.oldValue);c1(e,n,t)}const Wp={mounted:nD,unmounted:rD,updated:iD},oD=Qt({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:qx},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:ps,appendIcon:ps,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...Ju(),...$i(),...wc(),...Ep(),...Lp(),...RN(),...Qx(),...Np(),...Xx(),...ml(),...n1(),...xc(),...No({tag:"button"}),...Aa(),...eh({variant:"elevated"})},"VBtn"),sD=_r()({name:"VBtn",props:oD(),emits:{"group:selected":e=>!0},setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:c}=gl(e),{borderClasses:h}=Qu(e),{densityClasses:g}=Zu(e),{dimensionStyles:v}=Mp(e),{elevationClasses:s}=Op(e),{loaderClasses:f}=Zx(e),{locationStyles:a}=Dp(e),{positionClasses:l}=e1(e),{roundedClasses:u}=vl(e),{sizeClasses:d,sizeStyles:o}=Xu(e),p=LN(e,e.symbol,!1),m=t1(e,t),w=gt(()=>e.active!==void 0?e.active:m.isRouterLink.value?m.isActive?.value:p?.isSelected.value),x=Lt(()=>w.value?e.activeColor??e.color:e.color),R=gt(()=>({color:p?.isSelected.value&&(!m.isLink.value||m.isActive?.value)||!p||m.isActive?.value?x.value??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:T,colorStyles:_,variantClasses:C}=zp(R),P=gt(()=>p?.disabled.value||e.disabled),O=Lt(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=gt(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function k(B){P.value||m.isLink.value&&(B.metaKey||B.ctrlKey||B.shiftKey||B.button!==0||t.target==="_blank")||(m.isRouterLink.value?m.navigate.value?.(B):p?.toggle())}return ZN(m,p?.select),Si(()=>{const B=m.isLink.value?"a":e.tag,N=!!(e.prependIcon||r.prepend),I=!!(e.appendIcon||r.append),$=!!(e.icon&&e.icon!==!0);return Fa(Ke(B,dr(m.linkProps,{type:B==="a"?void 0:"button",class:["v-btn",p?.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":e.block,"v-btn--disabled":P.value,"v-btn--elevated":O.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],c.value,h.value,T.value,g.value,s.value,f.value,l.value,u.value,d.value,C.value,e.class],style:[_.value,v.value,a.value,o.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:P.value&&B!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:k,value:E.value}),{default:()=>[Pp(!0,"v-btn"),!e.icon&&N&&yt("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?Ke($a,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):Ke(Sa,{key:"prepend-icon",icon:e.prependIcon},null)]),yt("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&$?Ke(Sa,{key:"content-icon",icon:e.icon},null):Ke($a,{key:"content-defaults",disabled:!$,defaults:{VIcon:{icon:e.icon}}},{default:()=>[r.default?.()??Gr(e.text)]})]),!e.icon&&I&&yt("span",{key:"append",class:"v-btn__append"},[r.append?Ke($a,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):Ke(Sa,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&yt("span",{key:"loader",class:"v-btn__loader"},[r.loader?.()??Ke(Bp,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}),[[Wp,!P.value&&e.ripple,"",{center:!!e.icon}]])}),{group:p}}}),aD=Qt({start:Boolean,end:Boolean,icon:ps,image:String,text:String,...Ju(),...$i(),...wc(),...ml(),...xc(),...No(),...Aa(),...eh({variant:"flat"})},"VAvatar"),ih=_r()({name:"VAvatar",props:aD(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=gl(e),{borderClasses:c}=Qu(e),{colorClasses:h,colorStyles:g,variantClasses:v}=zp(e),{densityClasses:s}=Zu(e),{roundedClasses:f}=vl(e),{sizeClasses:a,sizeStyles:l}=Xu(e);return Si(()=>Ke(e.tag,{class:sn(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,c.value,h.value,s.value,f.value,a.value,v.value,e.class]),style:Zn([g.value,l.value,e.style])},{default:()=>[t.default?Ke($a,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[t.default()]}):e.image?Ke(Ku,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?Ke(Sa,{key:"icon",icon:e.icon},null):e.text,Pp(!1,"v-avatar")]})),{}}}),lD=Qt({...$i(),...No()},"VCardActions"),h1=_r()({name:"VCardActions",props:lD(),setup(e,n){let{slots:t}=n;return _p({VBtn:{slim:!0,variant:"text"}}),Si(()=>Ke(e.tag,{class:sn(["v-card-actions",e.class]),style:Zn(e.style)},t)),{}}}),cD=Qt({opacity:[Number,String],...$i(),...No()},"VCardSubtitle"),uD=_r()({name:"VCardSubtitle",props:cD(),setup(e,n){let{slots:t}=n;return Si(()=>Ke(e.tag,{class:sn(["v-card-subtitle",e.class]),style:Zn([{"--v-card-subtitle-opacity":e.opacity},e.style])},t)),{}}}),hD=Ox("v-card-title"),dD=Qt({appendAvatar:String,appendIcon:ps,prependAvatar:String,prependIcon:ps,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...$i(),...wc(),...No()},"VCardItem"),fD=_r()({name:"VCardItem",props:dD(),setup(e,n){let{slots:t}=n;return Si(()=>{const r=!!(e.prependAvatar||e.prependIcon),c=!!(r||t.prepend),h=!!(e.appendAvatar||e.appendIcon),g=!!(h||t.append),v=!!(e.title!=null||t.title),s=!!(e.subtitle!=null||t.subtitle);return Ke(e.tag,{class:sn(["v-card-item",e.class]),style:Zn(e.style)},{default:()=>[c&&yt("div",{key:"prepend",class:"v-card-item__prepend"},[t.prepend?Ke($a,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},t.prepend):yt(Er,null,[e.prependAvatar&&Ke(ih,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&Ke(Sa,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),yt("div",{class:"v-card-item__content"},[v&&Ke(hD,{key:"title"},{default:()=>[t.title?.()??Gr(e.title)]}),s&&Ke(uD,{key:"subtitle"},{default:()=>[t.subtitle?.()??Gr(e.subtitle)]}),t.default?.()]),g&&yt("div",{key:"append",class:"v-card-item__append"},[t.append?Ke($a,{key:"append-defaults",disabled:!h,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},t.append):yt(Er,null,[e.appendIcon&&Ke(Sa,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&Ke(ih,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]})}),{}}}),pD=Qt({opacity:[Number,String],...$i(),...No()},"VCardText"),d1=_r()({name:"VCardText",props:pD(),setup(e,n){let{slots:t}=n;return Si(()=>Ke(e.tag,{class:sn(["v-card-text",e.class]),style:Zn([{"--v-card-text-opacity":e.opacity},e.style])},t)),{}}}),gD=Qt({appendAvatar:String,appendIcon:ps,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:ps,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ju(),...$i(),...wc(),...Ep(),...Lp(),...Qx(),...Np(),...Xx(),...ml(),...n1(),...No(),...Aa(),...eh({variant:"elevated"})},"VCard"),mD=_r()({name:"VCard",directives:{vRipple:Wp},props:gD(),setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:c}=gl(e),{borderClasses:h}=Qu(e),{colorClasses:g,colorStyles:v,variantClasses:s}=zp(e),{densityClasses:f}=Zu(e),{dimensionStyles:a}=Mp(e),{elevationClasses:l}=Op(e),{loaderClasses:u}=Zx(e),{locationStyles:d}=Dp(e),{positionClasses:o}=e1(e),{roundedClasses:p}=vl(e),m=t1(e,t),w=Wi(void 0);return wi(()=>e.loading,(x,R)=>{w.value=!x&&typeof R=="string"?R:typeof x=="boolean"?void 0:x},{immediate:!0}),Si(()=>{const x=e.link!==!1&&m.isLink.value,R=!e.disabled&&e.link!==!1&&(e.link||m.isClickable.value),T=x?"a":e.tag,_=!!(r.title||e.title!=null),C=!!(r.subtitle||e.subtitle!=null),P=_||C,O=!!(r.append||e.appendAvatar||e.appendIcon),E=!!(r.prepend||e.prependAvatar||e.prependIcon),k=!!(r.image||e.image),B=P||E||O,N=!!(r.text||e.text!=null);return Fa(Ke(T,dr(m.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":R},c.value,h.value,g.value,f.value,l.value,u.value,o.value,p.value,s.value,e.class],style:[v.value,a.value,d.value,{"--v-card-height":On(e.height)},e.style],onClick:R&&m.navigate.value,tabindex:e.disabled?-1:void 0}),{default:()=>[k&&yt("div",{key:"image",class:"v-card__image"},[r.image?Ke($a,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):Ke(Ku,{key:"image-img",cover:!0,src:e.image},null)]),Ke(KN,{name:"v-card",active:!!e.loading,color:w.value},{default:r.loader}),B&&Ke(fD,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),N&&Ke(d1,{key:"text"},{default:()=>[r.text?.()??e.text]}),r.default?.(),r.actions&&Ke(h1,null,{default:r.actions}),Pp(R,"v-card")]}),[[Wp,R&&e.ripple]])}),{}}}),vD=Ox("v-spacer","div","VSpacer"),yD=Ls({__name:"VSonner",props:{id:{},invert:{type:Boolean},position:{default:"bottom-center"},closeButtonPosition:{},hotkey:{default:()=>["altKey","KeyT"]},expand:{type:Boolean,default:!1},duration:{},gap:{},visibleToasts:{default:3},toastOptions:{},class:{},offset:{default:32},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){return(n,t)=>(_t(),Xt(Er,null,[Ke(Ht(H2),{position:e.position,hotkey:e.hotkey,expand:e.expand,"visible-toasts":e.visibleToasts,duration:e.duration,"toast-options":e.toastOptions,offset:e.offset},null,8,["position","hotkey","expand","visible-toasts","duration","toast-options","offset"]),xi(n.$slots,"default")],64))}}),bD=Ls({__name:"ProgressBar",props:{duration:{default:5e3},progressBarProps:{},isPaused:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean,default:!1}},setup(e){const n=e,t=n.reverseProgressBar?nn(0):nn(5e3);let r;wi(()=>n.isPaused,h=>{!h&&!n.progressBarProps?.indeterminate&&c()});function c(){r=setTimeout(()=>{n.isPaused||(n.reverseProgressBar?t.value+=120:t.value-=120,t.value<=0&&!n.reverseProgressBar?(t.value=0,clearInterval(r)):t.value>=n.duration&&n.reverseProgressBar?(t.value=n.duration,clearInterval(r)):c())},100)}return Ba(()=>{n.progressBarProps?.indeterminate||(t.value=n.reverseProgressBar?0:n.duration,c())}),Qs(()=>{clearInterval(r)}),(h,g)=>(_t(),hr(Ht(Jx),dr(n.progressBarProps,{"model-value":Math.floor(100*(Ht(t)/n.duration))}),null,16,["model-value"]))}}),wD={class:"d-flex align-center justify-center fill-height"},xD={key:1,class:"d-flex align-center mr-8"},CD={class:"d-flex align-center justify-center fill-height"},kD={key:3},_D={class:"pb-1"},AD=["innerHTML"],$D=Ls({inheritAttrs:!1,__name:"Toast",props:{text:{},description:{},vertical:{type:Boolean,default:!1},cardProps:{},cardTextProps:{},cardActionsProps:{default:()=>({})},action:{},prependIcon:{},prependIconProps:{},avatar:{},multipleAvatars:{},avatarProps:{},progressBar:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean},progressDuration:{default:5e3},progressBarProps:{},loading:{type:Boolean}},emits:["closeToast"],setup(e){const n=nn(!1);return(t,r)=>(_t(),hr(Ht(mD),dr({class:"card-snackbar"},e.cardProps,{onMouseenter:r[1]||(r[1]=c=>n.value=!0),onMouseleave:r[2]||(r[2]=c=>n.value=!1)}),{default:En(()=>[yt("div",{class:sn({"d-flex flex-no-wrap justify-space-between":!e.vertical})},[Ke(Ht(d1),dr(e.cardTextProps,{class:{"d-flex align-center":e.prependIcon||e.avatar||e.multipleAvatars}}),{default:En(()=>[e.avatar?(_t(),hr(Ht(ih),dr({key:0,class:"mr-2"},e.avatarProps),{default:En(()=>[Ke(Ht(Ku),{src:e.avatar,cover:""},{placeholder:En(()=>[yt("div",wD,[Ke(Ht(Bp),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:1},16)):e.multipleAvatars?(_t(),Xt("div",xD,[(_t(!0),Xt(Er,null,Il(e.multipleAvatars.length<=5?e.multipleAvatars:e.multipleAvatars.slice(0,5),(c,h)=>(_t(),hr(Ht(ih),dr({ref_for:!0},e.avatarProps,{key:h,class:"mr-n6",style:{zIndex:5-h}}),{default:En(()=>[Ke(Ht(Ku),{src:c,cover:""},{placeholder:En(()=>[yt("div",CD,[Ke(Ht(Bp),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:2},1040,["style"]))),128))])):qr("",!0),e.prependIcon?(_t(),hr(Ht(Sa),dr({key:2,class:"mr-2",icon:e.prependIcon},e.prependIconProps),null,16,["icon"])):qr("",!0),e.description?(_t(),Xt("div",kD,[yt("div",_D,Gr(e.text),1),yt("p",{class:"font-weight-light",innerHTML:e.description},null,8,AD)])):(_t(),Xt(Er,{key:4},[Eo(Gr(e.text),1)],64))]),_:1},16,["class"]),e.action?(_t(),hr(Ht(h1),Fc(dr({key:0},e.cardActionsProps)),{default:En(()=>[Ke(Ht(vD)),Ke(Ht(sD),dr(e.action.buttonProps,{text:e.action.label,onClick:r[0]||(r[0]=()=>{t.$emit("closeToast"),e.action?.onClick?.()})}),null,16,["text"])]),_:1},16)):qr("",!0)],2),Ke(Ht(xN),null,{default:En(()=>[Fa(Ke(bD,{duration:e.progressDuration,"progress-bar-props":e.progressBarProps,"is-paused":n.value,"reverse-progress-bar":e.reverseProgressBar},null,8,["duration","progress-bar-props","is-paused","reverse-progress-bar"]),[[Wh,e.progressBar]])]),_:1})]),_:1},16))}}),SD=(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t},TD=SD($D,[["__scopeId","data-v-c014bbd8"]]);function f1(e,n){const{description:t,action:r,...c}=n||{};return mp.custom(Jg(To(TD,{...c,progressBar:n?.progressBar??!1,progressDuration:n?.duration??5e3,progressBarProps:{...n?.progressBarProps,indeterminate:n?.loading},description:t,action:r,text:e})),{...c,unstyled:!0})}function yl(e,n){return function(t,r){return f1(t,{prependIcon:n,cardProps:{color:e,...r?.cardProps},...r})}}const Hp=Object.assign(f1,{success:yl("success","mdi-check-circle"),error:yl("error","mdi-cancel"),warning:yl("warning","mdi-alert"),info:yl("info","mdi-alert-circle"),primary:yl("primary","mdi-bell"),secondary:yl("secondary","mdi-bell"),dismiss(e){return mp.dismiss(e)},toastOriginal:mp}),ED={components:{VSonner:yD},data:function(){return{active:new Map,nextId:0,noToastPaths:["/login"],position:localStorage.toastPosition==="bottom"?"bottom":"top"}},created:function(){window.addEventListener("openc3-toast-position",this.onPositionChange)},unmounted:function(){window.removeEventListener("openc3-toast-position",this.onPositionChange)},methods:{onPositionChange:function(e){const n=e.detail?.position;(n==="top"||n==="bottom")&&(this.position=n)},toast:function(e,n){if(this.noToastPaths.includes(window.location.pathname))return;n===void 0&&(n=5e3);const t=!n,r=`openc3-toast-${this.nextId++}`;this.active.set(r,e);const c=eO(e.level),h=rp[np[e.level]];Hp(this.toastText(e),{id:r,description:this.toastDescription(e),duration:t?1/0:n,prependIcon:this.toastNotificationIcon(e),prependIconProps:{style:`color:${c}`},cardProps:{style:`background-color:${h}!important;color:${c}!important;`,"data-test":"toast"},action:{label:t?"Acknowledge":"Dismiss",buttonProps:{variant:"text",style:`color:${c}`,"data-test":"dismiss-toast","aria-label":t?"Acknowledge":"Dismiss"},onClick:()=>{t&&e.msg_id&&window.dispatchEvent(new CustomEvent("openc3-ack-alert",{detail:{msg_id:e.msg_id}}))}},onDismiss:()=>this.active.delete(r),onAutoClose:()=>this.active.delete(r)})},dismissAll:function(){Hp.dismiss(),this.active.clear()},dismissMatching:function(e){for(const[n,t]of this.active)e(t)&&(Hp.dismiss(n),this.active.delete(n))},toastText:function(e){return e.title||e.message||e.body||""},toastDescription:function(e){const n=this.toastText(e),t=[];e.body&&e.body!==n&&t.push(e.body),e.message&&e.message!==n&&t.push(e.message);const r=this.toastTime(e);if(r&&t.push(r),!!t.length)return hx.sanitize(t.join("<br>"))},toastTime:function(e){return e["@timestamp"]?e["@timestamp"]:e.time?new Date(e.time/1e6).toISOString():""},toastNotificationIcon:function(e){switch(String(e.level).toUpperCase()){case"FATAL":return"mdi-alert-octagon";case"ERROR":return"mdi-alert-circle";case"WARN":return"mdi-alert";default:return"mdi-information"}}}};function MD(e,n,t,r,c,h){const g=wr("VSonner");return _t(),hr(g,{position:e.position==="bottom"?"bottom-center":"top-center","visible-toasts":3},null,8,["position"])}const ID=ja(ED,[["render",MD]]);class RD{constructor(n={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=G0()),this.store}mount(){if(this.mounted)return;const n=jh(ID);n.use(Up);const t=document.createElement("div");document.body.appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({method:n,title:t,body:r,message:c,level:h,duration:g,type:v="alert",logToConsole:s=!1,saveToHistory:f=!0,...a}){this.mount(),s&&console.log(c?`${h.toUpperCase()} - ${c}`:`${h.toUpperCase()} - ${t}: ${r}`),f&&this.getStore().notifyAddHistory({title:t,body:r,message:c,level:h}),this[n]({title:t,body:r,message:c,level:h,duration:g,type:v,...a})}toast({title:n,body:t,message:r,level:c,duration:h,type:g,...v}){this.$root.toast({title:n,body:t,message:r,level:c,type:g,...v},h)}critical(n){this.open({...n,method:"toast",level:"critical"})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious(n){this.open({...n,method:"toast",level:"serious"})}caution(n){this.open({...n,method:"toast",level:"caution"})}WARN(n){this.caution(n)}normal(n){this.open({...n,method:"toast",level:"normal"})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby(n){this.open({...n,method:"toast",level:"standby"})}off(n){this.open({...n,method:"toast",level:"off"})}dismissAll(){this.$root?.dismissAll()}dismiss(n){this.$root?.dismissMatching(n)}}const LD={install(e,n){const t=new RD(n);e.provide("notify",t),e.config.globalProperties.hasOwnProperty("$notify")||(e.config.globalProperties.$notify=t)}},OD={component:e=>To(FN,{...e,class:"mdi"})},ND={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},DD={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},PD={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},zD={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},Up=sm({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:WO,cosmosDarkCobalt:ND,cosmosDarkIndigo:DD,cosmosDarkSlate:PD,cosmosDarkEmerald:zD}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:OD,...nO,...rO}}}),Vp=uk({createApp:jh,appOptions:{render(){return To(yk,{})},el:"#openc3-tool"},handleInstance:e=>{e.use(uO),e.use(sl),e.use(Up),e.use(JO),e.use(LD)}}),D3=ur("e",Vp.bootstrap),P3=ur("h",Vp.mount),z3=ur("u",Vp.unmount)})}}));