openc3-cosmos-tool-tlmgrapher 6.8.1 → 6.9.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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/tools/tlmgrapher/ArrayWidget-DLfNWDzN-9f22143029331cd19814.js +2 -0
  3. data/tools/tlmgrapher/ArrayplotWidget-CoRsUxHG-ef5979f195a7bba15989.js +1 -0
  4. data/tools/tlmgrapher/BarColumn-DHP-zQ4R-e2d8497c4dc637868220.js +1 -0
  5. data/tools/tlmgrapher/BlockWidget-BmHSFvOq-adeabc2bc42306e0069d.js +2 -0
  6. data/tools/tlmgrapher/ButtonWidget-C3ZWRjZZ-47e7119bd5f986e8020a.js +2 -0
  7. data/tools/tlmgrapher/CanvasWidget-CL-XzPF4-729a1d701303535b92ae.js +1 -0
  8. data/tools/tlmgrapher/CanvasdotWidget-D8Y9DgVE-62c0d75607abacf6f533.js +1 -0
  9. data/tools/tlmgrapher/CanvasimageWidget-DHSGK_tD-472b7d2d1344cb4fa5ec.js +1 -0
  10. data/tools/tlmgrapher/CanvasimagevalueWidget-Btt_fQfC-9fbc089f74ab0c77f910.js +1 -0
  11. data/tools/tlmgrapher/CanvaslabelWidget-BF_8RTjv-a3f31df63709982b6a55.js +1 -0
  12. data/tools/tlmgrapher/CanvaslabelvalueWidget-scbwaujI-81507b1b078d4373ceb8.js +1 -0
  13. data/tools/tlmgrapher/CanvaslineWidget-gRvm_-TT-4e96a34c4e48cdff3fe0.js +1 -0
  14. data/tools/tlmgrapher/CanvaslinevalueWidget-CljziRek-13b3fbfceeef5b81174f.js +1 -0
  15. data/tools/tlmgrapher/CheckbuttonWidget-BOabI_jE-dfd034d5ec1334a60685.js +1 -0
  16. data/tools/tlmgrapher/ComboboxWidget-BLXNYFiY-5aec7a684038d6b9a587.js +1 -0
  17. data/tools/tlmgrapher/DateWidget-BTqLCtLS-34aadef664a0629b4126.js +1 -0
  18. data/tools/tlmgrapher/DetailsDialog-BNCS3QAe-38bd187b947d5e4d6efd.js +1 -0
  19. data/tools/tlmgrapher/DynamicWidget-CfMtj7H8-c4cc362cface50953111.js +1 -0
  20. data/tools/tlmgrapher/FormatvalueWidget-CLYx8qbg-6263e0bf4bdfd2b8be7b.js +1 -0
  21. data/tools/tlmgrapher/Graph-BliBYJxD-a7d36c79441050605b64.js +1 -0
  22. data/tools/tlmgrapher/GraphWidget-Cb6Ozf54-b34b55243a4afbd71bf0.js +1 -0
  23. data/tools/tlmgrapher/HorizontalWidget-AY2M01qP-14f17bc562bcc9872ccd.js +1 -0
  24. data/tools/tlmgrapher/HorizontalboxWidget-2MEKvq_C-cc7c76d38397e306f366.js +1 -0
  25. data/tools/tlmgrapher/HorizontallineWidget-DgpOPA7q-d5a43d9f38bf4c7cb41e.js +1 -0
  26. data/tools/tlmgrapher/IframeWidget-UKKUl7k5-2223d07d2d9fd9ef6e33.js +1 -0
  27. data/tools/tlmgrapher/ImageLoader-C-CIL4YD-9033717e26fa3d661972.js +1 -0
  28. data/tools/tlmgrapher/ImageviewerWidget-DhuQH5Io-8d3e52222eef3850d4e2.js +1 -0
  29. data/tools/tlmgrapher/LabelWidget-SO9zqcNN-6ea8822eccbed42b22ba.js +1 -0
  30. data/tools/tlmgrapher/LabelledWidget-DWoM5AJ5-29de721891c2eaceca53.js +1 -0
  31. data/tools/tlmgrapher/LabelprogressbarWidget-D3vnkvQZ-e029cc70a17088e3bcdf.js +1 -0
  32. data/tools/tlmgrapher/LabelsparklineWidget-DO0T-Jot-d899fc5423075f625866.js +1 -0
  33. data/tools/tlmgrapher/LabelvalueWidget-B6BbNFnk-50a709498132a21bff06.js +1 -0
  34. data/tools/tlmgrapher/LabelvaluedescWidget-CxfL-H9C-1bdd54650c839ddf4cfe.js +1 -0
  35. data/tools/tlmgrapher/LabelvaluelimitsbarWidget-BT5k9mHv-e48a4da90647314a1f05.js +1 -0
  36. data/tools/tlmgrapher/LabelvaluelimitscolumnWidget-DUbmxh4p-3fb471825f274ff0386a.js +1 -0
  37. data/tools/tlmgrapher/LabelvaluerangebarWidget-DexAc2UB-ed0709619ba7bcb4a3b2.js +1 -0
  38. data/tools/tlmgrapher/Layout-Dd6dRf3R-f6256f318b08e0f7c005.js +1 -0
  39. data/tools/tlmgrapher/LedWidget-D1RwHb_V-d8fe61068d2f939f324c.js +1 -0
  40. data/tools/tlmgrapher/LimitsbarWidget-ClOmoV50-80df89ffda098f7902a8.js +1 -0
  41. data/tools/tlmgrapher/LimitscolorWidget-CBUoEYKp-83d2d3d29206c1b51080.js +1 -0
  42. data/tools/tlmgrapher/LimitscolumnWidget-hsHkmY-_-fb5460ed4f3f3df3f5f4.js +1 -0
  43. data/tools/tlmgrapher/LinegraphWidget-CXrKtxOo-1927c18030a1a268987d.js +1 -0
  44. data/tools/tlmgrapher/MatrixbycolumnsWidget-CsogVU9c-5f47208858ac1deec7b5.js +1 -0
  45. data/tools/tlmgrapher/ProgressbarWidget-CO6CEkxP-483e8946921056cd1ef7.js +1 -0
  46. data/tools/tlmgrapher/RadiobuttonWidget-DrxUclws-1154c0fffdf466530990.js +1 -0
  47. data/tools/tlmgrapher/RadiogroupWidget-DN9C38cg-18b7ec0d01fbd5c13d38.js +1 -0
  48. data/tools/tlmgrapher/RangebarWidget-5uQTfLMP-14b1333f12a7f042994c.js +1 -0
  49. data/tools/tlmgrapher/RollupWidget-B0DCULnu-d32bac1b2da69af0ec0a.js +1 -0
  50. data/tools/tlmgrapher/ScrollwindowWidget-BOkZQgtf-73057d5763bd7a477415.js +1 -0
  51. data/tools/tlmgrapher/SignalWidget-Cis0Xkea-4b240e77380985a38575.js +1 -0
  52. data/tools/tlmgrapher/SpacerWidget-CLcqC2Qk-1bb1939085b18e1e5385.js +1 -0
  53. data/tools/tlmgrapher/SparklineWidget-CTp83eZ--e82c17e5c954e05d4b34.js +1 -0
  54. data/tools/tlmgrapher/TabbookWidget-uucd-zsX-36f33490179bf41320ea.js +1 -0
  55. data/tools/tlmgrapher/TextboxWidget-C2n38ti5-c44179f232be07919fa4.js +1 -0
  56. data/tools/tlmgrapher/TextfieldWidget--HTv9ddk-4b31e558a0e54bcace8b.js +1 -0
  57. data/tools/tlmgrapher/TimeWidget-CPNVZaUM-770ffb858d634a70c03b.js +1 -0
  58. data/tools/tlmgrapher/TitleWidget-Cp0cb6V8-278432e1c816d8e1110d.js +1 -0
  59. data/tools/tlmgrapher/TlmGrapher-10a49e380fbbb04770d6.js +27 -0
  60. data/tools/tlmgrapher/VWidget-DQGJRgAk-6419f0543944121c08ba.js +1 -0
  61. data/tools/tlmgrapher/ValueWidget-Bk1RFjks-f56c3be93a9009bac95a.js +1 -0
  62. data/tools/tlmgrapher/ValuelimitsbarWidget-C0HIBYh2-2538bcc938061227fa4f.js +1 -0
  63. data/tools/tlmgrapher/ValuelimitscolumnWidget-BTT90uyX-6d3a25fd197315f5a929.js +1 -0
  64. data/tools/tlmgrapher/ValuerangebarWidget-CcQw_XK9-38396768a7fa88b0c46c.js +1 -0
  65. data/tools/tlmgrapher/VerticalWidget-CNtFQv3R-36781b9075eda748d7ef.js +1 -0
  66. data/tools/tlmgrapher/VerticalboxWidget-Yxmz1SnU-152a8814d9c32983ea0f.js +1 -0
  67. data/tools/tlmgrapher/Widget-LsyjS7ZS-1391a2f8c33d8829d6a4.js +1 -0
  68. data/tools/tlmgrapher/main-4d8f372138921070e771.js +1503 -0
  69. data/tools/tlmgrapher/main.js +1 -1
  70. metadata +69 -69
  71. data/tools/tlmgrapher/ArrayWidget-FGjLmPfG-800405c59a42c304a0aa.js +0 -2
  72. data/tools/tlmgrapher/ArrayplotWidget-Cfo18TYm-15426793040dcba9c93f.js +0 -1
  73. data/tools/tlmgrapher/BarColumn-BuJ6MTYG-241fa69d3e51d5104da7.js +0 -1
  74. data/tools/tlmgrapher/BlockWidget-B_JwY8-N-4da2feabfe13146cebc5.js +0 -2
  75. data/tools/tlmgrapher/ButtonWidget-Cd4M3aBD-6c092dbafe87f0f1c399.js +0 -2
  76. data/tools/tlmgrapher/CanvasWidget-CpKdOgTG-4c6998d0863715befb23.js +0 -1
  77. data/tools/tlmgrapher/CanvasdotWidget-zYbI5LAw-445fc96cee7c8f768fc7.js +0 -1
  78. data/tools/tlmgrapher/CanvasimageWidget--ORQEPj6-5b8dd13e5d00a916ef48.js +0 -1
  79. data/tools/tlmgrapher/CanvasimagevalueWidget-CtAtYHRm-42be3d4c11f94c0ce1c6.js +0 -1
  80. data/tools/tlmgrapher/CanvaslabelWidget-DWoROb6o-adfd7e9b244ac5443a6b.js +0 -1
  81. data/tools/tlmgrapher/CanvaslabelvalueWidget-A4UbtwEc-70cd6f6f6e7742401697.js +0 -1
  82. data/tools/tlmgrapher/CanvaslineWidget-BBGi0nrb-f429f6a10955847ccec3.js +0 -1
  83. data/tools/tlmgrapher/CanvaslinevalueWidget-C_9OkL7f-9602d1374cda73271618.js +0 -1
  84. data/tools/tlmgrapher/CheckbuttonWidget-CTJg8Ypg-85a75853b42393a7dc54.js +0 -1
  85. data/tools/tlmgrapher/ComboboxWidget-DWiMZZk8-8c92cdc7c85a4a077029.js +0 -1
  86. data/tools/tlmgrapher/DateWidget-C7GSh68_-f93ad3d8973c69d725f5.js +0 -1
  87. data/tools/tlmgrapher/DetailsDialog-B2l0BNc2-9d99904fa0b818607c35.js +0 -1
  88. data/tools/tlmgrapher/DynamicWidget-CfMtj7H8-6e8947888c06a4c42fda.js +0 -1
  89. data/tools/tlmgrapher/FormatvalueWidget-CZJdsUAq-5b2a1e8aafc84914bd0b.js +0 -1
  90. data/tools/tlmgrapher/Graph-DZBpdSgR-4f8750c554f266b6665f.js +0 -1
  91. data/tools/tlmgrapher/GraphWidget-CHm4bhMI-69fcf6e2284dd654b624.js +0 -1
  92. data/tools/tlmgrapher/HorizontalWidget-B2skpV1m-a71908c3d060b5355584.js +0 -1
  93. data/tools/tlmgrapher/HorizontalboxWidget-BI0WZP5M-dfbd328b237595fe499e.js +0 -1
  94. data/tools/tlmgrapher/HorizontallineWidget-AmxVeXcU-857598846fe4a94a8748.js +0 -1
  95. data/tools/tlmgrapher/IframeWidget-DcqRMhyW-847b4a14a1ea1b746776.js +0 -1
  96. data/tools/tlmgrapher/ImageLoader-ly4zoGpO-a8ca186ff96bd264cca0.js +0 -1
  97. data/tools/tlmgrapher/ImageviewerWidget-cmDHcmW4-22371fd1d675f181c305.js +0 -1
  98. data/tools/tlmgrapher/LabelWidget-Bemw8Erq-207d94538bae4f27ddaa.js +0 -1
  99. data/tools/tlmgrapher/LabelledWidget-Cb7EvtUG-44e007d855635c61b800.js +0 -1
  100. data/tools/tlmgrapher/LabelprogressbarWidget-qYgrGqLY-8dc7772fe6f0c2440c3a.js +0 -1
  101. data/tools/tlmgrapher/LabelsparklineWidget-CMklq9-f-9d8e2eba5dfa99b0134a.js +0 -1
  102. data/tools/tlmgrapher/LabelvalueWidget-NjCMgiYL-877f0352e88fd4a1b9ac.js +0 -1
  103. data/tools/tlmgrapher/LabelvaluedescWidget-Dflulqm7-289f8640a439bca17578.js +0 -1
  104. data/tools/tlmgrapher/LabelvaluelimitsbarWidget-M34NDk2S-20e813123f891ebd30ca.js +0 -1
  105. data/tools/tlmgrapher/LabelvaluelimitscolumnWidget-Cchaw_-k-2e6801f537fefa15245c.js +0 -1
  106. data/tools/tlmgrapher/LabelvaluerangebarWidget-7pEykAm3-4b712e0e6bcd09c8d0ff.js +0 -1
  107. data/tools/tlmgrapher/Layout-BNvQKlyy-92ba78a427abad4f5055.js +0 -1
  108. data/tools/tlmgrapher/LedWidget-_EA7ZKM8-486c259bcde22c2041f8.js +0 -1
  109. data/tools/tlmgrapher/LimitsbarWidget-DdoQf46y-49b71131d1105f9a4fb5.js +0 -1
  110. data/tools/tlmgrapher/LimitscolorWidget-Cv0umnVo-ea01f48443d1541cd166.js +0 -1
  111. data/tools/tlmgrapher/LimitscolumnWidget-CnCQtxim-4b7cf381dfa03bfe5bc1.js +0 -1
  112. data/tools/tlmgrapher/LinegraphWidget-ekyQoR7x-59a1fd6da4bc19f402d8.js +0 -1
  113. data/tools/tlmgrapher/MatrixbycolumnsWidget-IBUcGNF7-7b1d2a375375f68a0e25.js +0 -1
  114. data/tools/tlmgrapher/ProgressbarWidget-CnveFZVh-d4d69b44c3e7917b9ab8.js +0 -1
  115. data/tools/tlmgrapher/RadiobuttonWidget-hWLrCb8W-9bff9f6ff182cae6911c.js +0 -1
  116. data/tools/tlmgrapher/RadiogroupWidget-DK1fphkh-968507e7c2e517625c5a.js +0 -1
  117. data/tools/tlmgrapher/RangebarWidget-vspY8CGV-9896f73dabbbd3e51ba8.js +0 -1
  118. data/tools/tlmgrapher/RollupWidget-07pNcXQV-1de937d5690175b48387.js +0 -1
  119. data/tools/tlmgrapher/ScrollwindowWidget-BcbyrYUo-b1b8726ffb1d0a951619.js +0 -1
  120. data/tools/tlmgrapher/SignalWidget-BDp5sUHj-935969be24c85ce1e88d.js +0 -1
  121. data/tools/tlmgrapher/SpacerWidget-DcOnQ1yI-43d532043f1642451920.js +0 -1
  122. data/tools/tlmgrapher/SparklineWidget-CVglnlAm-a79e6677f90732295b52.js +0 -1
  123. data/tools/tlmgrapher/TabbookWidget-p51Oa7Ru-704a4a5762fc9592a502.js +0 -1
  124. data/tools/tlmgrapher/TextboxWidget-DM-XX97e-e32aa1cda6e19374098e.js +0 -1
  125. data/tools/tlmgrapher/TextfieldWidget-7cYHAgH8-3507abe988f64ba9dd23.js +0 -1
  126. data/tools/tlmgrapher/TimeWidget-EvQJyu6x-73615eeba16033acc3c0.js +0 -1
  127. data/tools/tlmgrapher/TitleWidget-6ddfJuqd-29893fce216b00b3403b.js +0 -1
  128. data/tools/tlmgrapher/TlmGrapher-bb12b9e8ccc39e96eff9.js +0 -27
  129. data/tools/tlmgrapher/VWidget-P-X9ffkl-d0e4f2909fa1a4d88f83.js +0 -1
  130. data/tools/tlmgrapher/ValueWidget-DAUGuQ9f-6d7f1136c81c84de8921.js +0 -1
  131. data/tools/tlmgrapher/ValuelimitsbarWidget-DmLUXw0I-78b0f418e72ccecc70a4.js +0 -1
  132. data/tools/tlmgrapher/ValuelimitscolumnWidget-DDmo8wHJ-319671701eb629a4b4a7.js +0 -1
  133. data/tools/tlmgrapher/ValuerangebarWidget-CbzWSWq3-bf6b3569ff3b2ced8274.js +0 -1
  134. data/tools/tlmgrapher/VerticalWidget-BuKinn_c-a7caba2703b602e31b15.js +0 -1
  135. data/tools/tlmgrapher/VerticalboxWidget-C0zD5h0O-6ed93f149cacdd47e110.js +0 -1
  136. data/tools/tlmgrapher/Widget-BIXl-Pk5-314e11c982d247a5bf99.js +0 -1
  137. data/tools/tlmgrapher/main-ad836d6160b8fa2b08fa.js +0 -1502
@@ -0,0 +1,1503 @@
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(mr,it){"use strict";var Ct,so,In,Lt,ut,Jr,vr,Cp,kp,Xs,La,Al,Co,Mr,ei,uu,Zs,_l,$l,Sp,Ap,_p,hu,$p,Tp,Mp,Ep,Ip,du,Lp,Rp,Op,pu,Np,Dp;return{setters:[Tt=>{Ct=Tt.resolveComponent,so=Tt.createBlock,In=Tt.openBlock,Lt=Tt.withCtx,ut=Tt.createVNode,Jr=Tt.createElementBlock,vr=Tt.createElementVNode,Cp=Tt.useCssVars,kp=Tt.defineAsyncComponent,Xs=Tt.h,La=Tt.normalizeStyle,Al=Tt.Fragment,Co=Tt.createCommentVNode,Mr=Tt.createTextVNode,ei=Tt.toDisplayString,uu=Tt.withKeys,Zs=Tt.withModifiers,_l=Tt.withDirectives,$l=Tt.vShow,Sp=Tt.defineComponent,Ap=Tt.warn,_p=Tt.inject,hu=Tt.computed,$p=Tt.shallowRef,Tp=Tt.watchEffect,Mp=Tt.normalizeClass,Ep=Tt.getCurrentInstance,Ip=Tt.provide,du=Tt.createApp,Lp=Tt.mergeProps},Tt=>{Rp=Tt.createRouter,Op=Tt.createWebHistory},Tt=>{pu=Tt.getMountedApps},Tt=>{Np=Tt.createStore},Tt=>{Dp=Tt.createVuetify}],execute:function(){mr({$:Up,b:gd,c:yM,f:Ir,l:An,y:Qn});var Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(p){return Object.getOwnPropertyDescriptor(n,p).enumerable})),e.push.apply(e,r)}return e}function gs(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(e),!0).forEach(function(r){l0(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Fp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function l0(n,t,e){return(t=function(r){var p=function(g,v){if(ms(g)!=="object"||g===null)return g;var b=g[Symbol.toPrimitive];if(b!==void 0){var h=b.call(g,v);if(ms(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(g)}(r,"string");return ms(p)==="symbol"?p:String(p)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function ms(n){return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,p=String(e),g=p.length,v=-1,b="",h=p.charCodeAt(0);++v<g;)(r=p.charCodeAt(v))!=0?b+=r>=1&&r<=31||r==127||v==0&&r>=48&&r<=57||v==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":v==0&&g==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+p.charAt(v):p.charAt(v):b+="�";return b};n.CSS||(n.CSS={}),n.CSS.escape=t})(Tt);var c0={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function u0(n){if(ms(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=gs(gs({},c0),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ms(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:h0.bind(null,t,e),mount:d0.bind(null,t,e),unmount:f0.bind(null,t,e),update:p0.bind(null,t,e)}}function h0(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function d0(n,t,e){var r={};return Promise.resolve().then(function(){return function(p,g){return typeof p.appOptions=="function"?p.appOptions(g):Promise.resolve(gs({},p.appOptions))}(n,e).then(function(p){var g;if(e.domElement&&!p.el&&(p.el=e.domElement),p.el)if(typeof p.el=="string"){if(!(g=document.querySelector(p.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(p.el))}else(g=p.el).id||(g.id="single-spa-application:".concat(e.name)),p.el="#".concat(CSS.escape(g.id));else{var v="single-spa-application:".concat(e.name);p.el="#".concat(CSS.escape(v)),(g=document.getElementById(v))||((g=document.createElement("div")).id=v,document.body.appendChild(g))}if(!n.replaceMode&&(p.el=p.el+" .single-spa-container",!g.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",g.appendChild(b)}r.domEl=g,p.render||p.template||!n.rootComponent||(p.render=function(f){return f(n.rootComponent)}),p.data||(p.data={});var h=p.data;if(p.data=function(){return gs(gs({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(p),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return r.root=r.vueInstance.mount(p.el),t[e.name]=r,r.vueInstance});r.root=r.vueInstance.mount(p.el)}else if(r.vueInstance=new n.Vue(p),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return t[e.name]=r,r.vueInstance});return t[e.name]=r,r.vueInstance})})}function p0(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],p=gs(gs({},n.appOptions.data||{}),e),g=r.root||r.vueInstance;for(var v in p)g[v]=p[v]})}function f0(n,t,e){return Promise.resolve().then(function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const g0=mr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,p]of t)e[r]=p;return e}),m0={};function v0(n,t){const e=Ct("router-view"),r=Ct("v-app");return In(),so(r,{id:"innerapp"},{default:Lt(()=>[ut(e)]),_:1})}const y0=g0(m0,[["render",v0]]),VN="modulepreload",KN=function(n){return"/"+n},GN={},ot=function(t,e,r){let p=Promise.resolve();function g(v){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=v,window.dispatchEvent(b),!b.defaultPrevented)throw v}return p.then(v=>{for(const b of v||[])b.status==="rejected"&&g(b.reason);return t().catch(g)})},Pp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/tlmgrapher/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(Pp)},Ko=mr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,p]of t)e[r]=p;return e}),w0="/icons/customIcons.svg",fu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return w0+"#"+this.icon}}},Wp=()=>{Cp(n=>({"259824e2":n.color}))},Bp=fu.setup;fu.setup=Bp?(n,t)=>(Wp(),Bp(n,t)):Wp;const b0={class:"cosmos-custom-icon"},x0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},C0=["href"];function k0(n,t,e,r,p,g){return In(),Jr("span",b0,[(In(),Jr("svg",x0,[vr("use",{href:g.iconSrc},null,8,C0)]))])}const S0=Ko(fu,[["render",k0],["__scopeId","data-v-4b6f1199"]]),Tl=6e4,gu=36e5,A0=1e3,zp=Symbol.for("constructDateFrom");function Qn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&zp in n?n[zp](t):n instanceof Date?new n.constructor(t):new Date(t)}function An(n,t){return Qn(t||n,n)}let _0={};function Qs(){return _0}function Go(n,t){var e,r,p,g;const v=Qs(),b=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??v.weekStartsOn??((g=(p=v.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,h=An(n,t==null?void 0:t.in),f=h.getDay(),s=(f<b?7:0)+f-b;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Js(n,t){return Go(n,{...t,weekStartsOn:1})}function Hp(n,t){const e=An(n,void 0),r=e.getFullYear(),p=Qn(e,0);p.setFullYear(r+1,0,4),p.setHours(0,0,0,0);const g=Js(p),v=Qn(e,0);v.setFullYear(r,0,4),v.setHours(0,0,0,0);const b=Js(v);return e.getTime()>=g.getTime()?r+1:e.getTime()>=b.getTime()?r:r-1}function Ml(n){const t=An(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function $0(n,...t){const e=Qn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function jp(n,t){const e=An(n,void 0);return e.setHours(0,0,0,0),e}function T0(n,t,e){const[r,p]=$0(void 0,n,t),g=jp(r),v=jp(p),b=+g-Ml(g),h=+v-Ml(v);return Math.round((b-h)/864e5)}function M0(n,t){const e=Hp(n),r=Qn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Js(r)}function E0(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Up(n){return!(!E0(n)&&typeof n!="number"||isNaN(+An(n)))}function I0(n,t){const e=An(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const L0={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"}},R0=(n,t,e)=>{let r;const p=L0[n];return typeof p=="string"?r=p:t===1?r=p.one:r=p.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function mu(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const O0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},N0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},D0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},F0={date:mu({formats:O0,defaultWidth:"full"}),time:mu({formats:N0,defaultWidth:"full"}),dateTime:mu({formats:D0,defaultWidth:"full"})},P0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},W0=(n,t,e,r)=>P0[n];function Ra(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let p;if(r==="formatting"&&n.formattingValues){const v=n.defaultFormattingWidth||n.defaultWidth,b=e!=null&&e.width?String(e.width):v;p=n.formattingValues[b]||n.formattingValues[v]}else{const v=n.defaultWidth,b=e!=null&&e.width?String(e.width):n.defaultWidth;p=n.values[b]||n.values[v]}const g=n.argumentCallback?n.argumentCallback(t):t;return p[g]}}const B0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},H0={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"]},j0={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"]},U0={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"}},V0={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"}},K0=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},G0={ordinalNumber:K0,era:Ra({values:B0,defaultWidth:"wide"}),quarter:Ra({values:z0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ra({values:H0,defaultWidth:"wide"}),day:Ra({values:j0,defaultWidth:"wide"}),dayPeriod:Ra({values:U0,defaultWidth:"wide",formattingValues:V0,defaultFormattingWidth:"wide"})};function Oa(n){return(t,e={})=>{const r=e.width,p=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],g=t.match(p);if(!g)return null;const v=g[0],b=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(b)?Y0(b,a=>a.test(v)):q0(b,a=>a.test(v));let f;f=n.valueCallback?n.valueCallback(h):h,f=e.valueCallback?e.valueCallback(f):f;const s=t.slice(v.length);return{value:f,rest:s}}}function q0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Y0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function X0(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const p=r[0],g=t.match(n.parsePattern);if(!g)return null;let v=n.valueCallback?n.valueCallback(g[0]):g[0];v=e.valueCallback?e.valueCallback(v):v;const b=t.slice(p.length);return{value:v,rest:b}}}const Z0=/^(\d+)(th|st|nd|rd)?/i,Q0=/\d+/i,J0={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},ex={any:[/^b/i,/^(a|c)/i]},tx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nx={any:[/1/i,/2/i,/3/i,/4/i]},rx={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},ix={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]},ox={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},sx={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]},ax={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},lx={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}},cx={ordinalNumber:X0({matchPattern:Z0,parsePattern:Q0,valueCallback:n=>parseInt(n,10)}),era:Oa({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:ex,defaultParseWidth:"any"}),quarter:Oa({matchPatterns:tx,defaultMatchWidth:"wide",parsePatterns:nx,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Oa({matchPatterns:rx,defaultMatchWidth:"wide",parsePatterns:ix,defaultParseWidth:"any"}),day:Oa({matchPatterns:ox,defaultMatchWidth:"wide",parsePatterns:sx,defaultParseWidth:"any"}),dayPeriod:Oa({matchPatterns:ax,defaultMatchWidth:"any",parsePatterns:lx,defaultParseWidth:"any"})},Vp={code:"en-US",formatDistance:R0,formatLong:F0,formatRelative:W0,localize:G0,match:cx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ux(n,t){const e=An(n,void 0);return T0(e,I0(e))+1}function Kp(n,t){const e=An(n,void 0),r=+Js(e)-+M0(e);return Math.round(r/6048e5)+1}function vu(n,t){var e,r,p,g;const v=An(n,t==null?void 0:t.in),b=v.getFullYear(),h=Qs(),f=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((g=(p=h.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,s=Qn((t==null?void 0:t.in)||n,0);s.setFullYear(b+1,0,f),s.setHours(0,0,0,0);const a=Go(s,t),u=Qn((t==null?void 0:t.in)||n,0);u.setFullYear(b,0,f),u.setHours(0,0,0,0);const c=Go(u,t);return+v>=+a?b+1:+v>=+c?b:b-1}function hx(n,t){var e,r,p,g;const v=Qs(),b=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??v.firstWeekContainsDate??((g=(p=v.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,h=vu(n,t),f=Qn((t==null?void 0:t.in)||n,0);return f.setFullYear(h,0,b),f.setHours(0,0,0,0),Go(f,t)}function Gp(n,t){const e=An(n,t==null?void 0:t.in),r=+Go(e,t)-+hx(e,t);return Math.round(r/6048e5)+1}function cn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const qo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return cn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):cn(e+1,2)},d(n,t){return cn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return cn(n.getHours()%12||12,t.length)},H(n,t){return cn(n.getHours(),t.length)},m(n,t){return cn(n.getMinutes(),t.length)},s(n,t){return cn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),p=Math.trunc(r*Math.pow(10,e-3));return cn(p,t.length)}},ea={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qp={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),p=r>0?r:1-r;return e.ordinalNumber(p,{unit:"year"})}return qo.y(n,t)},Y:function(n,t,e,r){const p=vu(n,r),g=p>0?p:1-p;if(t==="YY"){const v=g%100;return cn(v,2)}return t==="Yo"?e.ordinalNumber(g,{unit:"year"}):cn(g,t.length)},R:function(n,t){const e=Hp(n);return cn(e,t.length)},u:function(n,t){const e=n.getFullYear();return cn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return cn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return cn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return qo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return cn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const p=Gp(n,r);return t==="wo"?e.ordinalNumber(p,{unit:"week"}):cn(p,t.length)},I:function(n,t,e){const r=Kp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):cn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):qo.d(n,t)},D:function(n,t,e){const r=ux(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):cn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const p=n.getDay(),g=(p-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(g);case"ee":return cn(g,2);case"eo":return e.ordinalNumber(g,{unit:"day"});case"eee":return e.day(p,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(p,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(p,{width:"short",context:"formatting"});case"eeee":default:return e.day(p,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const p=n.getDay(),g=(p-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(g);case"cc":return cn(g,t.length);case"co":return e.ordinalNumber(g,{unit:"day"});case"ccc":return e.day(p,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(p,{width:"narrow",context:"standalone"});case"cccccc":return e.day(p,{width:"short",context:"standalone"});case"cccc":default:return e.day(p,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),p=r===0?7:r;switch(t){case"i":return String(p);case"ii":return cn(p,t.length);case"io":return e.ordinalNumber(p,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let p;switch(r===12?p=ea.noon:r===0?p=ea.midnight:p=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(p,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(p,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(p,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let p;switch(r>=17?p=ea.evening:r>=12?p=ea.afternoon:r>=4?p=ea.morning:p=ea.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(p,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(p,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return qo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):qo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):cn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):cn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):qo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):qo.s(n,t)},S:function(n,t){return qo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Xp(r);case"XXXX":case"XX":return vs(r);case"XXXXX":case"XXX":default:return vs(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Xp(r);case"xxxx":case"xx":return vs(r);case"xxxxx":case"xxx":default:return vs(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yp(r,":");case"OOOO":default:return"GMT"+vs(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yp(r,":");case"zzzz":default:return"GMT"+vs(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return cn(r,t.length)},T:function(n,t,e){return cn(+n,t.length)}};function Yp(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),p=Math.trunc(r/60),g=r%60;return g===0?e+String(p):e+String(p)+t+cn(g,2)}function Xp(n,t){return n%60===0?(n>0?"-":"+")+cn(Math.abs(n)/60,2):vs(n,t)}function vs(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),p=cn(Math.trunc(r/60),2),g=cn(r%60,2);return e+p+t+g}const Zp=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Qp=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},dx=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],p=e[2];if(!p)return Zp(n,t);let g;switch(r){case"P":g=t.dateTime({width:"short"});break;case"PP":g=t.dateTime({width:"medium"});break;case"PPP":g=t.dateTime({width:"long"});break;case"PPPP":default:g=t.dateTime({width:"full"});break}return g.replace("{{date}}",Zp(r,t)).replace("{{time}}",Qp(p,t))},yu={p:Qp,P:dx},px=/^D+$/,fx=/^Y+$/,gx=["D","DD","YY","YYYY"];function Jp(n){return px.test(n)}function ef(n){return fx.test(n)}function wu(n,t,e){const r=mx(n,t,e);if(console.warn(r),gx.includes(n))throw new RangeError(r)}function mx(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wx=/^'([^]*?)'?$/,bx=/''/g,xx=/[a-zA-Z]/;function ys(n,t,e){var r,p,g,v,b,h,f,s;const a=Qs(),u=(e==null?void 0:e.locale)??a.locale??Vp,c=(e==null?void 0:e.firstWeekContainsDate)??((p=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:p.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(g=a.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((h=(b=e==null?void 0:e.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(f=a.locale)==null?void 0:f.options)==null?void 0:s.weekStartsOn)??0,l=An(n,e==null?void 0:e.in);if(!Up(l))throw new RangeError("Invalid time value");let d=t.match(yx).map(x=>{const I=x[0];if(I==="p"||I==="P"){const $=yu[I];return $(x,u.formatLong)}return x}).join("").match(vx).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const I=x[0];if(I==="'")return{isToken:!1,value:Cx(x)};if(qp[I])return{isToken:!0,value:x};if(I.match(xx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:x}});u.localize.preprocessor&&(d=u.localize.preprocessor(l,d));const w={firstWeekContainsDate:c,weekStartsOn:i,locale:u};return d.map(x=>{if(!x.isToken)return x.value;const I=x.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&ef(I)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Jp(I))&&wu(I,t,String(n));const $=qp[I[0]];return $(l,I,u.localize,w)}).join("")}function Cx(n){const t=n.match(wx);return t?t[1].replace(bx,"'"):n}var Yo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function El(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var tf={exports:{}},nf;function kx(){return nf||(nf=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var p=function(s,a,u){if(typeof s!="string"){p.original?p.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),p.modules[s]||(p.payloads[s]=u,p.modules[s]=null)};p.modules={},p.payloads={};var g=function(s,a,u){if(typeof a=="string"){var c=h(s,a);if(c!=null)return u&&u(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var i=[],l=0,d=a.length;l<d;++l){var w=h(s,a[l]);if(w==null&&v.original)return;i.push(w)}return u&&u.apply(null,i)||!0}},v=function(s,a){var u=g("",s,a);return u==null&&v.original?v.original.apply(this,arguments):u},b=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return b(s,u[0])+"!"+b(s,u[1])}if(a.charAt(0)=="."){var c=s.split("/").slice(0,-1).join("/");for(a=c+"/"+a;a.indexOf(".")!==-1&&i!=a;){var i=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var u=p.modules[a];if(!u){if(u=p.payloads[a],typeof u=="function"){var c={},i={id:a,uri:"",exports:c,packaged:!0},l=function(w,x){return g(a,w,x)},d=u(l,c,i);c=d||i.exports,p.modules[a]=c,delete p.payloads[a]}u=p.modules[a]=c||u}return u};function f(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(p.original=a.define,a.define=p,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(v.original=a.require,a.require=v,a.require.packaged=!0)}f(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,p){function g(v,b,h){Object.defineProperty(v,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||g(String.prototype,"startsWith",function(v,b){return b=b||0,this.lastIndexOf(v,b)===b}),String.prototype.endsWith||g(String.prototype,"endsWith",function(v,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=v.length;var f=h.indexOf(v,b);return f!==-1&&f===b}),String.prototype.repeat||g(String.prototype,"repeat",function(v){for(var b="",h=this;v>0;)v&1&&(b+=h),(v>>=1)&&(h+=h);return b}),String.prototype.includes||g(String.prototype,"includes",function(v,b){return this.indexOf(v,b)!=-1}),Object.assign||(Object.assign=function(v){if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(v),h=1;h<arguments.length;h++){var f=arguments[h];f!=null&&Object.keys(f).forEach(function(s){b[s]=f[s]})}return b}),Object.values||(Object.values=function(v){return Object.keys(v).map(function(b){return v[b]})}),Array.prototype.find||g(Array.prototype,"find",function(v){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var s=this[f];if(v.call(h,s,f,this))return s}}),Array.prototype.findIndex||g(Array.prototype,"findIndex",function(v){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var s=this[f];if(v.call(h,s,f,this))return f}}),Array.prototype.includes||g(Array.prototype,"includes",function(v,b){return this.indexOf(v,b)!=-1}),Array.prototype.fill||g(Array.prototype,"fill",function(v){for(var b=this,h=b.length>>>0,f=arguments[1],s=f>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],c=u===void 0?h:u>>0,i=c<0?Math.max(h+c,0):Math.min(c,h);a<i;)b[a]=v,a++;return b}),Array.of||g(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,p){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,p){r.deepCopy=function g(v){if(typeof v!="object"||!v)return v;var b;if(Array.isArray(v)){b=[];for(var h=0;h<v.length;h++)b[h]=g(v[h]);return b}if(Object.prototype.toString.call(v)!=="[object Object]")return v;b={};for(var h in v)b[h]=g(v[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,p){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,h){for(var f="";h>0;)h&1&&(f+=b),(h>>=1)&&(b+=b);return f};var g=/^\s\s*/,v=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(g,"")},r.stringTrimRight=function(b){return b.replace(v,"")},r.copyObject=function(b){var h={};for(var f in b)h[f]=b[f];return h},r.copyArray=function(b){for(var h=[],f=0,s=b.length;f<s;f++)b[f]&&typeof b[f]=="object"?h[f]=this.copyObject(b[f]):h[f]=b[f];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var h={},f=0;f<b.length;f++)h[b[f]]=1;return h},r.createMap=function(b){var h=Object.create(null);for(var f in b)h[f]=b[f];return h},r.arrayRemove=function(b,h){for(var f=0;f<=b.length;f++)h===b[f]&&b.splice(f,1)},r.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(b){return(""+b).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(b,h){var f=[];return b.replace(h,function(s){f.push({offset:arguments[arguments.length-2],length:s.length})}),f},r.deferredCall=function(b){var h=null,f=function(){h=null,b()},s=function(a){return s.cancel(),h=setTimeout(f,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),b(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(b,h){var f=null,s=function(){f=null,b()},a=function(u){f==null&&(f=setTimeout(s,u||h))};return a.delay=function(u){f&&clearTimeout(f),f=setTimeout(s,u||h)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){f&&clearTimeout(f),f=null},a.isPending=function(){return f},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,h,f){return f&&b.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,p){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var g=typeof navigator=="object"?navigator:{},v=(/mac|win|linux/i.exec(g.platform)||["other"])[0].toLowerCase(),b=g.userAgent||"",h=g.appName||"";r.isWin=v=="win",r.isMac=v=="mac",r.isLinux=v=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=b.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(b.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,r.isAIR=b.indexOf("AdobeAIR")>=0,r.isAndroid=b.indexOf("Android")>=0,r.isChromeOS=b.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(b)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,p){var g=e("./useragent"),v="http://www.w3.org/1999/xhtml";r.buildDom=function u(c,i,l){if(typeof c=="string"&&c){var d=document.createTextNode(c);return i&&i.appendChild(d),d}if(!Array.isArray(c))return c&&c.appendChild&&i&&i.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var w=[],x=0;x<c.length;x++){var I=u(c[x],i,l);I&&w.push(I)}return w}var $=document.createElement(c[0]),S=c[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var x=C;x<c.length;x++)u(c[x],$,l);return C==2&&Object.keys(S).forEach(function(R){var N=S[R];R==="class"?$.className=Array.isArray(N)?N.join(" "):N:typeof N=="function"||R=="value"||R[0]=="$"?$[R]=N:R==="ref"?l&&(l[N]=$):R==="style"?typeof N=="string"&&($.style.cssText=N):N!=null&&$.setAttribute(R,N)}),i&&i.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,c){return document.createElementNS?document.createElementNS(c||v,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,c){var i=c?c.ownerDocument:document;return i.createTextNode(u)},r.createFragment=function(u){var c=u?u.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(u,c){var i=(u.className+"").split(/\s+/g);return i.indexOf(c)!==-1},r.addCssClass=function(u,c){r.hasCssClass(u,c)||(u.className+=" "+c)},r.removeCssClass=function(u,c){for(var i=u.className.split(/\s+/g);;){var l=i.indexOf(c);if(l==-1)break;i.splice(l,1)}u.className=i.join(" ")},r.toggleCssClass=function(u,c){for(var i=u.className.split(/\s+/g),l=!0;;){var d=i.indexOf(c);if(d==-1)break;l=!1,i.splice(d,1)}return l&&i.push(c),u.className=i.join(" "),l},r.setCssClass=function(u,c,i){i?r.addCssClass(u,c):r.removeCssClass(u,c)},r.hasCssString=function(u,c){var i=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;i<l.length;)if(l[i++].id===u)return!0}},r.removeElementById=function(u,c){c=c||document,c.getElementById(u)&&c.getElementById(u).remove()};var b,h=[];r.useStrictCSP=function(u){b=u,u==!1?f():h||(h=[])};function f(){var u=h;h=null,u&&u.forEach(function(c){s(c[0],c[1])})}function s(u,c,i){if(!(typeof document>"u")){if(h){if(i)f();else if(i===!1)return h.push([u,c])}if(!b){var l=i;!i||!i.getRootNode?l=document:(l=i.getRootNode(),(!l||l==i)&&(l=document));var d=l.ownerDocument||l;if(c&&r.hasCssString(c,l))return null;c&&(u+=`
2
+ /*# sourceURL=ace/css/`+c+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(u)),c&&(w.id=c),l==d&&(l=r.getDocumentHead(d)),l.insertBefore(w,l.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,c){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(c))},r.scrollbarWidth=function(u){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var i=r.createElement("ace_outer"),l=i.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",i.appendChild(c);var d=u&&u.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(i);var w=c.offsetWidth;l.overflow="scroll";var x=c.offsetWidth;return w===x&&(x=i.clientWidth),d.removeChild(i),w-x},r.computedStyle=function(u,c){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,c,i){u[c]!==i&&(u[c]=i)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=g.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,g.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,c,i){u.style.transform="translate("+Math.round(c)+"px, "+Math.round(i)+"px)"}:r.translate=function(u,c,i){u.style.top=Math.round(i)+"px",u.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,p){/*
3
+ * based on code from:
4
+ *
5
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
+ * Available via the MIT or new BSD license.
7
+ * see: http://github.com/jrburke/requirejs for details
8
+ */var g=e("./dom");r.get=function(v,b){var h=new XMLHttpRequest;h.open("GET",v,!0),h.onreadystatechange=function(){h.readyState===4&&b(h.responseText)},h.send(null)},r.loadScript=function(v,b){var h=g.getDocumentHead(),f=document.createElement("script");f.src=v,h.appendChild(f),f.onload=f.onreadystatechange=function(s,a){(a||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,a||b())}},r.qualifyURL=function(v){var b=document.createElement("a");return b.href=v,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,p){r.inherits=function(g,v){g.super_=v,g.prototype=Object.create(v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(g,v){for(var b in v)g[b]=v[b];return g},r.implement=function(g,v){r.mixin(g,v)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,p){var g={},v=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(h,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!s.length&&!a)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=h),f.stopPropagation||(f.stopPropagation=v),f.preventDefault||(f.preventDefault=b),s=s.slice();for(var u=0;u<s.length&&(s[u](f,this),!f.propagationStopped);u++);if(a&&!f.defaultPrevented)return a(f,this)}},g._signal=function(h,f){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](f,this)}},g.once=function(h,f){var s=this;if(this.on(h,function a(){s.off(h,a),f.apply(null,arguments)}),!f)return new Promise(function(a){f=a})},g.setDefaultHandler=function(h,f){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],u=s._disabled_[h];u||(s._disabled_[h]=u=[]),u.push(a);var c=u.indexOf(f);c!=-1&&u.splice(c,1)}s[h]=f},g.removeDefaultHandler=function(h,f){var s=this._defaultHandlers;if(s){var a=s._disabled_[h];if(s[h]==f)a&&this.setDefaultHandler(h,a.pop());else if(a){var u=a.indexOf(f);u!=-1&&a.splice(u,1)}}},g.on=g.addEventListener=function(h,f,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(f)==-1&&a[s?"unshift":"push"](f),f},g.off=g.removeListener=g.removeEventListener=function(h,f){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var a=s.indexOf(f);a!==-1&&s.splice(a,1)}},g.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=g}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,p){r.reportError=function(g,v){var b=new Error(g);b.data=v,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,p){var g={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=g}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,p){"no use strict";var g=e("./oop"),v=e("./event_emitter").EventEmitter,b=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,f={setOptions:function(i){Object.keys(i).forEach(function(l){this.setOption(l,i[l])},this)},getOptions:function(i){var l={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var d=this.$options;i=Object.keys(d).filter(function(w){return!d[w].hidden})}return i.forEach(function(w){l[w]=this.getOption(w)},this),l},setOption:function(i,l){if(this["$"+i]!==l){var d=this.$options[i];if(!d)return s('misspelled option "'+i+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(i,l);d.handlesSet||(this["$"+i]=l),d&&d.set&&d.set.call(this,l)}},getOption:function(i){var l=this.$options[i];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(i):l&&l.get?l.get.call(this):this["$"+i]:s('misspelled option "'+i+'"')}};function s(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,c=function(){function i(){this.$defaultOptions={},a=h,u="dollarSigns"}return i.prototype.defineOptions=function(l,d,w){return l.$options||(this.$defaultOptions[d]=l.$options={}),Object.keys(w).forEach(function(x){var I=w[x];typeof I=="string"&&(I={forwardTo:I}),I.name||(I.name=x),l.$options[I.name]=I,"initialValue"in I&&(l["$"+I.name]=I.initialValue)}),g.implement(l,f),this},i.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(d){var w=l.$options[d];"value"in w&&l.setOption(d,w.value)})},i.prototype.setDefaultValue=function(l,d,w){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][d])break;if(!this.$defaultOptions[l][d])return!1}var x=this.$defaultOptions[l]||(this.$defaultOptions[l]={});x[d]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,d,w):x[d].value=w)},i.prototype.setDefaultValues=function(l,d){Object.keys(d).forEach(function(w){this.setDefaultValue(l,w,d[w])},this)},i.prototype.setMessages=function(l,d){a=l,d&&d.placeholders&&(u=d.placeholders)},i.prototype.nls=function(l,d,w){a[l]||(s("No message found for the key '"+l+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+d+"'."),a[d]||s("No message found for the default string '"+d+"' in the provided messages. Falling back to the default English message."));var x=a[l]||a[d]||d;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(I,$){return $=="$"?"$":w[$]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(I,$){return w[$]}))),x},i}();c.prototype.warn=s,c.prototype.reportError=b,g.implement(c.prototype,v),r.AppConfig=c}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,p){p.exports=`.ace-tm .ace_gutter {
9
+ background: #f0f0f0;
10
+ color: #333;
11
+ }
12
+
13
+ .ace-tm .ace_print-margin {
14
+ width: 1px;
15
+ background: #e8e8e8;
16
+ }
17
+
18
+ .ace-tm .ace_fold {
19
+ background-color: #6B72E6;
20
+ }
21
+
22
+ .ace-tm {
23
+ background-color: #FFFFFF;
24
+ color: black;
25
+ }
26
+
27
+ .ace-tm .ace_cursor {
28
+ color: black;
29
+ }
30
+
31
+ .ace-tm .ace_invisible {
32
+ color: rgb(191, 191, 191);
33
+ }
34
+
35
+ .ace-tm .ace_storage,
36
+ .ace-tm .ace_keyword {
37
+ color: blue;
38
+ }
39
+
40
+ .ace-tm .ace_constant {
41
+ color: rgb(197, 6, 11);
42
+ }
43
+
44
+ .ace-tm .ace_constant.ace_buildin {
45
+ color: rgb(88, 72, 246);
46
+ }
47
+
48
+ .ace-tm .ace_constant.ace_language {
49
+ color: rgb(88, 92, 246);
50
+ }
51
+
52
+ .ace-tm .ace_constant.ace_library {
53
+ color: rgb(6, 150, 14);
54
+ }
55
+
56
+ .ace-tm .ace_invalid {
57
+ background-color: rgba(255, 0, 0, 0.1);
58
+ color: red;
59
+ }
60
+
61
+ .ace-tm .ace_support.ace_function {
62
+ color: rgb(60, 76, 114);
63
+ }
64
+
65
+ .ace-tm .ace_support.ace_constant {
66
+ color: rgb(6, 150, 14);
67
+ }
68
+
69
+ .ace-tm .ace_support.ace_type,
70
+ .ace-tm .ace_support.ace_class {
71
+ color: rgb(109, 121, 222);
72
+ }
73
+
74
+ .ace-tm .ace_keyword.ace_operator {
75
+ color: rgb(104, 118, 135);
76
+ }
77
+
78
+ .ace-tm .ace_string {
79
+ color: rgb(3, 106, 7);
80
+ }
81
+
82
+ .ace-tm .ace_comment {
83
+ color: rgb(76, 136, 107);
84
+ }
85
+
86
+ .ace-tm .ace_comment.ace_doc {
87
+ color: rgb(0, 102, 255);
88
+ }
89
+
90
+ .ace-tm .ace_comment.ace_doc.ace_tag {
91
+ color: rgb(128, 159, 191);
92
+ }
93
+
94
+ .ace-tm .ace_constant.ace_numeric {
95
+ color: rgb(0, 0, 205);
96
+ }
97
+
98
+ .ace-tm .ace_variable {
99
+ color: rgb(49, 132, 149);
100
+ }
101
+
102
+ .ace-tm .ace_xml-pe {
103
+ color: rgb(104, 104, 91);
104
+ }
105
+
106
+ .ace-tm .ace_entity.ace_name.ace_function {
107
+ color: #0000A2;
108
+ }
109
+
110
+
111
+ .ace-tm .ace_heading {
112
+ color: rgb(12, 7, 255);
113
+ }
114
+
115
+ .ace-tm .ace_list {
116
+ color:rgb(185, 6, 144);
117
+ }
118
+
119
+ .ace-tm .ace_meta.ace_tag {
120
+ color:rgb(0, 22, 142);
121
+ }
122
+
123
+ .ace-tm .ace_string.ace_regex {
124
+ color: rgb(255, 0, 0)
125
+ }
126
+
127
+ .ace-tm .ace_marker-layer .ace_selection {
128
+ background: rgb(181, 213, 255);
129
+ }
130
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
131
+ box-shadow: 0 0 3px 0px white;
132
+ }
133
+ .ace-tm .ace_marker-layer .ace_step {
134
+ background: rgb(252, 255, 0);
135
+ }
136
+
137
+ .ace-tm .ace_marker-layer .ace_stack {
138
+ background: rgb(164, 229, 101);
139
+ }
140
+
141
+ .ace-tm .ace_marker-layer .ace_bracket {
142
+ margin: -1px 0 0 -1px;
143
+ border: 1px solid rgb(192, 192, 192);
144
+ }
145
+
146
+ .ace-tm .ace_marker-layer .ace_active-line {
147
+ background: rgba(0, 0, 0, 0.07);
148
+ }
149
+
150
+ .ace-tm .ace_gutter-active-line {
151
+ background-color : #dcdcdc;
152
+ }
153
+
154
+ .ace-tm .ace_marker-layer .ace_selected-word {
155
+ background: rgb(250, 250, 255);
156
+ border: 1px solid rgb(200, 200, 250);
157
+ }
158
+
159
+ .ace-tm .ace_indent-guide {
160
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
161
+ }
162
+
163
+ .ace-tm .ace_indent-guide-active {
164
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
165
+ }
166
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,p){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,p){"no use strict";var g=e("./lib/lang"),v=e("./lib/net"),b=e("./lib/dom"),h=e("./lib/app_config").AppConfig;p.exports=r=new h;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!f.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return f[c]},r.set=function(c,i){if(f.hasOwnProperty(c))f[c]=i;else if(this.setDefaultValue("",c,i)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&b.useStrictCSP(i)},r.all=function(){return g.copyObject(f)},r.$modes={},r.moduleUrl=function(c,i){if(f.$moduleUrls[c])return f.$moduleUrls[c];var l=c.split("/");i=i||l[l.length-2]||"";var d=i=="snippets"?"/":"-",w=l[l.length-1];if(i=="worker"&&d=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");w=w.replace(x,"")}(!w||w==i)&&l.length>1&&(w=l[l.length-2]);var I=f[i+"Path"];return I==null?I=f.basePath:d=="/"&&(i=d=""),I&&I.slice(-1)!="/"&&(I+="/"),I+i+d+w+this.get("suffix")},r.setModuleUrl=function(c,i){return f.$moduleUrls[c]=i};var s=function(c,i){if(c==="ace/theme/textmate"||c==="./theme/textmate")return i(null,e("./theme/textmate"));if(a)return a(c,i);console.error("loader is not configured")},a;r.setLoader=function(c){a=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,i){var l;if(Array.isArray(c))var d=c[0],w=c[1];else if(typeof c=="string")var w=c;var x=function(I){if(I&&!r.$loading[w])return i&&i(I);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(i),!(r.$loading[w].length>1)){var $=function(){s(w,function(S,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(N){N&&N(C)})})};if(!r.get("packaged"))return $();v.loadScript(r.moduleUrl(w,d),$),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(I){I.default?x(I.default):x(I)});else{try{l=this.$require(w)}catch{}x(l||r.$loaded[w])}},r.$require=function(c){if(typeof p.require=="function"){var i="require";return p[i](c)}},r.setModuleLoader=function(c,i){r.dynamicModules[c]=i};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.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,p){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(f,s){e([f],function(a){s(null,a)})});var v=function(){return this||typeof window<"u"&&window}();p.exports=function(f){g.init=b,g.$require=e,f.require=e},b(!0);function b(f){if(!(!v||!v.document)){g.set("packaged",f||e.packaged||p.packaged||v.define&&(void 0).packaged);var s={},a="",u=document.currentScript||document._currentScript,c=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=c.getElementsByTagName("script"),l=0;l<i.length;l++){var d=i[l],w=d.src||d.getAttribute("src");if(w){for(var x=d.attributes,I=0,$=x.length;I<$;I++){var S=x[I];S.name.indexOf("data-ace-")===0&&(s[h(S.name.replace(/^data-ace-/,""))]=S.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&g.set(R,s[R])}}function h(f){return f.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,p){var g=function(){function v(b,h,f,s){this.start={row:b,column:h},this.end={row:f,column:s}}return v.prototype.isEqual=function(b){return this.start.row===b.start.row&&this.end.row===b.end.row&&this.start.column===b.start.column&&this.end.column===b.end.column},v.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},v.prototype.contains=function(b,h){return this.compare(b,h)==0},v.prototype.compareRange=function(b){var h,f=b.end,s=b.start;return h=this.compare(f.row,f.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},v.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},v.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},v.prototype.intersects=function(b){var h=this.compareRange(b);return h==-1||h==0||h==1},v.prototype.isEnd=function(b,h){return this.end.row==b&&this.end.column==h},v.prototype.isStart=function(b,h){return this.start.row==b&&this.start.column==h},v.prototype.setStart=function(b,h){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=h)},v.prototype.setEnd=function(b,h){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=h)},v.prototype.inside=function(b,h){return this.compare(b,h)==0?!(this.isEnd(b,h)||this.isStart(b,h)):!1},v.prototype.insideStart=function(b,h){return this.compare(b,h)==0?!this.isEnd(b,h):!1},v.prototype.insideEnd=function(b,h){return this.compare(b,h)==0?!this.isStart(b,h):!1},v.prototype.compare=function(b,h){return!this.isMultiLine()&&b===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?h>=this.start.column?0:-1:this.end.row===b?h<=this.end.column?0:1:0},v.prototype.compareStart=function(b,h){return this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},v.prototype.compareEnd=function(b,h){return this.end.row==b&&this.end.column==h?1:this.compare(b,h)},v.prototype.compareInside=function(b,h){return this.end.row==b&&this.end.column==h?1:this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},v.prototype.clipRows=function(b,h){if(this.end.row>h)var f={row:h+1,column:0};else if(this.end.row<b)var f={row:b,column:0};if(this.start.row>h)var s={row:h+1,column:0};else if(this.start.row<b)var s={row:b,column:0};return v.fromPoints(s||this.start,f||this.end)},v.prototype.extend=function(b,h){var f=this.compare(b,h);if(f==0)return this;if(f==-1)var s={row:b,column:h};else var a={row:b,column:h};return v.fromPoints(s||this.start,a||this.end)},v.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},v.prototype.isMultiLine=function(){return this.start.row!==this.end.row},v.prototype.clone=function(){return v.fromPoints(this.start,this.end)},v.prototype.collapseRows=function(){return this.end.column==0?new v(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new v(this.start.row,0,this.end.row,0)},v.prototype.toScreenRange=function(b){var h=b.documentToScreenPosition(this.start),f=b.documentToScreenPosition(this.end);return new v(h.row,h.column,f.row,f.column)},v.prototype.moveBy=function(b,h){this.start.row+=b,this.start.column+=h,this.end.row+=b,this.end.column+=h},v}();g.fromPoints=function(v,b){return new g(v.row,v.column,b.row,b.column)},g.comparePoints=function(v,b){return v.row-b.row||v.column-b.column},r.Range=g}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,p){for(var g=e("./oop"),v={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:"*"}},b={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},h=0;h<10;h++)b["Digit"+h]=48+h,b["Numpad"+h]=96+h,v.PRINTABLE_KEYS[48+h]=""+h,v.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var f=String.fromCharCode(h+32);b["Key"+f.toUpperCase()]=h,v.PRINTABLE_KEYS[h]=f}for(var h=1;h<13;h++)b["F"+h]=111+h,v.FUNCTION_KEYS[111+h]="F"+h;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)b[a]=b[a+"Left"]=b[a+"Right"]=s[a];r.$codeToKeyCode=b,v.PRINTABLE_KEYS[173]="-";for(var u in v.FUNCTION_KEYS){var c=v.FUNCTION_KEYS[u].toLowerCase();v[c]=parseInt(u,10)}for(var u in v.PRINTABLE_KEYS){var c=v.PRINTABLE_KEYS[u].toLowerCase();v[c]=parseInt(u,10)}g.mixin(v,v.MODIFIER_KEYS),g.mixin(v,v.PRINTABLE_KEYS),g.mixin(v,v.FUNCTION_KEYS),v.enter=v.return,v.escape=v.esc,v.del=v.delete,function(){for(var i=["cmd","ctrl","alt","shift"],l=Math.pow(2,i.length);l--;)v.KEY_MODS[l]=i.filter(function(d){return l&v.KEY_MODS[d]}).join("-")+"-"}(),v.KEY_MODS[0]="",v.KEY_MODS[-1]="input-",g.mixin(r,v),r.default=r,r.keyCodeToString=function(i){var l=v[i];return typeof l!="string"&&(l=String.fromCharCode(i)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,p){var g=e("./keys"),v=e("./useragent"),b=null,h=0,f;function s(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function a(){return f==null&&s(),f}function u(I,$,S){this.elem=I,this.type=$,this.callback=S}u.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(I,$,S,C){I.addEventListener($,S,a()),C&&C.$toDestroy.push(new u(I,$,S))},i=r.removeListener=function(I,$,S){I.removeEventListener($,S,a())};r.stopEvent=function(I){return r.stopPropagation(I),r.preventDefault(I),!1},r.stopPropagation=function(I){I.stopPropagation&&I.stopPropagation()},r.preventDefault=function(I){I.preventDefault&&I.preventDefault()},r.getButton=function(I){return I.type=="dblclick"?0:I.type=="contextmenu"||v.isMac&&I.ctrlKey&&!I.altKey&&!I.shiftKey?2:I.button},r.capture=function(I,$,S){var C=I&&I.ownerDocument||document;function R(N){$&&$(N),S&&S(N),i(C,"mousemove",$),i(C,"mouseup",R),i(C,"dragstart",R)}return c(C,"mousemove",$),c(C,"mouseup",R),c(C,"dragstart",R),R},r.addMouseWheelListener=function(I,$,S){c(I,"wheel",function(C){var R=.15,N=C.deltaX||0,L=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=N*R,C.wheelY=L*R;break;case C.DOM_DELTA_LINE:var E=15;C.wheelX=N*E,C.wheelY=L*E;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=N*B,C.wheelY=L*B;break}$(C)},S)},r.addMultiMouseDownListener=function(I,$,S,C,R){var N=0,L,E,B,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(_){if(r.getButton(_)!==0?N=0:_.detail>1?(N++,N>4&&(N=1)):N=1,v.isIE){var k=Math.abs(_.clientX-L)>5||Math.abs(_.clientY-E)>5;(!B||k)&&(N=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},$[N-1]||600),N==1&&(L=_.clientX,E=_.clientY)}if(_._clicks=N,S[C]("mousedown",_),N>4)N=0;else if(N>1)return S[C](P[N],_)}Array.isArray(I)||(I=[I]),I.forEach(function(_){c(_,"mousedown",O,R)})};function l(I){return 0|(I.ctrlKey?1:0)|(I.altKey?2:0)|(I.shiftKey?4:0)|(I.metaKey?8:0)}r.getModifierString=function(I){return g.KEY_MODS[l(I)]};function d(I,$,S){var C=l($);if(!S&&$.code&&(S=g.$codeToKeyCode[$.code]||S),!v.isMac&&b){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(S===18||S===17){var R=$.location;if(S===17&&R===1)b[S]==1&&(h=$.timeStamp);else if(S===18&&C===3&&R===2){var N=$.timeStamp-h;N<50&&(b.altGr=!0)}}}if(S in g.MODIFIER_KEYS&&(S=-1),!(!C&&S===13&&$.location===3&&(I($,C,-S),$.defaultPrevented))){if(v.isChromeOS&&C&8){if(I($,C,S),$.defaultPrevented)return;C&=-9}return!C&&!(S in g.FUNCTION_KEYS)&&!(S in g.PRINTABLE_KEYS)?!1:I($,C,S)}}r.addCommandKeyListener=function(I,$,S){var C=null;c(I,"keydown",function(R){b[R.keyCode]=(b[R.keyCode]||0)+1;var N=d($,R,R.keyCode);return C=R.defaultPrevented,N},S),c(I,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},S),c(I,"keyup",function(R){b[R.keyCode]=null},S),b||(w(),c(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!v.isOldIE){var x=1;r.nextTick=function(I,$){$=$||window;var S="zero-timeout-message-"+x++,C=function(R){R.data==S&&(r.stopPropagation(R),i($,"message",C),I())};c($,"message",C),$.postMessage(S,"*")}}r.$idleBlocked=!1,r.onIdle=function(I,$){return setTimeout(function S(){r.$idleBlocked?setTimeout(S,100):I()},$)},r.$idleBlockId=null,r.blockIdle=function(I){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},I||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(I){setTimeout(I,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,p){var g;p.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,p){var g=e("../lib/event"),v=e("../config").nls,b=e("../lib/useragent"),h=e("../lib/dom"),f=e("../lib/lang"),s=e("../clipboard"),a=b.isChrome<18,u=b.isIE,c=b.isChrome>63,i=400,l=e("../lib/keys"),d=l.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,I=b.isMobile,$=function(){function S(C,R){var N=this;this.host=R,this.text=h.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",I||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),g.addListener(this.text,"blur",function(L){N.ignoreFocusEvents||(R.onBlur(L),N.$isFocused=!1)},R),g.addListener(this.text,"focus",function(L){if(!N.ignoreFocusEvents){if(N.$isFocused=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(L),b.isEdge?setTimeout(N.resetSelection.bind(N)):N.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var L=R.curOp,E=L&&L.command&&L.command.name;if(E!="insertstring"){var B=E&&(L.docChanged||L.selectionChanged);N.inComposition&&B&&(N.lastValue=N.text.value="",N.onCompositionEnd()),N.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,g.addCommandKeyListener(this.text,function(L,E,B){if(!N.inComposition)return R.onCommandKey(L,E,B)},R),g.addListener(this.text,"select",this.onSelect.bind(this),R),g.addListener(this.text,"input",this.onInput.bind(this),R),g.addListener(this.text,"cut",this.onCut.bind(this),R),g.addListener(this.text,"copy",this.onCopy.bind(this),R),g.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&g.addListener(C,"keydown",function(L){if(!(b.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:N.onCopy(L);break;case 86:N.onPaste(L);break;case 88:N.onCut(L);break}},R),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),g.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),g.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),g.addListener(this.text,"keyup",this.onKeyup.bind(this),R),g.addListener(this.text,"keydown",this.syncComposition.bind(this),R),g.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,g.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),g.addListener(this.text,"mousedown",function(L){L.preventDefault(),N.onContextMenuClose()},R),g.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),g.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),w&&this.addIosSelectionHandler(C,R,this.text)}return S.prototype.addIosSelectionHandler=function(C,R,N){var L=this,E=null,B=!1;N.addEventListener("keydown",function(O){E&&clearTimeout(E),B=!0},!0),N.addEventListener("keyup",function(O){E=setTimeout(function(){B=!1},100)},!0);var P=function(O){if(document.activeElement===N&&!(B||L.inComposition||R.$mouseHandler.isMousePressed)&&!L.copied){var _=N.selectionStart,k=N.selectionEnd,D=null,z=0;if(_==0?D=l.up:_==1?D=l.home:k>L.lastSelectionEnd&&L.lastValue[k]==`
167
+ `?D=l.end:_<L.lastSelectionStart&&L.lastValue[_-1]==" "?(D=l.left,z=d.option):_<L.lastSelectionStart||_==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&_==k?D=l.left:k>L.lastSelectionEnd&&L.lastValue.slice(0,k).split(`
168
+ `).length>2?D=l.down:k>L.lastSelectionEnd&&L.lastValue[k-1]==" "?(D=l.right,z=d.option):(k>L.lastSelectionEnd||k==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&_==k)&&(D=l.right),_!==k&&(z|=d.shift),D){var U=R.onCommandKey({},z,D);if(!U&&R.commands){D=l.keyCodeToString(D);var q=R.commands.findKeyCommand(z,D);q&&R.execCommand(q)}L.lastSelectionStart=_,L.lastSelectionEnd=k,L.resetSelection("")}}};document.addEventListener("selectionchange",P),R.on("destroy",function(){document.removeEventListener("selectionchange",P)})},S.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)},S.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},S.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()},S.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},S.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 R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,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()))}},S.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)}}},S.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())},S.prototype.onCut=function(C){this.doCopy(C,!0)},S.prototype.onCopy=function(C){this.doCopy(C,!1)},S.prototype.onPaste=function(C){var R=this.handleClipboardData(C);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,C),b.isIE&&setTimeout(this.resetSelection),g.preventDefault(C)):(this.text.value="",this.pasted=!0))},S.prototype.doCopy=function(C,R){var N=this,L=this.host.getCopyText();if(!L)return g.preventDefault(C);this.handleClipboardData(C,L)?(w&&(this.resetSelection(L),this.copied=L,setTimeout(function(){N.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),g.preventDefault(C)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){N.copied=!1,N.resetSelection(),R?N.host.onCut():N.host.onCopy()}))},S.prototype.handleClipboardData=function(C,R,N){var L=C.clipboardData||window.clipboardData;if(!(!L||a)){var E=u||N?"Text":"text/plain";try{return R?L.setData(E,R)!==!1:L.getData(E)}catch(B){if(!N)return this.handleClipboardData(B,R,!0)}}},S.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 R=this.text.value,N=this.sendText(R,!0);(R.length>i+100||x.test(N)||I&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},S.prototype.sendText=function(C,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var N=this.text.selectionStart,L=this.text.selectionEnd,E=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,P=C,O=C.length-N,_=C.length-L,k=0;E>0&&this.lastValue[k]==C[k];)k++,E--;for(P=P.slice(k),k=1;B>0&&this.lastValue.length-k>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-k]==C[C.length-k];)k++,B--;O-=k-1,_-=k-1;var D=P.length-k+1;if(D<0&&(E=-D,D=0),P=P.slice(0,D),!R&&!P&&!O&&!E&&!B&&!_)return"";this.sendingText=!0;var z=!1;return b.isAndroid&&P==". "&&(P=" ",z=!0),P&&!E&&!B&&!O&&!_||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:E,extendRight:B,restoreStart:O,restoreEnd:_}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=N,this.lastSelectionEnd=L,this.lastRestoreEnd=_,z?`
169
+ `:P},S.prototype.onSelect=function(C){var R=this;if(!this.inComposition){var N=function(L){return L.selectionStart===0&&L.selectionEnd>=R.lastValue.length&&L.value===R.lastValue&&R.lastValue&&L.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:N(this.text)?(this.host.selectAll(),this.resetSelection()):I&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},S.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var R=`
170
+ ab`+C+`cde fg
171
+ `;R!=this.text.value&&(this.text.value=this.lastValue=R);var N=4,L=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=N||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(N,L),this.lastSelectionStart=N,this.lastSelectionEnd=L}},S.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,N=0,L="",E=function(q,X){for(var ee=X,de=1;de<=q-C.rowStart&&de<2*C.numberOfExtraLines+1;de++)ee+=C.host.session.getLine(q-de).length+1;return ee};if(this.host.session){var B=this.host.selection,P=B.getRange(),O=B.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var _=[],k=this.rowStart;k<=this.rowEnd;k++)_.push(this.host.session.getLine(k));if(L=_.join(`
172
+ `),R=E(P.start.row,P.start.column),N=E(P.end.row,P.end.column),P.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);R=P.start.row<this.rowStart-1?0:R,N+=D.length+1,L=D+`
173
+ `+L}else if(P.end.row>this.rowEnd){var z=this.host.session.getLine(this.rowEnd+1);N=P.end.row>this.rowEnd+1?z.length:P.end.column,N+=L.length+1,L=L+`
174
+ `+z}else I&&O>0&&(L=`
175
+ `+L,N+=1,R+=1);L.length>i&&(R<i&&N<i?L=L.slice(0,i):(L=`
176
+ `,R==N?R=N=0:(R=0,N=1)));var U=L+`
177
+
178
+ `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=N||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,N),this.lastSelectionStart=R,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},S.prototype.setHost=function(C){this.host=C},S.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},S.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;C+=v("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",C)},S.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",v("text-input.aria-roledescription","editor")),this.setAriaLabel())},S.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||c||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(N)for(var E=this.text.parentElement;E&&E.nodeType==1;)L.push(E),E.setAttribute("ace_nocontext","true"),!E.parentElement&&E.getRootNode?E=E.getRootNode().host:E=E.parentElement;this.text.focus({preventScroll:!0}),N&&L.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=R)},0)},S.prototype.blur=function(){this.text.blur()},S.prototype.isFocused=function(){return this.$isFocused},S.prototype.setInputHandler=function(C){this.inputHandler=C},S.prototype.getInputHandler=function(){return this.inputHandler},S.prototype.getElement=function(){return this.text},S.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},S.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},S.prototype.setCopyWithEmptySelection=function(C){},S.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},S.prototype.moveToMouse=function(C,R){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),E=h.computedStyle(this.host.container),B=L.top+(parseInt(E.borderTopWidth)||0),P=L.left+(parseInt(E.borderLeftWidth)||0),O=L.bottom-B-this.text.clientHeight-2,_=function(k){h.translate(N.text,k.clientX-P-2,Math.min(k.clientY-B-2,O))};_(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&g.capture(this.host.container,_,this.onContextMenuClose.bind(this)))},S.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},S}();r.TextInput=$,r.$setUserAgentForTests=function(S,C){I=S,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,p){var g=e("../lib/useragent"),v=0,b=550,h=function(){function a(u){u.$clickSelection=null;var c=u.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(l){u[l]=this[l]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var c=u.inSelection(),i=u.getDocumentPosition();this.mousedownEvent=u;var l=this.editor,d=u.getButton();if(d!==0){var w=l.getSelectionRange(),x=w.isEmpty();(x||d==1)&&l.selection.moveToPosition(i),d==2&&(l.textInput.onContextMenu(u.domEvent),g.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(i,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,c){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(u):c||i.selection.moveToPosition(u),c||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,c=this.editor,i=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(i);if(l==-1)u=this.$clickSelection.end;else if(l==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,i);i=d.cursor,u=d.anchor}c.selection.setSelectionAnchor(u.row,u.column)}c.selection.selectToPosition(i),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var c,i=this.editor,l=i.renderer.screenToTextCoordinates(this.x,this.y),d=i.selection[u](l.row,l.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),x=this.$clickSelection.comparePoint(d.end);if(w==-1&&x<=0)c=this.$clickSelection.end,(d.end.row!=l.row||d.end.column!=l.column)&&(l=d.start);else if(x==1&&w>=0)c=this.$clickSelection.start,(d.start.row!=l.row||d.start.column!=l.column)&&(l=d.end);else if(w==-1&&x==1)l=d.end,c=d.start;else{var I=s(this.$clickSelection,l);l=I.cursor,c=I.anchor}i.selection.setSelectionAnchor(c.row,c.column)}i.selection.selectToPosition(l),i.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(u>v||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var c=u.getDocumentPosition(),i=this.editor,l=i.session,d=l.getBracketRange(c);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=i.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},a.prototype.onTripleClick=function(u){var c=u.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var l=i.getSelectionRange();l.isMultiLine()&&l.contains(c.row,c.column)?(this.$clickSelection=i.selection.getLineRange(l.start.row),this.$clickSelection.end=i.selection.getLineRange(l.end.row).end):this.$clickSelection=i.selection.getLineRange(c.row),this.select()},a.prototype.onQuadClick=function(u){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,l=u.domEvent.timeStamp,d=l-i.t,w=d?u.wheelX/d:i.vx,x=d?u.wheelY/d:i.vy;d<b&&(w=(w+i.vx)/2,x=(x+i.vy)/2);var I=Math.abs(w/x),$=!1;if(I>=1&&c.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),I<=1&&c.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)i.allowed=l;else if(l-i.allowed<b){var S=Math.abs(w)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);S?($=!0,i.allowed=l):i.allowed=0}if(i.t=l,i.vx=w,i.vy=x,$)return c.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function f(a,u,c,i){return Math.sqrt(Math.pow(c-a,2)+Math.pow(i-u,2))}function s(a,u){if(a.start.row==a.end.row)var c=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var c=u.column-4;else var c=2*u.row-a.start.row-a.end.row;return c<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,p){r.preventParentScroll=function(g){g.stopPropagation();var v=g.currentTarget,b=v.scrollHeight>v.clientHeight;b||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,p){var g=this&&this.__extends||function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(x[$]=I[$])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function x(){this.constructor=d}d.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),v=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],x=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},b=e("./lib/dom");e("./lib/event");var h=e("./range").Range,f=e("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function l(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return l.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(d){this.getElement().textContent=d},l.prototype.setHtml=function(d){this.getElement().innerHTML=d},l.prototype.setPosition=function(d,w){var x=this.getElement(),I=x.offsetParent&&x.offsetParent.getBoundingClientRect();x.style.left=d-(I?I.left:0)+"px",x.style.top=w-(I?I.top:0)+"px"},l.prototype.setClassName=function(d){b.addCssClass(this.getElement(),d)},l.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},l.prototype.show=function(d,w,x){d!=null&&this.setText(d),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l}(),u=function(){function l(){this.popups=[]}return l.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},l.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},l.prototype.updatePopups=function(){var d,w,x,I;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var S=v(this.popups),C=S.next();!C.done;C=S.next()){var R=C.value,N=!0;try{for(var L=(x=void 0,v($)),E=L.next();!E.done;E=L.next()){var B=E.value;if(this.doPopupsOverlap(B,R)){N=!1;break}}}catch(P){x={error:P}}finally{try{E&&!E.done&&(I=L.return)&&I.call(L)}finally{if(x)throw x.error}}N?$.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=S.return)&&w.call(S)}finally{if(d)throw d.error}}},l.prototype.doPopupsOverlap=function(d,w){var x=d.getElement().getBoundingClientRect(),I=w.getElement().getBoundingClientRect();return x.left<I.right&&x.right>I.left&&x.top<I.bottom&&x.bottom>I.top},l}(),c=new u;r.popupManager=c,r.Tooltip=a;var i=function(l){g(d,l);function d(w){w===void 0&&(w=document.body);var x=l.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 I=x.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",x.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(x)),I.addEventListener("wheel",f),x}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var I=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},d.prototype.isOutsideOfText=function(w){var x=w.editor,I=w.getDocumentPosition(),$=x.session.getLine(I.row);if(I.column==$.length){var S=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(I.row,I.column);if(C.column!=S.column||C.row!=S.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,x,I,$){var S=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=h.fromPoints(x.start,x.end);var R=C.textToScreenCoordinates(x.start.row,x.start.column),N=C.scroller.getBoundingClientRect();R.pageX<N.left&&(R.pageX=N.left);var L=this.getElement();L.innerHTML="",L.appendChild(I),L.style.maxHeight="",L.style.display="block";var E=L.clientHeight,B=L.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-E<0&&R.pageY<P&&(O=!1),L.style.maxHeight=(O?R.pageY:P)-S+"px",L.style.top=O?"":R.pageY+C.lineHeight+"px",L.style.bottom=O?window.innerHeight-R.pageY+"px":"",L.style.left=Math.min(R.pageX,window.innerWidth-B-S)+"px"}},d.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")},d.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},d}(a);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,p){var g=this&&this.__extends||function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(x[$]=I[$])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function x(){this.constructor=d}d.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),v=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],x=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},b=e("../lib/dom"),h=e("../lib/event"),f=e("../tooltip").Tooltip,s=e("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function c(l){var d=l.editor,w=d.renderer.$gutterLayer,x=new i(d,!0);l.editor.setDefaultHandler("guttermousedown",function(N){if(!(!d.isFocused()||N.getButton()!=0)){var L=w.getRegion(N);if(L!="foldWidgets"){var E=N.getDocumentPosition().row,B=d.session.selection;if(N.getShiftKey())B.selectTo(E,0);else{if(N.domEvent.detail==2)return d.selectAll(),N.preventDefault();l.$clickSelection=d.selection.getLineRange(E)}return l.setState("selectByLines"),l.captureMouse(N),N.preventDefault()}}});var I,$;function S(){var N=$.getDocumentPosition().row,L=d.session.getLength();if(N==L){var E=d.renderer.pixelToScreenCoordinates(0,$.y).row,B=$.$pos;if(E>d.session.documentToScreenRow(B.row,B.column))return C()}if(x.showTooltip(N),!!x.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),l.$tooltipFollowsMouse)R($);else{var P=$.getGutterRow(),O=w.$lines.get(P);if(O){var _=O.element.querySelector(".ace_gutter_annotation"),k=_.getBoundingClientRect(),D=x.getElement().style;D.left=k.right-a+"px",D.top=k.bottom-u+"px"}else R($)}}function C(N){N&&N.type==="keydown"&&(N.ctrlKey||N.metaKey)||N&&N.type==="mouseout"&&(!N.relatedTarget||x.getElement().contains(N.relatedTarget))||(I&&(I=clearTimeout(I)),x.isOpen&&(x.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(N){x.setPosition(N.x,N.y)}l.editor.setDefaultHandler("guttermousemove",function(N){var L=N.domEvent.target||N.domEvent.srcElement;if(b.hasCssClass(L,"ace_fold-widget")||b.hasCssClass(L,"ace_custom-widget"))return C();x.isOpen&&l.$tooltipFollowsMouse&&R(N),$=N,!I&&(I=setTimeout(function(){I=null,$&&!l.isMousePressed&&S()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(N){$=null,x.isOpen&&(I=setTimeout(function(){I=null,C(N)},50))},d)}r.GutterHandler=c;var i=function(l){g(d,l);function d(w,x){x===void 0&&(x=!1);var I=l.call(this,w.container)||this;I.id="gt"+ ++d.$uid,I.editor=w,I.visibleTooltipRow;var $=I.getElement();return $.setAttribute("role","tooltip"),$.setAttribute("id",I.id),$.style.pointerEvents="auto",x&&(I.onMouseOut=I.onMouseOut.bind(I),$.addEventListener("mouseout",I.onMouseOut)),I}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,x){var I=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+S>I&&(w-=w+S-I),x+C>$&&(x-=20+C),f.prototype.setPosition.call(this,w,x)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(w){var x,I=this.editor.renderer.$gutterLayer,$=I.$annotations[w],S;$?S={displayText:Array.from($.displayText),type:Array.from($.type)}:S={displayText:[],type:[]};var C=I.session.getFoldLine(w);if(C&&I.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},N={error:1,security:2,warning:3,info:4,hint:5},L,E=w+1;E<=C.end.row;E++)if(I.$annotations[E])for(var B=0;B<I.$annotations[E].text.length;B++){var P=I.$annotations[E].type[B];R[P].push(I.$annotations[E].text[B]),(!L||N[P]<N[L])&&(L=P)}if(["error","security","warning"].includes(L)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");S.displayText.push(O),S.type.push(L+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},k=I.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<S.displayText.length;E++){var D=b.createElement("span"),z=b.createElement("span");(x=z.classList).add.apply(x,["ace_".concat(S.type[E]),k]),z.setAttribute("aria-label","".concat(d.annotationLabels[S.type[E].replace("_fold","")].singular)),z.setAttribute("role","img"),z.appendChild(b.createTextNode(" ")),D.appendChild(z),D.appendChild(b.createTextNode(S.displayText[E])),D.appendChild(b.createElement("br")),_[S.type[E].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),_.error.forEach(function(X){return U.appendChild(X)}),_.security.forEach(function(X){return U.appendChild(X)}),_.warning.forEach(function(X){return U.appendChild(X)}),_.info.forEach(function(X){return U.appendChild(X)}),_.hint.forEach(function(X){return U.appendChild(X)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var q=this.$findLinkedAnnotationNode(w);q&&q.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.$findLinkedAnnotationNode=function(w){var x=this.$findCellByRow(w);if(x){var I=x.element;if(I.childNodes.length>2)return I.childNodes[2]}},d.prototype.$findCellByRow=function(w){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(x){return x.row===w})},d.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},d.annotationsToSummaryString=function(w){var x,I,$=[],S=["error","security","warning","info","hint"];try{for(var C=v(S),R=C.next();!R.done;R=C.next()){var N=R.value;if(w[N].length){var L=w[N].length===1?d.annotationLabels[N].singular:d.annotationLabels[N].plural;$.push("".concat(w[N].length," ").concat(L))}}}catch(E){x={error:E}}finally{try{R&&!R.done&&(I=C.return)&&I.call(C)}finally{if(x)throw x.error}}return $.join(", ")},d}(f);i.$uid=0,r.GutterTooltip=i}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,p){var g=e("../lib/event"),v=e("../lib/useragent"),b=function(){function h(f,s){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=s,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 h.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(f,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,s=f.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return g.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return v.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,p){var g=e("../lib/dom"),v=e("../lib/event"),b=e("../lib/useragent"),h=200,f=200,s=5;function a(c){var i=c.editor,l=g.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(te){c[te]=this[te]},this),i.on("mousedown",this.onMouseDown.bind(c));var w=i.container,x,I,$,S,C,R,N=0,L,E,B,P,O;this.onDragStart=function(te){if(this.cancelDrag||!w.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(te)},0),te.preventDefault()}C=i.getSelectionRange();var se=te.dataTransfer;se.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(l),se.setDragImage&&se.setDragImage(l,0,0),setTimeout(function(){i.container.removeChild(l)}),se.clearData(),se.setData("Text",i.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(te){if(w.draggable=!1,E=!1,this.setState(null),!i.getReadOnly()){var le=te.dataTransfer.dropEffect;!L&&le=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(te){if(!(i.getReadOnly()||!ee(te.dataTransfer)))return I=te.clientX,$=te.clientY,x||z(),N++,te.dataTransfer.dropEffect=L=de(te),v.preventDefault(te)},this.onDragOver=function(te){if(!(i.getReadOnly()||!ee(te.dataTransfer)))return I=te.clientX,$=te.clientY,x||(z(),N++),q!==null&&(q=null),te.dataTransfer.dropEffect=L=de(te),v.preventDefault(te)},this.onDragLeave=function(te){if(N--,N<=0&&x)return U(),L=null,v.preventDefault(te)},this.onDrop=function(te){if(R){var le=te.dataTransfer;if(E)switch(L){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=i.moveText(C,R);break;case"copy":C=i.moveText(C,R,!0);break}else{var se=le.getData("Text");C={start:R,end:i.session.insert(R,se)},i.focus(),L=null}return U(),v.preventDefault(te)}},v.addListener(w,"dragstart",this.onDragStart.bind(c),i),v.addListener(w,"dragend",this.onDragEnd.bind(c),i),v.addListener(w,"dragenter",this.onDragEnter.bind(c),i),v.addListener(w,"dragover",this.onDragOver.bind(c),i),v.addListener(w,"dragleave",this.onDragLeave.bind(c),i),v.addListener(w,"drop",this.onDrop.bind(c),i);function _(te,le){var se=Date.now(),ue=!le||te.row!=le.row,me=!le||te.column!=le.column;if(!P||ue||me)i.moveCursorToPosition(te),P=se,O={x:I,y:$};else{var _e=u(O.x,O.y,I,$);_e>s?P=null:se-P>=f&&(i.renderer.scrollCursorIntoView(),P=null)}}function k(te,le){var se=Date.now(),ue=i.renderer.layerConfig.lineHeight,me=i.renderer.layerConfig.characterWidth,_e=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:I-_e.left,right:_e.right-I},y:{top:$-_e.top,bottom:_e.bottom-$}},Me=Math.min(Te.x.left,Te.x.right),Xe=Math.min(Te.y.top,Te.y.bottom),Ue={row:te.row,column:te.column};Me/me<=2&&(Ue.column+=Te.x.left<Te.x.right?-3:2),Xe/ue<=1&&(Ue.row+=Te.y.top<Te.y.bottom?-1:1);var ct=te.row!=Ue.row,et=te.column!=Ue.column,ht=!le||te.row!=le.row;ct||et&&!ht?B?se-B>=h&&i.renderer.scrollCursorIntoView(Ue):B=se:B=null}function D(){var te=R;R=i.renderer.screenToTextCoordinates(I,$),_(R,te),k(R,te)}function z(){C=i.selection.toOrientedRange(),x=i.session.addMarker(C,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),D(),S=setInterval(D,20),N=0,v.addListener(document,"mousemove",X)}function U(){clearInterval(S),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!E&&i.$resetCursorStyle(),C=null,R=null,N=0,B=null,P=null,v.removeListener(document,"mousemove",X)}var q=null;function X(){q==null&&(q=setTimeout(function(){q!=null&&x&&U()},20))}function ee(te){var le=te.types;return!le||Array.prototype.some.call(le,function(se){return se=="text/plain"||se=="Text"})}function de(te){var le=["copy","copymove","all","uninitialized"],se=["move","copymove","linkmove","all","uninitialized"],ue=b.isMac?te.altKey:te.ctrlKey,me="uninitialized";try{me=te.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return ue&&le.indexOf(me)>=0?_e="copy":se.indexOf(me)>=0?_e="move":le.indexOf(me)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,i=c.container;i.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var l=b.isWin?"default":"move";c.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(c){var i=this.editor.container;if(b.isIE&&this.state=="dragReady"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&i.dragDrop()}if(this.state==="dragWait"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var i=this.editor,l=c.inSelection(),d=c.getButton(),w=c.domEvent.detail||1;if(w===1&&d===0&&l){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var I=i.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function u(c,i,l,d){return Math.sqrt(Math.pow(l-c,2)+Math.pow(d-i,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,p){var g=e("./mouse_event").MouseEvent,v=e("../lib/event"),b=e("../lib/dom");r.addTouchListeners=function(h,f){var s="scroll",a,u,c,i,l,d,w=0,x,I=0,$=0,S=0,C,R;function N(){var _=window.navigator&&window.navigator.clipboard,k=!1,D=function(){var q=f.getCopyText(),X=f.session.getUndoManager().hasUndo();R.replaceChild(b.buildDom(k?["span",!q&&z("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&z("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&z("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&z("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],X&&z("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],z("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],z("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},z=function(q){return f.commands.canExecute(q,f)},U=function(q){var X=q.target.getAttribute("action");if(X=="more"||!k)return k=!k,D();X=="paste"?_.readText().then(function(ee){f.execCommand(X,ee)}):X&&((X=="cut"||X=="copy")&&(_?_.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(X)),R.firstChild.style.display="none",k=!1,X!="openCommandPalette"&&f.focus()};R=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(q){s="menu",q.stopPropagation(),q.preventDefault(),f.textInput.focus()},ontouchend:function(q){q.stopPropagation(),q.preventDefault(),U(q)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container)}function L(){if(!f.getOption("enableMobileMenu")){R&&E();return}R||N();var _=f.selection.cursor,k=f.renderer.textToScreenCoordinates(_.row,_.column),D=f.renderer.textToScreenCoordinates(0,0).pageX,z=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();R.style.top=k.pageY-U.top-3+"px",k.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=D+z-U.left+"px"),R.style.display="",R.firstChild.style.display="none",f.on("input",E)}function E(_){R&&(R.style.display="none"),f.off("input",E)}function B(){l=null,clearTimeout(l);var _=f.selection.getRange(),k=_.contains(x.row,x.column);(_.isEmpty()||!k)&&(f.selection.moveToPosition(x),f.selection.selectWord()),s="wait",L()}function P(){l=null,clearTimeout(l),f.selection.moveToPosition(x);var _=I>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);_&&!_.isEmpty()?f.selection.setRange(_):f.selection.selectWord(),s="wait"}v.addListener(h,"contextmenu",function(_){if(C){var k=f.textInput.getElement();k.focus()}},f),v.addListener(h,"touchstart",function(_){var k=_.touches;if(l||k.length>1){clearTimeout(l),l=null,c=-1,s="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var D=f.renderer.layerConfig.lineHeight,z=f.renderer.layerConfig.lineHeight,U=_.timeStamp;i=U;var q=k[0],X=q.clientX,ee=q.clientY;Math.abs(a-X)+Math.abs(u-ee)>D&&(c=-1),a=_.clientX=X,u=_.clientY=ee,$=S=0;var de=new g(_,f);if(x=de.getDocumentPosition(),U-c<500&&k.length==1&&!w)I++,_.preventDefault(),_.button=0,P();else{I=0;var te=f.selection.cursor,le=f.selection.isEmpty()?te:f.selection.anchor,se=f.renderer.$cursorLayer.getPixelPosition(te,!0),ue=f.renderer.$cursorLayer.getPixelPosition(le,!0),me=f.renderer.scroller.getBoundingClientRect(),_e=f.renderer.layerConfig.offset,Te=f.renderer.scrollLeft,Me=function(ct,et){return ct=ct/z,et=et/D-.75,ct*ct+et*et};if(_.clientX<me.left){s="zoom";return}var Xe=Me(_.clientX-me.left-se.left+Te,_.clientY-me.top-se.top+_e),Ue=Me(_.clientX-me.left-ue.left+Te,_.clientY-me.top-ue.top+_e);Xe<3.5&&Ue<3.5&&(s=Xe>Ue?"cursor":"anchor"),Ue<3.5?s="anchor":Xe<3.5?s="cursor":s="scroll",l=setTimeout(B,450)}c=U},f),v.addListener(h,"touchend",function(_){C=f.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):l?(f.selection.moveToPosition(x),w=0,L()):s=="scroll"?(O(),E()):L(),clearTimeout(l),l=null},f),v.addListener(h,"touchmove",function(_){l&&(clearTimeout(l),l=null);var k=_.touches;if(!(k.length>1||s=="zoom")){var D=k[0],z=a-D.clientX,U=u-D.clientY;if(s=="wait")if(z*z+U*U>4)s="cursor";else return _.preventDefault();a=D.clientX,u=D.clientY,_.clientX=D.clientX,_.clientY=D.clientY;var q=_.timeStamp,X=q-i;if(i=q,s=="scroll"){var ee=new g(_,f);ee.speed=1,ee.wheelX=z,ee.wheelY=U,10*Math.abs(z)<Math.abs(U)&&(z=0),10*Math.abs(U)<Math.abs(z)&&(U=0),X!=0&&($=z/X,S=U/X),f._emit("mousewheel",ee),ee.propagationStopped||($=S=0)}else{var de=new g(_,f),te=de.getDocumentPosition();s=="cursor"?f.selection.moveCursorToPosition(te):s=="anchor"&&f.selection.setSelectionAnchor(te.row,te.column),f.renderer.scrollCursorIntoView(te),_.preventDefault()}}},f);function O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs($)<.01&&($=0),Math.abs(S)<.01&&(S=0),w<20&&($=.9*$),w<20&&(S=.9*S);var _=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*S),_==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(e,r,p){var g=e("../lib/event"),v=e("../lib/useragent"),b=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,f=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),c=function(){function i(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=l,new b(this),new h(this),new s(this);var w=function($){var S=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());S&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},x=l.renderer.getMouseEventTarget();g.addListener(x,"click",this.onMouseEvent.bind(this,"click"),l),g.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),g.addMultiMouseDownListener([x,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),g.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),a(l.container,l);var I=l.renderer.$gutter;g.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),g.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),l),g.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),g.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),g.addListener(x,"mousedown",w,l),g.addListener(I,"mousedown",w,l),v.isIE&&l.renderer.scrollBarV&&(g.addListener(l.renderer.scrollBarV.element,"mousedown",w,l),g.addListener(l.renderer.scrollBarH.element,"mousedown",w,l)),l.on("mousemove",function($){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var S=l.renderer.screenToTextCoordinates($.x,$.y),C=l.session.selection.getRange(),R=l.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},l)}return i.prototype.onMouseEvent=function(l,d){this.editor.session&&this.editor._emit(l,new f(d,this.editor))},i.prototype.onMouseMove=function(l,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(l,new f(d,this.editor))},i.prototype.onMouseWheel=function(l,d){var w=new f(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(l,w)},i.prototype.setState=function(l){this.state=l},i.prototype.captureMouse=function(l,d){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var I=this,$=!0,S=function(E){if(E){if(v.isWebKit&&!E.which&&I.releaseMouse)return I.releaseMouse();I.x=E.clientX,I.y=E.clientY,d&&d(E),I.mouseEvent=new f(E,I.editor),I.$mouseMoved=!0}},C=function(E){w.off("beforeEndOperation",L),$=!1,w.session&&R(),I[I.state+"End"]&&I[I.state+"End"](E),I.state="",I.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,E&&I.onMouseEvent("mouseup",E),w.endOperation()},R=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1},N=function(){$&&(R(),g.nextFrame(N))};if(v.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){C(l)});var L=function(E){I.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=S,I.releaseMouse=g.capture(this.editor.container,S,C),N()},i.prototype.cancelContextMenu=function(){var l=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),d&&d.domEvent&&g.stopEvent(d.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},i}();c.prototype.releaseMouse=null,u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:v.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,p){var g=e("../lib/dom"),v=function(){function b(h){h.on("click",function(f){var s=f.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(f.getAccelKey()?a.removeFold(u):a.expandFold(u),f.stop());var c=f.domEvent&&f.domEvent.target;c&&g.hasCssClass(c,"ace_inline_button")&&g.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(f){var s=h.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,f),h.isFocused()||h.focus(),f.stop()}}),h.on("gutterdblclick",function(f){var s=h.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=h.session,c=u.getParentFoldRangeData(a,!0),i=c.range||c.firstRange;if(i){a=i.start.row;var l=u.getFoldAt(a,u.getLine(a).length,1);l?u.removeFold(l):(u.addFold("...",i),h.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}f.stop()}})}return b}();r.FoldHandler=v}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,p){var g=e("../lib/keys"),v=e("../lib/event"),b=function(){function h(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return h.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},h.prototype.setKeyboardHandler=function(f){var s=this.$handlers;if(s[s.length-1]!=f){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(f,1)}},h.prototype.addKeyboardHandler=function(f,s){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var a=this.$handlers.indexOf(f);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(f):this.$handlers.splice(s,0,f),a==-1&&f.attach&&f.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(f){var s=this.$handlers.indexOf(f);return s==-1?!1:(this.$handlers.splice(s,1),f.detach&&f.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var f=this.$data,s=f.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,f)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(f,s,a,u){for(var c,i=!1,l=this.$editor.commands,d=this.$handlers.length;d--&&(c=this.$handlers[d].handleKeyboard(this.$data,f,s,a,u),!(!(!c||!c.command)&&(c.command=="null"?i=!0:i=l.exec(c.command,this.$editor,c.args,u),i&&u&&f!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&v.stopEvent(u),i))););return!i&&f==-1&&(c={command:"insertstring"},i=l.exec("insertstring",this.$editor,s)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),i},h.prototype.onCommandKey=function(f,s,a){var u=g.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,f)},h.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},h}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,p){var g=0,v=0,b=!1,h=!1,f=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,c=1,i=0,l=1,d=2,w=3,x=4,I=5,$=6,S=7,C=8,R=9,N=10,L=11,E=12,B=13,P=14,O=15,_=16,k=17,D=18,z=[D,D,D,D,D,D,D,D,D,$,I,$,C,I,D,D,D,D,D,D,D,D,D,D,D,D,D,D,I,I,I,$,C,x,x,L,L,L,x,x,x,x,x,N,R,N,R,R,d,d,d,d,d,d,d,d,d,d,R,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,D,D,D,D,D,D,I,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,R,x,L,L,L,L,x,x,x,x,i,x,x,D,x,x,L,L,d,d,x,i,x,x,x,d,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,i,l,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,I,B,P,O,_,k,R,L,L,L,L,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,R,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(te,le,se,ue){var me=g?a:s,_e=null,Te=null,Me=null,Xe=0,Ue=null,ct=null,et=-1,ht=null,qt=null,hn=[];if(!ue)for(ht=0,ue=[];ht<se;ht++)ue[ht]=de(te[ht]);for(v=g,b=!1,h=!1,f=!1,qt=0;qt<se;qt++){if(_e=Xe,hn[qt]=Te=ee(te,ue,hn,qt),Xe=me[_e][Te],Ue=Xe&240,Xe&=15,le[qt]=Me=me[Xe][5],Ue>0)if(Ue==16){for(ht=et;ht<qt;ht++)le[ht]=1;et=-1}else et=-1;if(ct=me[Xe][6],ct)et==-1&&(et=qt);else if(et>-1){for(ht=et;ht<qt;ht++)le[ht]=Me;et=-1}ue[qt]==I&&(le[qt]=0),v|=Me}if(f){for(ht=0;ht<se;ht++)if(ue[ht]==$){le[ht]=g;for(var Vt=ht-1;Vt>=0&&ue[Vt]==C;Vt--)le[Vt]=g}}}function X(te,le,se){if(!(v<te)){if(te==1&&g==c&&!h){se.reverse();return}for(var ue=se.length,me=0,_e,Te,Me,Xe;me<ue;){if(le[me]>=te){for(_e=me+1;_e<ue&&le[_e]>=te;)_e++;for(Te=me,Me=_e-1;Te<Me;Te++,Me--)Xe=se[Te],se[Te]=se[Me],se[Me]=Xe;me=_e}me++}}}function ee(te,le,se,ue){var me=le[ue],_e,Te,Me,Xe;switch(me){case i:case l:b=!1;case x:case w:return me;case d:return b?w:d;case S:return b=!0,l;case C:return x;case R:return ue<1||ue+1>=le.length||(_e=se[ue-1])!=d&&_e!=w||(Te=le[ue+1])!=d&&Te!=w?x:(b&&(Te=w),Te==_e?Te:x);case N:return _e=ue>0?se[ue-1]:I,_e==d&&ue+1<le.length&&le[ue+1]==d?d:x;case L:if(ue>0&&se[ue-1]==d)return d;if(b)return x;for(Xe=ue+1,Me=le.length;Xe<Me&&le[Xe]==L;)Xe++;return Xe<Me&&le[Xe]==d?d:x;case E:for(Me=le.length,Xe=ue+1;Xe<Me&&le[Xe]==E;)Xe++;if(Xe<Me){var Ue=te[ue],ct=Ue>=1425&&Ue<=2303||Ue==64286;if(_e=le[Xe],ct&&(_e==l||_e==S))return l}return ue<1||(_e=le[ue-1])==I?x:se[ue-1];case I:return b=!1,h=!0,g;case $:return f=!0,x;case B:case P:case _:case k:case O:b=!1;case D:return x}}function de(te){var le=te.charCodeAt(0),se=le>>8;return se==0?le>191?i:z[le]:se==5?/[\u0591-\u05f4]/.test(te)?l:i:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(te)?E:/[\u0660-\u0669\u066b-\u066c]/.test(te)?w:le==1642?L:/[\u06f0-\u06f9]/.test(te)?d:S:se==32&&le<=8287?U[le&255]:se==254&&le>=65136?S:x}r.L=i,r.R=l,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(te,le,se){if(te.length<2)return{};var ue=te.split(""),me=new Array(ue.length),_e=new Array(ue.length),Te=[];g=se?c:u,q(ue,Te,ue.length,le);for(var Me=0;Me<me.length;me[Me]=Me,Me++);X(2,Te,me),X(1,Te,me);for(var Me=0;Me<me.length-1;Me++)le[Me]===w?Te[Me]=r.AN:Te[Me]===l&&(le[Me]>S&&le[Me]<B||le[Me]===x||le[Me]===D)?Te[Me]=r.ON_R:Me>0&&ue[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Me])&&(Te[Me-1]=Te[Me]=r.R_H,Me++);ue[ue.length-1]===r.DOT&&(Te[ue.length-1]=r.B),ue[0]==="‫"&&(Te[0]=r.RLE);for(var Me=0;Me<me.length;Me++)_e[Me]=Te[me[Me]];return{logicalFromVisual:me,bidiLevels:_e}},r.hasBidiCharacters=function(te,le){for(var se=!1,ue=0;ue<te.length;ue++)le[ue]=de(te.charAt(ue)),!se&&(le[ue]==l||le[ue]==S||le[ue]==w)&&(se=!0);return se},r.getVisualFromLogicalIdx=function(te,le){for(var se=0;se<le.logicalFromVisual.length;se++)if(le.logicalFromVisual[se]==te)return se;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,p){var g=e("./lib/bidiutil"),v=e("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function f(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=g,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=b.test(s.getValue())}return f.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
179
+ `))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},f.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===c);)c=u,s++;else s=this.currentRow;return s},f.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,c=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[s];i&&(a===void 0&&(a=this.getSplitIndex()),a>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=a<i.length?this.line.substring(i[a-1],i[a]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[a]),a==i.length&&(this.line+=this.showInvisibles?c:g.DOT))}else this.line+=this.showInvisibles?c:g.DOT;var l=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,I){return x===" "||l.isFullWidth(x.charCodeAt(0))?(w=x===" "?l.getScreenTabSize(I+d):2,d+=w-1,v.stringRepeat(g.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==g.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var s=[];g.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=g.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[g.L]=this.charWidths[g.EN]=this.charWidths[g.ON_R]=a,this.charWidths[g.R]=this.charWidths[g.AN]=u,this.charWidths[g.R_H]=u*.45,this.charWidths[g.B]=this.charWidths[g.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},f.prototype.setEolChar=function(s){this.EOL=s},f.prototype.setContentWidth=function(s){this.contentWidth=s},f.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),c=s.selection.getSelectionAnchor().row;c<=u.row;c++)!a&&s.session.getLine(c).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(c,0,1):a&&s.session.getLine(c).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:c},s.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=s>a?this.session.getOverwrite()?s:s-1:a,c=g.getVisualFromLogicalIdx(u,this.bidiMap),i=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&s<=a&&i[c]%2!==0&&c++;for(var d=0;d<c;d++)l+=this.charWidths[i[d]];return!this.session.getOverwrite()&&s>a&&i[c]%2===0&&(l+=this.charWidths[i[c]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},f.prototype.getSelections=function(s,a){var u=this.bidiMap,c=u.bidiLevels,i,l=[],d=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,I=!1,$=!1,S=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<c.length;R++)C=u.logicalFromVisual[R],i=c[R],I=C>=w&&C<x,I&&!$?S=d:!I&&$&&l.push({left:S,width:d-S}),d+=this.charWidths[i],$=I;if(I&&R===c.length&&l.push({left:S,width:d-S}),this.isRtlDir)for(var N=0;N<l.length;N++)l[N].left+=this.rtlLineOffset;return l},f.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),c=0,i=0,l=this.bidiMap.bidiLevels,d=this.charWidths[l[i]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>c+d/2;){if(c+=d,i===l.length-1){d=0;break}d=this.charWidths[l[++i]]}return i>0&&l[i-1]%2!==0&&l[i]%2===0?(u<c&&i--,a=this.bidiMap.logicalFromVisual[i]):i>0&&l[i-1]%2===0&&l[i]%2!==0?a=1+(u>c?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===l.length-1&&d===0&&l[i-1]%2===0||!this.isRtlDir&&i===0&&l[i]%2!==0?a=1+this.bidiMap.logicalFromVisual[i]:(i>0&&l[i-1]%2!==0&&d!==0&&i--,a=this.bidiMap.logicalFromVisual[i]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},f}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,p){var g=e("./lib/oop"),v=e("./lib/lang"),b=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,f=function(){function s(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(c){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},s.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,a):h.fromPoints(a,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,u){var c=u?a.end:a.start,i=u?a.start:a.end;this.$setSelection(c.row,c.column,i.row,i.column)},s.prototype.$setSelection=function(a,u,c,i){if(!this.$silent){var l=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(c,i),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||d)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},s.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,u){if(typeof u>"u"){var c=a||this.lead;a=c.row,u=c.column}return this.session.getWordRange(a,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(a,u){var c=typeof a=="number"?a:this.lead.row,i,l=this.session.getFoldLine(c);return l?(c=l.start.row,i=l.end.row):i=c,u===!0?new h(c,0,i,this.session.getLine(i).length):new h(c,0,i+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,u,c){var i=a.column,l=a.column+u;return c<0&&(i=a.column-u,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(i,l).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,c=this.session.documentToScreenRow(a,u),i=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,i.row,i.column),d=l.match(/^\s*/);d[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(i.column+=d[0].length),this.moveCursorToPosition(i)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var c=this.session.getLine(u.row);if(u.column==c.length){var i=c.search(/\s+$/);i>0&&(u.column=i)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),i=c.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,u,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(i)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=c.substring(u)),u>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var i=this.session.getFoldStringAt(a,u,-1);i==null&&(i=this.doc.getLine(a).substring(0,u));var l=v.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(u-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,c,i=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(c=a[u])&&i.test(c);)u++;if(u<1){for(l.lastIndex=0;(c=a[u])&&!l.test(c);)if(l.lastIndex=0,u++,i.test(c))if(u>2){u--;break}else{for(;(c=a[u])&&i.test(c);)u++;if(u>2)break}}}return l.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),i=c.substring(u),l=this.session.getFoldAt(a,u,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(u==c.length){var d=this.doc.getLength();do a++,i=this.doc.getLine(a);while(a<d&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),u=0}var w=this.$shortWordEndIndex(i);this.moveCursorTo(a,u+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(c.start.row,c.start.column);var i=this.session.getLine(a).substring(0,u);if(u===0){do a--,i=this.doc.getLine(a);while(a>0&&/^\s*$/.test(i));u=i.length,/\s+$/.test(i)||(i="")}var l=v.stringReverse(i),d=this.$shortWordEndIndex(l);return this.moveCursorTo(a,u-d)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,u){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];a<0?a-=l.rowsAbove||0:a>0&&(a+=l.rowCount-(l.rowsAbove||0))}var d=this.session.screenToDocumentPosition(c.row+a,c.column,i);a!==0&&u===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,c){var i=this.session.getFoldAt(a,u,1);i&&(a=i.start.row,u=i.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(u))&&l.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,c){var i=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(i.row,i.column,c)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var c=this.getCursor();return h.fromPoints(u,c)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var c=u.clone();return c.isBackwards=u.cursor==u.start,c});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var c=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},s}();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,g.implement(f.prototype,b),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,p){var g=e("./lib/report_error").reportError,v=2e3,b=function(){function h(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],u=[],c=0,i=this.matchMappings[s]={defaultToken:"text"},l="g",d=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),x.unicode&&l.indexOf("u")===-1&&(l+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var I=x.regex,$=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?I=x.regex.replace(/\\([0-9]+)/g,function(S,C){return"\\"+(parseInt(C,10)+c+1)}):($=1,I=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&d.push(x)),i[c]=w,c+=$,u.push(I),x.onMatch||(x.onMatch=null)}}u.length||(i[0]=0,u.push("$")),d.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,l)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",l)}}return h.prototype.$setMaxTokenCount=function(f){v=f|0},h.prototype.$applyToken=function(f){var s=this.splitRegex.exec(f).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:f}];for(var u=[],c=0,i=a.length;c<i;c++)s[c]&&(u[u.length]={type:a[c],value:s[c]});return u},h.prototype.$arrayTokens=function(f){if(!f)return[];var s=this.splitRegex.exec(f);if(!s)return"text";for(var a=[],u=this.tokenArray,c=0,i=u.length;c<i;c++)s[c+1]&&(a[a.length]={type:u[c],value:s[c+1]});return a},h.prototype.removeCapturingGroups=function(f){var s=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},h.prototype.createSplitterRegexp=function(f,s){if(f.indexOf("(?=")!=-1){var a=0,u=!1,c={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,l,d,w,x,I){return u?u=x!="]":x?u=!0:w?(a==c.stack&&(c.end=I+1,c.stack=-1),a--):d&&(a++,d.length!=1&&(c.stack=a,c.start=I)),i}),c.end!=null&&/^\)*$/.test(f.substr(c.end))&&(f=f.substring(0,c.start)+f.substr(c.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(s||"").replace("g",""))},h.prototype.getLineTokens=function(f,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var u=s||"start",c=this.states[u];c||(u="start",c=this.states[u]);var i=this.matchMappings[u],l=this.regExps[u];l.lastIndex=0;for(var d,w=[],x=0,I=0,$={type:null,value:""};d=l.exec(f);){var S=i.defaultToken,C=null,R=d[0],N=l.lastIndex;if(N-R.length>x){var L=f.substring(x,N-R.length);$.type==S?$.value+=L:($.type&&w.push($),$={type:S,value:L})}for(var E=0;E<d.length-2;E++)if(d[E+1]!==void 0){C=c[i[E]],C.onMatch?S=C.onMatch(R,u,a,f):S=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),c=this.states[u],c||(this.reportError("state doesn't exist",u),u="start",c=this.states[u]),i=this.matchMappings[u],x=N,l=this.regExps[u],l.lastIndex=N),C.consumeLineEnd&&(x=N);break}if(R){if(typeof S=="string")(!C||C.merge!==!1)&&$.type===S?$.value+=R:($.type&&w.push($),$={type:S,value:R});else if(S){$.type&&w.push($),$={type:null,value:""};for(var E=0;E<S.length;E++)w.push(S[E])}}if(x==f.length)break;if(x=N,I++>v){for(I>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:f});x<f.length;)$.type&&w.push($),$={value:f.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return $.type&&w.push($),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},h}();b.prototype.reportError=g,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,p){var g=e("../lib/deep_copy").deepCopy,v;v=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,s){if(!s){for(var a in f)this.$rules[a]=f[a];return}for(var a in f){for(var u=f[a],c=0;c<u.length;c++){var i=u[c];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(s)!==0&&(i.next=s+i.next),i.nextState&&i.nextState.indexOf(s)!==0&&(i.nextState=s+i.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(f,s,a,u,c){var i=typeof f=="function"?new f().getRules():f;if(u)for(var l=0;l<u.length;l++)u[l]=s+u[l];else{u=[];for(var d in i)u.push(s+d)}if(this.addRules(i,s),a)for(var w=Array.prototype[c?"push":"unshift"],l=0;l<u.length;l++)w.apply(this.$rules[u[l]],g(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var b=function(f,s){return(f!="start"||s.length)&&s.unshift(this.nextState,f),this.nextState},h=function(f,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var f=0,s=this.$rules;function a(u){var c=s[u];c.processed=!0;for(var i=0;i<c.length;i++){var l=c[i],d=null;Array.isArray(l)&&(d=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var w=l.next||l.push;if(w&&Array.isArray(w)){var x=l.stateName;x||(x=l.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=f++)),s[x]=w,l.next=x,a(x)}else w=="pop"&&(l.next=h);if(l.push&&(l.nextState=l.next||l.push,l.next=b,delete l.push),l.rules)for(var I in l.rules)s[I]?s[I].push&&s[I].push.apply(s[I],l.rules[I]):s[I]=l.rules[I];var $=typeof l=="string"?l:l.include;if($&&($==="$self"&&($="start"),Array.isArray($)?d=$.map(function(C){return s[C]}):d=s[$]),d){var S=[i,1].concat(d);l.noEscape&&(S=S.filter(function(C){return!C.next})),c.splice.apply(c,S),i--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(f,s,a,u){var c=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(i){for(var l=f[i],d=l.split(u||"|"),w=d.length;w--;){var x=d[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),c[x]=i}},this),f=null,a?function(i){return c[i.toLowerCase()]||s}:function(i){return c[i]||s}},this.getKeywords=function(){return this.$keywords}}).call(v.prototype),r.TextHighlightRules=v}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,p){var g;g=function(){this.$behaviours={}},(function(){this.add=function(v,b,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[v]:this.$behaviours[v]={}}this.$behaviours[v][b]=h},this.addBehaviours=function(v){for(var b in v)for(var h in v[b])this.add(b,h,v[b][h])},this.remove=function(v){this.$behaviours&&this.$behaviours[v]&&delete this.$behaviours[v]},this.inherit=function(v,b){if(typeof v=="function")var h=new v().getBehaviours(b);else var h=v.getBehaviours(b);this.addBehaviours(h)},this.getBehaviours=function(v){if(v){for(var b={},h=0;h<v.length;h++)this.$behaviours[v[h]]&&(b[v[h]]=this.$behaviours[v[h]]);return b}else return this.$behaviours}}).call(g.prototype),r.Behaviour=g}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,p){var g=e("./range").Range,v=function(){function b(h,f,s){this.$session=h,this.$row=f,this.$rowTokens=h.getTokens(f);var a=h.getTokenAt(f,s);this.$tokenIndex=a?a.index:-1}return b.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]},b.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,f=this.$tokenIndex,s=h[f].start;if(s!==void 0)return s;for(s=0;f>0;)f-=1,s+=h[f].value.length;return s},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new g(this.$row,f,this.$row,f+h.value.length)},b}();r.TokenIterator=v}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,p){var g=e("../../lib/oop"),v=e("../behaviour").Behaviour,b=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},c={'"':'"',"'":"'"},i=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 a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(w,x,I,$){var S=w.end.row-w.start.row;return{text:I+x+$,selection:[0,w.start.column+1,S,w.end.column+(S?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(x,I,$,S,C){var R=$.getCursorPosition(),N=S.doc.getLine(R.row);if(C=="{"){i($);var L=$.getSelectionRange(),E=S.doc.getTextRange(L),B=S.getTokenAt(R.row,R.column);if(E!==""&&E!=="{"&&$.getWrapBehavioursEnabled())return l(L,E,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(q){return q.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[R.column-B.start-1]!=="$"?void 0:(d.recordAutoInsert($,S,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion($,S))return/[\]\}\)]/.test(N[R.column])||$.inMultiSelectMode||w.braces?(d.recordAutoInsert($,S,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert($,S,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i($);var O=N.substring(R.column,R.column+1);if(O=="}"){var _=S.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&d.isAutoInsertedClosing(R,N,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
+ `||C==`\r
181
+ `){i($);var k="";d.isMaybeInsertedClosing(R,N)&&(k=h.stringRepeat("}",a.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var O=N.substring(R.column,R.column+1);if(O==="}"){var D=S.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var z=this.$getIndent(S.getLine(D.row))}else if(k)var z=this.$getIndent(N);else{d.clearMaybeInsertedClosing();return}var U=z+S.getTabString();return{text:`
182
+ `+U+`
183
+ `+z+k,selection:[1,U.length,1,U.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,I,$,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){i($);var N=S.doc.getLine(C.start.row),L=N.substring(C.end.column,C.end.column+1);if(L=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,I,$,S,C){if(C=="("){i($);var R=$.getSelectionRange(),N=S.doc.getTextRange(R);if(N!==""&&$.getWrapBehavioursEnabled())return l(R,N,"(",")");if(d.isSaneInsertion($,S))return d.recordAutoInsert($,S,")"),{text:"()",selection:[1,1]}}else if(C==")"){i($);var L=$.getCursorPosition(),E=S.doc.getLine(L.row),B=E.substring(L.column,L.column+1);if(B==")"){var P=S.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(P!==null&&d.isAutoInsertedClosing(L,E,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,I,$,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){i($);var N=S.doc.getLine(C.start.row),L=N.substring(C.start.column+1,C.start.column+2);if(L==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,I,$,S,C){if(C=="["){i($);var R=$.getSelectionRange(),N=S.doc.getTextRange(R);if(N!==""&&$.getWrapBehavioursEnabled())return l(R,N,"[","]");if(d.isSaneInsertion($,S))return d.recordAutoInsert($,S,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i($);var L=$.getCursorPosition(),E=S.doc.getLine(L.row),B=E.substring(L.column,L.column+1);if(B=="]"){var P=S.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(P!==null&&d.isAutoInsertedClosing(L,E,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,I,$,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){i($);var N=S.doc.getLine(C.start.row),L=N.substring(C.start.column+1,C.start.column+2);if(L=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,I,$,S,C){var R=S.$mode.$quotes||c;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i($);var N=C,L=$.getSelectionRange(),E=S.doc.getTextRange(L);if(E!==""&&(E.length!=1||!R[E])&&$.getWrapBehavioursEnabled())return l(L,E,N,N);if(!E){var B=$.getCursorPosition(),P=S.doc.getLine(B.row),O=P.substring(B.column-1,B.column),_=P.substring(B.column,B.column+1),k=S.getTokenAt(B.row,B.column),D=S.getTokenAt(B.row,B.column+1);if(O=="\\"&&k&&/escape/.test(k.type))return null;var z=k&&/string|escape/.test(k.type),U=!D||/string|escape/.test(D.type),q;if(_==N)q=z!==U,q&&/string\.end/.test(D.type)&&(q=!1);else{if(z&&!U||z&&U)return null;var X=S.$mode.tokenRe;X.lastIndex=0;var ee=X.test(O);X.lastIndex=0;var de=X.test(_),te=S.$mode.$pairQuotesAfter,le=te&&te[N]&&te[N].test(O);if(!le&&ee||de||_&&!/[\s;,.})\]\\]/.test(_))return null;var se=P[B.column-2];if(O==N&&(se==N||X.test(se)))return null;q=!0}return{text:q?N+N:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,I,$,S,C){var R=S.$mode.$quotes||c,N=S.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(N)){i($);var L=S.doc.getLine(C.start.row),E=L.substring(C.start.column+1,C.start.column+2);if(E==N)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,I,$,S,C){if(x==="doc-start"&&(C===`
184
+ `||C===`\r
185
+ `)&&$.selection.isEmpty()){var R=$.getCursorPosition();if(R.column===0)return;for(var N=S.doc.getLine(R.row),L=S.doc.getLine(R.row+1),E=S.getTokens(R.row),B=0,P=0;P<E.length;P++){B+=E[P].value.length;var O=E[P];if(B>=R.column){if(B===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var _=E[P+1];if(!_||!/\.doc/.test(_.type))return}}var k=R.column-(B-O.value.length),D=O.value.indexOf("*/"),z=O.value.indexOf("/**",D>-1?D+2:0);if(z!==-1&&k>z&&k<z+3||D!==-1&&z!==-1&&k>=D&&k<=z||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(N);if(/\s*\*/.test(L))return/^\s*\*/.test(N)?{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(N.substring(0,R.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},d.isSaneInsertion=function(w,x){var I=w.getCursorPosition(),$=new b(x,I.row,I.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(w.session.getLine(I.row)[I.column]))return!0;var S=new b(x,I.row,I.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==I.row||this.$matchTokenType($.getCurrentToken()||"text",s)},d.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},d.recordAutoInsert=function(w,x,I){var $=w.getCursorPosition(),S=x.doc.getLine($.row);this.isAutoInsertedClosing($,S,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=I+S.substr($.column),a.autoInsertedBrackets++},d.recordMaybeInsert=function(w,x,I){var $=w.getCursorPosition(),S=x.doc.getLine($.row);this.isMaybeInsertedClosing($,S)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=S.substr(0,$.column)+I,a.maybeInsertedLineEnd=S.substr($.column),a.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(w,x,I){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&I===a.autoInsertedLineEnd[0]&&x.substr(w.column)===a.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(w,x){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&x.substr(w.column)===a.maybeInsertedLineEnd&&x.substr(0,w.column)==a.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},g.inherits(d,v),r.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,r,p){for(var g=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],v=0,b=[],h=0;h<g.length;h+=2)b.push(v+=g[h]),g[h+1]&&b.push(45,v+=g[h+1]);r.wordChars=String.fromCharCode.apply(null,b)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,r,p){var g=e("../config"),v=e("../tokenizer").Tokenizer,b=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,f=e("../unicode"),s=e("../lib/lang"),a=e("../token_iterator").TokenIterator,u=e("../range").Range,c;c=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new h,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 v(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,l,d,w){var x=l.doc,I=!0,$=!0,S=1/0,C=l.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var N=this.lineCommentStart.map(s.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var N=s.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;N=new RegExp("^(\\s*)(?:"+N+") ?"),R=l.getUseSoftTabs();var E=function(q,X){var ee=q.match(N);if(ee){var de=ee[1].length,te=ee[0].length;!_(q,de,te)&&ee[0][te-1]==" "&&te--,x.removeInLine(X,de,te)}},B=L+" ",P=function(q,X){(!I||/\S/.test(q))&&(_(q,S,S)?x.insertInLine({row:X,column:S},B):x.insertInLine({row:X,column:S},L))},O=function(q,X){return N.test(q)},_=function(q,X,ee){for(var de=0;X--&&q.charAt(X)==" ";)de++;if(de%C!=0)return!1;for(var de=0;q.charAt(ee++)==" ";)de++;return C>2?de%C!=C-1:de%C==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,k=this.blockComment.end,N=new RegExp("^(\\s*)(?:"+s.escapeRegExp(L)+")"),D=new RegExp("(?:"+s.escapeRegExp(k)+")\\s*$"),P=function(le,se){O(le,se)||(!I||/\S/.test(le))&&(x.insertInLine({row:se,column:le.length},k),x.insertInLine({row:se,column:S},L))},E=function(le,se){var ue;(ue=le.match(D))&&x.removeInLine(se,le.length-ue[0].length,le.length),(ue=le.match(N))&&x.removeInLine(se,ue[1].length,ue[0].length)},O=function(le,se){if(N.test(le))return!0;for(var ue=l.getTokens(se),me=0;me<ue.length;me++)if(ue[me].type==="comment")return!0}}function z(q){for(var X=d;X<=w;X++)q(x.getLine(X),X)}var U=1/0;z(function(q,X){var ee=q.search(/\S/);ee!==-1?(ee<S&&(S=ee),$&&!O(q,X)&&($=!1)):U>q.length&&(U=q.length)}),S==1/0&&(S=U,I=!1,$=!1),R&&S%C!=0&&(S=Math.floor(S/C)*C),z($?E:P)},this.toggleBlockComment=function(i,l,d,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var I=new a(l,w.row,w.column),$=I.getCurrentToken();l.selection;var S=l.selection.toOrientedRange(),C,R;if($&&/comment/.test($.type)){for(var N,L;$&&/comment/.test($.type);){var E=$.value.indexOf(x.start);if(E!=-1){var B=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;N=new u(B,P,B,P+x.start.length);break}$=I.stepBackward()}for(var I=new a(l,w.row,w.column),$=I.getCurrentToken();$&&/comment/.test($.type);){var E=$.value.indexOf(x.end);if(E!=-1){var B=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;L=new u(B,P,B,P+x.end.length);break}$=I.stepForward()}L&&l.remove(L),N&&(l.remove(N),C=N.start.row,R=-x.start.length)}else R=x.start.length,C=d.start.row,l.insert(d.end,x.end),l.insert(d.start,x.start);S.start.row==C&&(S.start.column+=R),S.end.row==C&&(S.end.column+=R),l.selection.fromOrientedRange(S)}},this.getNextLineIndent=function(i,l,d){return this.$getIndent(l)},this.checkOutdent=function(i,l,d){return!1},this.autoOutdent=function(i,l,d){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var l in i)if(i[l]){var d=i[l],w=d.prototype.$id,x=g.$modes[w];x||(g.$modes[w]=x=new d),g.$modes[l]||(g.$modes[l]=x),this.$embeds.push(l),this.$modes[l]=x}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(R){(function(N){var L=I[R],E=N[L];N[I[R]]=function(){return this.$delegator(L,arguments,E)}})(S)},S=this,l=0;l<I.length;l++)$(l)},this.$delegator=function(i,l,d){var w=l[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],I=this.$modes[x];if(I)return I[i].apply(I,[w[1]].concat([].slice.call(l,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var S=w.split(this.$embeds[$]);if(!S[0]&&S[1]){l[0]=S[1];var I=this.$modes[this.$embeds[$]];return I[i].apply(I,l)}}var C=d.apply(this,l);return d?C:void 0},this.transformAction=function(i,l,d,w,x){if(this.$behaviour){var I=this.$behaviour.getBehaviours();for(var $ in I)if(I[$][l]){var S=I[$][l].apply(this,arguments);if(S)return S}}},this.getKeywords=function(i){if(!this.completionKeywords){var l=this.$tokenizer.rules,d=[];for(var w in l)for(var x=l[w],I=0,$=x.length;I<$;I++)if(typeof x[I].token=="string")/keyword|support|storage/.test(x[I].token)&&d.push(x[I].regex);else if(typeof x[I].token=="object"){for(var S=0,C=x[I].token.length;S<C;S++)if(/keyword|support|storage/.test(x[I].token[S])){var w=x[I].regex.match(/\(.+?\)/g)[S];d.push(w.substr(1,w.length-2))}}this.completionKeywords=d}return i?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,l,d,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(I){return{name:I,value:I,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,p){var g=e("./lib/dom"),v=function(){function b(h){this.session=h,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return b.prototype.getRowLength=function(h){var f;return this.lineWidgets?f=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[h]?1+f:this.$wrapData[h].length+1+f},b.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(h+=f.rowCount)}),h},b.prototype.$onChangeEditor=function(h){this.attach(h.editor)},b.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(h){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 s=this.session.lineWidgets;s&&s.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},b.prototype.updateOnFold=function(h,f){var s=f.lineWidgets;if(!(!s||!h.action)){for(var a=h.data,u=a.start.row,c=a.end.row,i=h.action=="add",l=u+1;l<c;l++)s[l]&&(s[l].hidden=i);s[c]&&(i?s[u]?s[c].hidden=i:s[u]=s[c]:(s[u]==s[c]&&(s[u]=void 0),s[c].hidden=i))}},b.prototype.updateOnChange=function(h){var f=this.session.lineWidgets;if(f){var s=h.start.row,a=h.end.row-s;if(a!==0)if(h.action=="remove"){var u=f.splice(s+1,a);!f[s]&&u[u.length-1]&&(f[s]=u.pop()),u.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var c=new Array(a);f[s]&&f[s].column!=null&&h.start.column>f[s].column&&s++,c.unshift(s,0),f.splice.apply(f,c),this.$updateRows()}}},b.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var f=!0;h.forEach(function(s,a){if(s)for(f=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),f&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[h.row];return f&&(h.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},b.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var f=this.editor.renderer;h.html&&!h.el&&(h.el=g.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=g.createElement("div"),h.el.textContent=h.text),h.el&&(g.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&g.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",f.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/f.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var a=this.session.lineWidgets;h.row==s.end.row&&!a[s.start.row]?a[s.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(h),h},b.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[h.row];if(f==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;f;){if(f.$oldWidget==h){f.$oldWidget=h.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(h){for(var f=this.session.lineWidgets,s=f&&f[h],a=[];s;)a.push(s),s=s.$oldWidget;return a},b.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(h,f){var s=this.session._changedWidgets,a=f.layerConfig;if(!(!s||!s.length)){for(var u=1/0,c=0;c<s.length;c++){var i=s[c];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,f.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/a.characterWidth));var l=i.h/a.lineHeight;i.coverLine&&(l-=this.session.getRowLineCount(i.row),l<0&&(l=0)),i.rowCount!=l&&(i.rowCount=l,i.row<u&&(u=i.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(h,f){var s=f.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,s.firstRow),c=Math.max(this.lastRow,s.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,f.$cursorLayer.config=s;for(var i=u;i<=c;i++){var l=a[i];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,f.container.appendChild(l.el));var d=f.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;l.coverLine||(d+=s.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=d-s.offset+"px";var w=l.coverGutter?0:f.gutterWidth;l.fixedWidth||(w-=f.scrollLeft),l.el.style.left=w+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=s.width+2*s.padding+"px"),l.fixedWidth?l.el.style.right=f.scrollBar.getWidth()+"px":l.el.style.right=""}}}},b}();r.LineWidgets=v}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,p){r.applyDelta=function(g,v,b){var h=v.start.row,f=v.start.column,s=g[h]||"";switch(v.action){case"insert":var a=v.lines;if(a.length===1)g[h]=s.substring(0,f)+v.lines[0]+s.substring(f);else{var u=[h,1].concat(v.lines);g.splice.apply(g,u),g[h]=s.substring(0,f)+g[h],g[h+v.lines.length-1]+=s.substring(f)}break;case"remove":var c=v.end.column,i=v.end.row;h===i?g[h]=s.substring(0,f)+s.substring(c):g.splice(h,i-h+1,s.substring(0,f)+g[i].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,p){var g=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,b=function(){function s(a,u,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,c)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(a,u,c){var i;if(c?i={row:a,column:u}:i=this.$clipPositionToDocument(a,u),!(this.row==i.row&&this.column==i.column)){var l={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:l,value:i})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(a,u){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,u))),u<0&&(c.column=0),c},s}();b.prototype.$insertRight=!1,g.implement(b.prototype,v);function h(s,a,u){var c=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&c}function f(s,a,u){var c=s.action=="insert",i=(c?1:-1)*(s.end.row-s.start.row),l=(c?1:-1)*(s.end.column-s.start.column),d=s.start,w=c?d:s.end;return h(a,d,u)?{row:a.row,column:a.column}:h(w,a,!u)?{row:a.row+i,column:a.column+(a.row==w.row?l:0)}:{row:d.row,column:d.column}}r.Anchor=b}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,p){var g=e("./lib/oop"),v=e("./apply_delta").applyDelta,b=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,f=e("./anchor").Anchor,s=function(){function a(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 a.prototype.setValue=function(u){var c=this.getLength()-1;this.remove(new h(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,c){return new f(this,u,c)},a.prototype.$detectNewLine=function(u){var c=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
186
+ `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
187
+ `;case"unix":return`
188
+ `;default:return this.$autoNewLine||`
189
+ `}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
190
+ `||u=="\r"||u==`
191
+ `},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,c){return this.$lines.slice(u,c+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var c;if(u.start.row===u.end.row)c=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{c=this.getLines(u.start.row,u.end.row),c[0]=(c[0]||"").substring(u.start.column);var i=c.length-1;u.end.row-u.start.row==i&&(c[i]=c[i].substring(0,u.end.column))}return c},a.prototype.insertLines=function(u,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,c)},a.prototype.removeLines=function(u,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,c)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(u,this.$split(c))},a.prototype.insertInLine=function(u,c){var i=this.clippedPos(u.row,u.column),l=this.pos(u.row,u.column+c.length);return this.applyDelta({start:i,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(u,c){var i=this.getLength();u===void 0?u=i:u<0?u=0:u>=i&&(u=i-1,c=void 0);var l=this.getLine(u);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:u,column:c}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,c){return{row:u,column:c}},a.prototype.$clipPosition=function(u){var c=this.getLength();return u.row>=c?(u.row=Math.max(0,c-1),u.column=this.getLine(c-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,c){u=Math.min(Math.max(u,0),this.getLength());var i=0;u<this.getLength()?(c=c.concat([""]),i=0):(c=[""].concat(c),u--,i=this.$lines[u].length),this.insertMergedLines({row:u,column:i},c)},a.prototype.insertMergedLines=function(u,c){var i=this.clippedPos(u.row,u.column),l={row:i.row+c.length-1,column:(c.length==1?i.column:0)+c[c.length-1].length};return this.applyDelta({start:i,end:l,action:"insert",lines:c}),this.clonePos(l)},a.prototype.remove=function(u){var c=this.clippedPos(u.start.row,u.start.column),i=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:c,end:i,action:"remove",lines:this.getLinesForRange({start:c,end:i})}),this.clonePos(c)},a.prototype.removeInLine=function(u,c,i){var l=this.clippedPos(u,c),d=this.clippedPos(u,i);return this.applyDelta({start:l,end:d,action:"remove",lines:this.getLinesForRange({start:l,end:d})},!0),this.clonePos(l)},a.prototype.removeFullLines=function(u,c){u=Math.min(Math.max(0,u),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var i=c==this.getLength()-1&&u>0,l=c<this.getLength()-1,d=i?u-1:u,w=i?this.getLine(d).length:0,x=l?c+1:c,I=l?0:this.getLine(x).length,$=new h(d,w,x,I),S=this.$lines.slice(u,c+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),S},a.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:["",""]})},a.prototype.replace=function(u,c){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),c.length===0&&u.isEmpty())return u.start;if(c==this.getTextRange(u))return u.end;this.remove(u);var i;return c?i=this.insert(u.start,c):i=u.start,i},a.prototype.applyDeltas=function(u){for(var c=0;c<u.length;c++)this.applyDelta(u[c])},a.prototype.revertDeltas=function(u){for(var c=u.length-1;c>=0;c--)this.revertDelta(u[c])},a.prototype.applyDelta=function(u,c){var i=u.action=="insert";(i?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(i&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(v(this.$lines,u,c),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var c=this.$lines.length;(u.action=="remove"&&u.start.row<c&&u.end.row<c||u.action=="insert"&&u.start.row<=c)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,c){for(var i=u.lines,l=i.length-c+1,d=u.start.row,w=u.start.column,x=0,I=0;x<l;x=I){I+=c-1;var $=i.slice(x,I);$.push(""),this.applyDelta({start:this.pos(d+x,w),end:this.pos(d+I,w=0),action:u.action,lines:$},!0)}u.lines=i.slice(x),u.start.row=d+x,u.start.column=w,this.applyDelta(u,!0)},a.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()})},a.prototype.indexToPosition=function(u,c){for(var i=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=c||0,w=i.length;d<w;d++)if(u-=i[d].length+l,u<0)return{row:d,column:u+i[d].length+l};return{row:w-1,column:u+i[w-1].length+l}},a.prototype.positionToIndex=function(u,c){for(var i=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=0,w=Math.min(u.row,i.length),x=c||0;x<w;++x)d+=i[x].length+l;return d+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",g.implement(s.prototype,b),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,p){var g=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,b=function(){function h(f,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,c=a.currentLine,i=-1,l=a.doc,d=c;a.lines[c];)c++;var w=l.getLength(),x=0;for(a.running=!1;c<w;){a.$tokenizeRow(c),i=c;do c++;while(a.lines[c]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,i==-1&&(i=c),d<=i&&a.fireUpdateEvent(d,i)}}}return h.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(f,s){var a={first:f,last:s};this._signal("update",{data:a})},h.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)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(f){var s=f.start.row,a=f.end.row-s;if(a===0)this.lines[s]=null;else if(f.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var u=Array(a+1);u.unshift(s,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},h.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},h.prototype.$tokenizeRow=function(f){var s=this.doc.getLine(f),a=this.states[f-1],u=this.tokenizer.getLineTokens(s,a,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},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();g.implement(b.prototype,v),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,p){var g=e("./lib/lang"),v=e("./range").Range,b=function(){function h(f,s,a){a===void 0&&(a="text"),this.setRegexp(f),this.clazz=s,this.type=a,this.docLen=0}return h.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},h.prototype.update=function(f,s,a,u){if(this.regExp){for(var c=u.firstRow,i=u.lastRow,l={},d=a.$editor&&a.$editor.$search,w=d&&d.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=c;x<=i;x++){var I=this.cache[x];if(I==null||a.getValue().length!=this.docLen){if(w){I=[];var $=d.$multiLineForward(a,this.regExp,x,i);if($){var S=$.endRow<=i?$.endRow-1:i;S>x&&(x=S),I.push(new v($.startRow,$.startCol,$.endRow,$.endCol))}I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES))}else I=g.getMatchOffsets(a.getLine(x),this.regExp),I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES)),I=I.map(function(L){return new v(x,L.offset,x,L.offset+L.length)});this.cache[x]=I.length?I:""}if(I.length!==0)for(var C=I.length;C--;){var R=I[C].toScreenRange(a),N=R.toString();l[N]||(l[N]=!0,s.drawSingleLineMarker(f,R,this.clazz,u))}}this.docLen=a.getValue().length}},h}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,p){var g=function(){function S(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return S.prototype.addSession=function(C){this.$session=C},S.prototype.add=function(C,R,N){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-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)}},S.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},S.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},S.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var N=this.$undoStack,L=N.length;L--;){var E=N[L][0];if(E.id<=C)break;E.id<R&&(E.ignore=!0)}this.lastDeltas=null},S.prototype.getSelection=function(C,R){for(var N=this.selections,L=N.length;L--;){var E=N[L];if(E.rev<C)return R&&(E=N[L+1]),E}},S.prototype.getRevision=function(){return this.$rev},S.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var N=this.$undoStack,L=null,E=0,B=N.length;B--;){var P=N[B][0];if(P.id<R&&!L&&(L=B+1),P.id<=C){E=B+1;break}}return N.slice(E,L)},S.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},S.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},S.prototype.undo=function(C,R){this.lastDeltas=null;var N=this.$undoStack;if(v(N,N.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=N.pop(),E=null;return L&&(E=C.undoChanges(L,R),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,E}},S.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var N=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,N),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),E=null;return L&&(E=C.redoChanges(L,R),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,E},S.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],N=R&&R[0].id||0;this.$redoStackBaseRev=N,this.$rev=N},S.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=[]},S.prototype.canUndo=function(){return this.$undoStack.length>0},S.prototype.canRedo=function(){return this.$redoStack.length>0},S.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},S.prototype.isAtBookmark=function(){return this.$rev===this.mark},S.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},S.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},S.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
192
+ ---
193
+ `+a(this.$redoStack)},S}();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function v(S,C){for(var R=C;R--;){var N=S[R];if(N&&!N[0].ignore){for(;R<C-1;){var L=i(S[R],S[R+1]);S[R]=L[0],S[R+1]=L[1],R++}return!0}}}var b=e("./range").Range,h=b.comparePoints;b.comparePoints;function f(S){return{row:S.row,column:S.column}}function s(S){return{start:f(S.start),end:f(S.end),action:S.action,lines:S.lines.slice()}}function a(S){if(S=S||this,Array.isArray(S))return S.map(a).join(`
194
+ `);var C="";return S.action?(C=S.action=="insert"?"+":"-",C+="["+S.lines+"]"):S.value&&(Array.isArray(S.value)?C=S.value.map(u).join(`
195
+ `):C=u(S.value)),S.start&&(C+=u(S)),(S.id||S.rev)&&(C+=" ("+(S.id||S.rev)+")"),C}function u(S){return S.start.row+":"+S.start.column+"=>"+S.end.row+":"+S.end.column}function c(S,C){var R=S.action=="insert",N=C.action=="insert";if(R&&N)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.start,S.start)<=0)d(S,C,1);else return null;else if(R&&!N)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.end,S.start)<=0)d(S,C,-1);else return null;else if(!R&&N)if(h(C.start,S.start)>=0)d(C,S,1);else if(h(C.start,S.start)<=0)d(S,C,1);else return null;else if(!R&&!N)if(h(C.start,S.start)>=0)d(C,S,1);else if(h(C.end,S.start)<=0)d(S,C,-1);else return null;return[C,S]}function i(S,C){for(var R=S.length;R--;)for(var N=0;N<C.length;N++)if(!c(S[R],C[N])){for(;R<S.length;){for(;N--;)c(C[N],S[R]);N=C.length,R++}return[S,C]}return S.selectionBefore=C.selectionBefore=S.selectionAfter=C.selectionAfter=null,[C,S]}function l(S,C){var R=S.action=="insert",N=C.action=="insert";if(R&&N)h(S.start,C.start)<0?d(C,S,1):d(S,C,1);else if(R&&!N)h(S.start,C.end)>=0?d(S,C,-1):(h(S.start,C.start)<=0||d(S,b.fromPoints(C.start,S.start),-1),d(C,S,1));else if(!R&&N)h(C.start,S.end)>=0?d(C,S,-1):(h(C.start,S.start)<=0||d(C,b.fromPoints(S.start,C.start),-1),d(S,C,1));else if(!R&&!N)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.end,S.start)<=0)d(S,C,-1);else{var L,E;return h(S.start,C.start)<0&&(L=S,S=x(S,C.start)),h(S.end,C.end)>0&&(E=x(S,C.end)),w(C.end,S.start,S.end,-1),E&&!L&&(S.lines=E.lines,S.start=E.start,S.end=E.end,E=S),[C,L,E].filter(Boolean)}return[C,S]}function d(S,C,R){w(S.start,C.start,C.end,R),w(S.end,C.start,C.end,R)}function w(S,C,R,N){S.row==(N==1?C:R).row&&(S.column+=N*(R.column-C.column)),S.row+=N*(R.row-C.row)}function x(S,C){var R=S.lines,N=S.end;S.end=f(C);var L=S.end.row-S.start.row,E=R.splice(L,R.length),B=L?C.column:C.column-S.start.column;R.push(E[0].substring(0,B)),E[0]=E[0].substr(B);var P={start:f(C),end:N,lines:E,action:S.action};return P}function I(S,C){C=s(C);for(var R=S.length;R--;){for(var N=S[R],L=0;L<N.length;L++){var E=N[L],B=l(E,C);C=B[0],B.length!=2&&(B[2]?(N.splice(L+1,1,B[1],B[2]),L++):B[1]||(N.splice(L,1),L--))}N.length||S.splice(R,1)}return S}function $(S,C){for(var R=0;R<C.length;R++)for(var N=C[R],L=0;L<N.length;L++)I(S,N[L])}r.UndoManager=g}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,p){var g=e("../range").Range,v=function(){function b(h,f){this.foldData=h,Array.isArray(f)?this.folds=f:f=this.folds=[f];var s=f[f.length-1];this.range=new g(f[0].start.row,f[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return b.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(f){f.start.row+=h,f.end.row+=h})},b.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(f,s){return-f.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},b.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},b.prototype.walk=function(h,f,s){var a=0,u=this.folds,c,i,l,d=!0;f==null&&(f=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(c=u[w],i=c.range.compareStart(f,s),i==-1){h(null,f,s,a,d);return}if(l=h(null,c.start.row,c.start.column,a,d),l=!l&&h(c.placeholder,c.start.row,c.start.column,a),l||i===0)return;d=!c.sameRow,a=c.end.column}h(null,f,s,a,d)},b.prototype.getNextFoldTo=function(h,f){for(var s,a,u=0;u<this.folds.length;u++){if(s=this.folds[u],a=s.range.compareEnd(h,f),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},b.prototype.addRemoveChars=function(h,f,s){var a=this.getNextFoldTo(h,f),u,c;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=f&&u.start.row!=h)window.console&&window.console.log(h,f,u);else if(u.start.row==h){c=this.folds;var i=c.indexOf(u);for(i===0&&(this.start.column+=s),i;i<c.length;i++){if(u=c[i],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},b.prototype.split=function(h,f){var s=this.getNextFoldTo(h,f);if(!s||s.kind=="inside")return null;var a=s.fold,u=this.folds,c=this.foldData,i=u.indexOf(a),l=u[i-1];this.end.row=l.end.row,this.end.column=l.end.column,u=u.splice(i,u.length-i);var d=new b(c,u);return c.splice(c.indexOf(this)+1,0,d),d},b.prototype.merge=function(h){for(var f=h.folds,s=0;s<f.length;s++)this.addFold(f[s]);var a=this.foldData;a.splice(a.indexOf(h),1)},b.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(f){h.push(" "+f.toString())}),h.push("]"),h.join(`
196
+ `)},b.prototype.idxToPosition=function(h){for(var f=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(h-=a.start.column-f,h<0)return{row:a.start.row,column:a.start.column+h};if(h-=a.placeholder.length,h<0)return a.start;f=a.end.column}return{row:this.end.row,column:this.end.column+h}},b}();r.FoldLine=v}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,p){var g=e("./range").Range,v=g.comparePoints,b=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(f,s,a){for(var u=this.ranges,c=a||0;c<u.length;c++){var i=u[c],l=v(f,i.end);if(!(l>0)){var d=v(f,i.start);return l===0?s&&d!==0?-c-2:c:d>0||d===0&&!s?c:-c-1}}return-c-1},h.prototype.add=function(f){var s=!f.isEmpty(),a=this.pointIndex(f.start,s);a<0&&(a=-a-1);var u=this.pointIndex(f.end,s,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,f)},h.prototype.addList=function(f){for(var s=[],a=f.length;a--;)s.push.apply(s,this.add(f[a]));return s},h.prototype.substractPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var f=[],s=this.ranges;s=s.sort(function(l,d){return v(l.start,d.start)});for(var a=s[0],u,c=1;c<s.length;c++){u=a,a=s[c];var i=v(u.end,a.start);i<0||i==0&&!u.isEmpty()&&!a.isEmpty()||(v(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),s.splice(c,1),f.push(a),a=u,c--)}return this.ranges=s,f},h.prototype.contains=function(f,s){return this.pointIndex({row:f,column:s})>=0},h.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},h.prototype.rangeAtPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(f,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<f)return[];var u=this.pointIndex({row:f,column:0});u<0&&(u=-u-1);var c=this.pointIndex({row:s,column:0},u);c<0&&(c=-c-1);for(var i=[],l=u;l<c;l++)i.push(a[l]);return i},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(f){for(var s=f.start,a=f.end,u=s.row,c=a.row,i=this.ranges,l=0,d=i.length;l<d;l++){var w=i[l];if(w.end.row>=u)break}if(f.action=="insert")for(var x=c-u,I=-s.column+a.column;l<d;l++){var w=i[l];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=I,w.start.row+=x)),w.end.row==u&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&I>0&&l<d-1&&w.end.column>w.start.column&&w.end.column==i[l+1].start.column&&(w.end.column-=I),w.end.column+=I,w.end.row+=x}}else for(var x=u-c,I=s.column-a.column;l<d;l++){var w=i[l];if(w.start.row>c)break;w.end.row<c&&(u<w.end.row||u==w.end.row&&s.column<w.end.column)?(w.end.row=u,w.end.column=s.column):w.end.row==c?w.end.column<=a.column?(x||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=I,w.end.row+=x):w.end.row>c&&(w.end.row+=x),w.start.row<c&&(u<w.start.row||u==w.start.row&&s.column<w.start.column)?(w.start.row=u,w.start.column=s.column):w.start.row==c?w.start.column<=a.column?(x||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=I,w.start.row+=x):w.start.row>c&&(w.start.row+=x)}if(x!=0&&l<d)for(;l<d;l++){var w=i[l];w.start.row+=x,w.end.row+=x}},h}();b.prototype.comparePoints=v,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,p){var g=this&&this.__extends||function(){var u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function l(){this.constructor=c}c.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),v=e("../range_list").RangeList,b=function(u){g(c,u);function c(i,l){var d=u.call(this)||this;return d.foldLine=null,d.placeholder=l,d.range=i,d.start=i.start,d.end=i.end,d.sameRow=i.start.row==i.end.row,d.subFolds=d.ranges=[],d}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(l){l.setFoldLine(i)})},c.prototype.clone=function(){var i=this.range.clone(),l=new c(i,this.placeholder);return this.subFolds.forEach(function(d){l.subFolds.push(d.clone())}),l.collapseChildren=this.collapseChildren,l},c.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){f(i,this.start);for(var l=i.start.row,d=i.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(l,d),x==1);w++);var I=this.subFolds[w],$=0;if(x==0){if(I.range.containsRange(i))return I.addSubFold(i);$=1}for(var l=i.range.end.row,d=i.range.end.column,S=w,x=-1;S<this.subFolds.length&&(x=this.subFolds[S].range.compare(l,d),x==1);S++);x==0&&S++;for(var C=this.subFolds.splice(w,S-w,i),R=x==0?C.length-1:C.length,N=$;N<R;N++)i.addSubFold(C[N]);return i.setFoldLine(this.foldLine),i}},c.prototype.restoreRange=function(i){return a(i,this.start)},c}(v);function h(u,c){u.row-=c.row,u.row==0&&(u.column-=c.column)}function f(u,c){h(u.start,c),h(u.end,c)}function s(u,c){u.row==0&&(u.column+=c.column),u.row+=c.row}function a(u,c){s(u.start,c),s(u.end,c)}r.Fold=b}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,r,p){var g=e("../range").Range,v=e("./fold_line").FoldLine,b=e("./fold").Fold,h=e("../token_iterator").TokenIterator,f=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,u,c){var i=this.getFoldLine(a);if(!i)return null;for(var l=i.folds,d=0;d<l.length;d++){var w=l[d].range;if(w.contains(a,u)){if(c==1&&w.isEnd(a,u)&&!w.isEmpty()||c==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return l[d]}}},this.getFoldsInRange=function(a){var u=a.start,c=a.end,i=this.$foldData,l=[];u.column+=1,c.column-=1;for(var d=0;d<i.length;d++){var w=i[d].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=i[d].folds,I=0;I<x.length;I++){var $=x[I];if(w=$.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;l.push($)}}}}return u.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(i){u=u.concat(this.getFoldsInRange(i))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,c=0;c<u.length;c++)for(var i=0;i<u[c].folds.length;i++)a.push(u[c].folds[i]);return a},this.getFoldStringAt=function(a,u,c,i){if(i=i||this.getFoldLine(a),!i)return null;for(var l={end:{column:0}},d,w,x=0;x<i.folds.length;x++){w=i.folds[x];var I=w.range.compareEnd(a,u);if(I==-1){d=this.getLine(w.start.row).substring(l.end.column,w.start.column);break}else if(I===0)return null;l=w}return d||(d=this.getLine(w.start.row).substring(l.end.column)),c==-1?d.substring(0,u-l.end.column):c==1?d.substring(u-l.end.column):d},this.getFoldLine=function(a,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var l=c[i];if(l.start.row<=a&&l.end.row>=a)return l;if(l.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var l=c[i];if(l.end.row>=a)return l}return null},this.getFoldedRowCount=function(a,u){for(var c=this.$foldData,i=u-a+1,l=0;l<c.length;l++){var d=c[l],w=d.end.row,x=d.start.row;if(w>=u){x<u&&(x>=a?i-=u-x:i=0);break}else w>=a&&(x>=a?i-=w-x:i-=w-a+1)}return i},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,c){return u.start.row-c.start.row}),a},this.addFold=function(a,u){var c=this.$foldData,i=!1,l;a instanceof b?l=a:(l=new b(u,a),l.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(l.range);var d=l.start.row,w=l.start.column,x=l.end.row,I=l.end.column,$=this.getFoldAt(d,w,1),S=this.getFoldAt(x,I,-1);if($&&S==$)return $.addSubFold(l);$&&!$.range.isStart(d,w)&&this.removeFold($),S&&!S.range.isEnd(x,I)&&this.removeFold(S);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(E){l.addSubFold(E)}));for(var R=0;R<c.length;R++){var N=c[R];if(x==N.start.row){N.addFold(l),i=!0;break}else if(d==N.end.row){if(N.addFold(l),i=!0,!l.sameRow){var L=c[R+1];if(L&&L.start.row==x){N.merge(L);break}}break}else if(x<=N.start.row)break}return i||(N=this.$addFoldLine(new v(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(N.start.row,N.start.row):this.$updateRowLengthCache(N.start.row,N.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,c=u.start.row,i=u.end.row,l=this.$foldData,d=u.folds;if(d.length==1)l.splice(l.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))d.pop(),u.end.row=d[d.length-1].end.row,u.end.column=d[d.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))d.shift(),u.start.row=d[0].start.row,u.start.column=d[0].start.column;else if(a.sameRow)d.splice(d.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);d=w.folds,d.shift(),w.start.row=d[0].start.row,w.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,i):this.$updateRowLengthCache(c,i)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],c=0;c<a.length;c++)u.push(a[c]);u.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var c,i;if(a==null)c=new g(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")c=new g(a,0,a,this.getLine(a).length);else if("row"in a)c=g.fromPoints(a,a);else{if(Array.isArray(a))return i=[],a.forEach(function(d){i=i.concat(this.unfold(d))},this),i;c=a}i=this.getFoldsInRangeList(c);for(var l=i;i.length==1&&g.comparePoints(i[0].start,c.start)<0&&g.comparePoints(i[0].end,c.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(c);if(u!=!1?this.removeFolds(i):this.expandFolds(i),l.length)return l},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var c=this.getFoldLine(a,u);return c?c.end.row:a},this.getRowFoldStart=function(a,u){var c=this.getFoldLine(a,u);return c?c.start.row:a},this.getFoldDisplayLine=function(a,u,c,i,l){i==null&&(i=a.start.row),l==null&&(l=0),u==null&&(u=a.end.row),c==null&&(c=this.getLine(u).length);var d=this.doc,w="";return a.walk(function(x,I,$,S){if(!(I<i)){if(I==i){if($<l)return;S=Math.max(l,S)}x!=null?w+=x:w+=d.getLine(I).substring(S,$)}},u,c),w},this.getDisplayLine=function(a,u,c,i){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,u,c,i);var d;return d=this.doc.getLine(a),d.substring(i||0,u||d.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var c=u.folds.map(function(i){return i.clone()});return new v(a,c)}),a},this.toggleFold=function(a){var u=this.selection,c=u.getRange(),i,l;if(c.isEmpty()){var d=c.start;if(i=this.getFoldAt(d.row,d.column),i){this.expandFold(i);return}else if(a){var w=this.getFoldLine(d.row);w&&this.expandFolds(w.folds);return}else(l=this.findMatchingBracket(d))?c.comparePoint(l)==1?c.end=l:(c.start=l,c.start.column++,c.end.column--):(l=this.findMatchingBracket({row:d.row,column:d.column+1}))?(c.comparePoint(l)==1?c.end=l:c.start=l,c.start.column++):c=this.getCommentFoldRange(d.row,d.column)||c}else{var x=this.getFoldsInRange(c);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(c.start.row,c.start.column)),i&&i.range.toString()==c.toString()){this.expandFold(i);return}var I="...";if(!c.isMultiLine()){if(I=this.getTextRange(c),I.length<4)return;I=I.trim().substring(0,2)+".."}this.addFold(I,c)},this.getCommentFoldRange=function(a,u,c){var i=new h(this,a,u),l=i.getCurrentToken(),d=l&&l.type;if(l&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start|\\.doc");var w=new RegExp(d),x=new g;if(c!=1){do l=i.stepBackward();while(l&&w.test(l.type));l=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+l.value.length,i=new h(this,a,u);var I=this.getState(i.$row);if(c!=-1){var $=-1;do if(l=i.stepForward(),$==-1){var S=this.getState(i.$row);I.toString()!==S.toString()&&($=i.$row)}else if(i.$row>$)break;while(l&&w.test(l.type));l=i.stepBackward()}else l=i.getCurrentToken();return x.end.row=i.getCurrentTokenRow(),x.end.column=i.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,c,i){c==null&&(c=1e5);var l=this.foldWidgets;if(l){u=u||this.getLength(),a=a||0;for(var d=a;d<u;d++)if(l[d]==null&&(l[d]=this.getFoldWidget(d)),l[d]=="start"&&!(i&&!i(d))){var w=this.getFoldWidgetRange(d);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(d=w.end.row,w.collapseChildren=c,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var c=a.getTokens(u),i=0;i<c.length;i++){var l=c[i];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,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(a,u){var c=this.foldWidgets;if(!c||u&&c[a])return{};for(var i=a-1,l;i>=0;){var d=c[i];if(d==null&&(d=c[i]=this.getFoldWidget(i)),d=="start"){var w=this.getFoldWidgetRange(i);if(l||(l=w),w&&w.end.row>=a)break}i--}return{range:i!==-1&&w,firstRange:l}},this.onFoldWidgetClick=function(a,u){u instanceof f&&(u=u.domEvent);var c={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},i=this.$toggleFoldWidget(a,c);if(!i){var l=u.target||u.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var c=this.getFoldWidget(a),i=this.getLine(a),l=c==="end"?-1:1,d=this.getFoldAt(a,l===-1?0:i.length,l);if(d)return u.children||u.all?this.removeFold(d):this.expandFold(d),d;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(d=this.getFoldAt(w.start.row,w.start.column,1),d&&w.isEqual(d.range)))return this.removeFold(d),d;if(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var I=x.range.start.row+1,$=x.range.end.row;this.foldAll(I,$,u.all?1e4:0)}else u.children?($=w?w.end.row:this.getLength(),this.foldAll(a+1,$,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var c=this.$toggleFoldWidget(u,{});if(!c){var i=this.getParentFoldRangeData(u,!0);if(c=i.range||i.firstRange,c){u=c.start.row;var l=this.getFoldAt(u,this.getLine(u).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var u=a.start.row,c=a.end.row-u;if(c===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,c+1,null);else{var i=Array(c+1);i.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,p){var g=e("../token_iterator").TokenIterator,v=e("../range").Range;function b(){this.findMatchingBracket=function(h,f){if(h.column==0)return null;var s=f||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var f=this.getLine(h.row),s=!0,a,u=f.charAt(h.column-1),c=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(c||(u=f.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!c)return null;if(c[1]){var i=this.$findClosingBracket(c[1],h);if(!i)return null;a=v.fromPoints(h,i),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var i=this.$findOpeningBracket(c[2],h);if(!i)return null;a=v.fromPoints(i,h),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,f){var s=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,u=!f&&s.charAt(h.column-1),c=u&&u.match(a);if(c||(u=(f===void 0||f)&&s.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(a)),!c)return null;var i=new v(h.row,h.column-1,h.row,h.column),l=c[1]?this.$findClosingBracket(c[1],h):this.$findOpeningBracket(c[2],h);if(!l)return[i];var d=new v(l.row,l.column,l.row,l.column+1);return[i,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,f,s){var a=this.$brackets[h],u=1,c=new g(this,f.row,f.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=f.column-c.getCurrentTokenColumn()-2,d=i.value;;){for(;l>=0;){var w=d.charAt(l);if(w==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else w==h&&(u+=1);l-=1}do i=c.stepBackward();while(i&&!s.test(i.type));if(i==null)break;d=i.value,l=d.length-1}return null}},this.$findClosingBracket=function(h,f,s){var a=this.$brackets[h],u=1,c=new g(this,f.row,f.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=f.column-c.getCurrentTokenColumn();;){for(var d=i.value,w=d.length;l<w;){var x=d.charAt(l);if(x==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else x==h&&(u+=1);l+=1}do i=c.stepForward();while(i&&!s.test(i.type));if(i==null)break;l=0}return null}},this.getMatchingTags=function(h){var f=new g(this,h.row,h.column),s=this.$findTagName(f);if(s){var a=f.stepBackward();return a.value==="<"?this.$findClosingTag(f,s):this.$findOpeningTag(f,s)}},this.$findTagName=function(h){var f=h.getCurrentToken(),s=!1,a=!1;if(f&&f.type.indexOf("tag-name")===-1)do a?f=h.stepBackward():f=h.stepForward(),f&&(f.value==="/>"?a=!0:f.type.indexOf("tag-name")!==-1&&(s=!0));while(f&&!s);return f},this.$findClosingTag=function(h,f){var s,a=f.value,u=f.value,c=0,i=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=h.stepForward();var l=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length),d=!1;do{if(s=f,s.type.indexOf("tag-close")!==-1&&!d){var w=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(f=h.stepForward(),f){if(f.value===">"&&!d){var w=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(f.type.indexOf("tag-name")!==-1){if(a=f.value,u===a){if(s.value==="<")c++;else if(s.value==="</"&&(c--,c<0)){h.stepBackward();var x=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);f=h.stepForward();var I=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=h.stepForward()),f&&f.value===">")var $=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===a&&f.value==="/>"&&(c--,c<0))var x=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),I=x,$=I,w=new v(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(f&&c>=0);if(i&&w&&x&&$&&l&&I)return{openTag:new v(i.start.row,i.start.column,w.end.row,w.end.column),closeTag:new v(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:l,closeTagName:I}},this.$findOpeningTag=function(h,f){var s=h.getCurrentToken(),a=f.value,u=0,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),l=i+2,d=new v(c,i,c,l);h.stepForward();var w=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=h.stepForward()),!(!f||f.value!==">")){var x=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(f=s,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),l=i+f.value.length,s=h.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(s.value==="<"){if(u++,u>0){var I=new v(c,i,c,l),$=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do f=h.stepForward();while(f&&f.value!==">");var S=new v(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&u--}else if(f.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){u--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var N=0;N<C;N++)h.stepForward()}}while(s&&u<=0);if($&&S&&d&&x&&I&&w)return{openTag:new v($.start.row,$.start.column,S.end.row,S.end.column),closeTag:new v(d.start.row,d.start.column,x.end.row,x.end.column),openTagName:I,closeTagName:w}}}}r.BracketMatch=b}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,r,p){var g=e("./lib/oop"),v=e("./lib/lang"),b=e("./bidihandler").BidiHandler,h=e("./config"),f=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,a=e("./mode/text").Mode,u=e("./range").Range,c=e("./line_widgets").LineWidgets,i=e("./document").Document,l=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,x=function(){function P(O,_){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
197
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new a().getTokenizer(),this);var k=this;this.bgTokenizer.on("update",function(D){k._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new i(O)),this.setDocument(O),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new b(this),h.resetOptions(this),this.setMode(_),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=v.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(_),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new c(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,k=this.$getRowCacheIndex(this.$docRowCache,O)+1;_>k&&(this.$docRowCache.splice(k,_),this.$screenRowCache.splice(k,_))},P.prototype.$getRowCacheIndex=function(O,_){for(var k=0,D=O.length-1;k<=D;){var z=k+D>>1,U=O[z];if(_>U)k=z+1;else if(_<U)D=z-1;else return z}return k-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var _=O.data;this.$resetRowCache(_.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var _=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var _=new w;_.$undoStack=O.history.undo,_.$redoStack=O.history.redo,_.mark=O.history.mark,_.$rev=O.history.rev;var k=new P(O.value);return O.folds.forEach(function(D){k.addFold("...",u.fromPoints(D.start,D.end))}),k.setAnnotations(O.annotations),k.setBreakpoints(O.breakpoints),k.setMode(O.mode),k.setScrollLeft(O.scrollLeft),k.setScrollTop(O.scrollTop),k.setUndoManager(_),k.selection.fromJSON(O.selection),k},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,_){var k=this.bgTokenizer.getTokens(O),D,z=0;if(_==null){var U=k.length-1;z=this.getLine(O).length}else for(var U=0;U<k.length&&(z+=k[U].value.length,!(z>=_));U++);return D=k[U],D?(D.index=U,D.start=z-D.value.length,D):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var _=this;O.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.mergeUndoDeltas=!1},this.$informUndoManager=v.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?v.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,_){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+_,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,_)},P.prototype.removeGutterDecoration=function(O,_){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var _=0;_<O.length;_++)this.$breakpoints[O[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[O]=_:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,_,k,D){var z=this.$markerId++,U={range:O,type:k||"line",renderer:typeof k=="function"?k:null,clazz:_,inFront:!!D,id:z};return D?(this.$frontMarkers[z]=U,this._signal("changeFrontMarker")):(this.$backMarkers[z]=U,this._signal("changeBackMarker")),z},P.prototype.addDynamicMarker=function(O,_){if(O.update){var k=this.$markerId++;return O.id=k,O.inFront=!!_,_?(this.$frontMarkers[k]=O,this._signal("changeFrontMarker")):(this.$backMarkers[k]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var _=this.$frontMarkers[O]||this.$backMarkers[O];if(_){var k=_.inFront?this.$frontMarkers:this.$backMarkers;delete k[O],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var _=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,_,k,D){typeof _!="number"&&(k=_,_=O),k||(k="ace_step");var z=new u(O,0,_,1/0);return z.id=this.addMarker(z,k,"fullLine",D),z},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var _=O.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
198
+ `},P.prototype.getWordRange=function(O,_){var k=this.getLine(O),D=!1;if(_>0&&(D=!!k.charAt(_-1).match(this.tokenRe)),D||(D=!!k.charAt(_).match(this.tokenRe)),D)var z=this.tokenRe;else if(/^\s+$/.test(k.slice(_-1,_+1)))var z=/\s/;else var z=this.nonTokenRe;var U=_;if(U>0){do U--;while(U>=0&&k.charAt(U).match(z));U++}for(var q=_;q<k.length&&k.charAt(q).match(z);)q++;return new u(O,U,O,q)},P.prototype.getAWordRange=function(O,_){for(var k=this.getWordRange(O,_),D=this.getLine(k.end.row);D.charAt(k.end.column).match(/[ \t]/);)k.end.column+=1;return k},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var _=O.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,_){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var k=O,D=k.path}else D=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!k){this.$onChangeMode(this.$modes[D]),_&&_();return}this.$modeId=D,h.loadModule(["mode",D],(function(z){if(!this.destroyed){if(this.$modeId!==D)return _&&_();this.$modes[D]&&!k?this.$onChangeMode(this.$modes[D]):z&&z.Mode&&(z=new z.Mode(k),k||(this.$modes[D]=z,z.$id=D),this.$onChangeMode(z)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,_){if(_||(this.$modeId=O.$id),this.$mode!==O){var k=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=O.getTokenizer();if(D.on!==void 0){var z=this.onReloadTokenizer.bind(this);D.on("update",z)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,_||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:k,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){h.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>O&&(O=_.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),k=this.$rowLengthCache,D=0,z=0,U=this.$foldData[z],q=U?U.start.row:1/0,X=_.length,ee=0;ee<X;ee++){if(ee>q){if(ee=U.end.row+1,ee>=X)break;U=this.$foldData[z++],q=U?U.start.row:1/0}k[ee]==null&&(k[ee]=this.$getStringScreenWidth(_[ee])[0]),k[ee]>D&&(D=k[ee])}this.screenWidth=D}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,_){return this.doc.getLines(O,_)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,_){return this.doc.insert(O,_)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,_){return this.doc.removeFullLines(O,_)},P.prototype.undoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var k=O.length-1;k!=-1;k--){var D=O[k];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!_&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var k=0;k<O.length;k++){var D=O[k];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!_&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,_){function k(X){return _?X.action!=="insert":X.action==="insert"}for(var D,z,U=0;U<O.length;U++){var q=O[U];if(q.start){if(!D){k(q)?D=u.fromPoints(q.start,q.end):D=u.fromPoints(q.start,q.start);continue}k(q)?(z=q.start,D.compare(z.row,z.column)==-1&&D.setStart(z),z=q.end,D.compare(z.row,z.column)==1&&D.setEnd(z)):(z=q.start,D.compare(z.row,z.column)==-1&&(D=u.fromPoints(q.start,q.start)))}}return D},P.prototype.replace=function(O,_){return this.doc.replace(O,_)},P.prototype.moveText=function(O,_,k){var D=this.getTextRange(O),z=this.getFoldsInRange(O),U=u.fromPoints(_,_);if(!k){this.remove(O);var q=O.start.row-O.end.row,X=q?-O.end.column:O.start.column-O.end.column;X&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=X),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=X)),q&&U.start.row>=O.end.row&&(U.start.row+=q,U.end.row+=q)}if(U.end=this.insert(U.start,D),z.length){var ee=O.start,de=U.start,q=de.row-ee.row,X=de.column-ee.column;this.addFolds(z.map(function(se){return se=se.clone(),se.start.row==ee.row&&(se.start.column+=X),se.end.row==ee.row&&(se.end.column+=X),se.start.row+=q,se.end.row+=q,se}))}return U},P.prototype.indentRows=function(O,_,k){k=k.replace(/\t/g,this.getTabString());for(var D=O;D<=_;D++)this.doc.insertInLine({row:D,column:0},k)},P.prototype.outdentRows=function(O){for(var _=O.collapseRows(),k=new u(0,0,0,0),D=this.getTabSize(),z=_.start.row;z<=_.end.row;++z){var U=this.getLine(z);k.start.row=z,k.end.row=z;for(var q=0;q<D&&U.charAt(q)==" ";++q);q<D&&U.charAt(q)==" "?(k.start.column=q,k.end.column=q+1):(k.start.column=0,k.end.column=q),this.remove(k)}},P.prototype.$moveLines=function(O,_,k){if(O=this.getRowFoldStart(O),_=this.getRowFoldEnd(_),k<0){var D=this.getRowFoldStart(O+k);if(D<0)return 0;var z=D-O}else if(k>0){var D=this.getRowFoldEnd(_+k);if(D>this.doc.getLength()-1)return 0;var z=D-_}else{O=this.$clipRowToDocument(O),_=this.$clipRowToDocument(_);var z=_-O+1}var U=new u(O,0,_,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(ee){return ee=ee.clone(),ee.start.row+=z,ee.end.row+=z,ee}),X=k==0?this.doc.getLines(O,_):this.doc.removeFullLines(O,_);return this.doc.insertFullLines(O+z,X),q.length&&this.addFolds(q),z},P.prototype.moveLinesUp=function(O,_){return this.$moveLines(O,_,-1)},P.prototype.moveLinesDown=function(O,_){return this.$moveLines(O,_,1)},P.prototype.duplicateLines=function(O,_){return this.$moveLines(O,_,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,_){return _<0?0:Math.min(this.doc.getLine(O).length,_)},P.prototype.$clipPositionToDocument=function(O,_){if(_=Math.max(0,_),O<0)O=0,_=0;else{var k=this.doc.getLength();O>=k?(O=k-1,_=this.doc.getLine(k-1).length):_=Math.min(this.doc.getLine(O).length,_)}return{row:O,column:_}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var _=this.doc.getLength()-1;return O.end.row>_?(O.end.row=_,O.end.column=this.doc.getLine(_).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,_){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:O,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,_){var k=this.$wrapLimitRange;k.max<0&&(k={min:_,max:_});var D=this.$constrainWrapLimit(O,k.min,k.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},P.prototype.$constrainWrapLimit=function(O,_,k){return _&&(O=Math.max(_,O)),k&&(O=Math.min(k,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var _=this.$useWrapMode,k=O.action,D=O.start,z=O.end,U=D.row,q=z.row,X=q-U,ee=null;if(this.$updating=!0,X!=0)if(k==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(U,X);var de=this.$foldData;ee=this.getFoldsInRange(O),this.removeFolds(ee);var te=this.getFoldLine(z.row),le=0;if(te){te.addRemoveChars(z.row,z.column,D.column-z.column),te.shiftRow(-X);var se=this.getFoldLine(U);se&&se!==te&&(se.merge(te),te=se),le=de.indexOf(te)+1}for(le;le<de.length;le++){var te=de[le];te.start.row>=z.row&&te.shiftRow(-X)}q=U}else{var ue=Array(X);ue.unshift(U,0);var me=_?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,ue);var de=this.$foldData,te=this.getFoldLine(U),le=0;if(te){var _e=te.range.compareInside(D.row,D.column);_e==0?(te=te.split(D.row,D.column),te&&(te.shiftRow(X),te.addRemoveChars(q,0,z.column-D.column))):_e==-1&&(te.addRemoveChars(U,0,z.column-D.column),te.shiftRow(X)),le=de.indexOf(te)+1}for(le;le<de.length;le++){var te=de[le];te.start.row>=U&&te.shiftRow(X)}}else{X=Math.abs(O.start.column-O.end.column),k==="remove"&&(ee=this.getFoldsInRange(O),this.removeFolds(ee),X=-X);var te=this.getFoldLine(U);te&&te.addRemoveChars(U,D.column,X)}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),ee},P.prototype.$updateRowLengthCache=function(O,_){this.$rowLengthCache[O]=null,this.$rowLengthCache[_]=null},P.prototype.$updateWrapData=function(O,_){var k=this.doc.getAllLines(),D=this.getTabSize(),z=this.$wrapData,U=this.$wrapLimit,q,X,ee=O;for(_=Math.min(_,k.length-1);ee<=_;)X=this.getFoldLine(ee,X),X?(q=[],X.walk((function(de,te,le,se){var ue;if(de!=null){ue=this.$getDisplayTokens(de,q.length),ue[0]=S;for(var me=1;me<ue.length;me++)ue[me]=C}else ue=this.$getDisplayTokens(k[te].substring(se,le),q.length);q=q.concat(ue)}).bind(this),X.end.row,k[X.end.row].length+1),z[X.start.row]=this.$computeWrapSplits(q,U,D),ee=X.end.row+1):(q=this.$getDisplayTokens(k[ee]),z[ee]=this.$computeWrapSplits(q,U,D),ee++)},P.prototype.$computeWrapSplits=function(O,_,k){if(O.length==0)return[];var D=[],z=O.length,U=0,q=0,X=this.$wrapAsCode,ee=this.$indentedSoftWrap,de=_<=Math.max(2*k,8)||ee===!1?0:Math.floor(_/2);function te(){var _e=0;if(de===0)return _e;if(ee)for(var Te=0;Te<O.length;Te++){var Me=O[Te];if(Me==N)_e+=1;else if(Me==L)_e+=k;else{if(Me==E)continue;break}}return X&&ee!==!1&&(_e+=k),Math.min(_e,de)}function le(_e){for(var Te=_e-U,Me=U;Me<_e;Me++){var Xe=O[Me];(Xe===12||Xe===2)&&(Te-=1)}D.length||(se=te(),D.indent=se),q+=Te,D.push(q),U=_e}for(var se=0;z-U>_-se;){var ue=U+_-se;if(O[ue-1]>=N&&O[ue]>=N){le(ue);continue}if(O[ue]==S||O[ue]==C){for(ue;ue!=U-1&&O[ue]!=S;ue--);if(ue>U){le(ue);continue}for(ue=U+_,ue;ue<O.length&&O[ue]==C;ue++);if(ue==O.length)break;le(ue);continue}for(var me=Math.max(ue-(_-(_>>2)),U-1);ue>me&&O[ue]<S;)ue--;if(X){for(;ue>me&&O[ue]<S;)ue--;for(;ue>me&&O[ue]==R;)ue--}else for(;ue>me&&O[ue]<N;)ue--;if(ue>me){le(++ue);continue}ue=U+_,O[ue]==$&&ue--,le(ue-se)}return D},P.prototype.$getDisplayTokens=function(O,_){var k=[],D;_=_||0;for(var z=0;z<O.length;z++){var U=O.charCodeAt(z);if(U==9){D=this.getScreenTabSize(k.length+_),k.push(L);for(var q=1;q<D;q++)k.push(E)}else U==32?k.push(N):U>39&&U<48||U>57&&U<64?k.push(R):U>=4352&&B(U)?k.push(I,$):k.push(I)}return k},P.prototype.$getStringScreenWidth=function(O,_,k){if(_==0)return[0,0];_==null&&(_=1/0),k=k||0;var D,z;for(z=0;z<O.length&&(D=O.charCodeAt(z),D==9?k+=this.getScreenTabSize(k):D>=4352&&B(D)?k+=2:k+=1,!(k>_));z++);return[k,z]},P.prototype.getRowLength=function(O){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?_:this.$wrapData[O].length+_},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE),k=this.$wrapData[_.row];return k.length&&k[0]<_.column?k.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},P.prototype.getDocumentLastRowColumn=function(O,_){var k=this.documentToScreenRow(O,_);return this.getScreenLastRowColumn(k)},P.prototype.getDocumentLastRowColumnPosition=function(O,_){var k=this.documentToScreenRow(O,_);return this.screenToDocumentPosition(k,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,_){return this.screenToDocumentPosition(O,_).row},P.prototype.screenToDocumentColumn=function(O,_){return this.screenToDocumentPosition(O,_).column},P.prototype.screenToDocumentPosition=function(O,_,k){if(O<0)return{row:0,column:0};var D,le=0,z=0,U,te=0,q=0,X=this.$screenRowCache,ee=this.$getRowCacheIndex(X,O),de=X.length;if(de&&ee>=0)var te=X[ee],le=this.$docRowCache[ee],se=O>X[de-1];else var se=!de;for(var ue=this.getLength()-1,me=this.getNextFoldLine(le),_e=me?me.start.row:1/0;te<=O&&(q=this.getRowLength(le),!(te+q>O||le>=ue));)te+=q,le++,le>_e&&(le=me.end.row+1,me=this.getNextFoldLine(le,me),_e=me?me.start.row:1/0),se&&(this.$docRowCache.push(le),this.$screenRowCache.push(te));if(me&&me.start.row<=le)D=this.getFoldDisplayLine(me),le=me.start.row;else{if(te+q<=O||le>ue)return{row:ue,column:this.getLine(ue).length};D=this.getLine(le),me=null}var Te=0,Me=Math.floor(O-te);if(this.$useWrapMode){var Xe=this.$wrapData[le];Xe&&(U=Xe[Me],Me>0&&Xe.length&&(Te=Xe.indent,z=Xe[Me-1]||Xe[Xe.length-1],D=D.substring(z)))}return k!==void 0&&this.$bidiHandler.isBidiRow(te+Me,le,Me)&&(_=this.$bidiHandler.offsetToCol(k)),z+=this.$getStringScreenWidth(D,_-Te)[1],this.$useWrapMode&&z>=U&&(z=U-1),me?me.idxToPosition(z):{row:le,column:z}},P.prototype.documentToScreenPosition=function(O,_){if(typeof _>"u")var k=this.$clipPositionToDocument(O.row,O.column);else k=this.$clipPositionToDocument(O,_);O=k.row,_=k.column;var te=0,D=null,z=null;z=this.getFoldAt(O,_,1),z&&(O=z.start.row,_=z.start.column);var U,de=0,q=this.$docRowCache,X=this.$getRowCacheIndex(q,O),ee=q.length;if(ee&&X>=0)var de=q[X],te=this.$screenRowCache[X],le=O>q[ee-1];else var le=!ee;for(var se=this.getNextFoldLine(de),ue=se?se.start.row:1/0;de<O;){if(de>=ue){if(U=se.end.row+1,U>O)break;se=this.getNextFoldLine(U,se),ue=se?se.start.row:1/0}else U=de+1;te+=this.getRowLength(de),de=U,le&&(this.$docRowCache.push(de),this.$screenRowCache.push(te))}var me="";se&&de>=ue?(me=this.getFoldDisplayLine(se,O,_),D=se.start.row):(me=this.getLine(O).substring(0,_),D=O);var _e=0;if(this.$useWrapMode){var Te=this.$wrapData[D];if(Te){for(var Me=0;me.length>=Te[Me];)te++,Me++;me=me.substring(Te[Me-1]||0,me.length),_e=Me>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[de]&&this.lineWidgets[de].rowsAbove&&(te+=this.lineWidgets[de].rowsAbove),{row:te,column:_e+this.$getStringScreenWidth(me)[0]}},P.prototype.documentToScreenColumn=function(O,_){return this.documentToScreenPosition(O,_).column},P.prototype.documentToScreenRow=function(O,_){return this.documentToScreenPosition(O,_).row},P.prototype.getScreenLength=function(){var O=0,_=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,D=0,z=0,_=this.$foldData[z++],U=_?_.start.row:1/0;D<k;){var q=this.$wrapData[D];O+=q?q.length+1:1,D++,D>U&&(D=_.end.row+1,_=this.$foldData[z++],U=_?_.start.row:1/0)}else{O=this.getLength();for(var X=this.$foldData,z=0;z<X.length;z++)_=X[z],O-=_.end.row-_.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,k,D){if(k===0)return[0,0];k||(k=1/0),D=D||0;var z,U;for(U=0;U<_.length&&(z=_.charAt(U),z===" "?D+=this.getScreenTabSize(D):D+=O.getCharacterWidth(z),!(D>k));U++);return[D,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var _=this.getLine(O.row);return _[O.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P}();x.$uid=0,x.prototype.$modes=h.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=B,g.implement(x.prototype,f);var I=1,$=2,S=3,C=4,R=9,N=10,L=11,E=12;function B(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),h.defineOptions(x.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,p){var g=e("./lib/lang"),v=e("./lib/oop"),b=e("./range").Range,h=function(){function u(){this.$options={}}return u.prototype.set=function(c){return v.mixin(this.$options,c),this},u.prototype.getOptions=function(){return g.copyObject(this.$options)},u.prototype.setOptions=function(c){this.$options=c},u.prototype.find=function(c){var i=this.$options,l=this.$matchIterator(c,i);if(!l)return!1;var d=null;return l.forEach(function(w,x,I,$){return d=new b(w,x,I,$),x==$&&i.start&&i.start.start&&i.skipCurrent!=!1&&d.isEqual(i.start)?(d=null,!1):!0}),d},u.prototype.findAll=function(c){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var l=i.range,d=l?c.getLines(l.start.row,l.end.row):c.doc.getAllLines(),w=[],x=i.re;if(i.$isMultiLine){var I=x.length,$=d.length-I,S;e:for(var C=x.offset||0;C<=$;C++){for(var R=0;R<I;R++)if(d[C+R].search(x[R])==-1)continue e;var N=d[C],L=d[C+I-1],E=N.length-N.match(x[0])[0].length,B=L.match(x[I-1])[0].length;S&&S.end.row===C&&S.end.column>E||(w.push(S=new b(C,E,C+I-1,B)),I>2&&(C=C+I-2))}}else for(var P,O=0;O<d.length;O++)if(this.$isMultilineSearch(i)){var _=d.length-1;if(P=this.$multiLineForward(c,x,O,_),P){var k=P.endRow<=_?P.endRow-1:_;k>O&&(O=k),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=g.getMatchOffsets(d[O],x);for(var R=0;R<P.length;R++){var D=P[R];w.push(new b(O,D.offset,O,D.offset+D.length))}}if(l){for(var z=l.start.column,U=l.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<z&&w[O].start.row==0;)O++;for(var q=l.end.row-l.start.row;O<R&&w[R].end.column>U&&w[R].end.row==q;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=l.start.row,w[O].end.row+=l.start.row}return w},u.prototype.parseReplaceString=function(c){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",d=0,w=c.length;d<w;d++){var x=c.charCodeAt(d);if(x===i.Backslash){if(d++,d>=w){l+="\\";break}var I=c.charCodeAt(d);switch(I){case i.Backslash:l+="\\";break;case i.n:l+=`
199
+ `;break;case i.t:l+=" ";break}continue}if(x===i.DollarSign){if(d++,d>=w){l+="$";break}var $=c.charCodeAt(d);if($===i.DollarSign){l+="$$";continue}if($===i.Digit0||$===i.Ampersand){l+="$&";continue}if(i.Digit1<=$&&$<=i.Digit9){l+="$"+c[d];continue}}l+=c[d]}return l||c},u.prototype.replace=function(c,i){var l=this.$options,d=this.$assembleRegExp(l);if(l.$isMultiLine)return i;if(d){var w=this.$isMultilineSearch(l);w&&(c=c.replace(/\r\n|\r|\n/g,`
200
+ `));var x=d.exec(c);if(!x||!w&&x[0].length!=c.length)return null;if(i=l.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=c.replace(d,i),l.preserveCase){i=i.split("");for(var I=Math.min(c.length,c.length);I--;){var $=c[I];$&&$.toLowerCase()!=$?i[I]=i[I].toUpperCase():i[I]=i[I].toLowerCase()}i=i.join("")}return i}},u.prototype.$assembleRegExp=function(c,i){if(c.needle instanceof RegExp)return c.re=c.needle;var l=c.needle;if(!c.needle)return c.re=!1;c.regExp||(l=g.escapeRegExp(l));var d=c.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),c.$supportsUnicodeFlag=!0,d+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(l=f(l,c)),c.$isMultiLine=!i&&/[\n\r]/.test(l),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(l,d);try{var w=new RegExp(l,d)}catch{w=!1}return c.re=w},u.prototype.$assembleMultilineRegExp=function(c,i){for(var l=c.replace(/\r\n|\r|\n/g,`$
201
+ ^`).split(`
202
+ `),d=[],w=0;w<l.length;w++)try{d.push(new RegExp(l[w],i))}catch{return!1}return d},u.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},u.prototype.$multiLineForward=function(c,i,l,d){for(var w,x=a(c,l),I=l;I<=d;){for(var $=0;$<x&&!(I>d);$++){var S=c.getLine(I++);w=w==null?S:w+`
203
+ `+S}var C=i.exec(w);if(i.lastIndex=0,C){var R=w.slice(0,C.index).split(`
204
+ `),N=C[0].split(`
205
+ `),L=l+R.length-1,E=R[R.length-1].length,B=L+N.length-1,P=N.length==1?E+N[0].length:N[N.length-1].length;return{startRow:L,startCol:E,endRow:B,endCol:P}}}return null},u.prototype.$multiLineBackward=function(c,i,l,d,w){for(var x,I=a(c,d),$=c.getLine(d).length-l,S=d;S>=w;){for(var C=0;C<I&&S>=w;C++){var R=c.getLine(S--);x=x==null?R:R+`
206
+ `+x}var N=s(x,i,$);if(N){var L=x.slice(0,N.index).split(`
207
+ `),E=N[0].split(`
208
+ `),B=S+L.length,P=L[L.length-1].length,O=B+E.length-1,_=E.length==1?P+E[0].length:E[E.length-1].length;return{startRow:B,startCol:P,endRow:O,endCol:_}}}return null},u.prototype.$matchIterator=function(c,i){var l=this.$assembleRegExp(i);if(!l)return!1;var d=this.$isMultilineSearch(i),w=this.$multiLineForward,x=this.$multiLineBackward,I=i.backwards==!0,$=i.skipCurrent!=!1,S=l.unicode,C=i.range,R=i.start;R||(R=C?C[I?"end":"start"]:c.selection.getRange()),R.start&&(R=R[$!=I?"end":"start"]);var N=C?C.start.row:0,L=C?C.end.row:c.getLength()-1;if(I)var E=function(O){var _=R.row;if(!P(_,R.column,O)){for(_--;_>=N;_--)if(P(_,Number.MAX_VALUE,O))return;if(i.wrap!=!1){for(_=L,N=R.row;_>=N;_--)if(P(_,Number.MAX_VALUE,O))return}}};else var E=function(O){var _=R.row;if(!P(_,R.column,O)){for(_=_+1;_<=L;_++)if(P(_,0,O))return;if(i.wrap!=!1){for(_=N,L=R.row;_<=L;_++)if(P(_,0,O))return}}};if(i.$isMultiLine)var B=l.length,P=function(O,_,k){var D=I?O-B+1:O;if(!(D<0||D+B>c.getLength())){var z=c.getLine(D),U=z.search(l[0]);if(!(!I&&U<_||U===-1)){for(var q=1;q<B;q++)if(z=c.getLine(D+q),z.search(l[q])==-1)return;var X=z.match(l[B-1])[0].length;if(!(I&&X>_)&&k(D,U,D+B-1,X))return!0}}};else if(I)var P=function(O,_,k){if(d){var D=x(c,l,_,O,N);if(!D)return!1;if(k(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var z=c.getLine(O),U=[],q,X=0;for(l.lastIndex=0;q=l.exec(z);){var ee=q[0].length;if(X=q.index,!ee){if(X>=z.length)break;l.lastIndex=X+=g.skipEmptyMatch(z,X,S)}if(q.index+ee>_)break;U.push(q.index,ee)}for(var de=U.length-1;de>=0;de-=2){var te=U[de-1],ee=U[de];if(k(O,te,O,te+ee))return!0}}};else var P=function(O,_,k){if(l.lastIndex=_,d){var D=w(c,l,O,L);if(D){var z=D.endRow<=L?D.endRow-1:L;z>O&&(O=z)}if(!D)return!1;if(k(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=c.getLine(O),q,X;X=l.exec(U);){var ee=X[0].length;if(q=X.index,k(O,q,O,q+ee))return!0;if(!ee&&(l.lastIndex=q+=g.skipEmptyMatch(U,q,S),q>=U.length))return!1}};return{forEach:E}},u}();function f(u,c){var i=g.supportsLookbehind();function l(I,$){$===void 0&&($=!0);var S=i&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(I)||c.regExp?i&&c.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var d=Array.from(u),w=d[0],x=d[d.length-1];return l(w)+u+l(x,!1)}function s(u,c,i){for(var l=null,d=0;d<=u.length;){c.lastIndex=d;var w=c.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-i)break;(!l||x>l.index+l[0].length)&&(l=w),d=w.index+1}return l}function a(u,c){var i=5e3,l={row:c,column:0},d=u.doc.positionToIndex(l),w=d+i,x=u.doc.indexToPosition(w),I=x.row;return I+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,p){var g=this&&this.__extends||function(){var u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function l(){this.constructor=c}c.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),v=e("../lib/keys"),b=e("../lib/useragent"),h=v.KEY_MODS,f=function(){function u(c,i){this.$init(c,i,!1)}return u.prototype.$init=function(c,i,l){this.platform=i||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},u.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},u.prototype.removeCommand=function(c,i){var l=c&&(typeof c=="string"?c:c.name);c=this.commands[l],i||delete this.commands[l];var d=this.commandKeyBinding;for(var w in d){var x=d[w];if(x==c)delete d[w];else if(Array.isArray(x)){var I=x.indexOf(c);I!=-1&&(x.splice(I,1),x.length==1&&(d[w]=x[0]))}}},u.prototype.bindKey=function(c,i,l){if(typeof c=="object"&&c&&(l==null&&(l=c.position),c=c[this.platform]),!!c){if(typeof i=="function")return this.addCommand({exec:i,bindKey:c,name:i.name||c});c.split("|").forEach(function(d){var w="";if(d.indexOf(" ")!=-1){var x=d.split(/\s+/);d=x.pop(),x.forEach(function(S){var C=this.parseKeys(S),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var I=this.parseKeys(d),$=h[I.hashId]+I.key;this._addCommandToBinding(w+$,i,l)},this)}},u.prototype._addCommandToBinding=function(c,i,l){var d=this.commandKeyBinding,w;if(!i)delete d[c];else if(!d[c]||this.$singleCommand)d[c]=i;else{Array.isArray(d[c])?(w=d[c].indexOf(i))!=-1&&d[c].splice(w,1):d[c]=[d[c]],typeof l!="number"&&(l=s(i));var x=d[c];for(w=0;w<x.length;w++){var I=x[w],$=s(I);if($>l)break}x.splice(w,0,i)}},u.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(i){var l=c[i];if(l){if(typeof l=="string")return this.bindKey(l,i);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=i),this.addCommand(l))}},this)},u.prototype.removeCommands=function(c){Object.keys(c).forEach(function(i){this.removeCommand(c[i])},this)},u.prototype.bindKeys=function(c){Object.keys(c).forEach(function(i){this.bindKey(i,c[i])},this)},u.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},u.prototype.parseKeys=function(c){var i=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),l=i.pop(),d=v[l];if(v.FUNCTION_KEYS[d])l=v.FUNCTION_KEYS[d].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var w=0,x=i.length;x--;){var I=v.KEY_MODS[i[x]];if(I==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+c),!1;w|=I}return{key:l,hashId:w}},u.prototype.findKeyCommand=function(c,i){var l=h[c]+i;return this.commandKeyBinding[l]},u.prototype.handleKeyboard=function(c,i,l,d){if(!(d<0)){var w=h[i]+l,x=this.commandKeyBinding[w];return c.$keyChain&&(c.$keyChain+=" "+w,x=this.commandKeyBinding[c.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||w,{command:"null"}):(c.$keyChain&&((!i||i==4)&&l.length==1?c.$keyChain=c.$keyChain.slice(0,-w.length-1):(i==-1||d>0)&&(c.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(c,i){return i.$keyChain||""},u}();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=function(u){g(c,u);function c(i,l){var d=u.call(this,i,l)||this;return d.$singleCommand=!0,d}return c}(f);a.call=function(u,c,i){f.prototype.$init.call(u,c,i,!0)},f.call=function(u,c,i){f.prototype.$init.call(u,c,i,!1)},r.HashHandler=a,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,p){var g=this&&this.__extends||function(){var s=function(a,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(c[l]=i[l])},s(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(a,u);function c(){this.constructor=a}a.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),v=e("../lib/oop"),b=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,f=function(s){g(a,s);function a(u,c){var i=s.call(this,c,u)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),i}return a.prototype.exec=function(u,c,i){if(Array.isArray(u)){for(var l=u.length;l--;)if(this.exec(u[l],c,i))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var d={editor:c,command:u,args:i};return this.canExecute(u,c)?(d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1):(this._signal("commandUnavailable",d),!1)},a.prototype.canExecute=function(u,c){return typeof u=="string"&&(u=this.commands[u]),!(!u||c&&c.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(c))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,u):this.exec(c[0],u,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},a}(b);v.implement(f.prototype,h),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,p){var g=e("../lib/lang"),v=e("../config"),b=e("../range").Range;function h(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){v.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(s,a){typeof a=="number"&&!isNaN(a)&&s.gotoLine(a),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){v.loadModule("ace/ext/searchbox",function(a){a.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(s,a){s.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(s,a){s.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(s,a){s.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(s,a){s.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var a=s.$copyWithEmptySelection&&s.selection.isEmpty(),u=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",u),u.isEmpty()||s.session.remove(u),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,a){s.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){v.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(s){var a=s.selection.getRange();a.start.column=0,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(s){var a=s.selection.getRange();a.end.column=Number.MAX_VALUE,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,a){s.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,a){s.insert(g.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var a=s.selection.getRange();a.start.column=a.end.column=0,a.end.row++,s.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var a=s.selection.isBackwards(),u=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),c=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),i=s.session.doc.getLine(u.row).length,l=s.session.doc.getTextRange(s.selection.getRange()),d=l.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),x=u.row+1;x<=c.row+1;x++){var I=g.stringTrimLeft(g.stringTrimRight(s.session.doc.getLine(x)));I.length!==0&&(I=" "+I),w+=I}c.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new b(u.row,0,c.row+2,0),w),d>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+d)):(i=s.session.doc.getLine(u.row).length>i?i+1:i,s.selection.moveCursorTo(u.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var a=s.session.doc.getLength()-1,u=s.session.doc.getLine(a).length,c=s.selection.rangeList.ranges,i=[];c.length<1&&(c=[s.selection.getRange()]);for(var l=0;l<c.length;l++)l==c.length-1&&(c[l].end.row===a&&c[l].end.column===u||i.push(new b(c[l].end.row,c[l].end.column,a,u))),l===0?c[l].start.row===0&&c[l].start.column===0||i.push(new b(0,0,c[l].start.row,c[l].start.column)):i.push(new b(c[l-1].end.row,c[l-1].end.column,c[l].start.row,c[l].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var l=0;l<i.length;l++)s.selection.addRange(i[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
209
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var a=s.getCursorPosition();s.selection.moveTo(a.row-1,Number.MAX_VALUE),s.insert(`
210
+ `),a.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,r,p){var g=e("../lib/keys"),v=e("../mouse/default_gutter_handler").GutterTooltip,b=function(){function f(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new v(this.editor)}return f.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))},f.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))},f.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===g.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=g.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(u),i=this.$findNearestAnnotation(u);if(!(c===null&&i===null)){var l=this.$findClosestNumber(c,i,u);if(l===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new h(s,this))}).bind(this),10)},f.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===g.tab){s.preventDefault();return}if(s.keyCode===g.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===g.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===g.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===g.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===g.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===g.enter||s.keyCode===g.space){switch(s.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[a];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(s,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),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":var c=this.lines.cells[this.activeRowIndex].element.childNodes[2],i=c.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=i.right+"px",l.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},f.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.hideTooltip()},f.prototype.$isFoldWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getFoldWidget(s).style.display!=="none";return a&&u},f.prototype.$isCustomWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=!!this.$getCustomWidget(s);return a&&u},f.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getAnnotation(s).style.display!=="none";return a&&u},f.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[1]},f.prototype.$getCustomWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[3]},f.prototype.$getAnnotation=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[2]},f.prototype.$findNearestFoldLaneWidget=function(s){if(this.$isCustomWidgetVisible(s)||this.$isFoldWidgetVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isCustomWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(s+a))return s+a;if(s-a>=0&&this.$isFoldWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+a))return s+a}return null},f.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isAnnotationVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+a))return s+a}return null},f.prototype.$focusFoldWidget=function(s){if(s!=null){var a=this.$getFoldWidget(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},f.prototype.$focusCustomWidget=function(s){if(s!=null){var a=this.$getCustomWidget(s);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},f.prototype.$focusAnnotation=function(s){if(s!=null){var a=this.$getAnnotation(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},f.prototype.$blurFoldWidget=function(s){var a=this.$getFoldWidget(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},f.prototype.$blurCustomWidget=function(s){var a=this.$getCustomWidget(s);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},f.prototype.$blurAnnotation=function(s){var a=this.$getAnnotation(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},f.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$findClosestNumber=function(s,a,u){return s===null?a:a===null||Math.abs(u-s)<=Math.abs(u-a)?s:a},f.prototype.$switchLane=function(s){switch(s){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 u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},f.prototype.$rowIndexToRow=function(s){var a=this.lines.get(s);return a?a.row:null},f.prototype.$rowToRowIndex=function(s){for(var a=0;a<this.lines.getLength();a++){var u=this.lines.get(a);if(u.row==s)return a}return null},f}();r.GutterKeyboardHandler=b;var h=function(){function f(s,a){this.gutterKeyboardHandler=a,this.domEvent=s}return f.prototype.getKey=function(){return g.keyCodeToString(this.domEvent.keyCode)},f.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},f.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},f.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},f}();r.GutterKeyboardEvent=h}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,p){var g=this&&this.__values||function(_){var k=typeof Symbol=="function"&&Symbol.iterator,D=k&&_[k],z=0;if(D)return D.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&z>=_.length&&(_=void 0),{value:_&&_[z++],done:!_}}};throw new TypeError(k?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/oop"),b=e("./lib/dom"),h=e("./lib/lang"),f=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,i=e("./edit_session").EditSession,l=e("./search").Search,d=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,I=e("./commands/default_commands").commands,$=e("./config"),S=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,N=e("./clipboard"),L=e("./lib/keys"),E=e("./lib/event"),B=e("./tooltip").HoverTooltip,P=function(){function _(k,D,z){this.id="editor"+ ++_.$uid,this.session,this.$toDestroy=[];var U=k.getContainerElement();this.container=U,this.renderer=k,this.commands=new x(f.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new s(k.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new c(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(q,X){X._$emitInputEvent.schedule(31)}),this.setSession(D||z&&z.session||new i("")),$.resetOptions(this),z&&this.setOptions(z),$._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(k){this.session.startOperation(k)},_.prototype.endOperation=function(k){this.session.endOperation(k)},_.prototype.onStartOperation=function(k){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,k||(this.previousCommand=null)},_.prototype.onEndOperation=function(k){if(this.curOp&&this.session){if(k&&k.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,z=D&&D.scrollIntoView;if(z){switch(z){case"center-animate":z="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}z=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(k){if(this.$mergeUndoDeltas){var D=this.prevOp,z=this.$mergeableCommands,U=D.command&&k.command.name==D.command.name;if(k.command.name=="insertstring"){var q=k.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&&z.indexOf(k.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:z.indexOf(k.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(k,D){if(k&&typeof k=="string"&&k!="ace"){this.$keybindingId=k;var z=this;$.loadModule(["keybinding",k],function(U){z.$keybindingId==k&&z.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(k),D&&D()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(k){if(this.session!=k){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 z=this.session.getSelection();z.off("changeCursor",this.$onCursorChange),z.off("changeSelection",this.$onSelectionChange)}this.session=k,k?(this.$onDocumentChange=this.onDocumentChange.bind(this),k.on("change",this.$onDocumentChange),this.renderer.setSession(k),this.$onChangeMode=this.onChangeMode.bind(this),k.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),k.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),k.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),k.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),k.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),k.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=k.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(k)),this._signal("changeSession",{session:k,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),k&&k._signal("changeEditor",{editor:this}),k&&(k.$editor=this),k&&!k.destroyed&&k.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(k,D){return this.session.doc.setValue(k),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),k},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(k){this.renderer.onResize(k)},_.prototype.setTheme=function(k,D){this.renderer.setTheme(k,D)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(k,D){this.renderer.setStyle(k,D)},_.prototype.unsetStyle=function(k){this.renderer.unsetStyle(k)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(k){this.setOption("fontSize",k)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var k=this;this.$highlightPending=!0,setTimeout(function(){k.$highlightPending=!1;var D=k.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(se){D.removeMarker(se)}),D.$bracketHighlight=null);var z=k.getCursorPosition(),U=k.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(k),X=D.getMatchingBracketRanges(z,q);if(!X){var ee=new S(D,z.row,z.column),de=ee.getCurrentToken();if(de&&/\b(?:tag-open|tag-name)/.test(de.type)){var te=D.getMatchingTags(z);te&&(X=[te.openTagName.isEmpty()?te.openTag:te.openTagName,te.closeTagName.isEmpty()?te.closeTag:te.closeTagName])}}if(!X&&D.$mode.getMatching&&(X=D.$mode.getMatching(k.session)),!X){k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(X)?X.length==1&&(le="ace_error_bracket"):X=[X],X.length==2&&(d.comparePoints(X[0].end,X[1].start)==0?X=[d.fromPoints(X[0].start,X[1].end)]:d.comparePoints(X[0].start,X[1].end)==0&&(X=[d.fromPoints(X[1].start,X[0].end)])),D.$bracketHighlight={ranges:X,markerIds:X.map(function(se){return D.addMarker(se,le,"text")})},k.getHighlightIndentGuides()&&k.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(k){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",k))},_.prototype.onBlur=function(k){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",k))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(k){var D=this.session.$useWrapMode,z=k.start.row==k.end.row?k.end.row:1/0;this.renderer.updateLines(k.start.row,z,D),this._signal("change",k),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(k){var D=k.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 k=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)),k.$highlightLineMarker&&!D)k.removeMarker(k.$highlightLineMarker.id),k.$highlightLineMarker=null;else if(!k.$highlightLineMarker&&D){var z=new d(D.row,D.column,D.row,1/0);z.id=k.addMarker(z,"ace_active-line","screenLine"),k.$highlightLineMarker=z}else D&&(k.$highlightLineMarker.start.row=D.row,k.$highlightLineMarker.end.row=D.row,k.$highlightLineMarker.start.column=D.column,k._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(k){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var z=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(z,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var k=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var z=D.start.column,U=D.end.column,q=k.getLine(D.start.row),X=q.substring(z,U);if(!(X.length>5e3||!/[\w\d]/.test(X))){var ee=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:X}),de=q.substring(z-1,U+1);if(ee.test(de))return ee}}},_.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(k){this.renderer.updateText(),this._emit("changeMode",k)},_.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 k=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),z=!1;if(!k&&this.$copyWithEmptySelection){z=!0;for(var U=this.selection.getAllRanges(),q=0;q<U.length;q++){var X=U[q];q&&U[q-1].start.row==X.start.row||(k+=this.session.getLine(X.start.row)+D)}}var ee={text:k};return this._signal("copy",ee),N.lineMode=z?ee.text:!1,ee.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(k,D){var z={text:k,event:D};this.commands.exec("paste",this,z)},_.prototype.$handlePaste=function(k){typeof k=="string"&&(k={text:k}),this._signal("paste",k);var D=k.text,z=D===N.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)z?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(z)this.selection.rangeList.ranges.forEach(function(le){U.insert({row:le.start.row,column:0},D)});else{var q=D.split(/\r\n|\r|\n/),X=this.selection.rangeList.ranges,ee=q.length==2&&(!q[0]||!q[1]);if(q.length!=X.length||ee)return this.commands.exec("insertstring",this,D);for(var de=X.length;de--;){var te=X[de];te.isEmpty()||U.remove(te),U.insert(te.start,q[de])}}},_.prototype.execCommand=function(k,D){return this.commands.exec(k,this,D)},_.prototype.insert=function(k,D){var z=this.session,U=z.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var X=U.transformAction(z.getState(q.row),"insertion",this,z,k);X&&(k!==X.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),k=X.text)}if(k==" "&&(k=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&k.indexOf(`
211
+ `)==-1){var ee=d.fromPoints(q,q);ee.end.column+=k.length,this.session.remove(ee)}}else{var ee=this.getSelectionRange();q=this.session.remove(ee),this.clearSelection()}if(k==`
212
+ `||k==`\r
213
+ `){var se=z.getLine(q.row);if(q.column>se.search(/\S|$/)){var de=se.substr(q.column).search(/\S|$/);z.doc.removeInLine(q.row,q.column,q.column+de)}}this.clearSelection();var te=q.column,le=z.getState(q.row),se=z.getLine(q.row),ue=U.checkOutdent(le,se,k);if(z.insert(q,k),X&&X.selection&&(X.selection.length==2?this.selection.setSelectionRange(new d(q.row,te+X.selection[0],q.row,te+X.selection[1])):this.selection.setSelectionRange(new d(q.row+X.selection[0],X.selection[1],q.row+X.selection[2],X.selection[3]))),this.$enableAutoIndent){if(z.getDocument().isNewLine(k)){var me=U.getNextLineIndent(le,se.slice(0,q.column),z.getTabString());z.insert({row:q.row+1,column:0},me)}ue&&U.autoOutdent(le,z,q.row)}},_.prototype.autoIndent=function(){for(var k=this.session,D=k.getMode(),z=this.selection.isEmpty()?[new d(0,0,k.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",X="",ee=k.getTabString(),de=0;de<z.length;de++)for(var te=z[de].start.row,le=z[de].end.row,se=te;se<=le;se++){se>0&&(U=k.getState(se-1),q=k.getLine(se-1),X=D.getNextLineIndent(U,q,ee));var ue=k.getLine(se),me=D.$getIndent(ue);if(X!==me){if(me.length>0){var _e=new d(se,0,se,me.length);k.remove(_e)}X.length>0&&k.insert({row:se,column:0},X)}D.autoOutdent(U,k,se)}},_.prototype.onTextInput=function(k,D){if(!D)return this.keyBinding.onTextInput(k);this.startOperation({command:{name:"insertstring"}});var z=this.applyComposition.bind(this,k,D);this.selection.rangeCount?this.forEachSelection(z):z(),this.endOperation()},_.prototype.applyComposition=function(k,D){if(D.extendLeft||D.extendRight){var z=this.selection.getRange();z.start.column-=D.extendLeft,z.end.column+=D.extendRight,z.start.column<0&&(z.start.row--,z.start.column+=this.session.getLine(z.start.row).length+1),this.selection.setRange(z),!k&&!z.isEmpty()&&this.remove()}if((k||!this.selection.isEmpty())&&this.insert(k,!0),D.restoreStart||D.restoreEnd){var z=this.selection.getRange();z.start.column-=D.restoreStart,z.end.column-=D.restoreEnd,this.selection.setRange(z)}},_.prototype.onCommandKey=function(k,D,z){return this.keyBinding.onCommandKey(k,D,z)},_.prototype.setOverwrite=function(k){this.session.setOverwrite(k)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(k){this.setOption("scrollSpeed",k)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(k){this.setOption("dragDelay",k)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(k){this.setOption("selectionStyle",k)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(k){this.setOption("highlightActiveLine",k)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(k){this.setOption("highlightSelectedWord",k)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(k){this.renderer.setAnimatedScroll(k)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(k){this.renderer.setShowInvisibles(k)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(k){this.renderer.setDisplayIndentGuides(k)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(k){this.renderer.setHighlightIndentGuides(k)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(k){this.renderer.setShowPrintMargin(k)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(k){this.renderer.setPrintMarginColumn(k)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(k){this.setOption("readOnly",k)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(k){this.setOption("behavioursEnabled",k)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(k){this.setOption("wrapBehavioursEnabled",k)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(k){this.setOption("showFoldWidgets",k)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(k){this.selection.isEmpty()&&(k=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var z=this.session,U=z.getState(D.start.row),q=z.getMode().transformAction(U,"deletion",this,z,D);if(D.end.column===0){var X=z.getTextRange(D);if(X[X.length-1]==`
214
+ `){var ee=z.getLine(D.end.row);/^\s+$/.test(ee)&&(D.end.column=ee.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 k=this.getSelectionRange();k.start.column==k.end.column&&k.start.row==k.end.row&&(k.end.column=0,k.end.row++),this.session.remove(k),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var k=this.getCursorPosition();this.insert(`
215
+ `),this.moveCursorToPosition(k)},_.prototype.setGhostText=function(k,D){this.renderer.setGhostText(k,D)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var k=this.getCursorPosition(),D=k.column;if(D!==0){var z=this.session.getLine(k.row),U,q;D<z.length?(U=z.charAt(D)+z.charAt(D-1),q=new d(k.row,D-1,k.row,D+1)):(U=z.charAt(D-1)+z.charAt(D-2),q=new d(k.row,D-2,k.row,D)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},_.prototype.toLowerCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),z=this.session.getTextRange(D);this.session.replace(D,z.toLowerCase()),this.selection.setSelectionRange(k)},_.prototype.toUpperCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),z=this.session.getTextRange(D);this.session.replace(D,z.toUpperCase()),this.selection.setSelectionRange(k)},_.prototype.indent=function(){var k=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var z=this.$getSelectedRows();k.indentRows(z.first,z.last," ");return}else if(D.start.column<D.end.column){var U=k.getTextRange(D);if(!/^\s+$/.test(U)){var z=this.$getSelectedRows();k.indentRows(z.first,z.last," ");return}}var q=k.getLine(D.start.row),X=D.start,ee=k.getTabSize(),de=k.documentToScreenColumn(X.row,X.column);if(this.session.getUseSoftTabs())var te=ee-de%ee,le=h.stringRepeat(" ",te);else{for(var te=de%ee;q[D.start.column-1]==" "&&te;)D.start.column--,te--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},_.prototype.blockIndent=function(){var k=this.$getSelectedRows();this.session.indentRows(k.first,k.last," ")},_.prototype.blockOutdent=function(){var k=this.session.getSelection();this.session.outdentRows(k.getRange())},_.prototype.sortLines=function(){for(var k=this.$getSelectedRows(),D=this.session,z=[],U=k.first;U<=k.last;U++)z.push(D.getLine(U));z.sort(function(ee,de){return ee.toLowerCase()<de.toLowerCase()?-1:ee.toLowerCase()>de.toLowerCase()?1:0});for(var q=new d(0,0,0,0),U=k.first;U<=k.last;U++){var X=D.getLine(U);q.start.row=U,q.end.row=U,q.end.column=X.length,D.replace(q,z[U-k.first])}},_.prototype.toggleCommentLines=function(){var k=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(k,this.session,D.first,D.last)},_.prototype.toggleBlockComment=function(){var k=this.getCursorPosition(),D=this.session.getState(k.row),z=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,z,k)},_.prototype.getNumberAt=function(k,D){var z=/[\-]?[0-9]+(?:\.[0-9]+)?/g;z.lastIndex=0;for(var U=this.session.getLine(k);z.lastIndex<D;){var q=z.exec(U);if(q.index<=D&&q.index+q[0].length>=D){var X={value:q[0],start:q.index,end:q.index+q[0].length};return X}}return null},_.prototype.modifyNumber=function(k){var D=this.selection.getCursor().row,z=this.selection.getCursor().column,U=new d(D,z-1,D,z),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var X=this.getNumberAt(D,z);if(X){var ee=X.value.indexOf(".")>=0?X.start+X.value.indexOf(".")+1:X.end,de=X.start+X.value.length-ee,te=parseFloat(X.value);te*=Math.pow(10,de),ee!==X.end&&z<ee?k*=Math.pow(10,X.end-z-1):k*=Math.pow(10,X.end-z),te+=k,te/=Math.pow(10,de);var le=te.toFixed(de),se=new d(D,X.start,D,X.end);this.session.replace(se,le),this.moveCursorTo(D,Math.max(X.start+1,z+le.length-X.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var k=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var z=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=z.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),X=D-U-1;X<0&&(X=0);var ee=0,de=0,te=this;z.match(/[A-Za-z0-9_]+/)&&q.forEach(function(Ue,ct){de=ee+Ue.length,X>=ee&&X<=de&&(z=Ue,te.selection.clearSelection(),te.moveCursorTo(k,ee+U),te.selection.selectTo(k,de+U)),ee=de});for(var le=this.$toggleWordPairs,se,ue=0;ue<le.length;ue++)for(var me=le[ue],_e=0;_e<=1;_e++){var Te=+!_e,Me=z.match(new RegExp("^\\s?_?("+h.escapeRegExp(me[_e])+")\\s?$","i"));if(Me){var Xe=z.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Me[1])+")($|\\s)","g"));Xe&&(se=z.replace(new RegExp(h.escapeRegExp(me[_e]),"i"),function(Ue){var ct=me[Te];return Ue.toUpperCase()==Ue?ct=ct.toUpperCase():Ue.charAt(0).toUpperCase()==Ue.charAt(0)&&(ct=ct.substr(0,0)+me[Te].charAt(0).toUpperCase()+ct.substr(1)),ct}),this.insert(se),se="")}}},_.prototype.findLinkAt=function(k,D){var z,U,q=this.session.getLine(k),X=q.split(/((?:https?|ftp):\/\/[\S]+)/),ee=D;ee<0&&(ee=0);var de=0,te=0,le;try{for(var se=g(X),ue=se.next();!ue.done;ue=se.next()){var me=ue.value;if(te=de+me.length,ee>=de&&ee<=te&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){le=me.replace(/[\s:.,'";}\]]+$/,"");break}de=te}}catch(_e){z={error:_e}}finally{try{ue&&!ue.done&&(U=se.return)&&U.call(se)}finally{if(z)throw z.error}}return le},_.prototype.openLink=function(){var k=this.selection.getCursor(),D=this.findLinkAt(k.row,k.column);return D&&window.open(D,"_blank"),D!=null},_.prototype.removeLines=function(){var k=this.$getSelectedRows();this.session.removeFullLines(k.first,k.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var k=this.selection,D=this.session,z=k.getRange(),U=k.isBackwards();if(z.isEmpty()){var q=z.start.row;D.duplicateLines(q,q)}else{var X=U?z.start:z.end,ee=D.insert(X,D.getTextRange(z));z.start=X,z.end=ee,k.setSelectionRange(z,U)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(k,D,z){return this.session.moveText(k,D,z)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(k,D){var z,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var X=q.toOrientedRange();z=this.$getSelectedRows(X),U=this.session.$moveLines(z.first,z.last,D?0:k),D&&k==-1&&(U=0),X.moveBy(U,0),q.fromOrientedRange(X)}else{var ee=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var de=0,te=0,le=ee.length,se=0;se<le;se++){var ue=se;ee[se].moveBy(de,0),z=this.$getSelectedRows(ee[se]);for(var me=z.first,_e=z.last;++se<le;){te&&ee[se].moveBy(te,0);var Te=this.$getSelectedRows(ee[se]);if(D&&Te.first!=_e||!D&&Te.first>_e+1)break;_e=Te.last}for(se--,de=this.session.$moveLines(me,_e,D?0:k),D&&k==-1&&(ue=se+1);ue<=se;)ee[ue].moveBy(de,0),ue++;D||(de=0),te+=de}q.fromOrientedRange(q.ranges[0]),q.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(k){return k=(k||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(k.start.row),last:this.session.getRowFoldEnd(k.end.row)}},_.prototype.onCompositionStart=function(k){this.renderer.showComposition(k)},_.prototype.onCompositionUpdate=function(k){this.renderer.setCompositionText(k)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(k){return k>=this.getFirstVisibleRow()&&k<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(k){return k>=this.renderer.getFirstFullyVisibleRow()&&k<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(k,D){var z=this.renderer,U=this.renderer.layerConfig,q=k*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 X=z.scrollTop;z.scrollBy(0,q*U.lineHeight),D!=null&&z.scrollCursorIntoView(null,.5),z.animateScrolling(X)},_.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(k){this.renderer.scrollToRow(k)},_.prototype.scrollToLine=function(k,D,z,U){this.renderer.scrollToLine(k,D,z,U)},_.prototype.centerSelection=function(){var k=this.getSelectionRange(),D={row:Math.floor(k.start.row+(k.end.row-k.start.row)/2),column:Math.floor(k.start.column+(k.end.column-k.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(k,D){this.selection.moveCursorTo(k,D)},_.prototype.moveCursorToPosition=function(k){this.selection.moveCursorToPosition(k)},_.prototype.jumpToMatching=function(k,D){var z=this.getCursorPosition(),U=new S(this.session,z.row,z.column),q=U.getCurrentToken(),X=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var ee=q||U.stepForward();if(ee){var de,te=!1,le={},se=z.column-ee.start,ue,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ee.value.match(/[{}()\[\]]/g)){for(;se<ee.value.length&&!te;se++)if(me[ee.value[se]])switch(ue=me[ee.value[se]]+"."+ee.type.replace("rparen","lparen"),isNaN(le[ue])&&(le[ue]=0),ee.value[se]){case"(":case"[":case"{":le[ue]++;break;case")":case"]":case"}":le[ue]--,le[ue]===-1&&(de="bracket",te=!0);break}}else ee.type.indexOf("tag-name")!==-1&&(isNaN(le[ee.value])&&(le[ee.value]=0),q.value==="<"&&X>1?le[ee.value]++:q.value==="</"&&le[ee.value]--,le[ee.value]===-1&&(de="tag",te=!0));te||(q=ee,X++,ee=U.stepForward(),se=0)}while(ee&&!te);if(de){var _e,Te;if(de==="bracket")_e=this.session.getBracketRange(z),_e||(_e=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1),Te=_e.start,(D||Te.row===z.row&&Math.abs(Te.column-z.column)<2)&&(_e=this.session.getBracketRange(Te)));else if(de==="tag"){if(!ee||ee.type.indexOf("tag-name")===-1)return;if(_e=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),_e.compare(z.row,z.column)===0){var Me=this.session.getMatchingTags(z);Me&&(Me.openTag.contains(z.row,z.column)?(_e=Me.closeTag,Te=_e.start):(_e=Me.openTag,Me.closeTag.start.row===z.row&&Me.closeTag.start.column===z.column?Te=_e.end:Te=_e.start))}Te=Te||_e.start}Te=_e&&_e.cursor||Te,Te&&(k?_e&&D?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},_.prototype.gotoLine=function(k,D,z){this.selection.clearSelection(),this.session.unfold({row:k-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(k-1,D||0),this.isRowFullyVisible(k-1)||this.scrollToLine(k-1,!0,z)},_.prototype.navigateTo=function(k,D){this.selection.moveTo(k,D)},_.prototype.navigateUp=function(k){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-k||-1,0)},_.prototype.navigateDown=function(k){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(k||1,0)},_.prototype.navigateLeft=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},_.prototype.navigateRight=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)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(k,D){D&&this.$search.set(D);var z=this.$search.find(this.session),U=0;return z&&(this.$tryReplace(z,k)&&(U=1),this.selection.setSelectionRange(z),this.renderer.scrollSelectionIntoView(z.start,z.end)),U},_.prototype.replaceAll=function(k,D){D&&this.$search.set(D);var z=this.$search.findAll(this.session),U=0;if(!z.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var X=z.length-1;X>=0;--X)this.$tryReplace(z[X],k)&&U++;return this.selection.setSelectionRange(q),U},_.prototype.$tryReplace=function(k,D){var z=this.session.getTextRange(k);return D=this.$search.replace(z,D),D!==null?(k.end=this.session.replace(k,D),k):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(k,D,z){D||(D={}),typeof k=="string"||k instanceof RegExp?D.needle=k:typeof k=="object"&&v.mixin(D,k);var U=this.selection.getRange();D.needle==null&&(k=this.session.getTextRange(U)||this.$search.$options.needle,k||(U=this.session.getWordRange(U.start.row,U.start.column),k=this.session.getTextRange(U)),this.$search.set({needle:k})),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,z),q;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},_.prototype.findNext=function(k,D){this.find({skipCurrent:!0,backwards:!1},k,D)},_.prototype.findPrevious=function(k,D){this.find(k,{skipCurrent:!0,backwards:!0},D)},_.prototype.revealRange=function(k,D){this.session.unfold(k),this.selection.setSelectionRange(k);var z=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(k.start,k.end,.5),D!==!1&&this.renderer.animateScrolling(z)},_.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(k){k.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(k){if(k){var D,z=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 X=this.on("changeSelection",function(){U=!0}),ee=this.renderer.on("beforeRender",function(){U&&(D=z.renderer.container.getBoundingClientRect())}),de=this.renderer.on("afterRender",function(){if(U&&D&&(z.isFocused()||z.searchBox&&z.searchBox.isFocused())){var te=z.renderer,le=te.$cursorLayer.$pixelPos,se=te.layerConfig,ue=le.top-se.offset;le.top>=0&&ue+D.top<0?U=!0:le.top<se.height&&le.top+D.top+se.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=ue+"px",q.style.left=le.left+"px",q.style.height=se.lineHeight+"px",q.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(te){te||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",X),this.renderer.off("afterRender",de),this.renderer.off("beforeRender",ee))}}},_.prototype.$resetCursorStyle=function(){var k=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(k)),D.isBlinking=!this.$readOnly&&k!="wide",b.setCssClass(D.element,"ace_slim-cursors",/slim/.test(k)))},_.prototype.prompt=function(k,D,z){var U=this;$.loadModule("ace/ext/prompt",function(q){q.prompt(U,k,D,z)})},_}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],v.implement(P.prototype,w),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){var k=this;if(this.textInput.setReadOnly(_),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(z){var U=!1;if(z&&z.type=="keydown"){if(z&&z.key&&!z.ctrlKey&&!z.metaKey&&(z.key==" "&&z.preventDefault(),U=z.key.length==1),!U)return}else z&&z.type!=="exec"&&(U=!0);if(U){k.hoverTooltip||(k.hoverTooltip=new B);var q=b.createElement("div");q.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),k.hoverTooltip.isOpen||k.hoverTooltip.showForRange(k,k.getSelectionRange(),q)}else k.hoverTooltip&&k.hoverTooltip.isOpen&&k.hoverTooltip.hide()});var D=this.textInput.getElement();_?(E.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?O.attach(this):O.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var k=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(k&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),b.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!k&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),b.addCssClass(this.container,"ace_hasPlaceholder");var D=b.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!k&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var k={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===L.enter){U.preventDefault();var q=this.getCursorPosition().row;this.isRowVisible(q)||this.scrollToLine(q,!0,!0),this.focus()}},z;_?(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",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.bind(this)),this.commands.addCommand(k),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),z||(z=new C(this)),z.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(k),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),z&&z.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",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(_,k){return(Math.abs(_.selection.lead.row-k)||k+1+(k<9?"·":""))+""},getWidth:function(_,k,D){return Math.max(k.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(_,k){k.renderer.$loop.schedule(k.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,p){var g=e("../lib/dom"),v=function(){function b(h,f){this.element=h,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(h){g.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(h,f){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(h,f,s){var a=f.firstRowScreen*f.lineHeight,u=Math.floor(a/this.canvasHeight),c=s.documentToScreenRow(h,0)*f.lineHeight;return c-u*this.canvasHeight},b.prototype.computeLineHeight=function(h,f,s){return f.lineHeight*s.getRowLineCount(h)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(h){return this.cells[h]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var f=g.createFragment(this.element),s=0;s<h.length;s++)f.appendChild(h[s].element);this.element.appendChild(f)}else this.cells.push(h),this.element.appendChild(h.element)},b.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var f=g.createFragment(this.element),s=0;s<h.length;s++)f.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},b.prototype.createCell=function(h,f,s,a){var u=this.cellCache.pop();if(!u){var c=g.createElement("div");a&&a(c),this.element.appendChild(c),u={element:c,text:"",row:h}}return u.row=h,u},b}();r.Lines=v}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,p){var g=e("../lib/dom"),v=e("../lib/oop"),b=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,f=e("./lines").Lines,s=e("../config").nls,a=function(){function c(i){this.element=g.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(i,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,l)},c.prototype.removeGutterDecoration=function(i,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,l)},c.prototype.setAnnotations=function(i){this.$annotations=[];for(var l=0;l<i.length;l++){var d=i[l],w=d.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var I=d.text,$=d.text,S=d.type;I=I?b.escapeHTML(I):d.html||"",$=$||d.html||"",x.text.indexOf(I)===-1&&(x.text.push(I),x.type.push(S),x.displayText.push($));var C=d.className;C?x.className=C:S==="error"?x.className=" ace_error":S==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":S==="info"&&!x.className?x.className=" ace_info":S==="hint"&&!x.className&&(x.className=" ace_hint")}},c.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var l=i.start.row,d=i.end.row-l;if(d!==0)if(i.action=="remove")this.$annotations.splice(l,d+1,null);else{var w=new Array(d+1);w.unshift(l,1),this.$annotations.splice.apply(this.$annotations,w)}}},c.prototype.update=function(i){this.config=i;var l=this.session,d=i.firstRow,w=Math.min(i.lastRow+i.gutterOffset,l.getLength()-1);this.oldLastRow=w,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=l.getNextFoldLine(d),I=x?x.start.row:1/0,$=null,S=-1,C=d;;){if(C>I&&(C=x.end.row+1,x=l.getNextFoldLine(C,x),I=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}$=this.$lines.get(++S),$?$.row=C:($=this.$lines.createCell(C,i,this.session,u),this.$lines.push($)),this.$renderCell($,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i)},c.prototype.$updateGutterWidth=function(i){var l=this.session,d=l.gutterRenderer||this.$renderer,w=l.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(x=l.getLength()+w-1);var I=d?d.getWidth(l,x,i):x.toString().length*i.characterWidth,$=this.$padding||this.$computePadding();I+=$.left+$.right,I!==this.gutterWidth&&!isNaN(I)&&(this.gutterWidth=I,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",I))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<l.length;d++){var w=l[d];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(d>0&&x&&x.start.row==l[d-1].row)w=l[d-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},c.prototype.scrollLines=function(i){var l=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(l,i))return this.update(i);this.$lines.moveContainer(i);var d=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=d,!l||w<i.firstRow)return this.update(i);if(d<l.firstRow)return this.update(i);if(l.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(w>d)for(var x=this.session.getFoldedRowCount(d+1,w);x>0;x--)this.$lines.pop();i.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,l.firstRow-1)),d>w&&this.$lines.push(this.$renderLines(i,w+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},c.prototype.$renderLines=function(i,l,d){for(var w=[],x=l,I=this.session.getNextFoldLine(x),$=I?I.start.row:1/0;x>$&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),$=I?I.start.row:1/0),!(x>d);){var S=this.$lines.createCell(x,i,this.session,u);this.$renderCell(S,i,I,x),w.push(S),x++}return w},c.prototype.$renderCell=function(i,l,d,w){var x=i.element,I=this.session,$=x.childNodes[0],S=x.childNodes[1],C=x.childNodes[2],R=x.childNodes[3],N=C.firstChild,L=I.$firstLineNumber,E=I.$breakpoints,B=I.$decorations,P=I.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&I.foldWidgets,_=d?d.start.row:Number.MAX_VALUE,k=l.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",z=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(I,w):w+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||d&&w<this.$cursorRow&&w>=_&&this.$cursorRow<=d.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),E[w]&&(D+=E[w]),B[w]&&(D+=B[w]),this.$annotations[w]&&w!==_&&(D+=this.$annotations[w].className),O){var q=O[w];q==null&&(q=O[w]=I.getFoldWidget(w))}if(q){var X="ace_fold-widget ace_"+q,ee=q=="start"&&w==_&&w<d.end.row;if(ee){X+=" ace_closed";for(var de="",te=!1,le=w+1;le<=d.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){te=!0,de=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(te=!0,de=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&de!==" ace_security_fold"&&(te=!0,de=" ace_warning_fold")}D+=de}else X+=" ace_open";S.className!=X&&(S.className=X),g.setStyle(S.style,"height",k),g.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var se=I.getFoldWidgetRange(w);se?S.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[se.start.row+1,se.end.row+1])):d?S.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[d.start.row+1,d.end.row+1])):S.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),ee?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else S&&(g.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.removeAttribute("aria-label"));var ue=this.session.$gutterCustomWidgets[w];if(ue?this.$addCustomWidget(w,ue,i):R&&this.$removeCustomWidget(w,i),te&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",N.className=z,N.className+=de,g.setStyle(N.style,"height",k),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",k);var me;switch(de){case" ace_error_fold":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",N.className=z,this.$useSvgGutterIcons?N.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),g.setStyle(N.style,"height",k),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",k);var me;switch(this.$annotations[w].className){case" ace_error":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":me=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":me=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else g.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=D&&(x.className=D),g.setStyle(i.element.style,"height",this.$lines.computeLineHeight(w,l,I)+"px"),g.setStyle(i.element.style,"top",this.$lines.computeLineTop(w,l,I)+"px"),i.text=U,C.style.display==="none"&&S.style.display==="none"&&!ue?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},c.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i},c.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(i){i?g.addCssClass(this.element,"ace_folding-enabled"):g.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(i,l){var d=l||this.$getGutterCell(i);if(d&&d.element){var w=d.element.childNodes[1];w&&g.setStyle(w.style,"display","none")}},c.prototype.$showFoldWidget=function(i,l){var d=l||this.$getGutterCell(i);if(d&&d.element){var w=d.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[d.row]&&g.setStyle(w.style,"display","inline-block")}},c.prototype.$getGutterCell=function(i){var l=this.$lines.cells,d=this.session.documentToScreenRow(i,0);return l[i-this.config.firstRowScreen-(i-d)]},c.prototype.$addCustomWidget=function(i,l,d){var w=l.className,x=l.label,I=l.title,$=l.callbacks;this.session.$gutterCustomWidgets[i]={className:w,label:x,title:I,callbacks:$},this.$hideFoldWidget(i,d);var S=d||this.$getGutterCell(i);if(S&&S.element){var C=S.element.querySelector(".ace_custom-widget");C&&C.remove(),C=g.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",I),g.setStyle(C.style,"display","inline-block"),g.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(R){$.onClick(R,i),R.stopPropagation()}),S.element.appendChild(C)}},c.prototype.$removeCustomWidget=function(i,l){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,l);var d=l||this.$getGutterCell(i);if(d&&d.element){var w=d.element.querySelector(".ace_custom-widget");w&&d.element.removeChild(w)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=g.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},c.prototype.getRegion=function(i){var l=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(i.x<l.left+d.left)return"markers";if(this.$showFoldWidgets&&i.x>d.right-l.right)return"foldWidgets"},c}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,v.implement(a.prototype,h);function u(c){var i=document.createTextNode("");c.appendChild(i);var l=g.createElement("span");c.appendChild(l);var d=g.createElement("span");c.appendChild(d);var w=g.createElement("span");return d.appendChild(w),c}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,p){var g=e("../range").Range,v=e("../lib/dom"),b=function(){function f(s){this.element=v.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return f.prototype.setPadding=function(s){this.$padding=s},f.prototype.setSession=function(s){this.session=s},f.prototype.setMarkers=function(s){this.markers=s},f.prototype.elt=function(s,a){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=a,u.className=s},f.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var u in this.markers){var c=this.markers[u];if(!c.range){c.update(a,this,this.session,s);continue}var i=c.range.clipRows(s.firstRow,s.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),c.renderer){var l=this.$getTop(i.start.row,s),d=this.$padding+i.start.column*s.characterWidth;c.renderer(a,i,d,l,s)}else c.type=="fullLine"?this.drawFullLineMarker(a,i,c.clazz,s):c.type=="screenLine"?this.drawScreenLineMarker(a,i,c.clazz,s):i.isMultiLine()?c.type=="text"?this.drawTextMarker(a,i,c.clazz,s):this.drawMultiLineMarker(a,i,c.clazz,s):this.drawSingleLineMarker(a,i,c.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},f.prototype.drawTextMarker=function(s,a,u,c,i){for(var l=this.session,d=a.start.row,w=a.end.row,x=d,I=0,$=0,S=l.getScreenLastRowColumn(x),C=new g(x,a.start.column,x,$);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==d?a.start.column:l.getRowWrapIndent(x),C.end.column=S,I=$,$=S,S=x+1<w?l.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(s,C,u+(x==d?" ace_start":"")+" ace_br"+h(x==d||x==d+1&&a.start.column,I<$,$>S,x==w),c,x==w?0:1,i)},f.prototype.drawMultiLineMarker=function(s,a,u,c,i){var l=this.$padding,d=c.lineHeight,w=this.$getTop(a.start.row,c),x=l+a.start.column*c.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var I=a.clone();I.end.row=I.start.row,I.end.column=this.session.getLine(I.start.row).length,this.drawBidiSingleLineMarker(s,I,u+" ace_br1 ace_start",c,null,i)}else this.elt(u+" ace_br1 ace_start","height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var I=a.clone();I.start.row=I.end.row,I.start.column=0,this.drawBidiSingleLineMarker(s,I,u+" ace_br12",c,null,i)}else{w=this.$getTop(a.end.row,c);var $=a.end.column*c.characterWidth;this.elt(u+" ace_br12","height:"+d+"px;width:"+$+"px;top:"+w+"px;left:"+l+"px;"+(i||""))}if(d=(a.end.row-a.start.row-1)*c.lineHeight,!(d<=0)){w=this.$getTop(a.start.row+1,c);var S=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(S?" ace_br"+S:""),"height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+l+"px;"+(i||""))}},f.prototype.drawSingleLineMarker=function(s,a,u,c,i,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,c,i,l);var d=c.lineHeight,w=(a.end.column+(i||0)-a.start.column)*c.characterWidth,x=this.$getTop(a.start.row,c),I=this.$padding+a.start.column*c.characterWidth;this.elt(u,"height:"+d+"px;width:"+w+"px;top:"+x+"px;left:"+I+"px;"+(l||""))},f.prototype.drawBidiSingleLineMarker=function(s,a,u,c,i,l){var d=c.lineHeight,w=this.$getTop(a.start.row,c),x=this.$padding,I=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);I.forEach(function($){this.elt(u,"height:"+d+"px;width:"+($.width+(i||0))+"px;top:"+w+"px;left:"+(x+$.left)+"px;"+(l||""))},this)},f.prototype.drawFullLineMarker=function(s,a,u,c,i){var l=this.$getTop(a.start.row,c),d=c.lineHeight;a.start.row!=a.end.row&&(d+=this.$getTop(a.end.row,c)-l),this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(i||""))},f.prototype.drawScreenLineMarker=function(s,a,u,c,i){var l=this.$getTop(a.start.row,c),d=c.lineHeight;this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(i||""))},f}();b.prototype.$padding=0;function h(f,s,a,u){return(f?1:0)|(s?2:0)|(a?4:0)|(u?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,p){var g=new Set(["text","rparen","lparen"]);r.isTextToken=function(v){return g.has(v)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/dom"),b=e("../lib/lang"),h=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,a=e("./text_util").isTextToken,u=function(){function c(i){this.dom=v,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return c.prototype.$updateEolChar=function(){var i=this.session.doc,l=i.getNewLineCharacter()==`
216
+ `&&i.getNewLineMode()!="windows",d=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},c.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},c.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},c.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var l=this.$tabStrings=[0],d=1;d<i+1;d++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,d),l.push(w)}else l.push(this.dom.createTextNode(b.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",I=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=x+I,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+S,w.textContent=C,this.$tabStrings[" "]=w}},c.prototype.updateLines=function(i,l,d){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var w=Math.max(l,i.firstRow),x=Math.min(d,i.lastRow),I=this.element.childNodes,$=0,S=i.firstRow;S<w;S++){var C=this.session.getFoldLine(S);if(C)if(C.containsRow(w)){w=C.start.row;break}else S=C.end.row;$++}for(var R=!1,S=w,C=this.session.getNextFoldLine(S),N=C?C.start.row:1/0;S>N&&(S=C.end.row+1,C=this.session.getNextFoldLine(S,C),N=C?C.start.row:1/0),!(S>x);){var L=I[$++];if(L){this.dom.removeChildren(L),this.$renderLine(L,S,S==N?C:!1),R&&(L.style.top=this.$lines.computeLineTop(S,i,this.session)+"px");var E=i.lineHeight*this.session.getRowLength(S)+"px";L.style.height!=E&&(R=!0,L.style.height=E)}S++}if(R)for(;$<this.$lines.cells.length;){var B=this.$lines.cells[$++];B.element.style.top=this.$lines.computeLineTop(B.row,i,this.session)+"px"}},c.prototype.scrollLines=function(i){var l=this.config;if(this.config=i,this.$lines.pageChanged(l,i))return this.update(i);this.$lines.moveContainer(i);var d=i.lastRow,w=l?l.lastRow:-1;if(!l||w<i.firstRow)return this.update(i);if(d<l.firstRow)return this.update(i);if(!l||l.lastRow<i.firstRow)return this.update(i);if(i.lastRow<l.firstRow)return this.update(i);if(l.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(l.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,l.lastRow);x>0;x--)this.$lines.pop();i.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,l.firstRow-1)),i.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(i,l.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(i,l,d){for(var w=[],x=l,I=this.session.getNextFoldLine(x),$=I?I.start.row:1/0;x>$&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),$=I?I.start.row:1/0),!(x>d);){var S=this.$lines.createCell(x,i,this.session),C=S.element;this.dom.removeChildren(C),v.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),v.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,this.session)+"px"),this.$renderLine(C,x,x==$?I:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(S),x++}return w},c.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var l=i.firstRow,d=i.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(i,l,d))},c.prototype.$renderToken=function(i,l,d,w){for(var x=this,I=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),S,C=0;S=I.exec(w);){var R=S[1],N=S[2],L=S[3],E=S[4],B=S[5];if(!(!x.showSpaces&&N)){var P=C!=S.index?w.slice(C,S.index):"";if(C=S.index+S[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),R){var O=x.session.getScreenTabSize(l+S.index),_=x.$tabStrings[O].cloneNode(!0);_.charCount=1,$.appendChild(_),l+=O-1}else if(N)if(x.showSpaces){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space",k.textContent=b.stringRepeat(x.SPACE_CHAR,N.length),$.appendChild(k)}else $.appendChild(this.dom.createTextNode(N,this.element));else if(L){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space ace_invalid",k.textContent=b.stringRepeat(x.SPACE_CHAR,L.length),$.appendChild(k)}else if(E){l+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=x.showSpaces?x.SPACE_CHAR:E,$.appendChild(k)}else if(B){l+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className="ace_cjk",k.textContent=B,$.appendChild(k)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(d.type))i.appendChild($);else{var D="ace_"+d.type.replace(/\./g," ace_"),k=this.dom.createElement("span");d.type=="fold"&&(k.style.width=d.value.length*this.config.characterWidth+"px",k.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),k.className=D,k.appendChild($),i.appendChild(k)}return l+w.length},c.prototype.renderIndentGuide=function(i,l,d){var w=l.search(this.$indentGuideRe);if(w<=0||w>=d)return l;if(l[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,I=0;I<x;I++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}else if(l[0]==" "){for(var I=0;I<w;I++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}return this.$highlightIndentGuide(),l},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var l=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,w=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:l.row};var x=this.session.$bracketHighlight;if(x){for(var I=this.session.$bracketHighlight.ranges,$=0;$<I.length;$++)if(l.row!==I[$].start.row){this.$highlightIndentGuideMarker.end=I[$].start.row+1,l.row>I[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[l.row]!==""&&l.column===i[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=l.row+1;$<i.length;$++){var S=i[$],C=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=$,C<=d))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<i.length;l++)i[l].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(i,l){var d=this.session.doc.getLine(i.row);if(d!==""){var w=i.element;if(i.element.classList&&i.element.classList.contains("ace_line_group"))if(i.element.childNodes.length>0)w=i.element.childNodes[0];else return;var x=w.childNodes;if(x){var I=x[l-1];I&&I.classList&&I.classList.contains("ace_indent-guide")&&I.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var d=0;d<i.length;d++){var w=i[d];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}else for(var d=i.length-1;d>=0;d--){var w=i[d];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}}},c.prototype.$createLineElement=function(i){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},c.prototype.$renderWrappedLine=function(i,l,d){var w=0,x=0,I=d[0],$=0,S=this.$createLineElement();i.appendChild(S);for(var C=0;C<l.length;C++){var R=l[C],N=R.value;if(C==0&&this.displayIndentGuides){if(w=N.length,N=this.renderIndentGuide(S,N,I),!N)continue;w-=N.length}if(w+N.length<I)$=this.$renderToken(S,$,R,N),w+=N.length;else{for(;w+N.length>=I;){$=this.$renderToken(S,$,R,N.substring(0,I-w)),N=N.substring(I-w),w=I,S=this.$createLineElement(),i.appendChild(S);var L=this.dom.createTextNode(b.stringRepeat(" ",d.indent),this.element);L.charCount=0,S.appendChild(L),x++,$=0,I=d[x]||Number.MAX_VALUE}N.length!=0&&(w+=N.length,$=this.$renderToken(S,$,R,N))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,$,null,"",!0)},c.prototype.$renderSimpleLine=function(i,l){for(var d=0,w=0;w<l.length;w++){var x=l[w],I=x.value;if(!(w==0&&this.displayIndentGuides&&(I=this.renderIndentGuide(i,I),!I))){if(d+I.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,d,x,I);d=this.$renderToken(i,d,x,I)}}},c.prototype.$renderOverflowMessage=function(i,l,d,w,x){d&&this.$renderToken(i,l,d,w.slice(0,this.MAX_LINE_LENGTH-l));var I=this.dom.createElement("span");I.className="ace_inline_button ace_keyword ace_toggle_wrap",I.textContent=x?"<hide>":"<click to see more...>",i.appendChild(I)},c.prototype.$renderLine=function(i,l,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(l)),d)var w=this.$getFoldLineTokens(l,d);else var w=this.session.getTokens(l);var x=i;if(w.length){var I=this.session.getRowSplitData(l);if(I&&I.length){this.$renderWrappedLine(i,w,I);var x=i.lastChild}else{var x=i;this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x));if(this.showEOL&&x){d&&(l=d.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},c.prototype.$getFoldLineTokens=function(i,l){var d=this.session,w=[];function x($,S,C){for(var R=0,N=0;N+$[R].value.length<S;)if(N+=$[R].value.length,R++,R==$.length)return;if(N!=S){var L=$[R].value.substring(S-N);L.length>C-S&&(L=L.substring(0,C-S)),w.push({type:$[R].type,value:L}),N=S+L.length,R+=1}for(;N<C&&R<$.length;){var L=$[R].value;L.length+N>C?w.push({type:$[R].type,value:L.substring(0,C-N)}):w.push($[R]),N+=L.length,R+=1}}var I=d.getTokens(i);return l.walk(function($,S,C,R,N){$!=null?w.push({type:"fold",value:$}):(N&&(I=d.getTokens(S)),I.length&&x(I,R,C))},l.end.row,this.session.getLine(l.end.row).length),w},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,g.implement(u.prototype,f),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,p){var g=e("../lib/dom"),v=function(){function b(h){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(h){for(var f=this.cursors,s=f.length;s--;)g.setStyle(f[s].style,"opacity",h?"":"0")},b.prototype.$startCssAnimation=function(){for(var h=this.cursors,f=h.length;f--;)h[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(h){this.$padding=h},b.prototype.setSession=function(h){this.session=h},b.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},b.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},b.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,g.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var h=g.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},b.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},b.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&g.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),f()},this.blinkInterval),f()}},b.prototype.getPixelPosition=function(h,f){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},b.prototype.isCursorInView=function(h,f){return h.top>=0&&h.top<f.maxHeight},b.prototype.update=function(h){this.config=h;var f=this.session.$selectionMarkers,s=0,a=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var s=0,u=f.length;s<u;s++){var c=this.getPixelPosition(f[s].cursor,!0);if(!((c.top>h.height+h.offset||c.top<0)&&s>1)){var i=this.cursors[a++]||this.addCursor(),l=i.style;this.drawCursor?this.drawCursor(i,c,h,f[s],this.session):this.isCursorInView(c,h)?(g.setStyle(l,"display","block"),g.translate(i,c.left,c.top),g.setStyle(l,"width",Math.round(h.characterWidth)+"px"),g.setStyle(l,"height",h.lineHeight+"px")):g.setStyle(l,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=c,this.restartTimer()},b.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();v.prototype.$padding=0,v.prototype.drawCursor=null,r.Cursor=v}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,p){var g=this&&this.__extends||function(){var i=function(l,d){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(w[I]=x[I])},i(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");i(l,d);function w(){this.constructor=l}l.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}(),v=e("./lib/oop"),b=e("./lib/dom"),h=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,s=32768,a=function(){function i(l,d){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return i.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},i}();v.implement(a.prototype,f);var u=function(i){g(l,i);function l(d,w){var x=i.call(this,d,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=b.scrollbarWidth(d.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var d=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-d)/(this.coeff-d)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(d){this.element.style.height=d+"px"},l.prototype.setScrollHeight=function(d){this.scrollHeight=d,d>s?(this.coeff=s/d,d=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=d+"px"},l.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},l}(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var c=function(i){g(l,i);function l(d,w){var x=i.call(this,d,"-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 l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(d){this.element.style.width=d+"px"},l.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},l}(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=c,r.VScrollBar=u,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,p){var g=this&&this.__extends||function(){var c=function(i,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,w){d.__proto__=w}||function(d,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(d[x]=w[x])},c(i,l)};return function(i,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");c(i,l);function d(){this.constructor=i}i.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),v=e("./lib/oop"),b=e("./lib/dom"),h=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
217
+ position: absolute;
218
+ background: rgba(128, 128, 128, 0.6);
219
+ -moz-box-sizing: border-box;
220
+ box-sizing: border-box;
221
+ border: 1px solid #bbb;
222
+ border-radius: 2px;
223
+ z-index: 8;
224
+ }
225
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
226
+ position: absolute;
227
+ z-index: 6;
228
+ background: none;
229
+ overflow: hidden!important;
230
+ }
231
+ .ace_editor>.ace_sb-v {
232
+ z-index: 6;
233
+ right: 0;
234
+ top: 0;
235
+ width: 12px;
236
+ }
237
+ .ace_editor>.ace_sb-v div {
238
+ z-index: 8;
239
+ right: 0;
240
+ width: 100%;
241
+ }
242
+ .ace_editor>.ace_sb-h {
243
+ bottom: 0;
244
+ left: 0;
245
+ height: 12px;
246
+ }
247
+ .ace_editor>.ace_sb-h div {
248
+ bottom: 0;
249
+ height: 100%;
250
+ }
251
+ .ace_editor>.ace_sb_grabbed {
252
+ z-index: 8;
253
+ background: #000;
254
+ }`,"ace_scrollbar.css",!1);var s=function(){function c(i,l){this.element=b.createElement("div"),this.element.className="ace_sb"+l,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},c}();v.implement(s.prototype,f);var a=function(c){g(i,c);function i(l,d){var w=c.call(this,l,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=l,w.width=w.VScrollWidth,w.renderer=d,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return i.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,x=d.clientY,I=function(E){x=E.clientY},$=function(){clearInterval(N)},S=d.clientY,C=this.thumbTop,R=function(){if(x!==void 0){var E=w.scrollTopFromThumbTop(C+x-S);E!==w.scrollTop&&w._emit("scroll",{data:E})}};h.capture(this.inner,I,$);var N=setInterval(R,20);return h.preventDefault(d)}var L=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),h.preventDefault(d)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(l){var d=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return d=d>>0,d<0?d=0:d>this.pageHeight-this.viewHeight&&(d=this.pageHeight-this.viewHeight),d},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(l,d){this.pageHeight===l&&!d||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},i.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=function(c){g(i,c);function i(l,d){var w=c.call(this,l,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=d,w}return i.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,x=d.clientX,I=function(E){x=E.clientX},$=function(){clearInterval(N)},S=d.clientX,C=this.thumbLeft,R=function(){if(x!==void 0){var E=w.scrollLeftFromThumbLeft(C+x-S);E!==w.scrollLeft&&w._emit("scroll",{data:E})}};h.capture(this.inner,I,$);var N=setInterval(R,20);return h.preventDefault(d)}var L=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),h.preventDefault(d)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(l){var d=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return d=d>>0,d<0?d=0:d>this.pageWidth-this.viewWidth&&(d=this.pageWidth-this.viewWidth),d},i.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(l,d){this.pageWidth===l&&!d||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},i.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i}(s);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,p){var g=e("./lib/event"),v=function(){function b(h,f){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var s=this;this._flush=function(a){s.pending=!1;var u=s.changes;if(u&&(g.blockIdle(100),s.changes=0,s.onRender(u)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return b.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(h){var f=this.changes;return this.changes=0,f},b}();r.RenderLoop=v}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/dom"),b=e("../lib/lang"),h=e("../lib/event"),f=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",c=200,i=function(){function l(d){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),d.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(d,w){d.width=d.height="auto",d.left=d.top="0px",d.visibility="hidden",d.position="absolute",d.whiteSpace="pre",f.isIE<8?d["font-family"]="inherit":d.font="inherit",d.overflow=w?"hidden":"visible"},l.prototype.checkForSizeChanges=function(d){if(d===void 0&&(d=this.$measureSizes()),d&&(this.$characterSize.width!==d.width||this.$characterSize.height!==d.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=d,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===d.width&&w.height===d.height,this._emit("changeCharacterSize",{data:d})}},l.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(w){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var d=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){d.checkForSizeChanges(),h.onIdle(w,500)},500)},l.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(d){var w={height:(d||this.$measureNode).clientHeight,width:(d||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},l.prototype.$measureCharWidth=function(d){this.$main.textContent=b.stringRepeat(d,a);var w=this.$main.getBoundingClientRect();return w.width/a},l.prototype.getCharacterWidth=function(d){var w=this.charSizes[d];return w===void 0&&(w=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),w},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var d=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=v.buildDom([d(0,0),d(c,0),d(0,c),d(c,c)],this.el)},l.prototype.transformCoordinates=function(d,w){if(d){var x=this.$getZoom(this.el);d=C(1/x,d)}function I(X,ee,de){var te=X[1]*ee[0]-X[0]*ee[1];return[(-ee[1]*de[0]+ee[0]*de[1])/te,(+X[1]*de[0]-X[0]*de[1])/te]}function $(X,ee){return[X[0]-ee[0],X[1]-ee[1]]}function S(X,ee){return[X[0]+ee[0],X[1]+ee[1]]}function C(X,ee){return[X*ee[0],X*ee[1]]}this.els||this.$initTransformMeasureNodes();function R(X){var ee=X.getBoundingClientRect();return[ee.left,ee.top]}var N=R(this.els[0]),L=R(this.els[1]),E=R(this.els[2]),B=R(this.els[3]),P=I($(B,L),$(B,E),$(S(L,E),S(B,N))),O=C(1+P[0],$(L,N)),_=C(1+P[1],$(E,N));if(w){var k=w,D=P[0]*k[0]/c+P[1]*k[1]/c+1,z=S(C(k[0],O),C(k[1],_));return S(C(1/D/c,z),N)}var U=$(d,N),q=I($(O,C(P[0],U)),$(_,C(P[1],U)),U);return C(c,q)},l}();i.prototype.$characterSize={width:0,height:0},g.implement(i.prototype,s),r.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,p){p.exports=`
255
+ .ace_br1 {border-top-left-radius : 3px;}
256
+ .ace_br2 {border-top-right-radius : 3px;}
257
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
258
+ .ace_br4 {border-bottom-right-radius: 3px;}
259
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
260
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
261
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
262
+ .ace_br8 {border-bottom-left-radius : 3px;}
263
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
264
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
265
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
266
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+
271
+
272
+ .ace_editor {
273
+ position: relative;
274
+ overflow: hidden;
275
+ padding: 0;
276
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
277
+ direction: ltr;
278
+ text-align: left;
279
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
280
+ forced-color-adjust: none;
281
+ }
282
+
283
+ .ace_scroller {
284
+ position: absolute;
285
+ overflow: hidden;
286
+ top: 0;
287
+ bottom: 0;
288
+ background-color: inherit;
289
+ -ms-user-select: none;
290
+ -moz-user-select: none;
291
+ -webkit-user-select: none;
292
+ user-select: none;
293
+ cursor: text;
294
+ }
295
+
296
+ .ace_content {
297
+ position: absolute;
298
+ box-sizing: border-box;
299
+ min-width: 100%;
300
+ contain: style size layout;
301
+ font-variant-ligatures: no-common-ligatures;
302
+ }
303
+ .ace_invisible {
304
+ font-variant-ligatures: none;
305
+ }
306
+
307
+ .ace_keyboard-focus:focus {
308
+ box-shadow: inset 0 0 0 2px #5E9ED6;
309
+ outline: none;
310
+ }
311
+
312
+ .ace_dragging .ace_scroller:before{
313
+ position: absolute;
314
+ top: 0;
315
+ left: 0;
316
+ right: 0;
317
+ bottom: 0;
318
+ content: '';
319
+ background: rgba(250, 250, 250, 0.01);
320
+ z-index: 1000;
321
+ }
322
+ .ace_dragging.ace_dark .ace_scroller:before{
323
+ background: rgba(0, 0, 0, 0.01);
324
+ }
325
+
326
+ .ace_gutter {
327
+ position: absolute;
328
+ overflow : hidden;
329
+ width: auto;
330
+ top: 0;
331
+ bottom: 0;
332
+ left: 0;
333
+ cursor: default;
334
+ z-index: 4;
335
+ -ms-user-select: none;
336
+ -moz-user-select: none;
337
+ -webkit-user-select: none;
338
+ user-select: none;
339
+ contain: style size layout;
340
+ }
341
+
342
+ .ace_gutter-active-line {
343
+ position: absolute;
344
+ left: 0;
345
+ right: 0;
346
+ }
347
+
348
+ .ace_scroller.ace_scroll-left:after {
349
+ content: "";
350
+ position: absolute;
351
+ top: 0;
352
+ right: 0;
353
+ bottom: 0;
354
+ left: 0;
355
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
356
+ pointer-events: none;
357
+ }
358
+
359
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
360
+ position: absolute;
361
+ top: 0;
362
+ left: 0;
363
+ right: 0;
364
+ padding-left: 19px;
365
+ padding-right: 6px;
366
+ background-repeat: no-repeat;
367
+ }
368
+
369
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
370
+ margin-left: -14px;
371
+ float: left;
372
+ }
373
+
374
+ .ace_gutter-cell .ace_gutter_annotation {
375
+ margin-left: -19px;
376
+ float: left;
377
+ }
378
+
379
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
380
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
381
+ background-repeat: no-repeat;
382
+ background-position: 2px center;
383
+ }
384
+
385
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
386
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
387
+ background-repeat: no-repeat;
388
+ background-position: 2px center;
389
+ }
390
+
391
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
392
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
393
+ background-repeat: no-repeat;
394
+ background-position: 2px center;
395
+ }
396
+
397
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
398
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
399
+ }
400
+
401
+ .ace_icon_svg.ace_error {
402
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
403
+ background-color: crimson;
404
+ }
405
+ .ace_icon_svg.ace_security {
406
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
407
+ background-color: crimson;
408
+ }
409
+ .ace_icon_svg.ace_warning {
410
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
411
+ background-color: darkorange;
412
+ }
413
+ .ace_icon_svg.ace_info {
414
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
415
+ background-color: royalblue;
416
+ }
417
+ .ace_icon_svg.ace_hint {
418
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
419
+ background-color: silver;
420
+ }
421
+
422
+ .ace_icon_svg.ace_error_fold {
423
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
424
+ background-color: crimson;
425
+ }
426
+ .ace_icon_svg.ace_security_fold {
427
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
428
+ background-color: crimson;
429
+ }
430
+ .ace_icon_svg.ace_warning_fold {
431
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
432
+ background-color: darkorange;
433
+ }
434
+
435
+ .ace_scrollbar {
436
+ contain: strict;
437
+ position: absolute;
438
+ right: 0;
439
+ bottom: 0;
440
+ z-index: 6;
441
+ }
442
+
443
+ .ace_scrollbar-inner {
444
+ position: absolute;
445
+ cursor: text;
446
+ left: 0;
447
+ top: 0;
448
+ }
449
+
450
+ .ace_scrollbar-v{
451
+ overflow-x: hidden;
452
+ overflow-y: scroll;
453
+ top: 0;
454
+ }
455
+
456
+ .ace_scrollbar-h {
457
+ overflow-x: scroll;
458
+ overflow-y: hidden;
459
+ left: 0;
460
+ }
461
+
462
+ .ace_print-margin {
463
+ position: absolute;
464
+ height: 100%;
465
+ }
466
+
467
+ .ace_text-input {
468
+ position: absolute;
469
+ z-index: 0;
470
+ width: 0.5em;
471
+ height: 1em;
472
+ opacity: 0;
473
+ background: transparent;
474
+ -moz-appearance: none;
475
+ appearance: none;
476
+ border: none;
477
+ resize: none;
478
+ outline: none;
479
+ overflow: hidden;
480
+ font: inherit;
481
+ padding: 0 1px;
482
+ margin: 0 -1px;
483
+ contain: strict;
484
+ -ms-user-select: text;
485
+ -moz-user-select: text;
486
+ -webkit-user-select: text;
487
+ user-select: text;
488
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
489
+ white-space: pre!important;
490
+ }
491
+ .ace_text-input.ace_composition {
492
+ background: transparent;
493
+ color: inherit;
494
+ z-index: 1000;
495
+ opacity: 1;
496
+ }
497
+ .ace_composition_placeholder { color: transparent }
498
+ .ace_composition_marker {
499
+ border-bottom: 1px solid;
500
+ position: absolute;
501
+ border-radius: 0;
502
+ margin-top: 1px;
503
+ }
504
+
505
+ [ace_nocontext=true] {
506
+ transform: none!important;
507
+ filter: none!important;
508
+ clip-path: none!important;
509
+ mask : none!important;
510
+ contain: none!important;
511
+ perspective: none!important;
512
+ mix-blend-mode: initial!important;
513
+ z-index: auto;
514
+ }
515
+
516
+ .ace_layer {
517
+ z-index: 1;
518
+ position: absolute;
519
+ overflow: hidden;
520
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
521
+ word-wrap: normal;
522
+ white-space: pre;
523
+ height: 100%;
524
+ width: 100%;
525
+ box-sizing: border-box;
526
+ /* setting pointer-events: auto; on node under the mouse, which changes
527
+ during scroll, will break mouse wheel scrolling in Safari */
528
+ pointer-events: none;
529
+ }
530
+
531
+ .ace_gutter-layer {
532
+ position: relative;
533
+ width: auto;
534
+ text-align: right;
535
+ pointer-events: auto;
536
+ height: 1000000px;
537
+ contain: style size layout;
538
+ }
539
+
540
+ .ace_text-layer {
541
+ font: inherit !important;
542
+ position: absolute;
543
+ height: 1000000px;
544
+ width: 1000000px;
545
+ contain: style size layout;
546
+ }
547
+
548
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
549
+ contain: style size layout;
550
+ position: absolute;
551
+ top: 0;
552
+ left: 0;
553
+ right: 0;
554
+ }
555
+
556
+ .ace_hidpi .ace_text-layer,
557
+ .ace_hidpi .ace_gutter-layer,
558
+ .ace_hidpi .ace_content,
559
+ .ace_hidpi .ace_gutter {
560
+ contain: strict;
561
+ }
562
+ .ace_hidpi .ace_text-layer > .ace_line,
563
+ .ace_hidpi .ace_text-layer > .ace_line_group {
564
+ contain: strict;
565
+ }
566
+
567
+ .ace_cjk {
568
+ display: inline-block;
569
+ text-align: center;
570
+ }
571
+
572
+ .ace_cursor-layer {
573
+ z-index: 4;
574
+ }
575
+
576
+ .ace_cursor {
577
+ z-index: 4;
578
+ position: absolute;
579
+ box-sizing: border-box;
580
+ border-left: 2px solid;
581
+ /* workaround for smooth cursor repaintng whole screen in chrome */
582
+ transform: translatez(0);
583
+ }
584
+
585
+ .ace_multiselect .ace_cursor {
586
+ border-left-width: 1px;
587
+ }
588
+
589
+ .ace_slim-cursors .ace_cursor {
590
+ border-left-width: 1px;
591
+ }
592
+
593
+ .ace_overwrite-cursors .ace_cursor {
594
+ border-left-width: 0;
595
+ border-bottom: 1px solid;
596
+ }
597
+
598
+ .ace_hidden-cursors .ace_cursor {
599
+ opacity: 0.2;
600
+ }
601
+
602
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
603
+ opacity: 0;
604
+ }
605
+
606
+ .ace_smooth-blinking .ace_cursor {
607
+ transition: opacity 0.18s;
608
+ }
609
+
610
+ .ace_animate-blinking .ace_cursor {
611
+ animation-duration: 1000ms;
612
+ animation-timing-function: step-end;
613
+ animation-name: blink-ace-animate;
614
+ animation-iteration-count: infinite;
615
+ }
616
+
617
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
618
+ animation-duration: 1000ms;
619
+ animation-timing-function: ease-in-out;
620
+ animation-name: blink-ace-animate-smooth;
621
+ }
622
+
623
+ @keyframes blink-ace-animate {
624
+ from, to { opacity: 1; }
625
+ 60% { opacity: 0; }
626
+ }
627
+
628
+ @keyframes blink-ace-animate-smooth {
629
+ from, to { opacity: 1; }
630
+ 45% { opacity: 1; }
631
+ 60% { opacity: 0; }
632
+ 85% { opacity: 0; }
633
+ }
634
+
635
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
636
+ position: absolute;
637
+ z-index: 3;
638
+ }
639
+
640
+ .ace_marker-layer .ace_selection {
641
+ position: absolute;
642
+ z-index: 5;
643
+ }
644
+
645
+ .ace_marker-layer .ace_bracket {
646
+ position: absolute;
647
+ z-index: 6;
648
+ }
649
+
650
+ .ace_marker-layer .ace_error_bracket {
651
+ position: absolute;
652
+ border-bottom: 1px solid #DE5555;
653
+ border-radius: 0;
654
+ }
655
+
656
+ .ace_marker-layer .ace_active-line {
657
+ position: absolute;
658
+ z-index: 2;
659
+ }
660
+
661
+ .ace_marker-layer .ace_selected-word {
662
+ position: absolute;
663
+ z-index: 4;
664
+ box-sizing: border-box;
665
+ }
666
+
667
+ .ace_line .ace_fold {
668
+ box-sizing: border-box;
669
+
670
+ display: inline-block;
671
+ height: 11px;
672
+ margin-top: -2px;
673
+ vertical-align: middle;
674
+
675
+ background-image:
676
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
677
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
678
+ background-repeat: no-repeat, repeat-x;
679
+ background-position: center center, top left;
680
+ color: transparent;
681
+
682
+ border: 1px solid black;
683
+ border-radius: 2px;
684
+
685
+ cursor: pointer;
686
+ pointer-events: auto;
687
+ }
688
+
689
+ .ace_dark .ace_fold {
690
+ }
691
+
692
+ .ace_fold:hover{
693
+ background-image:
694
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
695
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
696
+ }
697
+
698
+ .ace_tooltip {
699
+ background-color: #f5f5f5;
700
+ border: 1px solid gray;
701
+ border-radius: 1px;
702
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
703
+ color: black;
704
+ padding: 3px 4px;
705
+ position: absolute;
706
+ z-index: 999999;
707
+ box-sizing: border-box;
708
+ cursor: default;
709
+ white-space: pre-wrap;
710
+ word-wrap: break-word;
711
+ line-height: normal;
712
+ font-style: normal;
713
+ font-weight: normal;
714
+ letter-spacing: normal;
715
+ pointer-events: none;
716
+ overflow: auto;
717
+ max-width: min(33em, 66vw);
718
+ overscroll-behavior: contain;
719
+ }
720
+ .ace_tooltip pre {
721
+ white-space: pre-wrap;
722
+ }
723
+
724
+ .ace_tooltip.ace_dark {
725
+ background-color: #636363;
726
+ color: #fff;
727
+ }
728
+
729
+ .ace_tooltip:focus {
730
+ outline: 1px solid #5E9ED6;
731
+ }
732
+
733
+ .ace_icon {
734
+ display: inline-block;
735
+ width: 18px;
736
+ vertical-align: top;
737
+ }
738
+
739
+ .ace_icon_svg {
740
+ display: inline-block;
741
+ width: 12px;
742
+ vertical-align: top;
743
+ -webkit-mask-repeat: no-repeat;
744
+ -webkit-mask-size: 12px;
745
+ -webkit-mask-position: center;
746
+ }
747
+
748
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
749
+ padding-right: 13px;
750
+ }
751
+
752
+ .ace_fold-widget, .ace_custom-widget {
753
+ box-sizing: border-box;
754
+
755
+ margin: 0 -12px 0 1px;
756
+ display: none;
757
+ width: 11px;
758
+ vertical-align: top;
759
+
760
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
761
+ background-repeat: no-repeat;
762
+ background-position: center;
763
+
764
+ border-radius: 3px;
765
+
766
+ border: 1px solid transparent;
767
+ cursor: pointer;
768
+ pointer-events: auto;
769
+ }
770
+
771
+ .ace_custom-widget {
772
+ background: none;
773
+ }
774
+
775
+ .ace_folding-enabled .ace_fold-widget {
776
+ display: inline-block;
777
+ }
778
+
779
+ .ace_fold-widget.ace_end {
780
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
781
+ }
782
+
783
+ .ace_fold-widget.ace_closed {
784
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
785
+ }
786
+
787
+ .ace_fold-widget:hover {
788
+ border: 1px solid rgba(0, 0, 0, 0.3);
789
+ background-color: rgba(255, 255, 255, 0.2);
790
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
791
+ }
792
+
793
+ .ace_fold-widget:active {
794
+ border: 1px solid rgba(0, 0, 0, 0.4);
795
+ background-color: rgba(0, 0, 0, 0.05);
796
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
797
+ }
798
+ /**
799
+ * Dark version for fold widgets
800
+ */
801
+ .ace_dark .ace_fold-widget {
802
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
803
+ }
804
+ .ace_dark .ace_fold-widget.ace_end {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_closed {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget:hover {
811
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
812
+ background-color: rgba(255, 255, 255, 0.1);
813
+ }
814
+ .ace_dark .ace_fold-widget:active {
815
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
816
+ }
817
+
818
+ .ace_inline_button {
819
+ border: 1px solid lightgray;
820
+ display: inline-block;
821
+ margin: -1px 8px;
822
+ padding: 0 5px;
823
+ pointer-events: auto;
824
+ cursor: pointer;
825
+ }
826
+ .ace_inline_button:hover {
827
+ border-color: gray;
828
+ background: rgba(200,200,200,0.2);
829
+ display: inline-block;
830
+ pointer-events: auto;
831
+ }
832
+
833
+ .ace_fold-widget.ace_invalid {
834
+ background-color: #FFB4B4;
835
+ border-color: #DE5555;
836
+ }
837
+
838
+ .ace_fade-fold-widgets .ace_fold-widget {
839
+ transition: opacity 0.4s ease 0.05s;
840
+ opacity: 0;
841
+ }
842
+
843
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
844
+ transition: opacity 0.05s ease 0.05s;
845
+ opacity:1;
846
+ }
847
+
848
+ .ace_underline {
849
+ text-decoration: underline;
850
+ }
851
+
852
+ .ace_bold {
853
+ font-weight: bold;
854
+ }
855
+
856
+ .ace_nobold .ace_bold {
857
+ font-weight: normal;
858
+ }
859
+
860
+ .ace_italic {
861
+ font-style: italic;
862
+ }
863
+
864
+
865
+ .ace_error-marker {
866
+ background-color: rgba(255, 0, 0,0.2);
867
+ position: absolute;
868
+ z-index: 9;
869
+ }
870
+
871
+ .ace_highlight-marker {
872
+ background-color: rgba(255, 255, 0,0.2);
873
+ position: absolute;
874
+ z-index: 8;
875
+ }
876
+
877
+ .ace_mobile-menu {
878
+ position: absolute;
879
+ line-height: 1.5;
880
+ border-radius: 4px;
881
+ -ms-user-select: none;
882
+ -moz-user-select: none;
883
+ -webkit-user-select: none;
884
+ user-select: none;
885
+ background: white;
886
+ box-shadow: 1px 3px 2px grey;
887
+ border: 1px solid #dcdcdc;
888
+ color: black;
889
+ }
890
+ .ace_dark > .ace_mobile-menu {
891
+ background: #333;
892
+ color: #ccc;
893
+ box-shadow: 1px 3px 2px grey;
894
+ border: 1px solid #444;
895
+
896
+ }
897
+ .ace_mobile-button {
898
+ padding: 2px;
899
+ cursor: pointer;
900
+ overflow: hidden;
901
+ }
902
+ .ace_mobile-button:hover {
903
+ background-color: #eee;
904
+ opacity:1;
905
+ }
906
+ .ace_mobile-button:active {
907
+ background-color: #ddd;
908
+ }
909
+
910
+ .ace_placeholder {
911
+ position: relative;
912
+ font-family: arial;
913
+ transform: scale(0.9);
914
+ transform-origin: left;
915
+ white-space: pre;
916
+ opacity: 0.7;
917
+ margin: 0 10px;
918
+ z-index: 1;
919
+ }
920
+
921
+ .ace_ghost_text {
922
+ opacity: 0.5;
923
+ font-style: italic;
924
+ }
925
+
926
+ .ace_ghost_text_container > div {
927
+ white-space: pre;
928
+ }
929
+
930
+ .ghost_text_line_wrapped::after {
931
+ content: "↩";
932
+ position: absolute;
933
+ }
934
+
935
+ .ace_lineWidgetContainer.ace_ghost_text {
936
+ margin: 0px 4px
937
+ }
938
+
939
+ .ace_screenreader-only {
940
+ position:absolute;
941
+ left:-10000px;
942
+ top:auto;
943
+ width:1px;
944
+ height:1px;
945
+ overflow:hidden;
946
+ }
947
+
948
+ .ace_hidden_token {
949
+ display: none;
950
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,p){var g=e("../lib/dom"),v=e("../lib/oop"),b=e("../lib/event_emitter").EventEmitter,h=function(){function f(s,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.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(s)}return f.prototype.$createCanvas=function(){this.canvas=g.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var u=this.canvas.getContext("2d");function c(O,_){return O.priority<_.priority?-1:O.priority>_.priority?1:0}var i=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),i){var l={info:1,warning:2,error:3};i.forEach(function(O){O.priority=l[O.type]||null}),i=i.sort(c);for(var d=0;d<i.length;d++){var w=i[d].row,x=this.getVerticalOffsetForRow(w),I=x+this.lineHeight,$=Math.round(this.heightRatio*x),S=Math.round(this.heightRatio*I),C=Math.round(($+S)/2),R=S-C;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),C-R<0&&(C=R),C+R>this.canvasHeight&&(C=this.canvasHeight-R);var N=C-R,L=C+R,E=L-N;u.fillStyle=a[i[d].type]||null,u.fillRect(0,N,Math.round(this.oneZoneWidth-1),E)}}var B=this.renderer.session.selection.getCursor();if(B){var P=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,P,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},f.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.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}();v.implement(h.prototype,b),r.Decorator=h}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,r,p){var g=e("./lib/oop"),v=e("./lib/dom"),b=e("./lib/lang"),h=e("./config"),f=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,a=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,i=e("./scrollbar").VScrollBar,l=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,I=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),S=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;v.importCssString($,"ace_editor.css",!1);var N=function(){function L(E,B){var P=this;this.container=E||v.createElement("div"),v.addCssClass(this.container,"ace_editor"),v.HI_DPI&&v.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=v.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=v.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=v.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 s(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollTop(_.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollLeft(_.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._signal("renderer",this)}return L.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),v.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},L.prototype.updateLines=function(E,B,P){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:E,lastRow:B},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(E,B,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var _=this.container;O||(O=_.clientHeight||_.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",O=_.clientHeight||_.scrollHeight),P||(P=_.clientWidth||_.scrollWidth);var k=this.$updateCachedSize(E,B,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(k|this.$changes,!0):this.$loop.schedule(k|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(E,B,P,O){O-=this.$extraHeight||0;var _=0,k=this.$size,D={width:k.width,height:k.height,scrollerHeight:k.scrollerHeight,scrollerWidth:k.scrollerWidth};if(O&&(E||k.height!=O)&&(k.height=O,_|=this.CHANGE_SIZE,k.scrollerHeight=k.height,this.$horizScroll&&(k.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(k.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),P&&(E||k.width!=P)){_|=this.CHANGE_SIZE,k.width=P,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,v.setStyle(this.scrollBarH.element.style,"left",B+"px"),v.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),k.scrollerWidth=Math.max(0,P-B-this.scrollBarV.getWidth()-this.margin.h),v.setStyle(this.$gutter.style,"left",this.margin.left+"px");var z=this.scrollBarV.getWidth()+"px";v.setStyle(this.scrollBarH.element.style,"right",z),v.setStyle(this.scroller.style,"right",z),v.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(k.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(_|=this.CHANGE_FULL)}return k.$dirty=!P||!O,_&&this._signal("resize",D),_},L.prototype.onGutterResize=function(E){var B=this.$showGutter?E: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()},L.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},L.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},L.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=v.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=v.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,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()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){v.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){B&&B.markerRange&&(P=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var O=this.layerConfig,_=P.top,k=P.left;_-=O.offset;var D=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if(_<0||_>O.height-D){v.translate(this.textarea,0,0);return}var z=1,U=this.$size.height-D;if(!B)_+=this.lineHeight;else if(B.useTextareaForIME){var q=this.textarea.value;z=this.characterWidth*this.session.$getStringScreenWidth(q)[0]}else _+=this.lineHeight+2;k-=this.scrollLeft,k>this.$size.scrollerWidth-z&&(k=this.$size.scrollerWidth-z),k+=this.gutterWidth+this.margin.left,v.setStyle(E,"height",D+"px"),v.setStyle(E,"width",z+"px"),v.translate(this.textarea,Math.min(k,this.$size.scrollerWidth-z),Math.min(_,U))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,B=E.lastRow,P=this.session.documentToScreenRow(B,0)*E.lineHeight;return P-this.session.getScrollTop()>E.height-E.lineHeight?B-1:B},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(E,B,P,O){var _=this.scrollMargin;_.top=E|0,_.bottom=B|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},L.prototype.setMargin=function(E,B,P,O){var _=this.margin;_.top=E|0,_.bottom=B|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},L.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-B&&(E=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(E,B){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!B){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),v.translate(this.content,-this.scrollLeft,-P.offset);var _=P.width+2*this.$padding+"px",k=P.minHeight+"px";v.setStyle(this.content.style,"width",_),v.setStyle(this.content.style,"height",k)}if(E&this.CHANGE_H_SCROLL&&(v.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",E)},L.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,P=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,_=!O&&E>B;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var k=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,k,P),this.desiredHeight=P,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var E=this.session,B=this.$size,P=B.height<=2*this.lineHeight,O=this.session.getScreenLength(),_=O*this.lineHeight,k=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-k-2*this.$padding<0),z=this.$horizScroll!==D;z&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=B.height<=2*this.lineHeight);var q=B.scrollerHeight+this.lineHeight,X=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=X;var ee=this.scrollMargin;this.session.setScrollTop(Math.max(-ee.top,Math.min(this.scrollTop,_-B.scrollerHeight+ee.bottom))),this.session.setScrollLeft(Math.max(-ee.left,Math.min(this.scrollLeft,k+2*this.$padding-B.scrollerWidth+ee.right)));var de=!P&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-_+X<0||this.scrollTop>ee.top),te=U!==de;te&&(this.$vScroll=de,this.scrollBarV.setVisible(de));var le=this.scrollTop%this.lineHeight,se=Math.ceil(q/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),me=ue+se,_e,Te,Me=this.lineHeight;ue=E.screenToDocumentRow(ue,0);var Xe=E.getFoldLine(ue);Xe&&(ue=Xe.start.row),_e=E.documentToScreenRow(ue,0),Te=E.getRowLength(ue)*Me,me=Math.min(E.screenToDocumentRow(me,0),E.getLength()-1),q=B.scrollerHeight+E.getRowLength(me)*Me+Te,le=this.scrollTop-_e*Me,le<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(le/Me)),le=this.scrollTop-_e*Me);var Ue=0;return(this.layerConfig.width!=k||z)&&(Ue=this.CHANGE_H_SCROLL),(z||te)&&(Ue|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),te&&(k=this.$getLongestLine())),this.layerConfig={width:k,padding:this.$padding,firstRow:ue,firstRowScreen:_e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:q,maxHeight:_,offset:le,gutterOffset:Me?Math.max(0,Math.ceil((le+B.height-B.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(k-this.$padding),Ue},L.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(E>P.lastRow+1)&&!(B<P.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,E,B),!0}}},L.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(E,B){this.$gutterLayer.addGutterDecoration(E,B)},L.prototype.removeGutterDecoration=function(E,B){this.$gutterLayer.removeGutterDecoration(E,B)},L.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(E,B,P){this.scrollCursorIntoView(E,P),this.scrollCursorIntoView(B,P)},L.prototype.scrollCursorIntoView=function(E,B,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(E),_=O.left,k=O.top,D=P&&P.top||0,z=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>k?(B&&U+D>k+this.lineHeight&&(k-=B*this.$size.scrollerHeight),k===0&&(k=-this.scrollMargin.top),this.session.setScrollTop(k)):U+this.$size.scrollerHeight-z<k+this.lineHeight&&(B&&U+this.$size.scrollerHeight-z<k-this.lineHeight&&(k+=B*this.$size.scrollerHeight),this.session.setScrollTop(k+this.lineHeight+z-this.$size.scrollerHeight));var q=this.scrollLeft,X=2*this.layerConfig.characterWidth;_-X<q?(_-=X,_<this.$padding+X&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=X,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))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},L.prototype.alignCursor=function(E,B){typeof E=="number"&&(E={row:E,column:0});var P=this.$cursorLayer.getPixelPosition(E),O=this.$size.scrollerHeight-this.lineHeight,_=P.top-O*(B||0);return this.session.setScrollTop(_),_},L.prototype.$calcSteps=function(E,B){var P=0,O=this.STEPS,_=[],k=function(D,z,U){return U*(Math.pow(D-1,3)+1)+z};for(P=0;P<O;++P)_.push(k(P/this.STEPS,E,B-E));return _},L.prototype.scrollToLine=function(E,B,P,O){var _=this.$cursorLayer.getPixelPosition({row:E,column:0}),k=_.top;B&&(k-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(k),P!==!1&&this.animateScrolling(D,O)},L.prototype.animateScrolling=function(E,B){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(E==P)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(E=_[0],E==P))return}var k=O.$calcSteps(E,P);this.$scrollAnimation={from:E,to:P,steps:k},clearInterval(this.$timer),O.session.setScrollTop(k.shift()),O.session.$scrollTop=P;function D(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(O.$stopAnimation){D();return}if(!O.session)return clearInterval(O.$timer);k.length?(O.session.setScrollTop(k.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):D()},10)},L.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},L.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(E,B){this.session.setScrollTop(B),this.session.setScrollLeft(E)},L.prototype.scrollBy=function(E,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},L.prototype.isScrollableBy=function(E,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||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(E,B){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,B]);E=O[1]-this.gutterWidth-this.margin.left,B=O[0]}else P=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-P.left-this.$padding,k=_/this.characterWidth,D=Math.floor((B+this.scrollTop-P.top)/this.lineHeight),z=this.$blockCursor?Math.floor(k):Math.round(k);return{row:D,column:z,side:k-z>0?1:-1,offsetX:_}},L.prototype.screenToTextCoordinates=function(E,B){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,B]);E=O[1]-this.gutterWidth-this.margin.left,B=O[0]}else P=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-P.left-this.$padding,k=_/this.characterWidth,D=this.$blockCursor?Math.floor(k):Math.round(k),z=Math.floor((B+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(z,Math.max(D,0),_)},L.prototype.textToScreenCoordinates=function(E,B){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(E,B),_=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,E)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),k=O.row*this.lineHeight;return{pageX:P.left+_-this.scrollLeft,pageY:P.top+k-this.scrollTop}},L.prototype.visualizeFocus=function(){v.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){v.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(v.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(E){var B=this.session.selection.cursor;this.addToken(E,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),v.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(E,B){var P=this.session.selection.cursor,O=B||{row:P.row,column:P.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(E,O);this.addToken(_[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:E,position:{row:O.row,column:O.column}};var k=v.createElement("div");if(_.length>1){var D=this.hideTokensAfterPosition(O.row,O.column),z;_.slice(1).forEach(function(te){var le=v.createElement("div"),se=v.createElement("span");se.className="ace_ghost_text",te.wrapped&&(le.className="ghost_text_line_wrapped"),te.text.length===0&&(te.text=" "),se.appendChild(v.createTextNode(te.text)),le.appendChild(se),k.appendChild(le),z=le}),D.forEach(function(te){var le=v.createElement("span");R(te.type)||(le.className="ace_"+te.type.replace(/\./g," ace_")),le.appendChild(v.createTextNode(te.value)),z.appendChild(le)}),this.$ghostTextWidget={el:k,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),q=this.container,X=q.getBoundingClientRect().height,ee=_.length*this.lineHeight,de=ee<X-U.top;if(de)return;ee<X?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollToRow(O.row)}},L.prototype.$calculateWrappedTextChunks=function(E,B){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var _=E.split(/\r?\n/),k=[],D=0;D<_.length;D++){var z=this.session.$getDisplayTokens(_[D],B.column),U=this.session.$computeWrapSplits(z,O,this.session.$tabSize);if(U.length>0){var q=0;U.push(_[D].length);for(var X=0;X<U.length;X++){var ee=_[D].slice(q,U[X]);k.push({text:ee,wrapped:!0}),q=U[X]}}else k.push({text:_[D],wrapped:!1})}return k},L.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(E,B,P,O){var _=this.session;_.bgTokenizer.lines[P]=null;var k={type:B,value:E},D=_.getTokens(P);if(O==null||!D.length)D.push(k);else for(var z=0,U=0;U<D.length;U++){var q=D[U];if(z+=q.value.length,O<=z){var X=q.value.length-(z-O),ee=q.value.slice(0,X),de=q.value.slice(X);D.splice(U,1,{type:q.type,value:ee},k,{type:q.type,value:de});break}}this.updateLines(P,P)},L.prototype.hideTokensAfterPosition=function(E,B){for(var P=this.session.getTokens(E),O=0,_=!1,k=[],D=0;D<P.length;D++){var z=P[D];if(O+=z.value.length,z.type!=="ghost_text"){if(_){k.push({type:z.type,value:z.value}),z.type="hidden_token";continue}O===B&&(_=!0)}}return this.updateLines(E,E),k},L.prototype.removeExtraToken=function(E,B){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},L.prototype.setTheme=function(E,B){var P=this;if(this.$themeId=E,P._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var O=E||this.$options.theme.initialValue;h.loadModule(["theme",O],_)}else _(E);function _(k){if(P.$themeId!=E)return B&&B();if(!k||!k.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");k.$id&&(P.$themeId=k.$id),v.importCssString(k.cssText,k.cssClass,P.container),P.theme&&v.removeCssClass(P.container,P.theme.cssClass);var D="padding"in k?k.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&D!=P.$padding&&P.setPadding(D),P.$theme=k.cssClass,P.theme=k,v.addCssClass(P.container,k.cssClass),v.setCssClass(P.container,"ace_dark",k.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:k}),B&&B(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(E,B){v.setCssClass(this.container,E,B!==!1)},L.prototype.unsetStyle=function(E){v.removeCssClass(this.container,E)},L.prototype.setCursorStyle=function(E){v.setStyle(this.scroller.style,"cursor",E)},L.prototype.setMouseCursor=function(E){v.setStyle(this.scroller.style,"cursor",E)},L.prototype.attachToShadowRoot=function(){v.importCssString($,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(E){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),E===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){B.$scrollAnimation||B.session.setScrollTop(P.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){B.$scrollAnimation||B.session.setScrollLeft(P.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){B.$scrollAnimation||B.session.setScrollTop(P.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){B.$scrollAnimation||B.session.setScrollLeft(P.data-B.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=b.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var P=B[0].contentRect.width,O=B[0].contentRect.height;Math.abs(E.$size.width-P)>1||Math.abs(E.$size.height-O)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L}();N.prototype.CHANGE_CURSOR=1,N.prototype.CHANGE_MARKER=2,N.prototype.CHANGE_GUTTER=4,N.prototype.CHANGE_SCROLL=8,N.prototype.CHANGE_LINES=16,N.prototype.CHANGE_TEXT=32,N.prototype.CHANGE_SIZE=64,N.prototype.CHANGE_MARKER_BACK=128,N.prototype.CHANGE_MARKER_FRONT=256,N.prototype.CHANGE_FULL=512,N.prototype.CHANGE_H_SCROLL=1024,N.prototype.$changes=0,N.prototype.$padding=null,N.prototype.$frozen=!1,N.prototype.STEPS=8,g.implement(N.prototype,I),h.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){v.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=N}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/net"),b=e("../lib/event_emitter").EventEmitter,h=e("../config");function f(c){var i="importScripts('"+v.qualifyURL(c)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new l;return d.append(i),d.getBlob("application/javascript")}}function s(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var i=f(c),l=window.URL||window.webkitURL,d=l.createObjectURL(i);return new Worker(d)}return new Worker(c)}var a=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){g.implement(this,b),this.$createWorkerFromOldConfig=function(c,i,l,d,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)d=d||h.moduleUrl(i,"worker");else{var x=this.$normalizePath;d=d||x(e.toUrl("ace/worker/worker.js",null,"_"));var I={};c.forEach(function($){I[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(d),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:I,module:i,classname:l}),this.$worker},this.onMessage=function(c){var i=c.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var l=this.callbacks[i.id];l&&(l(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return v.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,i){this.$worker.postMessage({command:c,args:i})},this.call=function(c,i,l){if(l){var d=this.callbackId++;this.callbacks[d]=l,i.push(d)}this.send(c,i)},this.emit=function(c,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:i.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(a.prototype);var u=function(c,i,l){var d=null,w=!1,x=Object.create(b),I=[],$=new a({messageBuffer:I,terminate:function(){},postMessage:function(C){I.push(C),d&&(w?setTimeout(S):S())}});$.setEmitSync=function(C){w=C};var S=function(){var C=I.shift();C.command?d[C.command].apply(d,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,R){this.postMessage({type:"call",id:R,data:C})},x.emit=function(C,R){this.postMessage({type:"event",name:C,data:R})},h.loadModule(["worker",i],function(C){for(d=new C[l](x);I.length;)S()}),$};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,p){var g=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,b=e("./lib/oop"),h=function(){function f(s,a,u,c,i,l){var d=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=i,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=u;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var s=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=u.addMarker(new g(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var l=a.createAnchor(i.row,i.column);l.$insertRight=!0,l.detach(),s.others.push(l)}),u.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=s.addMarker(new g(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},f.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var a=s;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,c=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,i=a.start.column-this.pos.column;if(this.updateAnchors(s),c&&(this.length+=u),c&&!this.session.$fromUndo){if(s.action==="insert")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+i};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+i};this.doc.remove(new g(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,u=function(i,l){a.removeMarker(i.markerId),i.markerId=a.addMarker(new g(i.row,i.column,i.row,i.column+s.length),l,null,!1)};u(this.pos,this.mainClass);for(var c=this.others.length;c--;)u(this.others[c],this.othersClass)}},f.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},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 s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f}();b.implement(h.prototype,v),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,p){var g=e("../lib/event"),v=e("../lib/useragent");function b(f,s){return f.row==s.row&&f.column==s.column}function h(f){var s=f.domEvent,a=s.altKey,u=s.shiftKey,c=s.ctrlKey,i=f.getAccelKey(),l=f.getButton();if(c&&v.isMac&&(l=s.button),f.editor.inMultiSelectMode&&l==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!c&&!a&&!i){l===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(l===0){var d=f.editor,w=d.selection,x=d.inMultiSelectMode,I=f.getDocumentPosition(),$=w.getCursor(),S=f.inSelection()||w.isEmpty()&&b(I,$),C=f.x,R=f.y,N=function(ee){C=ee.clientX,R=ee.clientY},L=d.session,E=d.renderer.pixelToScreenCoordinates(C,R),B=E,P;if(d.$mouseHandler.$enableJumpToDef)c&&a||i&&a?P=u?"block":"add":a&&d.$blockSelectEnabled&&(P="block");else if(i&&!a){if(P="add",!x&&u)return}else a&&d.$blockSelectEnabled&&(P="block");if(P&&v.isMac&&s.ctrlKey&&d.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&S)return;if(!x){var O=w.toOrientedRange();d.addSelectionMarker(O)}var _=w.rangeList.rangeAtPoint(I);d.inVirtualSelectionMode=!0,u&&(_=null,O=w.ranges[0]||O,d.removeSelectionMarker(O)),d.once("mouseup",function(){var ee=w.toOrientedRange();_&&ee.isEmpty()&&b(_.cursor,ee.cursor)?w.substractPoint(ee.cursor):(u?w.substractPoint(O.cursor):O&&(d.removeSelectionMarker(O),w.addRange(O)),w.addRange(ee)),d.inVirtualSelectionMode=!1})}else if(P=="block"){f.stop(),d.inVirtualSelectionMode=!0;var k,D=[],z=function(){var ee=d.renderer.pixelToScreenCoordinates(C,R),de=L.screenToDocumentPosition(ee.row,ee.column,ee.offsetX);b(B,ee)&&b(de,w.lead)||(B=ee,d.selection.moveToPosition(de),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(D),D=w.rectangularRangeBlock(B,E),d.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=d.$mouseHandler.$clickSelection.clone()),D.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};x&&!i?w.toSingleRange():!x&&i&&(k=w.toOrientedRange(),d.addSelectionMarker(k)),u?E=L.documentToScreenPosition(w.lead):w.moveToPosition(I),B={row:-1,column:-1};var U=function(ee){z(),clearInterval(X),d.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),k&&(d.removeSelectionMarker(k),w.toSingleRange(k));for(var de=0;de<D.length;de++)w.addRange(D[de]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},q=z;g.capture(d.container,N,U);var X=setInterval(function(){q()},20);return f.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,p){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(v){v.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(v){v.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(v){v.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(v){v.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(v){v.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(v){v.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(v){v.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(v){v.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(v){v.multiSelect.rangeCount>1?v.multiSelect.joinSelections():v.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(v){v.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(v){v.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(v){v.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(v){v.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(v){return v&&v.inMultiSelectMode}}];var g=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new g(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,p){var g=e("./range_list").RangeList,v=e("./range").Range,b=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),s=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=e("./search").Search,c=new u;function i($,S,C){return c.$options.wrap=!0,c.$options.needle=S,c.$options.backwards=C==-1,c.find($)}var l=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,S){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var R=this.rangeList.add($);return this.$onAddRange($),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),S||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),$&&this.fromOrientedRange($)},this.substractPoint=function($){var S=this.rangeList.substractPoint($);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();$.push(S),this.rangeCount=0}for(var C=$.length;C--;){var R=this.ranges.indexOf($[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],S=[],C=0;C<$.length;C++){var R=$[C],N=R.start.row,L=R.end.row;if(N===L)S.push(R.clone());else{for(S.push(new v(N,R.start.column,N,this.session.getLine(N).length));++N<L;)S.push(this.getLineRange(N,!0));S.push(new v(L,0,L,R.end.column))}C==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var C=S.length;C--;)this.addRange(S[C])},this.joinSelections=function(){var $=this.rangeList.ranges,S=$[$.length-1],C=v.fromPoints($[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,S=$[$.length-1],C=v.fromPoints($[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)}else{var R=this.session.documentToScreenPosition(this.cursor),N=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(R,N);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,S,C){var R=[],N=$.column<S.column;if(N)var L=$.column,E=S.column,B=$.offsetX,P=S.offsetX;else var L=S.column,E=$.column,B=S.offsetX,P=$.offsetX;var O=$.row<S.row;if(O)var _=$.row,k=S.row;else var _=S.row,k=$.row;L<0&&(L=0),_<0&&(_=0),_==k&&(C=!0);for(var D,z=_;z<=k;z++){var U=v.fromPoints(this.session.screenToDocumentPosition(z,L,B),this.session.screenToDocumentPosition(z,E,P));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=N?U.start:U.end,R.push(U)}if(O&&R.reverse(),!C){for(var q=R.length-1;R[q].isEmpty()&&q>0;)q--;if(q>0)for(var X=0;R[X].isEmpty();)X++;for(var ee=q;ee>=X;ee--)R[ee].isEmpty()&&R.splice(ee,1)}return R}}).call(b.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var S=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",S),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var S=this.session.$selectionMarkers.indexOf($);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var S=this.session.$selectionMarkers,C=$.length;C--;){var R=$[C];if(R.marker){this.session.removeMarker(R.marker);var N=S.indexOf(R);N!=-1&&S.splice(N,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var S=$.command,C=$.editor;if(C.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?R=C.forEachSelection(S,$.args):S.multiSelectAction=="forEachLine"?R=C.forEachSelection(S,$.args,!0):S.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=S.exec(C,$.args||{})):R=S.multiSelectAction(C,$.args||{});else{var R=S.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function($,S,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,N=C==!0||C&&C.$byLines,L=this.session,E=this.selection,B=E.rangeList,P=(R?E:B).ranges,O;if(!P.length)return $.exec?$.exec(this,S||{}):$(this,S||{});var _=E._eventRegistry;E._eventRegistry={};var k=new b(L);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(N)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;k.fromOrientedRange(P[D]),k.index=D,this.selection=L.selection=k;var z=$.exec?$.exec(this,S||{}):$(this,S||{});!O&&z!==void 0&&(O=z),k.toOrientedRange(P[D])}k.detach(),this.selection=L.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=_,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,C=[],R=0;R<S.length;R++)C.push(this.session.getTextRange(S[R]));var N=this.session.getDocument().getNewLineCharacter();$=C.join(N),$.length==(C.length-1)*N.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var R=S==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=S.row||this.session.$clipPositionToDocument(R.row,R.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,S,C){if(S=S||{},S.needle=$||S.needle,S.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(R)}this.$search.set(S);var N=this.$search.findAll(this.session);if(!N.length)return 0;var L=this.multiSelect;C||L.toSingleRange(N[0]);for(var E=N.length;E--;)L.addRange(N[E],!0);return R&&L.rangeList.rangeAtPoint(R.start)&&L.addRange(R,!0),N.length},this.selectMoreLines=function($,S){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,N=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(N.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(N.row+$,N.column);if(C.isEmpty())var B=L;else var E=this.session.documentToScreenPosition(R?C.end:C.start),B=this.session.screenToDocumentPosition(E.row+$,E.column);if(R){var P=v.fromPoints(L,B);P.cursor=P.start}else{var P=v.fromPoints(B,L);P.cursor=P.end}if(P.desiredColumn=N.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(S)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var S=this.session,C=S.multiSelect,R=C.ranges,N=R.length;N--;){var L=R[N];if(L.isEmpty()){var E=S.getWordRange(L.start.row,L.start.column);L.start.row=E.start.row,L.start.column=E.start.column,L.end.row=E.end.row,L.end.column=E.end.column}}C.mergeOverlappingRanges();for(var B=[],N=R.length;N--;){var L=R[N];B.unshift(S.getTextRange(L))}$<0?B.unshift(B.pop()):B.push(B.shift());for(var N=R.length;N--;){var L=R[N],P=L.clone();S.replace(L,B[N]),L.start.row=P.start.row,L.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,S,C){var R=this.session,N=R.multiSelect,L=N.toOrientedRange();if(!(L.isEmpty()&&(L=R.getWordRange(L.start.row,L.start.column),L.cursor=$==-1?L.start:L.end,this.multiSelect.addRange(L),C))){var E=R.getTextRange(L),B=i(R,E,$);B&&(B.cursor=$==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var $=this.session,S=$.multiSelect,C=S.ranges,R=-1,N=C.filter(function(q){if(q.cursor.row==R)return!0;R=q.cursor.row});if(!C.length||N.length==C.length-1){var L=this.selection.getRange(),E=L.start.row,B=L.end.row,P=E==B;if(P){var O=this.session.getLength(),_;do _=this.session.getLine(B);while(/[=:]/.test(_)&&++B<O);do _=this.session.getLine(E);while(/[=:]/.test(_)&&--E>0);E<0&&(E=0),B>=O&&(B=O-1)}var k=this.session.removeFullLines(E,B);k=this.$reAlignText(k,P),this.session.insert({row:E,column:0},k.join(`
951
+ `)+`
952
+ `),P||(L.start.column=0,L.end.column=k[k.length-1].length),this.selection.setRange(L)}else{N.forEach(function(q){S.substractPoint(q.cursor)});var D=0,z=1/0,U=C.map(function(q){var X=q.cursor,ee=$.getLine(X.row),de=ee.substr(X.column).search(/\S/g);return de==-1&&(de=0),X.column>D&&(D=X.column),de<z&&(z=de),de});C.forEach(function(q,X){var ee=q.cursor,de=D-ee.column,te=U[X]-z;de>te?$.insert(ee,s.stringRepeat(" ",de-te)):$.remove(new v(ee.row,ee.column,ee.row,ee.column-de+te)),q.start.column=q.end.column=D,q.start.row=q.end.row=ee.row,q.cursor=q.end}),S.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,S){var C=!0,R=!0,N,L,E;return $.map(function(k){var D=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?N==null?(N=D[1].length,L=D[2].length,E=D[3].length,D):(N+L+E!=D[1].length+D[2].length+D[3].length&&(R=!1),N!=D[1].length&&(C=!1),N>D[1].length&&(N=D[1].length),L<D[2].length&&(L=D[2].length),E>D[3].length&&(E=D[3].length),D):[k]}).map(S?P:C?R?O:P:_);function B(k){return s.stringRepeat(" ",k)}function P(k){return k[2]?B(N)+k[2]+B(L-k[2].length+E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function O(k){return k[2]?B(N+L-k[2].length)+k[2]+B(E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function _(k){return k[2]?B(N)+k[2]+B(E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(d.prototype);function w($,S){return $.row==S.row&&$.column==S.column}r.onSessionChange=function($){var S=$.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",h),$.commands.addCommands(a.defaultCommands),I($))}function I($){if(!$.textInput)return;var S=$.textInput.getElement(),C=!1;f.addListener(S,"keydown",function(N){var L=N.keyCode==18&&!(N.ctrlKey||N.shiftKey||N.metaKey);$.$blockSelectEnabled&&L?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},$),f.addListener(S,"keyup",R,$),f.addListener(S,"blur",R,$);function R(N){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,p){var g=e("../../range").Range,v=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,h,f){var s=b.getLine(f);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(b,h,f){return null},this.indentationBlock=function(b,h,f){var s=/\S/,a=b.getLine(h),u=a.search(s);if(u!=-1){for(var c=f||a.length,i=b.getLength(),l=h,d=h;++h<i;){var w=b.getLine(h).search(s);if(w!=-1){if(w<=u){var x=b.getTokenAt(h,0);if(!x||x.type!=="string")break}d=h}}if(d>l){var I=b.getLine(d).length;return new g(l,c,d,I)}}},this.openingBracketBlock=function(b,h,f,s,a){var u={row:f,column:s+1},c=b.$findClosingBracket(h,u,a);if(c){var i=b.foldWidgets[c.row];return i==null&&(i=b.getFoldWidget(c.row)),i=="start"&&c.row>u.row&&(c.row--,c.column=b.getLine(c.row).length),g.fromPoints(u,c)}},this.closingBracketBlock=function(b,h,f,s,a){var u={row:f,column:s},c=b.$findOpeningBracket(h,u);if(c)return c.column++,u.column--,g.fromPoints(c,u)}}).call(v.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,p){var g=e("../lib/dom"),v=e("../range").Range,b=e("../config").nls;function h(s,a,u){for(var c=0,i=s.length-1;c<=i;){var l=c+i>>1,d=u(a,s[l]);if(d>0)c=l+1;else if(d<0)i=l-1;else return l}return-(c+1)}function f(s,a,u){var c=s.getAnnotations().sort(v.comparePoints);if(c.length){var i=h(c,{row:a,column:-1},v.comparePoints);i<0&&(i=-i-1),i>=c.length?i=u>0?0:c.length-1:i===0&&u<0&&(i=c.length-1);var l=c[i];if(!(!l||!u)){if(l.row===a){do l=c[i+=u];while(l&&l.row===a);if(!l)return c.slice()}var d=[];a=l.row;do d[u<0?"unshift":"push"](l),l=c[i+=u];while(l&&l.row==a);return d.length&&d}}}r.showErrorMarker=function(s,a){var u=s.session,c=s.getCursorPosition(),i=c.row,l=u.widgetManager.getWidgetsAtRow(i).filter(function(N){return N.type=="errorMarker"})[0];l?l.destroy():i-=a;var d=f(u,i,a),w;if(d){var x=d[0];c.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,c.row=x.row,w=s.renderer.$gutterLayer.$annotations[c.row]}else{if(l)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(c.row),s.selection.moveToPosition(c);var I={row:c.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div"),type:"errorMarker"},$=I.el.appendChild(g.createElement("div")),S=I.el.appendChild(g.createElement("div"));S.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(c).left;S.style.left=C+s.renderer.gutterWidth-5+"px",I.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(N,L){$.appendChild(g.createTextNode(N)),L<w.displayText.length-1&&$.appendChild(g.createElement("br"))}),$.appendChild(g.createElement("div"));var R=function(N,L,E){if(L===0&&(E==="esc"||E==="return"))return I.destroy(),{command:"null"}};I.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(I),s.off("changeSelection",I.destroy),s.off("changeSession",I.destroy),s.off("mouseup",I.destroy),s.off("change",I.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",I.destroy),s.on("changeSession",I.destroy),s.on("mouseup",I.destroy),s.on("change",I.destroy),s.session.widgetManager.addLineWidget(I),I.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:I.el.offsetHeight})},g.importCssString(`
953
+ .error_widget_wrapper {
954
+ background: inherit;
955
+ color: inherit;
956
+ border:none
957
+ }
958
+ .error_widget {
959
+ border-top: solid 2px;
960
+ border-bottom: solid 2px;
961
+ margin: 5px 0;
962
+ padding: 10px 40px;
963
+ white-space: pre-wrap;
964
+ }
965
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
966
+ border-color: #ff5a5a
967
+ }
968
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
969
+ border-color: #F1D817
970
+ }
971
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
972
+ border-color: #5a5a5a
973
+ }
974
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
975
+ border-color: #5aaa5a
976
+ }
977
+ .error_widget_arrow {
978
+ position: absolute;
979
+ border: solid 5px;
980
+ border-top-color: transparent!important;
981
+ border-right-color: transparent!important;
982
+ border-left-color: transparent!important;
983
+ top: -5px;
984
+ }
985
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,p){e("./loader_build")(r);var g=e("./lib/dom"),v=e("./range").Range,b=e("./editor").Editor,h=e("./edit_session").EditSession,f=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,c){if(typeof u=="string"){var i=u;if(u=document.getElementById(i),!u)throw new Error("ace.edit can't find div #"+i)}if(u&&u.env&&u.env.editor instanceof b)return u.env.editor;var l="";if(u&&/input|textarea/i.test(u.tagName)){var d=u;l=d.value,u=g.createElement("pre"),d.parentNode.replaceChild(u,d)}else u&&(l=u.textContent,u.innerHTML="");var w=r.createEditSession(l),x=new b(new s(u),w,c),I={document:w,editor:x,onResize:x.resize.bind(x,null)};return d&&(I.textarea=d),x.on("destroy",function(){I.editor.container.env=null}),x.container.env=x.env=I,x},r.createEditSession=function(u,c){var i=new h(u,c);return i.setUndoManager(new f),i},r.Range=v,r.Editor=b,r.EditSession=h,r.UndoManager=f,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var p in e)e.hasOwnProperty(p)&&(r.ace[p]=e[p]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}(tf)),tf.exports}kx();var rf={exports:{}},of;function Sx(){return of||(of=1,function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var h=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",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",I="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":I,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(N,L,E){E.length&&(E=[]);var B=N[N.length-1];return E.unshift(B,L),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,L,E){E.length&&(E=[]);var B=N[N.length-1];return E.unshift(B,L),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,L,E){E.length&&(E=[]);var B=N[N.length-1];return E.unshift(B,L),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,L,E){E.length&&(E=[]);var B=N[N.length-1];return E.unshift(B,L),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,L,E){E.length&&(E=[]);var B=N[N.length-1];return E.unshift(B,L),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,c,b,h,i,f,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,L,E){var B=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",P=N.split(this.splitRegex);return E.push(B,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,L,E){return N===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,L,E){return N===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,L,E){return this.next="",N=="}"&&E.length>1&&E[1]!="start"&&(E.shift(),this.next=E.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(N,L,E){return E.length&&N===E[0]?(E.unshift(N,L),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(N,L,E){return E.length&&N===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,L,E){return E.length&&N===E[0]?(E.unshift(N,L),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,L,E){return E.length&&N===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,L,E){return E.length&&N===E[0]?(E.unshift(N,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,L,E){return E.length&&N===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,L,E){return E.length&&N===E[0]?(E.unshift(N,L),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(N,L,E){return E.length&&N===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,L,E){return E.length&&N===E[0]?(E.unshift(N,L),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,L,E){return E.length&&N[0]===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};g.inherits(d,v),r.RubyHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,p){var g=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(v.prototype),r.MatchingBraceOutdent=v}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,p){var g=e("../../lib/oop"),v=e("./fold_mode").FoldMode,b=e("../../range").Range,h=e("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};g.inherits(f,v),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(s,a,u){var c=s.getLine(u),i=this.foldingStartMarker.test(c),l=this.foldingStopMarker.test(c);if(i&&!l){var d=c.match(this.foldingStartMarker);if(d[1]){if((d[1]=="if"||d[1]=="else"||d[1]=="while"||d[1]=="until"||d[1]=="unless")&&(d[1]=="else"&&/^\s*else\s*$/.test(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||d[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(s.getTokenAt(u,d.index+2).type==="keyword")return"start"}else if(!d[3]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!l||i&&l)return"";var d=c.match(this.foldingStopMarker);if(d[3]==="end"){if(s.getTokenAt(u,d.index+1).type==="keyword")return"end"}else if(!d[1]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,u){var c=s.doc.getLine(u),i=this.foldingStartMarker.exec(c);if(i)return i[1]||i[3]?this.rubyBlock(s,u,i.index+2):this.openingBracketBlock(s,"{",u,i.index);var i=this.foldingStopMarker.exec(c);if(i)return i[3]==="end"&&s.getTokenAt(u,i.index+1).type==="keyword"?this.rubyBlock(s,u,i.index+1):i[1]==="=end"&&s.getTokenAt(u,i.index+1).type==="comment.multiline"?this.rubyBlock(s,u,i.index+1):this.closingBracketBlock(s,"}",u,i.index+i[0].length)},this.rubyBlock=function(s,a,u,c){var i=new h(s,a,u),l=i.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var d=l.value,w=s.getLine(a);switch(l.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);if(!x.test(w))return;var I=this.indentKeywords[d];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var I=1;break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");if(!x.test(w))return;var I=1;break;default:var I=this.indentKeywords[d]}var $=[d];if(I){var S=I===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(i.getCurrentTokenRange()),i.step=I===-1?i.stepBackward:i.stepForward,l.type=="comment.multiline"){for(;l=i.step();)if(l.type==="comment.multiline"){if(I==1){if(S=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=i.step();){var N=!1;if(l.type==="keyword"){var L=I*this.indentKeywords[l.value];switch(w=s.getLine(i.getCurrentTokenRow()),l.value){case"do":for(var E=i.$tokenIndex-1;E>=0;E--){var B=i.$rowTokens[E];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){L=0;break}}break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");(!x.test(w)||d=="case")&&(L=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);x.test(w)||(L=0,N=!0);break;case"when":(/\sthen\s/.test(w)||d=="case")&&(L=0,N=!0)}if(L>0)$.unshift(l.value);else if(L<=0&&N===!1){if($.shift(),!$.length&&((d=="while"||d=="until"||d=="for")&&l.value!="do"||l.value=="do"&&I==-1&&L!=0||l.value!="do"))break;L===0&&$.unshift(l.value)}}}if(!l)return null;if(c)return R.push(i.getCurrentTokenRange()),R;var a=i.getCurrentTokenRow();if(I===-1){if(l.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new b(a,P,C-1,S)}return new b(C,S,a-1,s.getLine(a-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(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../range").Range,s=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};g.inherits(a,v),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[]\s*$/),I=c.match(/^\s*(class|def|module)\s.*$/),$=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||I||$||S)&&(l+=i)}return l},this.checkOutdent=function(u,c,i){return/^\s+(end|else|rescue|ensure)$/.test(c+i)||this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){var l=c.getLine(i);if(/}/.test(l))return this.$outdent.autoOutdent(c,i);var d=this.$getIndent(l),w=c.getLine(i-1),x=this.$getIndent(w),I=c.getTabString();x.length<=d.length&&d.slice(-I.length)==I&&c.remove(new f(i,d.length-I.length,i,d.length))},this.getMatching=function(u,c,i){if(c==null){var l=u.selection.lead;i=l.column,c=l.row}var d=u.getTokenAt(c,i);if(d&&d.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,c,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})}()}(rf)),rf.exports}Sx();var sf={exports:{}},af;function Ax(){return af||(af=1,function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=function(){var h="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":f,keyword:h},"identifier"),u="[uU]?",c="[rR]",i="[fF]",l="(?:[rR][fF]|[fF][rR])",d="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",I="(?:0[bB][01]+)",$="(?:"+d+"|"+w+"|"+x+"|"+I+")",S="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",N="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",L="(?:(?:"+N+"|"+R+")"+S+")",E="(?:"+L+"|"+N+")",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:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex: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:"(?:"+E+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:E},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};g.inherits(b,v),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,p){var g=e("../../lib/oop"),v=e("./fold_mode").FoldMode,b=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};g.inherits(b,v),(function(){this.getFoldWidgetRange=function(h,f,s){var a=h.getLine(s),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],s,u.index):u[2]?this.indentationBlock(h,s,u.index+u[2].length):this.indentationBlock(h,s)}}).call(b.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,f=e("../range").Range,s=function(){this.HighlightRules=b,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};g.inherits(s,v),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(l+=i)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
986
+ `&&i!=="\r"&&i!==`
987
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&a[d.value]:!1},this.autoOutdent=function(u,c,i){i+=1;var l=this.$getIndent(c.getLine(i)),d=c.getTabString();l.slice(-d.length)==d&&c.remove(new f(i,l.length-d.length,i,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})}()}(sf)),sf.exports}Ax();var lf={exports:{}},cf;function _x(){return cf||(cf=1,function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};g.inherits(b,v),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,p){var g=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(v.prototype),r.MatchingBraceOutdent=v}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,p){var g=e("../../lib/oop"),v=e("../../range").Range,b=e("./fold_mode").FoldMode,h=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)))};g.inherits(h,b),(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,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(f,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(f,s,a,u){var c=f.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(f,c,a);var i=c.match(this.foldingStartMarker);if(i){var l=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,l);var d=f.getCommentFoldRange(a,l+i[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(f,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var l=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,l):f.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),c=s,i=a.length;s+=1;for(var l=s,d=f.getLength();++s<d;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=c)break;if(x.isMultiLine())s=x.end.row;else if(u==w)break}l=s}}return new v(c,i,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),c=f.getLength(),i=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<c;){s=f.getLine(a);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var x=a;if(x>i)return new v(i,u,x,s.length)}}).call(h.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};g.inherits(a,v),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c);if(u=="start"){var d=c.match(/^.*[\{\(\[]\s*$/);d&&(l+=i)}return l},this.checkOutdent=function(u,c,i){return this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){this.$outdent.autoOutdent(c,i)},this.createWorker=function(u){var c=new s(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(u.getDocument()),c.on("annotate",function(i){u.setAnnotations(i.data)}),c.on("terminate",function(){u.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()}(lf)),lf.exports}_x();var uf={exports:{}},hf;function $x(){return hf||(hf=1,function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop");e("../lib/lang");var v=e("./text_highlight_rules").TextHighlightRules,b=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",h=r.supportFunction="rgb|rgba|url|attr|counter|counters",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",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var d=this.createKeywordMapper({"support.function":h,"support.constant":f,"support.type":b,"support.constant.color":s,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{include:"url"},{token:d,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};g.inherits(l,v),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=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|$)"},b.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};g.inherits(b,v),b.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},b.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=b}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,p){function g(){var u=s.replace("\\d","\\d\\-"),c={onMatch:function(l,d,w){var x=l.charAt(1)=="/"?2:1;return x==1?(d!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&d==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:l.slice(0,x)},{type:"meta.tag.tag-name.xml",value:l.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,d,w){return d==w[0]&&w.shift(),l.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},i,v("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function v(u){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(u){var c={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},i=this.createKeywordMapper(c,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",d="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),v("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:i,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),v("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[v("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(I,$,S){if(this.next=I=="{"?this.nextState:"",I=="{"&&S.length)S.unshift("start",$);else if(I=="}"&&S.length&&(S.shift(),this.next=S.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return I=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&g.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,f),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=function(h){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===b&&this.normalizeRules()};(function(){this.embedTagRules=function(h,f,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,c){return c.splice(0),this.token}}],this.embedRules(h,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(v.prototype),g.inherits(b,v),r.XmlHighlightRules=b}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/lang"),b=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=e("./xml_highlight_rules").XmlHighlightRules,s=v.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"}),a=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,c){var i=s[c];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(b,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};g.inherits(a,f),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,p){var g=e("../config").$modes,v=e("../lib/oop"),b=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,s=function(u){return"(?:[^"+b.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,l,d,w){var x=i.match(/^(\s*)([`~]+)(.*)/),I=/[\w-]+|$/.exec(x[3])[0];return g[I]||(I=""),d.unshift("githubblock",[],[x[1],x[2],I],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(i,l,d,w){var x=d[1],I=d[2][0],$=d[2][1],S=d[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);if(C&&C[1].length<I.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return d.splice(0,3),this.next=d.shift(),this.token;if(this.next="",S&&g[S]){var R=g[S].getTokenizer().getLineTokens(i,x.slice(0));return d[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(i){return"markup.heading."+i.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:c}),this.normalizeRules()};v.inherits(a,h),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,p){var g=e("../../lib/oop"),v=e("./fold_mode").FoldMode,b=e("../../range").Range,h=r.FoldMode=function(){};g.inherits(h,v),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,s,a){var u=f.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,s,a){function u(N){return I=f.getTokens(N)[0],I&&I.type.lastIndexOf($,0)===0}function c(){var N=I.value[0];return N=="="?6:N=="-"?5:7-I.value.search(/[^#]|$/)}var i=f.getLine(a),l=i.length,d=f.getLength(),w=a,x=a;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<d&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(w,l,a,0)}for(;a-- >0&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(a,i.length,w,0)}var I,$="markup.heading";if(u(a)){for(var S=c();++a<d;)if(u(a)){var C=c();if(C>=S)break}if(x=a-(!I||["=","-"].indexOf(I.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(f.getLine(x));)x--;if(x>w){var R=f.getLine(x).length;return new b(w,l,x,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,p){var g=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(v.prototype),r.MatchingBraceOutdent=v}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,p){function g(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var v=e("../../lib/oop"),b=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(s,a,u,c,i){if(i=='"'||i=="'"){var l=i,d=c.doc.getTextRange(u.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&u.getWrapBehavioursEnabled())return{text:l+d+l,selection:!1};var w=u.getCursorPosition(),x=c.doc.getLine(w.row),I=x.substring(w.column,w.column+1),$=new h(c,w.row,w.column),S=$.getCurrentToken();if(I==l&&(g(S,"attribute-value")||g(S,"string")))return{text:"",selection:[1,1]};if(S||(S=$.stepBackward()),!S)return;for(;g(S,"tag-whitespace")||g(S,"whitespace");)S=$.stepBackward();var C=!I||I.match(/\s/);if(g(S,"attribute-equals")&&(C||I==">")||g(S,"decl-attribute-equals")&&(C||I=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,c,i){var l=c.doc.getTextRange(i);if(!i.isMultiLine()&&(l=='"'||l=="'")){var d=c.doc.getLine(i.start.row),w=d.substring(i.start.column+1,i.start.column+2);if(w==l)return i.end.column++,i}}),this.add("autoclosing","insertion",function(s,a,u,c,i){if(i==">"){var l=u.getSelectionRange().start,d=new h(c,l.row,l.column),w=d.getCurrentToken()||d.stepBackward();if(!w||!(g(w,"tag-name")||g(w,"tag-whitespace")||g(w,"attribute-name")||g(w,"attribute-equals")||g(w,"attribute-value"))||g(w,"reference.attribute-value"))return;if(g(w,"attribute-value")){var x=d.getCurrentTokenColumn()+w.value.length;if(l.column<x)return;if(l.column==x){var I=d.stepForward();if(I&&g(I,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(c.getLine(l.row).slice(l.column)))return;for(;!g(w,"tag-name");)if(w=d.stepBackward(),w.value=="<"){w=d.stepForward();break}var $=d.getCurrentTokenRow(),S=d.getCurrentTokenColumn();if(g(d.stepBackward(),"end-tag-open"))return;var C=w.value;return $==l.row&&(C=C.substring(0,l.column-S)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,c,i){if(i==`
988
+ `){var l=u.getCursorPosition(),d=c.getLine(l.row),w=new h(c,l.row,l.column),x=w.getCurrentToken();if(g(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 I=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var S=c.getTokenAt(l.row,l.column+1),d=c.getLine($),C=this.$getIndent(d),R=C+c.getTabString();return S&&S.value==="</"?{text:`
989
+ `+R+`
990
+ `+C,selection:[1,R.length,1,R.length]}:{text:`
991
+ `+R}}}}})};v.inherits(f,b),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(e,r,p){var g=e("../../lib/oop"),v=e("../../token_iterator").TokenIterator,b=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,f=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,u,c,i,l){if(l==">"){var d=c.getSelectionRange().start,w=new v(i,d.row,d.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};g.inherits(f,b),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,p){function g(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var v=e("../../lib/oop"),b=e("../../range").Range,h=e("./fold_mode").FoldMode,f=r.FoldMode=function(a,u){h.call(this),this.voidElements=a||{},this.optionalEndTags=v.mixin({},this.voidElements),u&&v.mixin(this.optionalEndTags,u)};v.inherits(f,h);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,c){var i=this._getFirstTagInLine(a,c);return i?i.closing||!i.tagName&&i.selfClosing?u==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(a,c,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(a,c)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var c=a.getTokens(u),i=new s,l=0;l<c.length;l++){var d=c[l];if(g(d,"tag-open")){if(i.end.column=i.start.column+d.value.length,i.closing=g(d,"end-tag-open"),d=c[++l],!d)return null;if(i.tagName=d.value,d.value===""){if(d=c[++l],!d)return null;i.tagName=d.value}for(i.end.column+=d.value.length,l++;l<c.length;l++)if(d=c[l],i.end.column+=d.value.length,g(d,"tag-close")){i.selfClosing=d.value=="/>";break}return i}if(g(d,"tag-close"))return i.selfClosing=d.value=="/>",i;i.start.column+=d.value.length}return null},this._findEndTagInLine=function(a,u,c,i){for(var l=a.getTokens(u),d=0,w=0;w<l.length;w++){var x=l[w];if(d+=x.value.length,!(d<i-1)&&g(x,"end-tag-open")&&(x=l[w+1],g(x,"tag-name")&&x.value===""&&(x=l[w+2]),x&&x.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,u,c){var i=this._getFirstTagInLine(a,c);if(!i)return this.getCommentFoldWidget(a,c)&&a.getCommentFoldRange(c,a.getLine(c).length);var l=a.getMatchingTags({row:c,column:0});if(l)return new b(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.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(e,r,p){var g=e("../../lib/oop"),v=e("../../range").Range,b=e("./fold_mode").FoldMode,h=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)))};g.inherits(h,b),(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,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(f,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(f,s,a,u){var c=f.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(f,c,a);var i=c.match(this.foldingStartMarker);if(i){var l=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,l);var d=f.getCommentFoldRange(a,l+i[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(f,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var l=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,l):f.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),c=s,i=a.length;s+=1;for(var l=s,d=f.getLength();++s<d;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=c)break;if(x.isMultiLine())s=x.end.row;else if(u==w)break}l=s}}return new v(c,i,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),c=f.getLength(),i=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<c;){s=f.getLine(a);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var x=a;if(x>i)return new v(i,u,x,s.length)}}).call(h.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,p){var g=e("../../lib/oop"),v=e("./xml").FoldMode,b=e("./cstyle").FoldMode,h=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 v};g.inherits(h,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,s,a){var u=this.getFoldWidgetBase(f,s,a);return u||this.xmlFoldMode.getFoldWidget(f,s,a)},this.getFoldWidgetRange=function(f,s,a,u){var c=this.getFoldWidgetRangeBase(f,s,a,u);return c||this.xmlFoldMode.getFoldWidgetRange(f,s,a)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};g.inherits(u,v),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,i,l){var d=this.$getIndent(i),w=this.getTokenizer().getLineTokens(i,c),x=w.tokens,I=w.state;if(x.length&&x[x.length-1].type=="comment")return d;if(c=="start"||c=="no_regex"){var $=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(d+=l)}else if(c=="doc-start"&&(I=="start"||I=="no_regex"))return"";return d},this.checkOutdent=function(c,i,l){return this.$outdent.checkOutdent(i,l)},this.autoOutdent=function(c,i,l){this.$outdent.autoOutdent(i,l)},this.createWorker=function(c){var i=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(c.getDocument()),i.on("annotate",function(l){c.setAnnotations(l.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,p){var g={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},v=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var b=document.createElement("c").style;for(var h in b)if(typeof b[h]=="string"){var f=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});g.hasOwnProperty(f)||(g[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,h,f,s){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(f.row).substr(0,f.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,h,f,s):this.getPropertyCompletions(b,h,f,s,u)}return[]},this.getPropertyCompletions=function(b,h,f,s,a){a=a||!1;var u=Object.keys(g);return u.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,h,f,s){var a=h.getLine(f.row).substr(0,f.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var c=[];return u in g&&typeof g[u]=="object"&&(c=Object.keys(g[u])),c.map(function(i){return{caption:i,snippet:i,meta:"property value",score:1e6}})}}).call(v.prototype),r.CssCompletions=v}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,p){var g=e("../../lib/oop");e("../behaviour").Behaviour;var v=e("./cstyle").CstyleBehaviour,b=e("../../token_iterator").TokenIterator,h=function(){this.inherit(v),this.add("colon","insertion",function(f,s,a,u,c){if(c===":"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=new b(u,i.row,i.column),d=l.getCurrentToken();if(d&&d.value.match(/\s+/)&&(d=l.stepBackward()),d&&d.type==="support.type"){var w=u.doc.getLine(i.row),x=w.substring(i.column,i.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(i.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,s,a,u,c){var i=u.doc.getTextRange(c);if(!c.isMultiLine()&&i===":"){var l=a.getCursorPosition(),d=new b(u,l.row,l.column),w=d.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=d.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(c.start.row),I=x.substring(c.end.column,c.end.column+1);if(I===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(f,s,a,u,c){if(c===";"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=u.doc.getLine(i.row),d=l.substring(i.column,i.column+1);if(d===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,s,a,u,c){if(c==="!"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=u.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(l.substring(i.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(h,v),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};g.inherits(c,v),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,l,d){var w=this.$getIndent(l),x=this.getTokenizer().getLineTokens(l,i).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var I=l.match(/^.*\{\s*$/);return I&&(w+=d),w},this.checkOutdent=function(i,l,d){return this.$outdent.checkOutdent(l,d)},this.autoOutdent=function(i,l,d){this.$outdent.autoOutdent(l,d)},this.getCompletions=function(i,l,d,w){return this.$completer.getCompletions(i,l,d,w)},this.createWorker=function(i){var l=new f(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(i.getDocument()),l.on("annotate",function(d){i.setAnnotations(d.data)}),l.on("terminate",function(){i.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,p){var g=e("../../lib/oop"),v=e("./fold_mode").FoldMode,b=r.FoldMode=function(h,f){this.defaultMode=h,this.subModes=f};g.inherits(b,v),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var f in this.subModes)if(h.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(h,f,s,a){var u=this.$getMode(h);return u?u.getFoldWidget(f,s,a):""},this.getFoldWidget=function(h,f,s){return this.$tryMode(h.getState(s-1),h,f,s)||this.$tryMode(h.getState(s),h,f,s)||this.defaultMode.getFoldWidget(h,f,s)},this.getFoldWidgetRange=function(h,f,s){var a=this.$getMode(h.getState(s-1));return(!a||!a.getFoldWidget(h,f,s))&&(a=this.$getMode(h.getState(s))),(!a||!a.getFoldWidget(h,f,s))&&(a=this.defaultMode),a.getFoldWidgetRange(h,f,s)}}).call(b.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,p){var g=e("../../lib/oop"),v=e("./mixed").FoldMode,b=e("./xml").FoldMode,h=e("./cstyle").FoldMode,f=r.FoldMode=function(s,a){v.call(this,new b(s,a),{"js-":new h,"css-":new h})};g.inherits(f,v)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,p){function g(l,d){return l.type.lastIndexOf(d+".xml")>-1}function v(l,d){for(var w=new h(l,d.row,d.column),x=w.getCurrentToken();x&&!g(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(l,d){for(var w=new h(l,d.row,d.column),x=w.getCurrentToken();x&&!g(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var h=e("../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"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=f.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(u),i=function(){};(function(){this.getCompletions=function(l,d,w,x){var I=d.getTokenAt(w.row,w.column);if(!I)return[];if(g(I,"tag-name")||g(I,"tag-open")||g(I,"end-tag-open"))return this.getTagCompletions(l,d,w,x);if(g(I,"tag-whitespace")||g(I,"attribute-name"))return this.getAttributeCompletions(l,d,w,x);if(g(I,"attribute-value"))return this.getAttributeValueCompletions(l,d,w,x);var $=d.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(l,d,w,x):[]},this.getTagCompletions=function(l,d,w,x){return c.map(function(I){return{value:I,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,d,w,x){var I=v(d,w);if(!I)return[];var $=a;return I in u&&($=$.concat(Object.keys(u[I]))),$.map(function(S){return{caption:S,snippet:S+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,d,w,x){var I=v(d,w),$=b(d,w);if(!I)return[];var S=[];return I in u&&$ in u[I]&&typeof u[I][$]=="object"&&(S=Object.keys(u[I][$])),S.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,d,w,x){var I=["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 I.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(i.prototype),r.HtmlCompletions=i}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/lang"),b=e("./text").Mode,h=e("./javascript").Mode,f=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,i=e("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=s,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":h,"css-":f}),this.foldingRules=new u(this.voidElements,v.arrayToMap(d))};g.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=v.arrayToMap(l),this.getNextLineIndent=function(x,I,$){return this.$getIndent(I)},this.checkOutdent=function(x,I,$){return!1},this.getCompletions=function(x,I,$,S){return this.$completer.getCompletions(x,I,$,S)},this.createWorker=function(x){if(this.constructor==w){var I=new i(["ace"],"ace/mode/html_worker","Worker");return I.attachToDocument(x.getDocument()),this.fragmentContext&&I.call("setOptions",[{context:this.fragmentContext}]),I.on("error",function($){x.setAnnotations($.data)}),I.on("terminate",function(){x.clearAnnotations()}),I}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,p){var g=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,b=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",h=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var s=this.createKeywordMapper({keyword:b,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",c="(?:\\d+)",i="(?:(?:"+c+"?"+u+")|(?:"+c+"\\.))",l="(?:(?:"+i+"|"+c+"))",d="(?:"+l+"|"+i+")",w="(?:&"+c+")",x="[a-zA-Z_][a-zA-Z0-9_]*",I="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",S="(?:"+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,R,N){var L=C[2]=="-"?"indentedHeredoc":"heredoc",E=C.split(this.splitRegex);return N.push(L,E[4]),[{type:"constant",value:E[1]},{type:"text",value:E[2]},{type:"string",value:E[3]},{type:"support.class",value:E[4]},{type:"string",value:E[5]}]},rules:{heredoc:[{onMatch:function(C,R,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:I},{include:"variables"},{token:"support.function",regex:S},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};g.inherits(f,v),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(e,r,p){var g=e("../lib/oop"),v=e("./text").Mode,b=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,f=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=b,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};g.inherits(s,v),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(l+=i)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
992
+ `&&i!=="\r"&&i!==`
993
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&a[d.value]:!1},this.autoOutdent=function(u,c,i){i+=1;var l=this.$getIndent(c.getLine(i)),d=c.getTabString();l.slice(-d.length)==d&&c.remove(new h(i,l.length-d.length,i,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,p){var g=e("../lib/oop"),v=e("../lib/lang"),b=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new f,this.foldingRules=new s};g.inherits(u,b),(function(){this.voidElements=v.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var i=new a(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(c.getDocument()),i.on("error",function(l){c.setAnnotations(l.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,p){var g=e("../lib/oop"),v=e("./behaviour/cstyle").CstyleBehaviour,b=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new f,this.$behaviour=new v({braces:!0})};g.inherits(s,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,c){if(a=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!i)return"";var l=i[2];return l||(l=parseInt(i[3],10)+1+"."),i[1]+l+i[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})}()}(uf)),uf.exports}$x();var df={exports:{}},pf;function Tx(){return pf||(pf=1,function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,p){p.exports=`.ace-twilight .ace_gutter {
994
+ background: #232323;
995
+ color: #E2E2E2
996
+ }
997
+
998
+ .ace-twilight .ace_print-margin {
999
+ width: 1px;
1000
+ background: #232323
1001
+ }
1002
+
1003
+ .ace-twilight {
1004
+ background-color: #141414;
1005
+ color: #F8F8F8
1006
+ }
1007
+
1008
+ .ace-twilight .ace_cursor {
1009
+ color: #A7A7A7
1010
+ }
1011
+
1012
+ .ace-twilight .ace_marker-layer .ace_selection {
1013
+ background: rgba(221, 240, 255, 0.20)
1014
+ }
1015
+
1016
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1017
+ box-shadow: 0 0 3px 0px #141414;
1018
+ }
1019
+
1020
+ .ace-twilight .ace_marker-layer .ace_step {
1021
+ background: rgb(102, 82, 0)
1022
+ }
1023
+
1024
+ .ace-twilight .ace_marker-layer .ace_bracket {
1025
+ margin: -1px 0 0 -1px;
1026
+ border: 1px solid rgba(255, 255, 255, 0.25)
1027
+ }
1028
+
1029
+ .ace-twilight .ace_marker-layer .ace_active-line {
1030
+ background: rgba(255, 255, 255, 0.031)
1031
+ }
1032
+
1033
+ .ace-twilight .ace_gutter-active-line {
1034
+ background-color: rgba(255, 255, 255, 0.031)
1035
+ }
1036
+
1037
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1038
+ border: 1px solid rgba(221, 240, 255, 0.20)
1039
+ }
1040
+
1041
+ .ace-twilight .ace_invisible {
1042
+ color: rgba(255, 255, 255, 0.25)
1043
+ }
1044
+
1045
+ .ace-twilight .ace_keyword,
1046
+ .ace-twilight .ace_meta {
1047
+ color: #CDA869
1048
+ }
1049
+
1050
+ .ace-twilight .ace_constant,
1051
+ .ace-twilight .ace_constant.ace_character,
1052
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1053
+ .ace-twilight .ace_constant.ace_other,
1054
+ .ace-twilight .ace_heading,
1055
+ .ace-twilight .ace_markup.ace_heading,
1056
+ .ace-twilight .ace_support.ace_constant {
1057
+ color: #CF6A4C
1058
+ }
1059
+
1060
+ .ace-twilight .ace_invalid.ace_illegal {
1061
+ color: #F8F8F8;
1062
+ background-color: rgba(86, 45, 86, 0.75)
1063
+ }
1064
+
1065
+ .ace-twilight .ace_invalid.ace_deprecated {
1066
+ text-decoration: underline;
1067
+ font-style: italic;
1068
+ color: #D2A8A1
1069
+ }
1070
+
1071
+ .ace-twilight .ace_support {
1072
+ color: #9B859D
1073
+ }
1074
+
1075
+ .ace-twilight .ace_fold {
1076
+ background-color: #AC885B;
1077
+ border-color: #F8F8F8
1078
+ }
1079
+
1080
+ .ace-twilight .ace_support.ace_function {
1081
+ color: #DAD085
1082
+ }
1083
+
1084
+ .ace-twilight .ace_list,
1085
+ .ace-twilight .ace_markup.ace_list,
1086
+ .ace-twilight .ace_storage {
1087
+ color: #F9EE98
1088
+ }
1089
+
1090
+ .ace-twilight .ace_entity.ace_name.ace_function,
1091
+ .ace-twilight .ace_meta.ace_tag {
1092
+ color: #AC885B
1093
+ }
1094
+
1095
+ .ace-twilight .ace_string {
1096
+ color: #8F9D6A
1097
+ }
1098
+
1099
+ .ace-twilight .ace_string.ace_regexp {
1100
+ color: #E9C062
1101
+ }
1102
+
1103
+ .ace-twilight .ace_comment {
1104
+ font-style: italic;
1105
+ color: #5F5A60
1106
+ }
1107
+
1108
+ .ace-twilight .ace_variable {
1109
+ color: #7587A6
1110
+ }
1111
+
1112
+ .ace-twilight .ace_xml-pe {
1113
+ color: #494949
1114
+ }
1115
+
1116
+ .ace-twilight .ace_indent-guide {
1117
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1118
+ }
1119
+
1120
+ .ace-twilight .ace_indent-guide-active {
1121
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1122
+ }
1123
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,p){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})}()}(df)),df.exports}Tx();var ff={exports:{}},gf;function Mx(){return gf||(gf=1,function(n,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,p){function g(C){var R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var v=e("./lib/dom"),b=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),s=e("./range").Range,a=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,i=e("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,N){var L=C.session.getTextRange();return N?L.replace(/\n\r?([ \t]*\S)/g,`
1124
+ `+N+"$1"):L},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return i.getText&&i.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(C){var R=C.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var d=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(E){return E=E.substr(1),/^\d+$/.test(E)?[{tabstopId:parseInt(E,10)}]:[{text:E}]}function N(E){return"(?:[^\\\\"+E+"]|\\\\.)"}var L={regex:"/("+N("/")+"+)/",onMatch:function(E,B,P){var O=P[0];return O.fmtString=!0,O.guard=E.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(E,B,P){var O=E[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(E=O),[E]}},{regex:/}/,onMatch:function(E,B,P){return[P.length?P.shift():E]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(E,B,P){var O=R(E.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+N("\\|")+"*\\|",onMatch:function(E,B,P){var O=E.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return P[0].choices=O,[O[0]]},next:"start"},L,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(E,B,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(E,B,P){var O=E[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?E=O:O=="n"?E=`
1125
+ `:O=="t"?E=" ":"ulULE".indexOf(O)!=-1&&(E={changeCase:O,local:O>"a"}),[E]}},{regex:"/\\w*}",onMatch:function(E,B,P){var O=P.shift();return O&&(O.flag=E.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(E,B,P){return[{text:E.slice(1)}]}},{regex:/\${\w+/,onMatch:function(E,B,P){var O={text:E.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(E,B,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(E,B,P){var O=P[0];return O.formatFunction=E.slice(2,-1),[P.shift()]},next:"formatString"},L,{regex:/:[\?\-+]?/,onMatch:function(E,B,P){E[1]=="+"&&(P[0].ifEnd=P[0]),E[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(R,N){return this.getTokenizer().getLineTokens(R,N).tokens.map(function(L){return L.value||L})},C.prototype.getVariableValue=function(R,N,L){if(/^\d+$/.test(N))return(this.variables.__||{})[N]||"";if(/^[A-Z]\d+$/.test(N))return(this.variables[N[0]+"__"]||{})[N.substr(1)]||"";if(N=N.replace(/^TM_/,""),!this.variables.hasOwnProperty(N))return"";var E=this.variables[N];return typeof E=="function"&&(E=this.variables[N](R,N,L)),E??""},C.prototype.tmStrFormat=function(R,N,L){if(!N.fmt)return R;var E=N.flag||"",B=N.guard;B=new RegExp(B,E.replace(/[^gim]/g,""));var P=typeof N.fmt=="string"?this.tokenizeTmSnippet(N.fmt,"formatString"):N.fmt,O=this,_=R.replace(B,function(){var k=O.variables.__;O.variables.__=[].slice.call(arguments);for(var D=O.resolveVariables(P,L),z="E",U=0;U<D.length;U++){var q=D[U];if(typeof q=="object")if(D[U]="",q.changeCase&&q.local){var X=D[U+1];X&&typeof X=="string"&&(q.changeCase=="u"?D[U]=X[0].toUpperCase():D[U]=X[0].toLowerCase(),D[U+1]=X.substr(1))}else q.changeCase&&(z=q.changeCase);else z=="U"?D[U]=q.toUpperCase():z=="L"&&(D[U]=q.toLowerCase())}return O.variables.__=k,D.join("")});return _},C.prototype.tmFormatFunction=function(R,N,L){return N.formatFunction=="upcase"?R.toUpperCase():N.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,N){function L(z){var U=R.indexOf(z,O+1);U!=-1&&(O=U)}for(var E=[],B="",P=!0,O=0;O<R.length;O++){var _=R[O];if(typeof _=="string"){E.push(_),_==`
1126
+ `?(P=!0,B=""):P&&(B=/^\t*/.exec(_)[0],P=/\S/.test(_));continue}if(_){if(P=!1,_.fmtString){var k=R.indexOf(_,O+1);k==-1&&(k=R.length),_.fmt=R.slice(O+1,k),O=k}if(_.text){var D=this.getVariableValue(N,_.text,B)+"";_.fmtString&&(D=this.tmStrFormat(D,_,N)),_.formatFunction&&(D=this.tmFormatFunction(D,_,N)),D&&!_.ifEnd?(E.push(D),L(_)):!D&&_.ifEnd&&L(_.ifEnd)}else _.elseEnd?L(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&E.push(_)}}return E},C.prototype.getDisplayTextForSnippet=function(R,N){var L=w.call(this,R,N);return L.text},C.prototype.insertSnippetForSelection=function(R,N,L){L===void 0&&(L={});var E=w.call(this,R,N,L),B=R.getSelectionRange(),P=R.session.replace(B,E.text),O=new x(R),_=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(E.tabstops,B.start,P,_)},C.prototype.insertSnippet=function(R,N,L){L===void 0&&(L={});var E=this;if(R.inVirtualSelectionMode)return E.insertSnippetForSelection(R,N,L);R.forEachSelection(function(){E.insertSnippetForSelection(R,N,L)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var N=R.session.$mode.$id||"";if(N=N.split("/").pop(),N==="html"||N==="php"){N==="php"&&!R.session.$mode.inlinePhp&&(N="html");var L=R.getCursorPosition(),E=R.session.getState(L.row);typeof E=="object"&&(E=E[0]),E.substring&&(E.substring(0,3)=="js-"?N="javascript":E.substring(0,4)=="css-"?N="css":E.substring(0,4)=="php-"&&(N="php"))}return N},C.prototype.getActiveScopes=function(R){var N=this.$getScope(R),L=[N],E=this.snippetMap;return E[N]&&E[N].includeScopes&&L.push.apply(L,E[N].includeScopes),L.push("_"),L},C.prototype.expandWithTab=function(R,N){var L=this,E=R.forEachSelection(function(){return L.expandSnippetForSelection(R,N)},null,{keepOrder:!0});return E&&R.tabstopManager&&R.tabstopManager.tabNext(),E},C.prototype.expandSnippetForSelection=function(R,N){var L=R.getCursorPosition(),E=R.session.getLine(L.row),B=E.substring(0,L.column),P=E.substr(L.column),O=this.snippetMap,_;return this.getActiveScopes(R).some(function(k){var D=O[k];return D&&(_=this.findMatchingSnippet(D,B,P)),!!_},this),_?(N&&N.dryRun||(R.session.doc.removeInLine(L.row,L.column-_.replaceBefore.length,L.column+_.replaceAfter.length),this.variables.M__=_.matchBefore,this.variables.T__=_.matchAfter,this.insertSnippetForSelection(R,_.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,N,L){for(var E=R.length;E--;){var B=R[E];if(!(B.startRe&&!B.startRe.test(N))&&!(B.endRe&&!B.endRe.test(L))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(N):[""],B.matchAfter=B.endRe?B.endRe.exec(L):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(N)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(L)[0]:"",B}},C.prototype.register=function(R,N){function L(k){return k&&!/^\^?\(.*\)\$?$|^\\b$/.test(k)&&(k="(?:"+k+")"),k||""}function E(k,D,z){return k=L(k),D=L(D),k=D+k,k&&k[k.length-1]!="$"&&(k+="$"),new RegExp(k)}function B(k){k.scope||(k.scope=N||"_"),N=k.scope,P[N]||(P[N]=[],O[N]={});var D=O[N];if(k.name){var z=D[k.name];z&&_.unregister(z),D[k.name]=k}P[N].push(k),k.prefix&&(k.tabTrigger=k.prefix),!k.content&&k.body&&(k.content=Array.isArray(k.body)?k.body.join(`
1127
+ `):k.body),k.tabTrigger&&!k.trigger&&(!k.guard&&/^\w/.test(k.tabTrigger)&&(k.guard="\\b"),k.trigger=f.escapeRegExp(k.tabTrigger)),!(!k.trigger&&!k.guard&&!k.endTrigger&&!k.endGuard)&&(k.startRe=E(k.trigger,k.guard),k.triggerRe=new RegExp(k.trigger),k.endRe=E(k.endTrigger,k.endGuard),k.endTriggerRe=new RegExp(k.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,_=this;R||(R=[]),Array.isArray(R)?R.forEach(B):Object.keys(R).forEach(function(k){B(R[k])}),this._signal("registerSnippets",{scope:N})},C.prototype.unregister=function(R,N){function L(P){var O=B[P.scope||N];if(O&&O[P.name]){delete O[P.name];var _=E[P.scope||N],k=_&&_.indexOf(P);k>=0&&_.splice(k,1)}}var E=this.snippetMap,B=this.snippetNameMap;R.content?L(R):Array.isArray(R)&&R.forEach(L)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var N=[],L={},E=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=E.exec(R);){if(B[1])try{L=JSON.parse(B[1]),N.push(L)}catch{}if(B[4])L.content=B[4].replace(/^\t/gm,""),N.push(L),L={};else{var P=B[2],O=B[3];if(P=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=_.exec(O)[1],L.trigger=_.exec(O)[1],L.endTrigger=_.exec(O)[1],L.endGuard=_.exec(O)[1]}else P=="snippet"?(L.tabTrigger=O.match(/^\S*/)[0],L.name||(L.name=O)):P&&(L[P]=O)}}return N},C.prototype.getSnippetByName=function(R,N){var L=this.snippetNameMap,E;return this.getActiveScopes(N).some(function(B){var P=L[B];return P&&(E=P[R]),!!E},this),E},C}();b.implement(d.prototype,h);var w=function(C,R,N){function L(ue){for(var me=[],_e=0;_e<ue.length;_e++){var Te=ue[_e];if(typeof Te=="object"){if(D[Te.tabstopId])continue;var Me=ue.lastIndexOf(Te,_e-1);Te=me[Me]||{tabstopId:Te.tabstopId}}me[_e]=Te}return me}N===void 0&&(N={});var E=C.getCursorPosition(),B=C.session.getLine(E.row),P=C.session.getTabString(),O=B.match(/^\s*/)[0];E.column<O.length&&(O=O.slice(0,E.column)),R=R.replace(/\r/g,"");var _=this.tokenizeTmSnippet(R);_=this.resolveVariables(_,C),_=_.map(function(ue){return ue==`
1128
+ `&&!N.excludeExtraIndent?ue+O:typeof ue=="string"?ue.replace(/\t/g,P):ue});var k=[];_.forEach(function(ue,me){if(typeof ue=="object"){var _e=ue.tabstopId,Te=k[_e];if(Te||(Te=k[_e]=[],Te.index=_e,Te.value="",Te.parents={}),Te.indexOf(ue)===-1){ue.choices&&!Te.choices&&(Te.choices=ue.choices),Te.push(ue);var Me=_.indexOf(ue,me+1);if(Me!==-1){var Xe=_.slice(me+1,Me),Ue=Xe.some(function(ct){return typeof ct=="object"});Ue&&!Te.value?Te.value=Xe:Xe.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Xe.join(""))}}}}),k.forEach(function(ue){ue.length=0});for(var D={},z=0;z<_.length;z++){var U=_[z];if(typeof U=="object"){var q=U.tabstopId,X=k[q],ee=_.indexOf(U,z+1);if(D[q]){D[q]===U&&(delete D[q],Object.keys(D).forEach(function(ue){X.parents[ue]=!0}));continue}D[q]=U;var de=X.value;typeof de!="string"?de=L(de):U.fmt&&(de=this.tmStrFormat(de,U,C)),_.splice.apply(_,[z+1,Math.max(0,ee-z)].concat(de,U)),X.indexOf(U)===-1&&X.push(U)}}var te=0,le=0,se="";return _.forEach(function(ue){if(typeof ue=="string"){var me=ue.split(`
1129
+ `);me.length>1?(le=me[me.length-1].length,te+=me.length-1):le+=ue.length,se+=ue}else ue&&(ue.start?ue.end={row:te,column:le}:ue.start={row:te,column:le})}),{text:se,tabstops:k,tokens:_}},x=function(){function C(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return C.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(R){for(var N=R.action[0]=="r",L=this.selectedTabstop||{},E=L.parents||{},B=this.tabstops.slice(),P=0;P<B.length;P++){var O=B[P],_=O==L||E[O.index];if(O.rangeList.$bias=_?0:1,R.action=="remove"&&O!==L){var k=O.parents&&O.parents[L.index],D=O.rangeList.pointIndex(R.start,k);D=D<0?-D-1:D+1;var z=O.rangeList.pointIndex(R.end,k);z=z<0?-z-1:z-1;for(var U=O.rangeList.ranges.slice(D,z),q=0;q<U.length;q++)this.removeRange(U[q])}O.rangeList.$onChange(R)}var X=this.session;!this.$inChange&&N&&X.getLength()==1&&!X.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var N=this.session,L=N.getTextRange(R.firstNonLinked),E=0;E<R.length;E++){var B=R[E];if(B.linked){var P=B.original,O=r.snippetManager.tmStrFormat(L,P,this.editor);N.replace(B,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,N=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var B=this.ranges[E].contains(R.row,R.column),P=L||this.ranges[E].contains(N.row,N.column);if(B&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var N=this.tabstops.length,L=this.index+(R||1);L=Math.min(Math.max(L,1),N),L==N&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var N=this.tabstops[this.index];if(N&&this.addTabstopMarkers(N),this.index=R,N=this.tabstops[this.index],!(!N||!N.length)){this.selectedTabstop=N;var L=N.firstNonLinked||N;if(N.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else{var E=this.editor.multiSelect;E.toSingleRange(L);for(var B=0;B<N.length;B++)N.hasLinkedRanges&&N[B].linked||E.addRange(N[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(R,N,L){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var B=s.fromPoints(L,L);$(B.start,N),$(B.end,N),R[0]=[B],R[0].index=0}var P=this.index,O=[P+1,0],_=this.ranges,k=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,z){var U=this.$openTabstops[z]||D;U.snippetId=k;for(var q=0;q<D.length;q++){var X=D[q],ee=s.fromPoints(X.start,X.end||X.start);I(ee.start,N),I(ee.end,N),ee.original=X,ee.tabstop=U,_.push(ee),U!=D?U.unshift(ee):U[q]=ee,X.fmtString||U.firstNonLinked&&E?(ee.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=ee)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(O.push(U),this.$openTabstops[z]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(R){var N=this.session;R.forEach(function(L){L.markerId||(L.markerId=N.addMarker(L,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var N=this.session;R.forEach(function(L){N.removeMarker(L.markerId),L.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(N){N.snippetId===R?this.addTabstopMarkers(N):this.removeTabstopMarkers(N)},this)}},C.prototype.removeRange=function(R){var N=R.tabstop.indexOf(R);N!=-1&&R.tabstop.splice(N,1),N=this.ranges.indexOf(R),N!=-1&&this.ranges.splice(N,1),N=R.tabstop.rangeList.ranges.indexOf(R),N!=-1&&R.tabstop.splice(N,1),this.session.removeMarker(R.markerId),R.tabstop.length||(N=this.tabstops.indexOf(R.tabstop),N!=-1&&this.tabstops.splice(N,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 I=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},$=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};v.importCssString(`
1130
+ .ace_snippet-marker {
1131
+ -moz-box-sizing: border-box;
1132
+ box-sizing: border-box;
1133
+ background: rgba(194, 193, 208, 0.09);
1134
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1135
+ position: absolute;
1136
+ }`,"snippets.css",!1),r.snippetManager=new d;var S=e("./editor").Editor;(function(){this.insertSnippet=function(C,R){return r.snippetManager.insertSnippet(this,C,R)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(S.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,p){var g=e("../virtual_renderer").VirtualRenderer,v=e("../editor").Editor,b=e("../range").Range,h=e("../lib/event"),f=e("../lib/lang"),s=e("../lib/dom"),a=e("../config").nls,u=e("./../lib/useragent"),c=function(I){return"suggest-aria-id:".concat(I)},i=u.isSafari?"menu":"listbox",l=u.isSafari?"menuitem":"option",d=u.isSafari?"aria-current":"aria-selected",w=function(I){var $=new g(I);$.$maxLines=4;var S=new v($);return S.setHighlightActiveLine(!1),S.setShowPrintMargin(!1),S.renderer.setShowGutter(!1),S.renderer.setHighlightGutterLine(!1),S.$mouseHandler.$focusTimeout=0,S.$highlightTagPending=!0,S},x=function(){function I($){var S=s.createElement("div"),C=w(S);$&&$.appendChild(S),S.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",i),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(_){var k=_.getDocumentPosition();C.selection.moveToPosition(k),E.start.row=E.end.row=k.row,_.stop()});var N,L=new b(-1,0,-1,1/0),E=new b(-1,0,-1,1/0);E.id=C.session.addMarker(E,"ace_active-line","fullLine"),C.setSelectOnHover=function(_){_?L.id&&(C.session.removeMarker(L.id),L.id=null):L.id=C.session.addMarker(L,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(_){if(!N){N=_;return}if(!(N.x==_.x&&N.y==_.y)){N=_,N.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var k=N.getDocumentPosition().row;L.start.row!=k&&(L.id||C.setRow(k),P(k))}}),C.renderer.on("beforeRender",function(){if(N&&L.start.row!=-1){N.$pos=null;var _=N.getDocumentPosition().row;L.id||C.setRow(_),P(_,!0)}}),C.renderer.on("afterRender",function(){for(var _=C.renderer.$textLayer,k=_.config.firstRow,D=_.config.lastRow;k<=D;k++){var z=_.element.childNodes[k-_.config.firstRow];z.setAttribute("role",l),z.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),z.setAttribute("aria-setsize",C.data.length),z.setAttribute("aria-describedby","doc-tooltip"),z.setAttribute("aria-posinset",k+1);var U=C.getData(k);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");z.setAttribute("aria-label",q)}var X=z.querySelectorAll(".ace_completion-highlight");X.forEach(function(ee){ee.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var _=C.getRow(),k=C.renderer.$textLayer,D=k.element.childNodes[_-k.config.firstRow],z=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(d),C.selectedNode.removeAttribute("id")),z.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=c(_);s.addCssClass(D,"ace_selected"),D.id=U,k.element.setAttribute("aria-activedescendant",U),z.setAttribute("aria-activedescendant",U),D.setAttribute(d,"true")}});var B=function(){P(-1)},P=function(_,k){_!==L.start.row&&(L.start.row=L.end.row=_,k||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return L.start.row},h.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 k=C.data[_];return typeof k=="string"?k:k&&k.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(_){function k(ue,me){ue&&z.push({type:(D.className||"")+(me||""),value:ue})}var D=C.data[_],z=[];if(!D)return z;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,q=U.toLowerCase(),X=(C.filterText||"").toLowerCase(),ee=0,de=0,te=0;te<=X.length;te++)if(te!=de&&(D.matchMask&1<<te||te==X.length)){var le=X.slice(de,te);de=te;var se=q.indexOf(le,ee);if(se==-1)continue;k(U.slice(ee,se),""),ee=se+le.length,k(U.slice(se,ee),"completion-highlight")}return k(U.slice(ee,U.length),""),z.push({type:"completion-spacer",value:" "}),D.meta&&z.push({type:"completion-meta",value:D.meta}),D.message&&z.push({type:"completion-message",value:D.message}),z},O.$updateOnChange=R,O.start=R,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(_,k){C.filterText=k||"",C.setValue(f.stringRepeat(`
1137
+ `,_.length),-1),C.data=_||[],C.setRow(0)},C.getData=function(_){return C.data[_]},C.getRow=function(){return E.start.row},C.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),E.start.row!=_&&(C.selection.clearSelection(),E.start.row=E.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(_,k,D,z){if(!z&&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,X=window.innerHeight-q,ee=window.innerWidth-q,de=this.renderer,te=de.$maxLines*k*1.4,le={top:0,bottom:0},se=X-_.top-3*this.$borderSize-k,ue=_.top-3*this.$borderSize;D||(ue<=se||se>=te?D="bottom":D="top"),D==="top"?(le.bottom=_.top-this.$borderSize,le.top=le.bottom-te):D==="bottom"&&(le.top=_.top+k+this.$borderSize,le.bottom=le.top+te);var me=le.top>=0&&le.bottom<=X;if(!z&&!me)return!1;me?de.$maxPixelHeight=null:D==="top"?de.$maxPixelHeight=ue:de.$maxPixelHeight=se,U.style.display="";var _e=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=X+q-le.bottom-(_e?X+q-_e.bottom:0)+"px",C.isTopdown=!1):(U.style.top=le.top-(_e?_e.top:0)+"px",U.style.bottom="",C.isTopdown=!0);var Te=_.left;return Te+U.offsetWidth>ee&&(Te=ee-U.offsetWidth),U.style.left=Te-(_e?_e.left:0)+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),N=null),C.anchorPos=_,C.anchor=D,!0},C.show=function(_,k,D){this.tryShow(_,k,D?"bottom":void 0,!0)},C.goTo=function(_){var k=this.getRow(),D=this.session.getLength()-1;switch(_){case"up":k=k<=0?D:k-1;break;case"down":k=k>=D?-1:k+1;break;case"start":k=0;break;case"end":k=D}this.setRow(k)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return I}();s.importCssString(`
1138
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1139
+ background-color: #CAD6FA;
1140
+ z-index: 1;
1141
+ }
1142
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1143
+ background-color: #3a674e;
1144
+ }
1145
+ .ace_editor.ace_autocomplete .ace_line-hover {
1146
+ border: 1px solid #abbffe;
1147
+ margin-top: -1px;
1148
+ background: rgba(233,233,253,0.4);
1149
+ position: absolute;
1150
+ z-index: 2;
1151
+ }
1152
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1153
+ border: 1px solid rgba(109, 150, 13, 0.8);
1154
+ background: rgba(58, 103, 78, 0.62);
1155
+ }
1156
+ .ace_completion-meta {
1157
+ opacity: 0.5;
1158
+ margin-left: 0.9em;
1159
+ }
1160
+ .ace_completion-message {
1161
+ margin-left: 0.9em;
1162
+ color: blue;
1163
+ }
1164
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1165
+ color: #2d69c7;
1166
+ }
1167
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #93ca12;
1169
+ }
1170
+ .ace_editor.ace_autocomplete {
1171
+ width: 300px;
1172
+ z-index: 200000;
1173
+ border: 1px lightgray solid;
1174
+ position: absolute;
1175
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1176
+ line-height: 1.4;
1177
+ background: #fefefe;
1178
+ color: #111;
1179
+ }
1180
+ .ace_dark.ace_editor.ace_autocomplete {
1181
+ border: 1px #484747 solid;
1182
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1183
+ line-height: 1.4;
1184
+ background: #25282c;
1185
+ color: #c1c1c1;
1186
+ }
1187
+ .ace_autocomplete .ace_text-layer {
1188
+ width: calc(100% - 8px);
1189
+ }
1190
+ .ace_autocomplete .ace_line {
1191
+ display: flex;
1192
+ align-items: center;
1193
+ }
1194
+ .ace_autocomplete .ace_line > * {
1195
+ min-width: 0;
1196
+ flex: 0 0 auto;
1197
+ }
1198
+ .ace_autocomplete .ace_line .ace_ {
1199
+ flex: 0 1 auto;
1200
+ overflow: hidden;
1201
+ text-overflow: ellipsis;
1202
+ }
1203
+ .ace_autocomplete .ace_completion-spacer {
1204
+ flex: 1;
1205
+ }
1206
+ .ace_autocomplete.ace_loading:after {
1207
+ content: "";
1208
+ position: absolute;
1209
+ top: 0px;
1210
+ height: 2px;
1211
+ width: 8%;
1212
+ background: blue;
1213
+ z-index: 100;
1214
+ animation: ace_progress 3s infinite linear;
1215
+ animation-delay: 300ms;
1216
+ transform: translateX(-100%) scaleX(1);
1217
+ }
1218
+ @keyframes ace_progress {
1219
+ 0% { transform: translateX(-100%) scaleX(1) }
1220
+ 50% { transform: translateX(625%) scaleX(2) }
1221
+ 100% { transform: translateX(1500%) scaleX(3) }
1222
+ }
1223
+ @media (prefers-reduced-motion) {
1224
+ .ace_autocomplete.ace_loading:after {
1225
+ transform: translateX(625%) scaleX(2);
1226
+ animation: none;
1227
+ }
1228
+ }
1229
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,p){var g=function(){function v(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return v.prototype.setScreenReaderContent=function(b){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(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[f-s.config.firstRow];if(a){for(var u="doc-tooltip ",c=0;c<this._lines.length;c++)u+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=b.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},v.prototype.destroy=function(){this.screenReaderDiv.remove()},v.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);f.appendChild(s),b.appendChild(f)}return b},v}();r.AceInlineScreenReader=g}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,p){var g=e("../snippets").snippetManager,v=e("./inline_screenreader").AceInlineScreenReader,b=function(){function h(){this.editor=null}return h.prototype.show=function(f,s,a){if(a=a||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new v(f));var u=s.snippet?g.getDisplayTextForSnippet(f,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?f.removeGhostText():f.setGhostText(u),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h}();r.AceInline=b}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,p){r.parForEach=function(v,b,h){var f=0,s=v.length;s===0&&h();for(var a=0;a<s;a++)b(v[a],function(u,c){f++,f===s&&h(u,c)})};var g=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(v,b,h){h=h||g;for(var f=[],s=b-1;s>=0&&h.test(v[s]);s--)f.push(v[s]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(v,b,h){h=h||g;for(var f=[],s=b;s<v.length&&h.test(v[s]);s++)f.push(v[s]);return f},r.getCompletionPrefix=function(v){var b=v.getCursorPosition(),h=v.session.getLine(b.row),f;return v.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!f&&a&&(f=this.retrievePrecedingIdentifier(h,b.column,a))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(h,b.column)},r.triggerAutocomplete=function(v,h){var h=h??v.session.getPrecedingCharacter();return v.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(h)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,p){var g=e("./keyboard/hash_handler").HashHandler,v=e("./autocomplete/popup").AcePopup,b=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,f=e("./autocomplete/util"),s=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,c=e("./config"),i=e("./lib/event"),l=e("./lib/scroll").preventParentScroll,d=function($,S){S.completer&&S.completer.destroy()},w=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new g,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var S=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!S||this.editor.completers.length===0||(this.completions=new I($.completionsForLoading),this.openPopup(this.editor,S.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new v(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(S){this.insertMatch(),S.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(S){!this.hasSeen.has(S)&&S&&S.completer&&S.completer.onSeen&&typeof S.completer.onSeen=="function"&&(S.completer.onSeen(this.editor,S),this.hasSeen.add(S))},$.prototype.$onPopupChange=function(S){if(this.inlineRenderer&&this.inlineEnabled){var C=S?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(S){var C=this.base.row,R=this.base.column,N=this.editor.getCursorPosition().column,L=this.editor.session.getLine(C).slice(R,N);this.inlineRenderer.show(this.editor,S,L)?this.$seen(S):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var S=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!S||R.hideInlinePreview)&&this.$seen(R)}},$.prototype.$onPopupShow=function(S){this.$onPopupChange(S),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var S=this.editor.container.parentNode,C=[];S;)C.push(S),S.addEventListener("scroll",this.onLayoutChange,{passive:!0}),S=S.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var S=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",S.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var S=this.editor,C=S.renderer,R=C.layerConfig.lineHeight,N=C.$cursorLayer.getPixelPosition(this.base,!0);N.left-=this.popup.getTextLeftOffset();var L=S.container.getBoundingClientRect();N.top+=L.top-C.layerConfig.offset,N.left+=L.left-S.renderer.scrollLeft,N.left+=C.gutterWidth;var E={top:N.top,left:N.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(E.top+=C.$ghostTextWidget.el.offsetHeight);var B=S.container.getBoundingClientRect().bottom-R,P=B<E.top?{top:B,left:E.left}:E;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(N,R,"top")||this.popup.show(N,R)},$.prototype.openPopup=function(S,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var N=this.popup.getRow(),L=this.popup.data[N];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),S.keyBinding.addKeyboardHandler(this.keyboardHandler);var E;this.stickySelection&&(E=this.popup.data.indexOf(L)),(!E||E===-1)&&(E=0),this.popup.setRow(this.autoSelect?E:-1),E===N&&L!==this.completions.filtered[E]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(E===N&&B){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(S.getTheme()),this.popup.setFontSize(S.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(S){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(S){var C=document.activeElement,R=this.editor.textInput.getElement(),N=S.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(S.relatedTarget),L=this.popup&&this.popup.container;C!=R&&C.parentNode!=L&&!N&&C!=this.tooltipNode&&S.relatedTarget!=R&&this.detach()},$.prototype.mousedownListener=function(S){this.detach()},$.prototype.mousewheelListener=function(S){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(S){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(S){this.popup.goTo(S)},$.prototype.insertMatch=function(S,C){if(S||(S=this.popup.getData(this.popup.getRow())),!S)return!1;if(S.value==="")return this.detach();var R=this.completions,N=this.getCompletionProvider().insertMatch(this.editor,S,R.filterText,C);return this.completions==R&&this.detach(),N},$.prototype.showPopup=function(S,C){this.editor&&this.detach(),this.activated=!0,this.editor=S,S.completer!=this&&(S.completer&&S.completer.detach(),S.completer=this),S.on("changeSelection",this.changeListener),S.on("blur",this.blurListener),S.on("mousedown",this.mousedownListener),S.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(S){return this.completionProvider||(this.completionProvider=new x(S)),this.completionProvider},$.prototype.gatherCompletions=function(S,C){return this.getCompletionProvider().gatherCompletions(S,C)},$.prototype.updateCompletions=function(S,C){if(S&&this.base&&this.completions){var N=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:N});if(L==this.completions.filterText)return;if(this.completions.setFilter(L),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==L&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,L,S);return}if(C&&C.matches){var N=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(N.row,N.column),this.base.$insertRight=!0,this.completions=new I(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",S)}var R=this.editor.getSession(),N=this.editor.getCursorPosition(),L=f.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(N.row,N.column-L.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:N}).provideCompletions(this.editor,E,(function(B,P,O){var _=P.filtered,k=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!_.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(k)),D){var z=[{caption:D,value:""}];this.completions=new I(z),this.openPopup(this.editor,k,S),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==k&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!O&&this.showLoadingState?new I($.completionsForLoading.concat(_),P.filterText):P,this.openPopup(this.editor,k,S),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var S=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[S.getHoveredRow()]||C[S.getRow()]),N=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,E=0;E<L;E++){var B=this.editor.completers[E];if(B.getDocTooltip&&R.completerId===B.id){N=B.getDocTooltip(R);break}}if(!N&&typeof R!="string"&&(N=R),typeof N=="string"&&(N={docText:N}),!N||!N.docHTML&&!N.docText)return this.hideDocTooltip();this.showDocTooltip(N)},$.prototype.showDocTooltip=function(S){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;S.docHTML?R.innerHTML=S.docHTML:S.docText&&(R.textContent=S.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var N=this.popup,L=N.container.getBoundingClientRect(),E=400,B=300,P=N.renderer.scrollBar.width||10,O=L.left,_=window.innerWidth-L.right-P,k=N.isTopdown?L.top:window.innerHeight-P-L.bottom,D=[Math.min(_/E,1),Math.min(O/E,1),Math.min(k/B*.9)],z=Math.max.apply(Math,D),U=R.style;U.display="block",z==D[0]?(U.left=L.right+1+"px",U.right="",U.maxWidth=E*z+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,B)+"px"):z==D[1]?(U.right=window.innerWidth-L.left+"px",U.left="",U.maxWidth=E*z+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,B)+"px"):z==D[2]&&(U.left=window.innerWidth-L.left+"px",U.maxWidth=Math.min(E,window.innerWidth)+"px",N.isTopdown?(U.top=L.bottom+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.bottom,B)+"px"):(U.top=N.container.offsetTop-R.offsetHeight+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(N.container.offsetTop,B)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var S=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==S&&this.editor.focus(),this.tooltipNode=null,S.parentNode&&S.parentNode.removeChild(S)}},$.prototype.onTooltipClick=function(S){for(var C=S.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var S=this.popup.container;S&&S.parentNode&&S.parentNode.removeChild(S)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",d),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(S){return S.completer instanceof $||(S.completer&&(S.completer.destroy(),S.completer=null),c.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),S.completer=$.$sharedInstance):(S.completer=new $,S.once("destroy",d))),S.completer},$}();w.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var S=$.completer.insertMatch();if(S||$.tabstopManager)return S;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var S=f.getCompletionPrefix($);!S&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,S){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,S),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function $(S){this.initialPosition=S,this.active=!0}return $.prototype.insertByIndex=function(S,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(S,this.completions.filtered[C],R)},$.prototype.insertMatch=function(S,C,R){if(!C)return!1;if(S.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(S,C);else{if(!this.completions)return!1;var N=this.completions.filterText.length,L=0;if(C.range&&C.range.start.row===C.range.end.row&&(N-=this.initialPosition.prefix.length,N+=this.initialPosition.pos.column-C.range.start.column,L+=C.range.end.column-this.initialPosition.pos.column),N||L){var E;S.selection.getAllRanges?E=S.selection.getAllRanges():E=[S.getSelectionRange()];for(var B=0,P;P=E[B];B++)P.start.column-=N,P.end.column+=L,S.session.remove(P)}C.snippet?u.insertSnippet(S,C.snippet):this.$insertString(S,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(S,C),C.command&&C.command==="startAutocomplete"&&S.execCommand(C.command)}return S.endOperation(),!0},$.prototype.$insertString=function(S,C){var R=C.value||C;S.execCommand("insertstring",R)},$.prototype.gatherCompletions=function(S,C){var R=S.getSession(),N=S.getCursorPosition(),L=f.getCompletionPrefix(S),E=[];this.completers=S.completers;var B=S.completers.length;return S.completers.forEach(function(P,O){P.getCompletions(S,R,N,L,function(_,k){P.hideInlinePreview&&(k=k.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!_&&k&&(E=E.concat(k)),C(null,{prefix:f.getCompletionPrefix(S),matches:E,finished:--B===0})})}),!0},$.prototype.provideCompletions=function(S,C,R){var N=(function(P){var O=P.prefix,_=P.matches;this.completions=new I(_),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),L=!0,E=null;if(this.gatherCompletions(S,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var _=O.prefix;if(_.indexOf(O.prefix)===0){if(L){E=O;return}N(O)}}}).bind(this)),L=!1,E){var B=E;E=null,N(B)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(S){typeof S.cancel=="function"&&S.cancel()})},$}(),I=function(){function $(S,C){this.all=S,this.filtered=S,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(S){if(S.length>this.filterText&&S.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=S,C=this.filterCompletions(C,this.filterText),C=C.sort(function(N,L){return L.exactMatch-N.exactMatch||L.$score-N.$score||(N.caption||N.value).localeCompare(L.caption||L.value)});var R=null;C=C.filter(function(N){var L=N.snippet||N.caption||N.value;return L===R?!1:(R=L,!0)}),this.filtered=C},$.prototype.filterCompletions=function(S,C){var R=[],N=C.toUpperCase(),L=C.toLowerCase();e:for(var E=0,B;B=S[E];E++){if(B.skipFilter){B.$score=B.score,R.push(B);continue}var P=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(P){var O=-1,_=0,k=0,D,z;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(L);if(U>-1)k=U;else for(var q=0;q<C.length;q++){var X=P.indexOf(L[q],O+1),ee=P.indexOf(N[q],O+1);if(D=X>=0&&(ee<0||X<ee)?X:ee,D<0)continue e;z=D-O-1,z>0&&(O===-1&&(k+=10),k+=z,_|=1<<q),O=D}}B.matchMask=_,B.exactMatch=k?0:1,B.$score=(B.score||0)-k,R.push(B)}}return R},$}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=I}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,p){var g=function(){function v(b,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=b,b.addDynamicMarker(this)}return v.prototype.getMarkerAtPosition=function(b){return this.markers.find(function(h){return h.range.contains(b.row,b.column)})},v.prototype.markersComparator=function(b,h){return b.range.start.row-h.range.start.row},v.prototype.setMarkers=function(b){this.markers=b.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},v.prototype.update=function(b,h,f,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,u=s.lastRow,c,i=0,l=0,d=0;d<this.markers.length;d++){var w=this.markers[d];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===l?i++:(l=w.range.start.row,i=0),!(i>200))){var x=w.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var I=x.toScreenRange(f);if(I.isEmpty()){c=f.getNextFoldLine(x.end.row,c),c&&c.end.row>x.end.row&&(a=c.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(b,I,w.className,s):I.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(b,I,w.className,s):h.drawTextMarker(b,I,w.className,s):h.drawSingleLineMarker(b,I,w.className+" ace_br15",s)}}}},v}();g.prototype.MAX_MARKERS=1e4,r.MarkerGroup=g}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,p){function g(f,s){var a=f.getTextRange(b.fromPoints({row:0,column:0},s));return a.split(h).length-1}function v(f,s){var a=g(f,s),u=f.getValue().split(h),c=Object.create(null),i=u[a];return u.forEach(function(l,d){if(!(!l||l===i)){var w=Math.abs(a-d),x=u.length-w;c[l]?c[l]=Math.max(x,c[l]):c[l]=x}}),c}var b=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(f,s,a,u,c){var i=v(s,a),l=Object.keys(i);c(null,l.map(function(d){return{caption:d,value:d,score:i[d],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,p){var g=e("../snippets").snippetManager,v=e("../autocomplete").Autocomplete,b=e("../config"),h=e("../lib/lang"),f=e("../autocomplete/util"),s=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),u={getCompletions:function(L,E,B,P,O){if(E.$mode.completer)return E.$mode.completer.getCompletions(L,E,B,P,O);var _=L.session.getState(B.row),k=E.$mode.getCompletions(_,E,B,P);k=k.map(function(D){return D.completerId=u.id,D}),O(null,k)},id:"keywordCompleter"},c=function(L){var E={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(B,P,O,_){return E[P]=_||""}).replace(/\$(\d+?)/g,function(B,P){return E[P]})},i={getCompletions:function(L,E,B,P,O){var _=[],k=E.getTokenAt(B.row,B.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?_.push("html-tag"):_=g.getActiveScopes(L);var D=g.snippetMap,z=[];_.forEach(function(U){for(var q=D[U]||[],X=q.length;X--;){var ee=q[X],de=ee.name||ee.tabTrigger;de&&z.push({caption:de,snippet:ee.content,meta:ee.tabTrigger&&!ee.name?ee.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),O(null,z)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(c(L.snippet))].join(""))},id:"snippetCompleter"},l=[i,a,u];r.setCompleters=function(L){l.length=0,L&&l.push.apply(l,L)},r.addCompleter=function(L){l.push(L)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=i;var d={name:"expandSnippet",exec:function(L){return g.expandWithTab(L)},bindKey:"Tab"},w=function(L,E){x(E.session.$mode)},x=function(L){typeof L=="string"&&(L=b.$modes[L]),L&&(g.files||(g.files={}),I(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(x))},I=function(L,E){!E||!L||g.files[L]||(g.files[L]={},b.loadModule(E,function(B){B&&(g.files[L]=B,!B.snippets&&B.snippetText&&(B.snippets=g.parseSnippetFile(B.snippetText)),g.register(B.snippets||[],B.scope),B.includeScopes&&(g.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(P){x("ace/mode/"+P)})))}))},$=function(L){var E=L.editor,B=E.completer&&E.completer.activated;if(L.command.name==="backspace")B&&!f.getCompletionPrefix(E)&&E.completer.detach();else if(L.command.name==="insertstring"&&!B){S=L;var P=L.editor.$liveAutocompletionDelay;P?C.delay(P):R(L)}},S,C=h.delayedCall(function(){R(S)},0),R=function(L){var E=L.editor,B=f.getCompletionPrefix(E),P=L.args,O=f.triggerAutocomplete(E,P);if(B&&B.length>=E.$liveAutocompletionThreshold||O){var _=v.for(E);_.autoShown=!0,_.showPopup(E)}},N=e("../editor").Editor;e("../config").defineOptions(N.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(v.for(this),this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.addCommand(v.startCommand)):this.commands.removeCommand(v.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(d),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(d),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=s}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()}(ff)),ff.exports}Mx();var mf={exports:{}},vf;function Ex(){return vf||(vf=1,function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,p){p.exports=`
1230
+
1231
+ /* ------------------------------------------------------------------------------------------
1232
+ * Editor Search Form
1233
+ * --------------------------------------------------------------------------------------- */
1234
+ .ace_search {
1235
+ background-color: #ddd;
1236
+ color: #666;
1237
+ border: 1px solid #cbcbcb;
1238
+ border-top: 0 none;
1239
+ overflow: hidden;
1240
+ margin: 0;
1241
+ padding: 4px 6px 0 4px;
1242
+ position: absolute;
1243
+ top: 0;
1244
+ z-index: 99;
1245
+ white-space: normal;
1246
+ }
1247
+ .ace_search.left {
1248
+ border-left: 0 none;
1249
+ border-radius: 0px 0px 5px 0px;
1250
+ left: 0;
1251
+ }
1252
+ .ace_search.right {
1253
+ border-radius: 0px 0px 0px 5px;
1254
+ border-right: 0 none;
1255
+ right: 0;
1256
+ }
1257
+
1258
+ .ace_search_form, .ace_replace_form {
1259
+ margin: 0 20px 4px 0;
1260
+ overflow: hidden;
1261
+ line-height: 1.9;
1262
+ }
1263
+ .ace_replace_form {
1264
+ margin-right: 0;
1265
+ }
1266
+ .ace_search_form.ace_nomatch {
1267
+ outline: 1px solid red;
1268
+ }
1269
+
1270
+ .ace_search_field {
1271
+ border-radius: 3px 0 0 3px;
1272
+ background-color: white;
1273
+ color: black;
1274
+ border: 1px solid #cbcbcb;
1275
+ border-right: 0 none;
1276
+ outline: 0;
1277
+ padding: 0;
1278
+ font-size: inherit;
1279
+ margin: 0;
1280
+ line-height: inherit;
1281
+ padding: 0 6px;
1282
+ min-width: 17em;
1283
+ vertical-align: top;
1284
+ min-height: 1.8em;
1285
+ box-sizing: content-box;
1286
+ }
1287
+ .ace_searchbtn {
1288
+ border: 1px solid #cbcbcb;
1289
+ line-height: inherit;
1290
+ display: inline-block;
1291
+ padding: 0 6px;
1292
+ background: #fff;
1293
+ border-right: 0 none;
1294
+ border-left: 1px solid #dcdcdc;
1295
+ cursor: pointer;
1296
+ margin: 0;
1297
+ position: relative;
1298
+ color: #666;
1299
+ }
1300
+ .ace_searchbtn:last-child {
1301
+ border-radius: 0 3px 3px 0;
1302
+ border-right: 1px solid #cbcbcb;
1303
+ }
1304
+ .ace_searchbtn:disabled {
1305
+ background: none;
1306
+ cursor: default;
1307
+ }
1308
+ .ace_searchbtn:hover {
1309
+ background-color: #eef1f6;
1310
+ }
1311
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1312
+ padding: 0px 0.7em
1313
+ }
1314
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1315
+ content: "";
1316
+ border: solid 2px #888;
1317
+ width: 0.5em;
1318
+ height: 0.5em;
1319
+ border-width: 2px 0 0 2px;
1320
+ display:inline-block;
1321
+ transform: rotate(-45deg);
1322
+ }
1323
+ .ace_searchbtn.next:after {
1324
+ border-width: 0 2px 2px 0 ;
1325
+ }
1326
+ .ace_searchbtn_close {
1327
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1328
+ border-radius: 50%;
1329
+ border: 0 none;
1330
+ color: #656565;
1331
+ cursor: pointer;
1332
+ font: 16px/16px Arial;
1333
+ padding: 0;
1334
+ height: 14px;
1335
+ width: 14px;
1336
+ top: 9px;
1337
+ right: 7px;
1338
+ position: absolute;
1339
+ }
1340
+ .ace_searchbtn_close:hover {
1341
+ background-color: #656565;
1342
+ background-position: 50% 100%;
1343
+ color: white;
1344
+ }
1345
+
1346
+ .ace_button {
1347
+ margin-left: 2px;
1348
+ cursor: pointer;
1349
+ -webkit-user-select: none;
1350
+ -moz-user-select: none;
1351
+ -o-user-select: none;
1352
+ -ms-user-select: none;
1353
+ user-select: none;
1354
+ overflow: hidden;
1355
+ opacity: 0.7;
1356
+ border: 1px solid rgba(100,100,100,0.23);
1357
+ padding: 1px;
1358
+ box-sizing: border-box!important;
1359
+ color: black;
1360
+ }
1361
+
1362
+ .ace_button:hover {
1363
+ background-color: #eee;
1364
+ opacity:1;
1365
+ }
1366
+ .ace_button:active {
1367
+ background-color: #ddd;
1368
+ }
1369
+
1370
+ .ace_button.checked {
1371
+ border-color: #3399ff;
1372
+ opacity:1;
1373
+ }
1374
+
1375
+ .ace_search_options{
1376
+ margin-bottom: 3px;
1377
+ text-align: right;
1378
+ -webkit-user-select: none;
1379
+ -moz-user-select: none;
1380
+ -o-user-select: none;
1381
+ -ms-user-select: none;
1382
+ user-select: none;
1383
+ clear: both;
1384
+ }
1385
+
1386
+ .ace_search_counter {
1387
+ float: left;
1388
+ font-family: arial;
1389
+ padding: 0 8px;
1390
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,p){var g=e("../lib/dom"),v=e("../lib/lang"),b=e("../lib/event"),h=e("./searchbox-css"),f=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),a=e("../config").nls,u=999;g.importCssString(h,"ace_searchbox",!1);var c=function(){function d(w,x,I){this.activeInput,this.element=g.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("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"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("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:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("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),g.importCssString(h,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return d.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},d.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},d.prototype.onEditorInput=function(){this.find(!1,!1,!0)},d.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},d.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(I){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(I)}),b.addListener(w,"click",function(I){var $=I.target||I.srcElement,S=$.getAttribute("action");S&&x[S]?x[S]():x.$searchBarKb.commands[S]&&x.$searchBarKb.commands[S].exec(x),b.stopPropagation(I)}),b.addCommandKeyListener(w,function(I,$,S){var C=s.keyCodeToString(S),R=x.$searchBarKb.findKeyCommand($,C);R&&R.exec&&(R.exec(x),b.stopEvent(I))}),this.$onChange=v.delayedCall(function(){x.find(!1,!1)}),b.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),b.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),b.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},d.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},d.prototype.$syncOptions=function(w){g.setCssClass(this.replaceOption,"checked",this.searchRange),g.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",g.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),g.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),g.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},d.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(w,x,I){if(this.editor.session){var $=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:I,range:this.searchRange}),S=!$&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",S),this.editor._emit("findSearchBox",{match:!S}),this.highlight(),this.updateCounter()}},d.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,I=x.unicode,$=0,S=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,`
1391
+ `),w.session.doc.$autoNewLine=`
1392
+ `);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var N=x.lastIndex=0,L;(L=x.exec(C))&&($++,N=L.index,N<=R&&S++,!($>u||!L[0]&&(x.lastIndex=N+=v.skipEmptyMatch(C,N,I),N>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[S,$>u?u+"+":$])},d.prototype.findNext=function(){this.find(!0,!1)},d.prototype.findPrev=function(){this.find(!0,!0)},d.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},d.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},d.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},d.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},d.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},d.prototype.show=function(w,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=v.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},d.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},d}(),i=new f;i.bindKeys({"Ctrl-f|Command-f":function(d){var w=d.isReplace=!d.isReplace;d.replaceBox.style.display=w?"":"none",d.replaceOption.checked=!1,d.$syncOptions(),d.searchInput.focus()},"Ctrl-H|Command-Option-F":function(d){d.editor.getReadOnly()||(d.replaceOption.checked=!0,d.$syncOptions(),d.replaceInput.focus())},"Ctrl-G|Command-G":function(d){d.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(d){d.findPrev()},esc:function(d){setTimeout(function(){d.hide()})},Return:function(d){d.activeInput==d.replaceInput&&d.replace(),d.findNext()},"Shift-Return":function(d){d.activeInput==d.replaceInput&&d.replace(),d.findPrev()},"Alt-Return":function(d){d.activeInput==d.replaceInput&&d.replaceAll(),d.findAll()},Tab:function(d){(d.activeInput==d.replaceInput?d.searchInput:d.replaceInput).focus()}}),i.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(d){d.regExpOption.checked=!d.regExpOption.checked,d.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(d){d.caseSensitiveOption.checked=!d.caseSensitiveOption.checked,d.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(d){d.wholeWordOption.checked=!d.wholeWordOption.checked,d.$syncOptions()}},{name:"toggleReplace",exec:function(d){d.replaceOption.checked=!d.replaceOption.checked,d.$syncOptions()}},{name:"searchInSelection",exec:function(d){d.searchOption.checked=!d.searchRange,d.setSearchRange(d.searchOption.checked&&d.editor.getSelectionRange()),d.$syncOptions()}}]);var l=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);c.prototype.$searchBarKb=i,c.prototype.$closeSearchBarKb=l,r.SearchBox=c,r.Search=function(d,w){var x=d.searchBox||new c(d),I=d.session.selection.getRange(),$=I.isMultiLine()?"":d.session.getTextRange(I);x.show($,w)}}),function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})}()}(mf)),mf.exports}Ex();var Ix=Object.defineProperty,Lx=(n,t,e)=>t in n?Ix(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Il=(n,t,e)=>Lx(n,typeof t!="symbol"?t+"":t,e);function yf(n,t){return function(){return n.apply(t,arguments)}}const{toString:Rx}=Object.prototype,{getPrototypeOf:bu}=Object,{iterator:Ll,toStringTag:wf}=Symbol,Rl=(n=>t=>{const e=Rx.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Gi=n=>(n=n.toLowerCase(),t=>Rl(t)===n),Ol=n=>t=>typeof t===n,{isArray:ta}=Array,na=Ol("undefined");function Na(n){return n!==null&&!na(n)&&n.constructor!==null&&!na(n.constructor)&&ti(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const bf=Gi("ArrayBuffer");function Ox(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&bf(n.buffer),t}const Nx=Ol("string"),ti=Ol("function"),xf=Ol("number"),Da=n=>n!==null&&typeof n=="object",Dx=n=>n===!0||n===!1,Nl=n=>{if(Rl(n)!=="object")return!1;const t=bu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wf in n)&&!(Ll in n)},Fx=n=>{if(!Da(n)||Na(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Px=Gi("Date"),Wx=Gi("File"),Bx=Gi("Blob"),zx=Gi("FileList"),Hx=n=>Da(n)&&ti(n.pipe),jx=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||ti(n.append)&&((t=Rl(n))==="formdata"||t==="object"&&ti(n.toString)&&n.toString()==="[object FormData]"))},Ux=Gi("URLSearchParams"),[Vx,Kx,Gx,qx]=["ReadableStream","Request","Response","Headers"].map(Gi),Yx=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fa(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,p;if(typeof n!="object"&&(n=[n]),ta(n))for(r=0,p=n.length;r<p;r++)t.call(null,n[r],r,n);else{if(Na(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),v=g.length;let b;for(r=0;r<v;r++)b=g[r],t.call(null,n[b],b,n)}}function Cf(n,t){if(Na(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,p;for(;r-- >0;)if(p=e[r],t===p.toLowerCase())return p;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kf=n=>!na(n)&&n!==ws;function xu(){const{caseless:n,skipUndefined:t}=kf(this)&&this||{},e={},r=(p,g)=>{const v=n&&Cf(e,g)||g;Nl(e[v])&&Nl(p)?e[v]=xu(e[v],p):Nl(p)?e[v]=xu({},p):ta(p)?e[v]=p.slice():(!t||!na(p))&&(e[v]=p)};for(let p=0,g=arguments.length;p<g;p++)arguments[p]&&Fa(arguments[p],r);return e}const Xx=(n,t,e,{allOwnKeys:r}={})=>(Fa(t,(p,g)=>{e&&ti(p)?n[g]=yf(p,e):n[g]=p},{allOwnKeys:r}),n),Zx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Qx=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Jx=(n,t,e,r)=>{let p,g,v;const b={};if(t=t||{},n==null)return t;do{for(p=Object.getOwnPropertyNames(n),g=p.length;g-- >0;)v=p[g],(!r||r(v,n,t))&&!b[v]&&(t[v]=n[v],b[v]=!0);n=e!==!1&&bu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},e1=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},t1=n=>{if(!n)return null;if(ta(n))return n;let t=n.length;if(!xf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},n1=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&bu(Uint8Array)),r1=(n,t)=>{const e=(n&&n[Ll]).call(n);let r;for(;(r=e.next())&&!r.done;){const p=r.value;t.call(n,p[0],p[1])}},i1=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},o1=Gi("HTMLFormElement"),s1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Sf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),a1=Gi("RegExp"),Af=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Fa(e,(p,g)=>{let v;(v=t(p,g,n))!==!1&&(r[g]=v||p)}),Object.defineProperties(n,r)},l1=n=>{Af(n,(t,e)=>{if(ti(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(ti(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},c1=(n,t)=>{const e={},r=p=>{p.forEach(g=>{e[g]=!0})};return ta(n)?r(n):r(String(n).split(t)),e},u1=()=>{},h1=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function d1(n){return!!(n&&ti(n.append)&&n[wf]==="FormData"&&n[Ll])}const p1=n=>{const t=new Array(10),e=(r,p)=>{if(Da(r)){if(t.indexOf(r)>=0)return;if(Na(r))return r;if(!("toJSON"in r)){t[p]=r;const g=ta(r)?[]:{};return Fa(r,(v,b)=>{const h=e(v,p+1);!na(h)&&(g[b]=h)}),t[p]=void 0,g}}return r};return e(n,0)},f1=Gi("AsyncFunction"),g1=n=>n&&(Da(n)||ti(n))&&ti(n.then)&&ti(n.catch),_f=((n,t)=>n?setImmediate:t?((e,r)=>(ws.addEventListener("message",({source:p,data:g})=>{p===ws&&g===e&&r.length&&r.shift()()},!1),p=>{r.push(p),ws.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ti(ws.postMessage)),m1=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||_f,v1=n=>n!=null&&ti(n[Ll]),Se={isArray:ta,isArrayBuffer:bf,isBuffer:Na,isFormData:jx,isArrayBufferView:Ox,isString:Nx,isNumber:xf,isBoolean:Dx,isObject:Da,isPlainObject:Nl,isEmptyObject:Fx,isReadableStream:Vx,isRequest:Kx,isResponse:Gx,isHeaders:qx,isUndefined:na,isDate:Px,isFile:Wx,isBlob:Bx,isRegExp:a1,isFunction:ti,isStream:Hx,isURLSearchParams:Ux,isTypedArray:n1,isFileList:zx,forEach:Fa,merge:xu,extend:Xx,trim:Yx,stripBOM:Zx,inherits:Qx,toFlatObject:Jx,kindOf:Rl,kindOfTest:Gi,endsWith:e1,toArray:t1,forEachEntry:r1,matchAll:i1,isHTMLForm:o1,hasOwnProperty:Sf,hasOwnProp:Sf,reduceDescriptors:Af,freezeMethods:l1,toObjectSet:c1,toCamelCase:s1,noop:u1,toFiniteNumber:h1,findKey:Cf,global:ws,isContextDefined:kf,isSpecCompliantForm:d1,toJSONObject:p1,isAsyncFn:f1,isThenable:g1,setImmediate:_f,asap:m1,isIterable:v1};function St(n,t,e,r,p){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),p&&(this.response=p,this.status=p.status?p.status:null)}Se.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const $f=St.prototype,Tf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Tf[n]={value:n}}),Object.defineProperties(St,Tf),Object.defineProperty($f,"isAxiosError",{value:!0}),St.from=(n,t,e,r,p,g)=>{const v=Object.create($f);Se.toFlatObject(n,v,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=t==null&&n?n.code:t;return St.call(v,b,h,e,r,p),n&&v.cause==null&&Object.defineProperty(v,"cause",{value:n,configurable:!0}),v.name=n&&n.name||"Error",g&&Object.assign(v,g),v};const y1=null;function Cu(n){return Se.isPlainObject(n)||Se.isArray(n)}function Mf(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Ef(n,t,e){return n?n.concat(t).map(function(r,p){return r=Mf(r),!e&&p?"["+r+"]":r}).join(e?".":""):t}function w1(n){return Se.isArray(n)&&!n.some(Cu)}const b1=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function Dl(n,t,e){if(!Se.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Se.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,i){return!Se.isUndefined(i[c])});const r=e.metaTokens,p=e.visitor||f,g=e.dots,v=e.indexes,b=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(p))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Se.isDate(c))return c.toISOString();if(Se.isBoolean(c))return c.toString();if(!b&&Se.isBlob(c))throw new St("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(c)||Se.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function f(c,i,l){let d=c;if(c&&!l&&typeof c=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Se.isArray(c)&&w1(c)||(Se.isFileList(c)||Se.endsWith(i,"[]"))&&(d=Se.toArray(c)))return i=Mf(i),d.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&t.append(v===!0?Ef([i],x,g):v===null?i:i+"[]",h(w))}),!1}return Cu(c)?!0:(t.append(Ef(l,i,g),h(c)),!1)}const s=[],a=Object.assign(b1,{defaultVisitor:f,convertValue:h,isVisitable:Cu});function u(c,i){if(!Se.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(c),Se.forEach(c,function(l,d){(!(Se.isUndefined(l)||l===null)&&p.call(t,l,Se.isString(d)?d.trim():d,i,a))===!0&&u(l,i?i.concat(d):[d])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),t}function If(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ku(n,t){this._pairs=[],n&&Dl(n,this,t)}const Lf=ku.prototype;Lf.append=function(n,t){this._pairs.push([n,t])},Lf.toString=function(n){const t=n?function(e){return n.call(this,e,If)}:If;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function x1(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rf(n,t,e){if(!t)return n;const r=e&&e.encode||x1;Se.isFunction(e)&&(e={serialize:e});const p=e&&e.serialize;let g;if(p?g=p(t,e):g=Se.isURLSearchParams(t)?t.toString():new ku(t,e).toString(r),g){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class Of{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Se.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},C1=typeof URLSearchParams<"u"?URLSearchParams:ku,k1=typeof FormData<"u"?FormData:null,S1=typeof Blob<"u"?Blob:null,A1={isBrowser:!0,classes:{URLSearchParams:C1,FormData:k1,Blob:S1},protocols:["http","https","file","blob","url","data"]},Su=typeof window<"u"&&typeof document<"u",Au=typeof navigator=="object"&&navigator||void 0,_1=Su&&(!Au||["ReactNative","NativeScript","NS"].indexOf(Au.product)<0),$1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T1=Su&&window.location.href||"http://localhost",M1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Su,hasStandardBrowserEnv:_1,hasStandardBrowserWebWorkerEnv:$1,navigator:Au,origin:T1},Symbol.toStringTag,{value:"Module"})),Er={...M1,...A1};function E1(n,t){return Dl(n,new Er.classes.URLSearchParams,{visitor:function(e,r,p,g){return Er.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function I1(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function L1(n){const t={},e=Object.keys(n);let r;const p=e.length;let g;for(r=0;r<p;r++)g=e[r],t[g]=n[g];return t}function Df(n){function t(e,r,p,g){let v=e[g++];if(v==="__proto__")return!0;const b=Number.isFinite(+v),h=g>=e.length;return v=!v&&Se.isArray(p)?p.length:v,h?(Se.hasOwnProp(p,v)?p[v]=[p[v],r]:p[v]=r,!b):((!p[v]||!Se.isObject(p[v]))&&(p[v]=[]),t(e,r,p[v],g)&&Se.isArray(p[v])&&(p[v]=L1(p[v])),!b)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,p)=>{t(I1(r),p,e,0)}),e}return null}function R1(n,t,e){if(Se.isString(n))try{return(t||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Pa={transitional:Nf,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,p=Se.isObject(n);if(p&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(Df(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(p){if(e.indexOf("application/x-www-form-urlencoded")>-1)return E1(n,this.formSerializer).toString();if((g=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return Dl(g?{"files[]":n}:n,v&&new v,this.formSerializer)}}return p||r?(t.setContentType("application/json",!1),R1(n)):n}],transformResponse:[function(n){const t=this.transitional||Pa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(e&&!this.responseType||r)){const p=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(g){if(p)throw g.name==="SyntaxError"?St.from(g,St.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Er.classes.FormData,Blob:Er.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Pa.headers[n]={}});const O1=Se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),N1=n=>{const t={};let e,r,p;return n&&n.split(`
1393
+ `).forEach(function(g){p=g.indexOf(":"),e=g.substring(0,p).trim().toLowerCase(),r=g.substring(p+1).trim(),!(!e||t[e]&&O1[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Ff=Symbol("internals");function Wa(n){return n&&String(n).trim().toLowerCase()}function Fl(n){return n===!1||n==null?n:Se.isArray(n)?n.map(Fl):String(n)}function D1(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const F1=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function _u(n,t,e,r,p){if(Se.isFunction(r))return r.call(this,t,e);if(p&&(t=e),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function P1(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function W1(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(p,g,v){return this[r].call(this,t,p,g,v)},configurable:!0})})}let ni=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function p(v,b,h){const f=Wa(b);if(!f)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,f);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||b]=Fl(v))}const g=(v,b)=>Se.forEach(v,(h,f)=>p(h,f,b));if(Se.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(Se.isString(n)&&(n=n.trim())&&!F1(n))g(N1(n),t);else if(Se.isObject(n)&&Se.isIterable(n)){let v={},b,h;for(const f of n){if(!Se.isArray(f))throw TypeError("Object iterator must return a key-value pair");v[h=f[0]]=(b=v[h])?Se.isArray(b)?[...b,f[1]]:[b,f[1]]:f[1]}g(v,t)}else n!=null&&p(t,n,e);return this}get(n,t){if(n=Wa(n),n){const e=Se.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return D1(r);if(Se.isFunction(t))return t.call(this,r,e);if(Se.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Wa(n),n){const e=Se.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||_u(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function p(g){if(g=Wa(g),g){const v=Se.findKey(e,g);v&&(!t||_u(e,e[v],v,t))&&(delete e[v],r=!0)}}return Se.isArray(n)?n.forEach(p):p(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const p=t[e];(!n||_u(this,this[p],p,n,!0))&&(delete this[p],r=!0)}return r}normalize(n){const t=this,e={};return Se.forEach(this,(r,p)=>{const g=Se.findKey(e,p);if(g){t[g]=Fl(r),delete t[p];return}const v=n?P1(p):String(p).trim();v!==p&&delete t[p],t[v]=Fl(r),e[v]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Se.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Se.isArray(e)?e.join(", "):e)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
1394
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[Ff]=this[Ff]={accessors:{}}).accessors,e=this.prototype;function r(p){const g=Wa(p);t[g]||(W1(e,p),t[g]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(ni.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(ni);function $u(n,t){const e=this||Pa,r=t||e,p=ni.from(r.headers);let g=r.data;return Se.forEach(n,function(v){g=v.call(e,g,p.normalize(),t?t.status:void 0)}),p.normalize(),g}function Pf(n){return!!(n&&n.__CANCEL__)}function ra(n,t,e){St.call(this,n??"canceled",St.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(ra,St,{__CANCEL__:!0});function Wf(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new St("Request failed with status code "+e.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function B1(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function z1(n,t){n=n||10;const e=new Array(n),r=new Array(n);let p=0,g=0,v;return t=t!==void 0?t:1e3,function(b){const h=Date.now(),f=r[g];v||(v=h),e[p]=b,r[p]=h;let s=g,a=0;for(;s!==p;)a+=e[s++],s=s%n;if(p=(p+1)%n,p===g&&(g=(g+1)%n),h-v<t)return;const u=f&&h-f;return u?Math.round(a*1e3/u):void 0}}function H1(n,t){let e=0,r=1e3/t,p,g;const v=(b,h=Date.now())=>{e=h,p=null,g&&(clearTimeout(g),g=null),n(...b)};return[(...b)=>{const h=Date.now(),f=h-e;f>=r?v(b,h):(p=b,g||(g=setTimeout(()=>{g=null,v(p)},r-f)))},()=>p&&v(p)]}const Pl=(n,t,e=3)=>{let r=0;const p=z1(50,250);return H1(g=>{const v=g.loaded,b=g.lengthComputable?g.total:void 0,h=v-r,f=p(h),s=v<=b;r=v;const a={loaded:v,total:b,progress:b?v/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&s?(b-v)/f:void 0,event:g,lengthComputable:b!=null,[t?"download":"upload"]:!0};n(a)},e)},Bf=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},zf=n=>(...t)=>Se.asap(()=>n(...t)),j1=Er.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Er.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Er.origin),Er.navigator&&/(msie|trident)/i.test(Er.navigator.userAgent)):()=>!0,U1=Er.hasStandardBrowserEnv?{write(n,t,e,r,p,g){const v=[n+"="+encodeURIComponent(t)];Se.isNumber(e)&&v.push("expires="+new Date(e).toGMTString()),Se.isString(r)&&v.push("path="+r),Se.isString(p)&&v.push("domain="+p),g===!0&&v.push("secure"),document.cookie=v.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function V1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function K1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Hf(n,t,e){let r=!V1(t);return n&&(r||e==!1)?K1(n,t):t}const jf=n=>n instanceof ni?{...n}:n;function bs(n,t){t=t||{};const e={};function r(f,s,a,u){return Se.isPlainObject(f)&&Se.isPlainObject(s)?Se.merge.call({caseless:u},f,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function p(f,s,a,u){if(Se.isUndefined(s)){if(!Se.isUndefined(f))return r(void 0,f,a,u)}else return r(f,s,a,u)}function g(f,s){if(!Se.isUndefined(s))return r(void 0,s)}function v(f,s){if(Se.isUndefined(s)){if(!Se.isUndefined(f))return r(void 0,f)}else return r(void 0,s)}function b(f,s,a){if(a in t)return r(f,s);if(a in n)return r(void 0,f)}const h={url:g,method:g,data:g,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:b,headers:(f,s,a)=>p(jf(f),jf(s),a,!0)};return Se.forEach(Object.keys({...n,...t}),function(f){const s=h[f]||p,a=s(n[f],t[f],f);Se.isUndefined(a)&&s!==b||(e[f]=a)}),e}const Uf=n=>{const t=bs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:p,xsrfCookieName:g,headers:v,auth:b}=t;if(t.headers=v=ni.from(v),t.url=Rf(Hf(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&v.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Se.isFormData(e)){if(Er.hasStandardBrowserEnv||Er.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if(Se.isFunction(e.getHeaders)){const h=e.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&v.set(s,a)})}}if(Er.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&j1(t.url))){const h=p&&g&&U1.read(g);h&&v.set(p,h)}return t},G1=typeof XMLHttpRequest<"u",q1=G1&&function(n){return new Promise(function(t,e){const r=Uf(n);let p=r.data;const g=ni.from(r.headers).normalize();let{responseType:v,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const x=ni.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),I={data:!v||v==="text"||v==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:n,request:l};Wf(function($){t($),i()},function($){e($),i()},I),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new St("Request aborted",St.ECONNABORTED,n,l)),l=null)},l.onerror=function(x){const I=x&&x.message?x.message:"Network Error",$=new St(I,St.ERR_NETWORK,n,l);$.event=x||null,e($),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Nf;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new St(x,I.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,n,l)),l=null},p===void 0&&g.setContentType(null),"setRequestHeader"in l&&Se.forEach(g.toJSON(),function(x,I){l.setRequestHeader(I,x)}),Se.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),v&&v!=="json"&&(l.responseType=r.responseType),h&&([a,c]=Pl(h,!0),l.addEventListener("progress",a)),b&&l.upload&&([s,u]=Pl(b),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new ra(null,n,l):x),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=B1(r.url);if(w&&Er.protocols.indexOf(w)===-1){e(new St("Unsupported protocol "+w+":",St.ERR_BAD_REQUEST,n));return}l.send(p||null)})},Y1=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,p;const g=function(f){if(!p){p=!0,b();const s=f instanceof Error?f:this.reason;r.abort(s instanceof St?s:new ra(s instanceof Error?s.message:s))}};let v=t&&setTimeout(()=>{v=null,g(new St(`timeout ${t} of ms exceeded`,St.ETIMEDOUT))},t);const b=()=>{n&&(v&&clearTimeout(v),v=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(g):f.removeEventListener("abort",g)}),n=null)};n.forEach(f=>f.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(b),h}},X1=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,p;for(;r<e;)p=r+t,yield n.slice(r,p),r=p},Z1=async function*(n,t){for await(const e of Q1(n))yield*X1(e,t)},Q1=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Vf=(n,t,e,r)=>{const p=Z1(n,t);let g=0,v,b=h=>{v||(v=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:s}=await p.next();if(f){b(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),p.return()}},{highWaterMark:2})},Kf=64*1024,{isFunction:Wl}=Se,Gf=(({fetch:n,Request:t,Response:e})=>({fetch:n,Request:t,Response:e}))(Se.global),{ReadableStream:qf,TextEncoder:Yf}=Se.global,Xf=(n,...t)=>{try{return!!n(...t)}catch{return!1}},J1=n=>{const{fetch:t,Request:e,Response:r}=Object.assign({},Gf,n),p=Wl(t),g=Wl(e),v=Wl(r);if(!p)return!1;const b=p&&Wl(qf),h=p&&(typeof Yf=="function"?(i=>l=>i.encode(l))(new Yf):async i=>new Uint8Array(await new e(i).arrayBuffer())),f=g&&b&&Xf(()=>{let i=!1;const l=new e(Er.origin,{body:new qf,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!l}),s=v&&b&&Xf(()=>Se.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(l,d)=>{let w=l&&l[i];if(w)return w.call(l);throw new St(`Response type '${i}' is not supported`,St.ERR_NOT_SUPPORT,d)})});const u=async i=>{if(i==null)return 0;if(Se.isBlob(i))return i.size;if(Se.isSpecCompliantForm(i))return(await new e(Er.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(i)||Se.isArrayBuffer(i))return i.byteLength;if(Se.isURLSearchParams(i)&&(i=i+""),Se.isString(i))return(await h(i)).byteLength},c=async(i,l)=>Se.toFiniteNumber(i.getContentLength())??u(l);return async i=>{let{url:l,method:d,data:w,signal:x,cancelToken:I,timeout:$,onDownloadProgress:S,onUploadProgress:C,responseType:R,headers:N,withCredentials:L="same-origin",fetchOptions:E}=Uf(i);R=R?(R+"").toLowerCase():"text";let B=Y1([x,I&&I.toAbortSignal()],$),P=null;const O=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let _;try{if(C&&f&&d!=="get"&&d!=="head"&&(_=await c(N,w))!==0){let X=new e(l,{method:"POST",body:w,duplex:"half"}),ee;if(Se.isFormData(w)&&(ee=X.headers.get("content-type"))&&N.setContentType(ee),X.body){const[de,te]=Bf(_,Pl(zf(C)));w=Vf(X.body,Kf,de,te)}}Se.isString(L)||(L=L?"include":"omit");const k=g&&"credentials"in e.prototype,D={...E,signal:B,method:d.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:k?L:void 0};P=g&&new e(l,D);let z=await(g?t(P,E):t(l,D));const U=s&&(R==="stream"||R==="response");if(s&&(S||U&&O)){const X={};["status","statusText","headers"].forEach(le=>{X[le]=z[le]});const ee=Se.toFiniteNumber(z.headers.get("content-length")),[de,te]=S&&Bf(ee,Pl(zf(S),!0))||[];z=new r(Vf(z.body,Kf,de,()=>{te&&te(),O&&O()}),X)}R=R||"text";let q=await a[Se.findKey(a,R)||"text"](z,i);return!U&&O&&O(),await new Promise((X,ee)=>{Wf(X,ee,{data:q,headers:ni.from(z.headers),status:z.status,statusText:z.statusText,config:i,request:P})})}catch(k){throw O&&O(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,i,P),{cause:k.cause||k}):St.from(k,k&&k.code,i,P)}}},eC=new Map,Zf=n=>{let t=Se.merge.call({skipUndefined:!0},Gf,n?n.env:null);const{fetch:e,Request:r,Response:p}=t,g=[r,p,e];let v=g.length,b=v,h,f,s=eC;for(;b--;)h=g[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:J1(t)),s=f;return f};Zf();const Tu={http:y1,xhr:q1,fetch:{get:Zf}};Se.forEach(Tu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Qf=n=>`- ${n}`,tC=n=>Se.isFunction(n)||n===null||n===!1,Jf={getAdapter:(n,t)=>{n=Se.isArray(n)?n:[n];const{length:e}=n;let r,p;const g={};for(let v=0;v<e;v++){r=n[v];let b;if(p=r,!tC(r)&&(p=Tu[(b=String(r)).toLowerCase()],p===void 0))throw new St(`Unknown adapter '${b}'`);if(p&&(Se.isFunction(p)||(p=p.get(t))))break;g[b||"#"+v]=p}if(!p){const v=Object.entries(g).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=e?v.length>1?`since :
1395
+ `+v.map(Qf).join(`
1396
+ `):" "+Qf(v[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return p},adapters:Tu};function Mu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ra(null,n)}function eg(n){return Mu(n),n.headers=ni.from(n.headers),n.data=$u.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Jf.getAdapter(n.adapter||Pa.adapter,n)(n).then(function(t){return Mu(n),t.data=$u.call(n,n.transformResponse,t),t.headers=ni.from(t.headers),t},function(t){return Pf(t)||(Mu(n),t&&t.response&&(t.response.data=$u.call(n,n.transformResponse,t.response),t.response.headers=ni.from(t.response.headers))),Promise.reject(t)})}const tg="1.12.0",Bl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Bl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const ng={};Bl.transitional=function(n,t,e){function r(p,g){return"[Axios v"+tg+"] Transitional option '"+p+"'"+g+(e?". "+e:"")}return(p,g,v)=>{if(n===!1)throw new St(r(g," has been removed"+(t?" in "+t:"")),St.ERR_DEPRECATED);return t&&!ng[g]&&(ng[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(p,g,v):!0}},Bl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function nC(n,t,e){if(typeof n!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let p=r.length;for(;p-- >0;){const g=r[p],v=t[g];if(v){const b=n[g],h=b===void 0||v(b,g,n);if(h!==!0)throw new St("option "+g+" must be "+h,St.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new St("Unknown option "+g,St.ERR_BAD_OPTION)}}const zl={assertOptions:nC,validators:Bl},ao=zl.validators;let xs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Of,response:new Of}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const p=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?p&&!String(e.stack).endsWith(p.replace(/^.+\n.+\n/,""))&&(e.stack+=`
1397
+ `+p):e.stack=p}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=bs(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:p}=t;e!==void 0&&zl.assertOptions(e,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),r!=null&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:zl.assertOptions(r,{encode:ao.function,serialize:ao.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),zl.assertOptions(t,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=p&&Se.merge(p.common,p[t.method]);p&&Se.forEach(["delete","get","head","post","put","patch","common"],c=>{delete p[c]}),t.headers=ni.concat(g,p);const v=[];let b=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(t)===!1||(b=b&&c.synchronous,v.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let f,s=0,a;if(!b){const c=[eg.bind(this),void 0];for(c.unshift(...v),c.push(...h),a=c.length,f=Promise.resolve(t);s<a;)f=f.then(c[s++],c[s++]);return f}a=v.length;let u=t;for(s=0;s<a;){const c=v[s++],i=v[s++];try{u=c(u)}catch(l){i.call(this,l);break}}try{f=eg.call(this,u)}catch(c){return Promise.reject(c)}for(s=0,a=h.length;s<a;)f=f.then(h[s++],h[s++]);return f}getUri(n){n=bs(this.defaults,n);const t=Hf(n.baseURL,n.url,n.allowAbsoluteUrls);return Rf(t,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){xs.prototype[n]=function(t,e){return this.request(bs(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,p,g){return this.request(bs(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:p}))}}xs.prototype[n]=t(),xs.prototype[n+"Form"]=t(!0)});let rC=class s0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(p){e=p});const r=this;this.promise.then(p=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](p);r._listeners=null}),this.promise.then=p=>{let g;const v=new Promise(b=>{r.subscribe(b),g=b}).then(p);return v.cancel=function(){r.unsubscribe(g)},v},t(function(p,g,v){r.reason||(r.reason=new ra(p,g,v),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new s0(function(e){t=e}),cancel:t}}};function iC(n){return function(t){return n.apply(null,t)}}function oC(n){return Se.isObject(n)&&n.isAxiosError===!0}const Eu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Eu).forEach(([n,t])=>{Eu[t]=n});function rg(n){const t=new xs(n),e=yf(xs.prototype.request,t);return Se.extend(e,xs.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return rg(bs(n,r))},e}const Kn=rg(Pa);Kn.Axios=xs,Kn.CanceledError=ra,Kn.CancelToken=rC,Kn.isCancel=Pf,Kn.VERSION=tg,Kn.toFormData=Dl,Kn.AxiosError=St,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=iC,Kn.isAxiosError=oC,Kn.mergeConfig=bs,Kn.AxiosHeaders=ni,Kn.formToJSON=n=>Df(Se.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=Jf.getAdapter,Kn.HttpStatusCode=Eu,Kn.default=Kn;const{Axios:qN,AxiosError:YN,CanceledError:XN,isCancel:ZN,CancelToken:QN,VERSION:JN,all:eD,Cancel:tD,isAxiosError:nD,spread:rD,toFormData:iD,AxiosHeaders:oD,HttpStatusCode:sD,formToJSON:aD,getAdapter:lD,mergeConfig:cD}=Kn,Iu=Kn.create({baseURL:location.origin,timeout:6e4,params:{}});Iu.interceptors.response.use(n=>n,n=>{var t,e,r,p,g,v,b,h,f,s,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(i){i&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(g=(p=n.response)==null?void 0:p.data)!=null&&g.message?u+=`${n.response.data.message}`:(b=(v=n.response)==null?void 0:v.data)!=null&&b.exception?u+=`${n.response.data.exception}`:(s=(f=(h=n.response)==null?void 0:h.data)==null?void 0:f.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),n}else throw n});const Hl=async function(n,t,{data:e,params:r={},headers:p,noAuth:g=!1,noScope:v=!1,onUploadProgress:b=!1}={}){if(!g){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}p.Authorization=localStorage.openc3Token}return p.manual=!0,!v&&!r.scope&&(r.scope=window.openc3Scope),Iu({method:n,url:t,data:e,params:r,headers:p,onUploadProgress:b})},Lu={Accept:"application/json"},ig={...Lu,"Content-Type":"application/json"},uD=mr("N",{get:function(n,{params:t,headers:e=Lu,noScope:r,noAuth:p,onUploadProgress:g}={}){return Hl("get",n,{params:t,headers:e,noScope:r,noAuth:p,onUploadProgress:g})},put:function(n,{data:t,params:e,headers:r=ig,noScope:p,noAuth:g,onUploadProgress:v}={}){return Hl("put",n,{data:t,params:e,headers:r,noScope:p,noAuth:g,onUploadProgress:v})},post:function(n,{data:t,params:e,headers:r=ig,noScope:p,noAuth:g,onUploadProgress:v}={}){return Hl("post",n,{data:t,params:e,headers:r,noScope:p,noAuth:g,onUploadProgress:v})},delete:function(n,{params:t,headers:e=Lu,noScope:r,noAuth:p,onUploadProgress:g}={}){return Hl("delete",n,{params:t,headers:e,noScope:r,noAuth:p,onUploadProgress:g})}});let jl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,p=e.length;r<p;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(p=>t!==p)}}});class Ba extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class Ru extends Ba{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class sC extends Ba{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class qi extends Ba{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class aC extends qi{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function og(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class lC{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:t,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:p})=>(e[r]=p,e),{})}}const Cs=Symbol("state");class sg{constructor(t={}){this.emitter=jl(),this.params=Object.freeze(t),this.presence=new lC(this),this.initialConnect=!0,this[Cs]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=og({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Cs]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[Cs]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Cs]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[Cs]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[Cs]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[Cs]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...p)=>{r(),e(...p)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(p=>p()),t()})),r.push(this.on("close",p=>{r.forEach(g=>g()),e(p||new Ba("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class cC{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(g=>{e=g}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},p=this._pendingTop;return this._pendings.push(r),p&&await p.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class uC{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class hC{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new uC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let p=this._subscriptions[t]=new cC(t);return p.remoteId=this._localToRemote[t],p.subscriber=e,p.unsubscriber=r,p.gvl=this.glv,p}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class dC{constructor(t={}){this.subscriptions=new hC(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let p=this._remoteToLocal[t];if(!p){this._pendingMessages.push([t,e,r]);return}let g=this.subscriptions.get(p);g&&g.channels.forEach(v=>{v.receive(e,r)})}notify(t,e,r){let p=this._remoteToLocal[t];if(!p)return;let g=this.subscriptions.get(p);g&&g.channels.forEach(v=>v.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const ag={debug:0,info:1,warn:2,error:3};class lg{constructor(t){this.level=t||"warn"}log(t,e,r){ag[t]<ag[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}}class za extends lg{writeLogEntry(){}}class pC{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let fC=0;class cg{constructor(t={}){let{logger:e}=t;this.logger=e||new za,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let p=og(r);if(this.pendingUnsubscriptions[p]){let v=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${v}`,p),new Promise(b=>{setTimeout(()=>{b(this.subscribe(t,e))},v)})}if(this.pendingSubscriptions[p])return this.logger.warn("subscription is already pending, skipping",p),Promise.reject(Error("Already subscribing"));let g=this.subscribeRetryInterval;return new Promise((v,b)=>{let h=++fC;this.pendingSubscriptions[p]={resolve:v,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(p)),this.maybeRetrySubscribe(h,p,g)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let p=this.pendingSubscriptions[e];p&&p.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let p=this.pendingSubscriptions[e];p&&p.id===t&&(delete this.pendingSubscriptions[e],p.reject(new sC(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:p,reason:g,reconnect:v}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let b=t.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(e==="disconnect"){let b=new qi(g);this.reset(b),v===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(e==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(e==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Ru)):this.logger.error("subscription not found",{type:e,identifier:r})}if(p)return{identifier:r,message:p};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const ug=()=>Date.now()/1e3|0;class gC extends cg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=ug()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:p}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=ug()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let g=t.restored_ids||Object.keys(this.subscriptionStreams);for(let v of g)this.cable.send({identifier:v,command:"history",history:this.historyRequestFor(v)}),this.presenceInfo[v]&&this.cable.send({identifier:v,command:"join",presence:this.presenceInfo[v]});return this.cable.restored(g)}return this.cable.connected(this.sessionId)}if(e==="presence"){let g=p.type;if(g==="info"){let v=this.pendingPresence[r];v&&(delete this.pendingPresence[r],v.resolve(p))}else if(g==="error"){let v=this.pendingPresence[r];v&&(delete this.pendingPresence[r],v.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:p}}if(p){let g=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:p,meta:g}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let p=this.presenceInfo[t];return p&&(e.presence=p),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let p of this.subscriptionStreams[t]){let g=this.streamsPositions[p];g&&(r=!0,e[p]=g)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,p){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:p},{stream:e,epoch:r,offset:p}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,p)=>{this.pendingPresence[t]={resolve:r,reject:p},this.cable.send({command:"presence",identifier:t,data:e})})}}class mC extends Ba{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Ou extends sg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}Il(Ou,"identifier","__ghost__");const vC="$pubsub";class Nu extends sg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}Il(Nu,"identifier",vC);const ks=Symbol("state");let yC=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:p,hubOptions:g,performFailures:v,transportConfigurator:b}){this.emitter=jl(),this.transport=n,this.encoder=e,this.logger=r||new za,this.protocol=t,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new dC(g||{}),this[ks]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,p===!1&&this.connect().catch(()=>{})}get state(){return this[ks]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[ks]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ks]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new qi("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[ks]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new qi("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new qi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[ks]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof qi?n:new qi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ks]="closed";let e=t||new qi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:p,message:g,meta:v}=e;r?this.hub.notify(p,r,g):this.hub.transmit(p,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 Nu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new Nu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=Ou),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let p=await n.acquire("subscribed");if(p.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),p.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),p.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),p.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),p.release();return}let g={identifier:t,params:e};this.logger.debug("subscribing",g);try{let v=await this.protocol.subscribe(t,e);this.hub.subscribe(r,v),this.logger.debug("subscribed",{...g,remoteId:v}),n.notify("connected")}catch(v){if(v){if(v instanceof Ru&&this.logger.warn("rejected",g),v instanceof qi){this.logger.debug("disconnected during subscription; will retry on connect",g),p.release();return}this.logger.error("failed to subscribe",{error:v,...g})}n.close(v),this.hub.unsubscribe(r)}p.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(p){p&&(p instanceof qi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:p}):this.logger.error("unsubscribe failed",{id:t,error:p}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new mC;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let p=r.remoteId,g={id:p,action:t,payload:e};this.logger.debug("perform",g);try{let v=await this.protocol.perform(p,t,e);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 e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(p=>p()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(p=>p()),t(r)}))}),this._pendingConnect)}};const wC={maxMissingPings:2,maxReconnectAttempts:1/0},ia=()=>Date.now(),hg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:p}=t;return e=e||2,r===void 0&&(r=.5),g=>{let v=n*e**g,b=v*e,h=v+(b-v)*Math.random(),f=2*(Math.random()-.5)*r;return h=h*(1+f),p&&p<h&&(h=p),h}};let dg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},wC,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new za,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ia()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ia(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ia(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ia(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ia()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=ia()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new aC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class bC{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=jl(),this.unbind=[],this.logger=e.logger||new za}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...p)=>{r(),e(...p)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}class xC{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=jl();let{format:p,subprotocol:g,authStrategy:v}=e;this.format=p||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=v||"param",this.authProtocol="",this.subprotocol=g}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let p=[];p.push(this.once("open",()=>{p.forEach(g=>g()),e()})),p.push(this.once("close",()=>{p.forEach(g=>g()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let p=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(p)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(p=>p.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...p)=>{r(),e(...p)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const pg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function CC(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},pg,t);let{protocol:e,websocketImplementation:r,websocketFormat:p,websocketOptions:g,websocketAuthStrategy:v,fallbacks:b,logLevel:h,logger:f,transport:s,encoder:a,lazy:u,monitor:c,pingInterval:i,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:I,historyTimestamp:$,protocolOptions:S,concurrentSubscribes:C,performFailures:R,transportConfigurator:N,auth:L}=t;if(f=f||new za(h),typeof e=="string"){x=x||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")e=new cg({logger:f,...S});else if(P==="actioncable-v1-ext")e=new gC({logger:f,historyTimestamp:$,...S});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new pC,p=p||"text";else if(O==="msgpack"){if(p="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(p=p||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new xC(n,{websocketImplementation:r,websocketOptions:g,subprotocol:x,authStrategy:v,format:p}),b&&(s=new bC([s,...b],{logger:f})),L&&L.token&&s.setToken(L.token,L.param||"jid"),l=l||hg(i),c!==!1&&(c=c||new dg({pingInterval:i,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,logger:f}));let E={concurrentSubscribes:C},B=new yC({protocol:e,transport:s,encoder:a,logger:f,lazy:u,hubOptions:E,performFailures:R,transportConfigurator:N});return c&&(c.watch(B),B.monitor=c),I&&kC(B,async()=>{try{await I(s)}catch(P){return f.error("Failed to refresh authentication token: "+P),!1}return B.connect().catch(()=>{}),!0}),B}function kC(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class SC{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class AC extends Ou{constructor(t,e,r){super(t,e),this.subscription=new SC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:p})=>this.subscription.notify("connected",{reconnected:p})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",p=>this.subscription.notify("received",p)),this.on("close",p=>{p&&p instanceof Ru?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class _C{constructor(t){this.cable=t}create(t,e){let r,p;typeof t=="object"?(r=t.channel,delete t.channel,p=t):(r=t,p={});let g=new AC(r,p,e);return g.subscription.notify("initialized"),this.cable.subscribe(g),g.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class $C{constructor(t){this.cable=t,this.subscriptions=new _C(t)}}class TC extends lg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class MC extends dg{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=p=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:p})},r=()=>this.disconnect(new qi("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const EC=["cable","action-cable"],IC="/cable",Ul=(n,t)=>{for(let e of EC){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},fg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,LC=()=>{if(typeof document<"u"&&document.head){let n=Ul(document,"url");if(n)return fg(n)}return fg(IC)},RC=()=>{if(typeof document<"u"&&document.head){let n=Ul(document,"history-timestamp");if(n)return n|0}},OC=()=>{if(typeof document<"u"&&document.head)return Ul(document,"token")},NC=()=>{if(typeof document<"u"&&document.head)return Ul(document,"token-param")};function DC(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||LC(),t=t||{},t.historyTimestamp||(t.historyTimestamp=RC());let e=OC();if(e){let f=NC();t.auth=Object.assign({token:e,param:f},t.auth||{})}t=Object.assign({},pg,t);let{logLevel:r,logger:p,pingInterval:g,reconnectStrategy:v,maxMissingPings:b,maxReconnectAttempts:h}=t;return p=t.logger=t.logger||new TC(r),v=t.reconnectStrategy=t.reconnectStrategy||hg(g),t.monitor!==!1&&(t.monitor=t.monitor||new MC({pingInterval:g,reconnectStrategy:v,maxMissingPings:b,maxReconnectAttempts:h,logger:p})),CC(n,t)}function FC(n,t){let e=DC(n,t);return new $C(e)}class PC{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},p={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(g=>{if(g&&OpenC3Auth.setTokens(),this._cable==null){let v=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);v=new URL(v,document.baseURI).href,this._cable=FC(v)}return this._cable.subscriptions.create({channel:t,...p},r)})}recordPing(){}}mr("F",PC);class WC{constructor(t,e,r="",p=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=p}}mr("k",WC);function Ha(n){return BC.test(n)}const BC=/^-?[0-9]+$/;function gg(n){return zC.test(n)}const zC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function mg(n,t){if(Ha(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const p=vg(n),g=vg(r);return!!(p===g||(t==null?void 0:t.approx)===!0&&!Ha(n)&&g.length>=14&&p.startsWith(g.substring(0,14)))}let ja=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function HC(n){if(mg(n,{approx:!1}))return;if(Ha(n))return ja.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?ja.underflow:ja.truncate_float:ja.overflow}function vg(n){const{start:t,end:e}=jC(n),r=n.substring(t,e),p=r.indexOf(".");return p===-1?r:r.substring(0,p)+r.substring(p+1)}function jC(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}class UC{constructor(t){if(Il(this,"isLosslessNumber",!0),!gg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=HC(this.value);if(t===void 0||t===ja.truncate_float)return Number.parseFloat(this.value);if(Ha(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function VC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function KC(n){return new UC(n)}function GC(n,t){return Du({"":n},"",n,t)}function Du(n,t,e,r){return Array.isArray(e)?r.call(n,t,YC(e,r)):e&&typeof e=="object"&&!VC(e)?r.call(n,t,qC(e,r)):r.call(n,t,e)}function qC(n,t){for(const e of Object.keys(n)){const r=Du(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function YC(n,t){for(let e=0;e<n.length;e++)n[e]=Du(n,String(e),n[e],t);return n}function XC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:KC,r=0;const p=b();return i(p),d(),t?GC(p,t):p;function g(){if(n.charCodeAt(r)===nk){r++,f();const _={};let k=!0;for(;r<n.length&&n.charCodeAt(r)!==wg;){k?k=!1:(u(),f());const D=r,z=s();if(z===void 0){I();return}f(),c();const U=b();if(U===void 0){L();return}Object.prototype.hasOwnProperty.call(_,z)&&!Fu(U,_[z])&&$(z,D+1),_[z]=U}return n.charCodeAt(r)!==wg&&S(),r++,_}}function v(){if(n.charCodeAt(r)===rk){r++,f();const _=[];let k=!0;for(;r<n.length&&n.charCodeAt(r)!==bg;){k?k=!1:u();const D=b();l(D),_.push(D)}return n.charCodeAt(r)!==bg&&C(),r++,_}}function b(){f();const _=s()??a()??g()??v()??h("true",!0)??h("false",!1)??h("null",null);return f(),_}function h(_,k){if(n.slice(r,r+_.length)===_)return r+=_.length,k}function f(){for(;ZC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===Pu){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==Pu;){if(n.charCodeAt(r)===tk){const k=n[r+1],D=ek[k];D!==void 0?(_+=D,r++):k==="u"?Vl(n.charCodeAt(r+2))&&Vl(n.charCodeAt(r+3))&&Vl(n.charCodeAt(r+4))&&Vl(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):E(r):N(r)}else JC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return x(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===xg&&(r++,w(_)),n.charCodeAt(r)===Wu)r++;else if(QC(n.charCodeAt(r)))for(r++;Kl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===hk)for(r++,w(_);Kl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===mk||n.charCodeAt(r)===gk)for(r++,(n.charCodeAt(r)===xg||n.charCodeAt(r)===lk)&&r++,w(_);Kl(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==uk)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function c(){if(n.charCodeAt(r)!==dk)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function i(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function l(_){if(_===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(_){if(!Kl(n.charCodeAt(r))){const k=n.slice(_,r);throw new SyntaxError(`Invalid number '${k}', expecting a digit ${O()}`)}}function x(){if(n.charCodeAt(r)!==Pu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function I(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(_,k){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${k}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${B()}`)}function N(_){const k=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${k}' ${B()}`)}function L(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function E(_){const k=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${k}' ${B()}`)}function B(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${B()}`}}function ZC(n){return n===ik||n===ok||n===sk||n===ak}function Vl(n){return n>=Wu&&n<=Bu||n>=pk&&n<=vk||n>=fk&&n<=yk}function Kl(n){return n>=Wu&&n<=Bu}function QC(n){return n>=ck&&n<=Bu}function JC(n){return n>=32&&n<=1114111}function Fu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>Fu(e,t[r])):yg(n)&&yg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>Fu(n[e],t[e])):!1}function yg(n){return typeof n=="object"&&n!==null}const ek={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1398
+ `,r:"\r",t:" "},tk=92,nk=123,wg=125,rk=91,bg=93,ik=32,ok=10,sk=9,ak=13,Pu=34,lk=43,xg=45,Wu=48,ck=49,Bu=57,uk=44,hk=46,dk=58,pk=65,fk=97,gk=69,mk=101,vk=70,yk=102;function Cg(n,t,e,r){return p(n);function p(h,f){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!gg(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return g(h);if(h&&typeof h=="object")return v(h)}function g(h,f){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const u=h[a];typeof u<"u"&&typeof u!="function"?s+=p(u):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function v(h,f){if(typeof h.toJSON=="function")return Cg(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,u="{";for(const c of s){const i=h[c];if(b(c,i)){a?a=!1:u+=",";const l=JSON.stringify(c);u+=`${l}:`,u+=p(i)}}return u+="}",u}function b(h,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function wk(n){return Ha(n)&&!mg(n)?BigInt(n):parseFloat(n)}class Ss{constructor(){Il(this,"id",1)}async exec(t,e,r={},p={},g=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,p.manual=!0,(await Iu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...p},timeout:g,transformRequest:[(v,b)=>Cg(v)],transformResponse:[v=>XC(v,void 0,wk)]})).data.result}catch(v){let b=new Error;throw v.response?(b.name=v.response.data.error.data.class,b.message=v.response.data.error.data.message,b.object=v.response.data.error):v.request?(b.name="Request error",b.message="Request error, no response received"):b=v,b}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e,r,p,g){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:p,unmap_old:g})}unmap_target_from_interface(t,e,r,p){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:p})}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}interface_target_enable(t,e,r=!1,p=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:p})}interface_target_disable(t,e,r=!1,p=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:p})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,p,g){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:p,unmap_old:g})}unmap_target_from_router(t,e,r,p){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:p})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,p=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:p})}router_target_disable(t,e,r=!1,p=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:p})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,p=30){const g=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:p});if(g!=null){let v=g.length,b=null;for(let h=0;h<v;h++)b=this.decode_openc3_type(g[h][1]),b!==null&&(g[h][1]=b)}return g}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,p=null,g=null){let v={stale_time:e};r!==null&&(v.cache_timeout=r),p!==null&&(v.start_time=p.toISOString()),g!==null&&(v.end_time=g.toISOString());const b=await this.exec("get_tlm_values",[t],v,{},1e4);if(b&&b.length>0){let h=b[0].length,f=null;for(let s=0;s<h;s++)f=this.decode_openc3_type(b[0][s]),f!==null&&(b[0][s]=f)}return b}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,p="CONVERTED"){let g=null;if(e===void 0)g=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))g=await this.exec("tlm",[t],{type:e});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else g=await this.exec("tlm",[t,e,r],{type:p});let v=this.decode_openc3_type(g);return v!==null&&(g=v),g}async inject_tlm(t,e,r=null,p="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:p})}set_tlm(t,e,r,p){return this.exec("set_tlm",[t,e,r],{type:p})}override_tlm(t,e,r,p){return this.exec("override_tlm",[t,e,r],{type:p})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,p){return this.exec("normalize_tlm",[t,e,r],{type:p})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,p="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,p])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,p,g,v={}){let b=null;for(let h in p)Object.prototype.hasOwnProperty.call(p,h)&&(b=this.encode_openc3_type(p[h]),b!==null&&(p[h]=b));return this.exec(t,[e,r,p],v,g)}get_cmd_hazardous(t,e,r,p={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},p):this._cmd("get_cmd_hazardous",t,e,r,p)}cmd(t,e,r,p={},g={}){return e===void 0?this.exec("cmd",t,{},p):this._cmd("cmd",t,e,r,p,g)}cmd_no_range_check(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_no_range_check",t,{},p,g):this._cmd("cmd_no_range_check",t,e,r,p,g)}cmd_raw(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_raw",t,{},p,g):this._cmd("cmd_raw",t,e,r,p,g)}cmd_raw_no_range_check(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},p,g):this._cmd("cmd_raw_no_range_check",t,e,r,p,g)}cmd_no_hazardous_check(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},p,g):this._cmd("cmd_no_hazardous_check",t,e,r,p,g)}cmd_no_checks(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_no_checks",t,{},p,g):this._cmd("cmd_no_checks",t,e,r,p,g)}cmd_raw_no_hazardous_check(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},p,g):this._cmd("cmd_raw_no_hazardous_check",t,e,r,p,g)}cmd_raw_no_checks(t,e,r,p={},g={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},p,g):this._cmd("cmd_raw_no_checks",t,e,r,p,g)}build_cmd(t,e,r,p={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,p,g)}build_command(t,e,r,p={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,p,g)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),p=new Uint8Array(r);return Array.from(p).map(g=>g.toString(16).padStart(2,"0")).join("")}}}mr("W",Ss);var kg={exports:{}},Sg;function bk(){return Sg||(Sg=1,function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,p){function g(f,s){function a(L,E,B){if(!(L.length<E)){var P=L.slice(0,E),O=L.slice(E),_=/^(?:(\s+)|(\S+)(\s+))/.exec(O),k=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,z=0;if(k&&!k[2]&&(D=E-k[1].length,z=E),_&&!_[2]&&(D||(D=E),z=E+_[1].length),D)return{start:D,end:z};if(k&&k[2]&&k.index>B)return{start:k.index,end:k.index+k[2].length};if(_&&_[2])return D=E+_[2].length,{start:D,end:D+_[3].length}}}for(var u=s.column||f.getOption("printMarginColumn"),c=s.allowMerge!=0,i=Math.min(s.startRow,s.endRow),l=Math.max(s.startRow,s.endRow),d=f.session;i<=l;){var w=d.getLine(i);if(w.length>u){var x=a(w,u,5);if(x){var I=/^\s*/.exec(w)[0];d.replace(new b(i,x.start,i,x.end),`
1399
+ `+I)}l++}else if(c&&/\S/.test(w)&&i!=l){var $=d.getLine(i+1);if($&&/\S/.test($)){var S=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),R=S+" "+C,x=a(R,u,5);if(x&&x.start>S.length||R.length<u){var N=new b(i,S.length,i+1,$.length-C.length);d.replace(N," "),i--,l--}else S.length<w.length&&d.remove(new b(i,S.length,i,w.length))}}i++}}function v(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var s=f.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;g(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",v):this.commands.off("afterExec",v)},value:!1}}),r.hardWrap=g}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,p){function g(y){return{row:y.line,column:y.ch}}function v(y){return new De(y.row,y.column)}function b(y,T,A){if(T.line===A.line&&T.ch>=A.ch-1){var F=y.getLine(T.line),W=F.charCodeAt(T.ch);55296<=W&&W<=55551&&(A.ch+=1)}return{start:T,end:A}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),We.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",ns),R(y),We.on(y.getInputField(),"paste",s(y))}function f(y){y.setOption("disableInput",!1),y.off("cursorActivity",ns),We.off(y.getInputField(),"paste",s(y)),y.state.vim=null,Cr&&clearTimeout(Cr)}function s(y){var T=y.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(y.setCursor(me(y.getCursor(),0,1)),jn.enterInsertMode(y,{},T))}),T.onPasteFn}function a(y,T){return T>=y.firstLine()&&T<=y.lastLine()}function u(y){return/^[a-z]$/.test(y)}function c(y){return"()[]{}".indexOf(y)!=-1}function i(y){return ka.test(y)}function l(y){return on.test(y)}function d(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,T){for(var A=0;A<T.length;A++)if(T[A]==y)return!0;return!1}function I(y,T,A,F,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(A||(A="string"),jt[y]={type:A,defaultValue:T,callback:W},F)for(var H=0;H<F.length;H++)jt[F[H]]=jt[y];T&&$(y,T)}function $(y,T,A,F){var W=jt[y];F=F||{};var H=F.scope;if(!W)return new Error("Unknown option: "+y);if(W.type=="boolean"){if(T&&T!==!0)return new Error("Invalid argument: "+y+"="+T);T!==!1&&(T=!0)}W.callback?(H!=="local"&&W.callback(T,void 0),H!=="global"&&A&&W.callback(T,A)):(H!=="local"&&(W.value=W.type=="boolean"?!!T:T),H!=="global"&&A&&(A.state.vim.options[y]={value:T}))}function S(y,T,A){var F=jt[y];A=A||{};var W=A.scope;if(!F)return new Error("Unknown option: "+y);if(F.callback){var H=T&&F.callback(void 0,T);return W!=="global"&&H!==void 0?H:W!=="local"?F.callback():void 0}var H=W!=="global"&&T&&T.state.vim.options[y];return(H||W!=="local"&&F||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=zn()}function R(y){return y.state.vim||(y.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function N(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Pi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new X,exCommandHistoryController:new X};for(var y in jt){var T=jt[y];T.value=T.defaultValue}}function L(y){function T(Y){typeof Y=="string"?Sn.value=Y:Sn=null}if(y[0]=="<"){var A=y.toLowerCase().slice(1,-1),F=A.split("-");if(A=F.pop()||"",A=="lt")y="<";else if(A=="space")y=" ";else if(A=="cr")y=`
1400
+ `;else if(Wi[A]){var W=Sn.value,H={key:Wi[A],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};Sn.onKeyDown&&Sn.onKeyDown(H,Sn.value,T),Sn&&Sn.onKeyUp&&Sn.onKeyUp(H,Sn.value,T);return}}if(y==`
1401
+ `){var K=Sn;Sn=null,K.onClose&&K.onClose(K.value)}else Sn.value=(Sn.value||"")+y}function E(y,T,A){var F=pn;if(A){if(Gr.indexOf(A)!=-1)return;Gr.push(A),pn=A.noremap!=0}try{for(var W=R(y),H=/<(?:[CSMA]-)*\w+>|./gi,K;K=H.exec(T);){var Y=K[0],Q=W.insertMode;if(Sn){L(Y);continue}var re=yt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var ae=Y.toLowerCase().slice(1,-1),we=ae.split("-");if(ae=we.pop()||"",ae=="lt")Y="<";else if(ae=="space")Y=" ";else if(ae=="cr")Y=`
1402
+ `;else{if(Wi.hasOwnProperty(ae)){Y=Wi[ae],is(y,Y);continue}Y=Y[0],H.lastIndex=K.index+1}}y.replaceSelection(Y)}}}finally{if(Gr.pop(),pn=Gr.length?F:!1,!Gr.length&&Sn){var ke=Sn;Sn=null,he(y,ke)}}}function B(y,T){var A=y.key;if(!qr[A]){A.length>1&&A[0]=="n"&&(A=A.replace("Numpad","")),A=ir[A]||A;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),We.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||A.length>1)&&y.shiftKey&&(F+="S-"),T&&!T.expectLiteralNext&&A.length==1){if(Yn.keymap&&A in Yn.keymap)(Yn.remapCtrl!=0||!F)&&(A=Yn.keymap[A]);else if(A.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(A=W)}}return F+=A,F.length>1&&(F="<"+F+">"),F}}function P(y,T){Yn.string!==y&&(Yn=O(y)),Yn.remapCtrl=T}function O(y){function T(F){return F.split(/\\?(.)/).filter(Boolean)}var A={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var H=T(W[1]),K=T(W[2]);if(H.length!==K.length)return;for(var Y=0;Y<H.length;++Y)A[H[Y]]=K[Y]}else if(W.length==1){var Q=T(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)A[Q[Y]]=Q[Y+1]}}}),{keymap:A,string:y}):{keymap:A,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 k(y,T){y.state.vim.inputState=new _,y.state.vim.expectLiteralNext=!1,We.signal(y,"vim-command-done",T)}function D(){this.removed=[],this.inserted=""}function z(y,T,A){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!A}function U(y,T){var A=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");A[y]=T,rn.push(y)}function q(y){this.registers=y,this.unnamedRegister=y['"']=new z,y["."]=new z,y[":"]=new z,y["/"]=new z,y["+"]=new z}function X(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function ee(y,T){ui[y]=T}function de(y,T){for(var A=[],F=0;F<T;F++)A.push(y);return A}function te(y,T){ls[y]=T}function le(y,T){jn[y]=T}function se(y,T,A){var F=y.state.vim,W=F.insertMode||F.visualMode,H=Math.min(Math.max(y.firstLine(),T.line),y.lastLine()),K=y.getLine(H),Y=K.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=K.charCodeAt(Q);if(56320<=re&&re<=57343){var ae=1;A&&A.line==H&&A.ch>Q&&(ae=-1),Q+=ae,Q>Y&&(Q-=2)}return new De(H,Q)}function ue(y){var T={};for(var A in y)y.hasOwnProperty(A)&&(T[A]=y[A]);return T}function me(y,T,A){return typeof T=="object"&&(A=T.ch,T=T.line),new De(y.line+T,y.ch+A)}function _e(y,T,A,F){F.operator&&(A="operatorPending");for(var W,H=[],K=[],Y=pn?T.length-Oo:0,Q=Y;Q<T.length;Q++){var re=T[Q];A=="insert"&&re.context!="insert"||re.context&&re.context!=A||F.operator&&re.type=="action"||!(W=Te(y,re.keys))||(W=="partial"&&H.push(re),W=="full"&&K.push(re))}return{partial:H.length&&H,full:K.length&&K}}function Te(y,T){var A=T.slice(-11)=="<character>",F=T.slice(-10)=="<register>";if(A||F){var W=T.length-(A?11:10),H=y.slice(0,W),K=T.slice(0,W);return H==K&&y.length>W?"full":K.indexOf(H)==0?"partial":!1}return y==T?"full":T.indexOf(y)==0?"partial":!1}function Me(y){var T=/^.*(<[^>]+>)$/.exec(y),A=T?T[1]:y.slice(-1);if(A.length>1)switch(A){case"<CR>":A=`
1403
+ `;break;case"<Space>":A=" ";break;default:A=""}return A}function Xe(y,T,A){return function(){for(var F=0;F<A;F++)T(y)}}function Ue(y){return new De(y.line,y.ch)}function ct(y,T){return y.ch==T.ch&&y.line==T.line}function et(y,T){return y.line<T.line?!0:y.line==T.line&&y.ch<T.ch}function ht(y,T){return arguments.length>2&&(T=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),et(y,T)?y:T}function qt(y,T){return arguments.length>2&&(T=qt.apply(void 0,Array.prototype.slice.call(arguments,1))),et(y,T)?T:y}function hn(y,T,A){var F=et(y,T),W=et(T,A);return F&&W}function Vt(y,T){return y.getLine(T).length}function yr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function yn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Rn(y,T,A){var F=Vt(y,T),W=new Array(A-F+1).join(" ");y.setCursor(new De(T,F)),y.replaceRange(W,y.getCursor())}function tr(y,T){var A=[],F=y.listSelections(),W=Ue(y.clipPos(T)),H=!ct(T,W),K=y.getCursor("head"),Y=pt(F,K),Q=ct(F[Y].head,F[Y].anchor),re=F.length-1,ae=re-Y>Y?re:0,we=F[ae].anchor,ke=Math.min(we.line,W.line),ve=Math.max(we.line,W.line),be=we.ch,Oe=W.ch,Re=F[ae].head.ch-be,Ke=Oe-be;Re>0&&Ke<=0?(be++,H||Oe--):Re<0&&Ke>=0?(be--,Q||Oe++):Re<0&&Ke==-1&&(be--,Oe++);for(var st=ke;st<=ve;st++){var Ze={anchor:new De(st,be),head:new De(st,Oe)};A.push(Ze)}return y.setSelections(A),T.ch=Oe,we.ch=be,we}function ur(y,T,A){for(var F=[],W=0;W<A;W++){var H=me(T,W,0);F.push({anchor:H,head:H})}y.setSelections(F,0)}function pt(y,T,A){for(var F=0;F<y.length;F++){var W=ct(y[F].anchor,T),H=ct(y[F].head,T);if(W||H)return F}return-1}function je(y,T){var A=T.lastSelection,F=function(){var H=y.listSelections(),K=H[0],Y=H[H.length-1],Q=et(K.anchor,K.head)?K.anchor:K.head,re=et(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var H=y.getCursor(),K=y.getCursor(),Y=A.visualBlock;if(Y){var Q=Y.width,re=Y.height;K=new De(H.line+re,H.ch+Q);for(var ae=[],we=H.line;we<K.line;we++){var ke=new De(we,H.ch),ve=new De(we,K.ch),be={anchor:ke,head:ve};ae.push(be)}y.setSelections(ae)}else{var Oe=A.anchorMark.find(),Re=A.headMark.find(),Ke=Re.line-Oe.line,st=Re.ch-Oe.ch;K={line:K.line+Ke,ch:Ke?K.ch:st+K.ch},A.visualLine&&(H=new De(H.line,0),K=new De(K.line,Vt(y,K.line))),y.setSelection(H,K)}return[H,K]};return T.visualMode?F():W()}function Rt(y,T){var A=T.sel.anchor,F=T.sel.head;T.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(A)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:y.setBookmark(A),headMark:y.setBookmark(F),anchor:Ue(A),head:Ue(F),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function dn(y,T,A,F){var W=y.state.vim.sel,H=F?T:W.head,K=F?T:W.anchor,Y;return et(A,T)&&(Y=A,A=T,T=Y),et(H,K)?(H=ht(T,H),K=qt(K,A)):(K=ht(T,K),H=qt(H,A),H=me(H,0,-1),H.ch==-1&&H.line!=y.firstLine()&&(H=new De(H.line-1,Vt(y,H.line-1)))),[K,H]}function On(y,T,W){var F=y.state.vim;T=T||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",H=wr(y,T,W);y.setSelections(H.ranges,H.primary)}function wr(y,T,A,F){var W=Ue(T.head),H=Ue(T.anchor);if(A=="char"){var K=!F&&!et(T.head,T.anchor)?1:0,Y=et(T.head,T.anchor)?1:0;return W=me(T.head,0,K),H=me(T.anchor,0,Y),{ranges:[{anchor:H,head:W}],primary:0}}if(A=="line"){if(et(T.head,T.anchor))W.ch=0,H.ch=Vt(y,H.line);else{H.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Vt(y,W.line)}return{ranges:[{anchor:H,head:W}],primary:0}}if(A=="block"){var re=Math.min(H.line,W.line),ae=H.ch,we=Math.max(H.line,W.line),ke=W.ch;ae<ke?ke+=1:ae+=1;for(var ve=we-re+1,be=W.line==re?0:ve-1,Oe=[],Re=0;Re<ve;Re++)Oe.push({anchor:new De(re+Re,ae),head:new De(re+Re,ke)});return{ranges:Oe,primary:be}}}function nr(y){var T=y.getCursor("head");return y.getSelection().length==1&&(T=ht(T,y.getCursor("anchor"))),T}function wn(y,T){var A=y.state.vim;T!==!1&&y.setCursor(se(y,A.sel.head)),Rt(y,A),A.visualMode=!1,A.visualLine=!1,A.visualBlock=!1,A.insertMode||We.signal(y,"vim-mode-change",{mode:"normal"})}function _n(y,T,A){var F=y.getRange(T,A);if(/\n\s*$/.test(F)){var W=F.split(`
1404
+ `);W.pop();for(var H,H=W.pop();W.length>0&&H&&d(H);H=W.pop())A.line--,A.ch=0;H?(A.line--,A.ch=Vt(y,A.line)):A.ch=0}}function Nn(y,T,A){T.ch=0,A.ch=0,A.line++}function Ot(y){if(!y)return 0;var T=y.search(/\S/);return T==-1?y.length:T}function bn(y,T,A){var F=T.inclusive,W=T.innerWord,H=T.bigWord,K=T.noSymbol,Y=T.multiline,Q=A||nr(y),re=y.getLine(Q.line),ae=re,we=Q.line,ke=we,ve=Q.ch,be,Oe=K?No[0]:Fi[0];if(W&&/\s/.test(re.charAt(ve)))Oe=function(Cn){return/\s/.test(Cn)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!Y)return null;ve--,be=oi(y,Q,!0,H,!0);break}H?Oe=Fi[0]:(Oe=No[0],Oe(re.charAt(ve))||(Oe=No[1]))}for(var Re=ve,Ke=ve;Oe(re.charAt(Ke))&&Ke>=0;)Ke--;if(Ke++,be)Re=be.to,ke=be.line,ae=y.getLine(ke),!ae&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(F){var st=Re,Ze=Q.ch<=Ke&&/\s/.test(re.charAt(Q.ch));if(!Ze)for(;/\s/.test(ae.charAt(Re))&&Re<ae.length;)Re++;if(st==Re||Ze){for(var tt=Ke;/\s/.test(re.charAt(Ke-1))&&Ke>0;)Ke--;!Ke&&!Ze&&(Ke=tt)}}return{start:new De(we,Ke),end:new De(ke,Re)}}function yi(y,T,A){var F=T;if(!We.findMatchingTag||!We.findEnclosingTag)return{start:F,end:F};var W=We.findMatchingTag(y,T)||We.findEnclosingTag(y,T);return!W||!W.open||!W.close?{start:F,end:F}:A?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function jr(y,T,A){ct(T,A)||He.jumpList.add(y,T,A)}function wi(y,T){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=T.forward,He.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Rr(y,T,A,F){var W=Ue(y.getCursor()),H=A?1:-1,K=A?y.lineCount():-1,Y=W.ch,Q=W.line,re=y.getLine(Q),ae={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(A?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:A,depth:0,curMoveThrough:!1},we=ki[F];if(!we)return W;var ke=Si[we].init,ve=Si[we].isComplete;for(ke&&ke(ae);Q!==K&&T;){if(ae.index+=H,ae.nextCh=ae.lineText.charAt(ae.index),!ae.nextCh){if(Q+=H,ae.lineText=y.getLine(Q)||"",H>0)ae.index=0;else{var be=ae.lineText.length;ae.index=be>0?be-1:0}ae.nextCh=ae.lineText.charAt(ae.index)}ve(ae)&&(W.line=Q,W.ch=ae.index,T--)}return ae.nextCh||ae.curMoveThrough?new De(Q,ae.index):W}function oi(y,T,A,F,W){var H=T.line,K=T.ch,Y=y.getLine(H),Q=A?1:-1,re=F?Fi:No;if(W&&Y==""){if(H+=Q,Y=y.getLine(H),!a(y,H))return null;K=A?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:H};for(var ae=Q>0?Y.length:-1,we=ae,ke=ae;K!=ae;){for(var ve=!1,be=0;be<re.length&&!ve;++be)if(re[be](Y.charAt(K))){for(we=K;K!=ae&&re[be](Y.charAt(K));)K+=Q;if(ke=K,ve=we!=ke,we==T.ch&&H==T.line&&ke==we+Q)continue;return{from:Math.min(we,ke+1),to:Math.max(we,ke),line:H}}ve||(K+=Q)}if(H+=Q,!a(y,H))return null;Y=y.getLine(H),K=Q>0?0:Y.length}}function hr(y,T,A,F,W,H){var K=Ue(T),Y=[];(F&&!W||!F&&W)&&A++;for(var Q=!F||!W,re=0;re<A;re++){var ae=oi(y,T,F,H,Q);if(!ae){var we=Vt(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:we,to:we}:{line:0,from:0,to:0});break}Y.push(ae),T=new De(ae.line,F?ae.to-1:ae.from)}var ke=Y.length!=A,ve=Y[0],be=Y.pop();return F&&!W?(!ke&&(ve.from!=K.ch||ve.line!=K.line)&&(be=Y.pop()),new De(be.line,be.from)):F&&W?new De(be.line,be.to-1):!F&&W?(!ke&&(ve.to!=K.ch||ve.line!=K.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function Ur(y,T,A,F,W){var H=T,K=new De(H.line+A.repeat-1,1/0),Y=y.clipPos(K);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),K}function po(y,T,A,F,W){for(var H=W||y.getCursor(),K=H.ch,Y,Q=0;Q<T;Q++){var re=y.getLine(H.line);if(Y=Oi(K,re,F,A),Y==-1)return null;K=Y}return new De(y.getCursor().line,Y)}function Os(y,T){var A=y.getCursor().line;return se(y,new De(A,T-1))}function Zt(y,T,A,F){!x(A,yo)&&!Qt.test(A)||(T.marks[A]&&T.marks[A].clear(),T.marks[A]=y.setBookmark(F))}function Oi(y,T,A,F,W){var H;return F?(H=T.indexOf(A,y+1),H!=-1):(H=T.lastIndexOf(A,y-1),H!=-1),H}function _o(y,T,A,F,W){function H(Ke){return!/\S/.test(y.getLine(Ke))}function K(Ke,st,Ze){return Ze?H(Ke)!=H(Ke+st):!H(Ke)&&H(Ke+st)}function Y(Ke){F=F>0?1:-1;var st=y.ace.session.getFoldLine(Ke);st&&Ke+F>st.start.row&&Ke+F<st.end.row&&(F=(F>0?st.end.row:st.start.row)-Ke)}var Q=T.line,re=y.firstLine(),ae=y.lastLine(),we,ke,ve=Q;if(F){for(;re<=ve&&ve<=ae&&A>0;)Y(ve),K(ve,F)&&A--,ve+=F;return new De(ve,0)}var be=y.state.vim;if(be.visualLine&&K(Q,1,!0)){var Oe=be.sel.anchor;K(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Re=H(Q);for(ve=Q;ve<=ae&&A;ve++)K(ve,1,!0)&&(!W||H(ve)!=Re)&&A--;for(ke=new De(ve,0),ve>ae&&!Re?Re=!0:W=!1,ve=Q;ve>re&&!((!W||H(ve)==Re||ve==Q)&&K(ve,-1,!0));ve--);return we=new De(ve,0),{start:we,end:ke}}function $o(y,T,A,F,W){function H(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function K(re,ae,we,ke){var ve=re.getLine(ae),be={line:ve,ln:ae,pos:we,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(H(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!W)return{ln:be.ln,pos:be.pos+1};for(H(be);be.line!==null&&d(be.line[be.pos]);)Oe=be.pos,H(be);return{ln:be.ln,pos:Oe+1}}H(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,ae,we,ke){var ve=re.getLine(ae),be={line:ve,ln:ae,pos:we,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(H(be);be.line!==null;){if(!d(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return W?d(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};H(be)}return be.line=ve,W&&d(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};A>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=K(y,Q.ln,Q.pos,F),A--;return new De(Q.ln,Q.pos)}function Vr(y,T,A,F){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function H(Q,re,ae,we){var Re=Q.getLine(re),ke=Re==="",ve={line:Re,ln:re,pos:ae,dir:we},be={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(W(Q,ve);ve.line!==null;){if(be.ln=ve.ln,be.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(ke&&ve.line!==""&&!d(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};w(ve.line[ve.pos])&&!ke&&(ve.pos===ve.line.length-1||d(ve.line[ve.pos+1]))&&(ke=!0),W(Q,ve)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ke=Re.length-1;Ke>=0;--Ke)if(!d(Re[Ke])){be.pos=Ke;break}return be}function K(Q,re,ae,we){var Oe=Q.getLine(re),ke={line:Oe,ln:re,pos:ae,dir:we},ve={ln:ke.ln,pos:null},be=ke.line==="";for(W(Q,ke);ke.line!==null;){if(ke.line===""&&!be)return ve.pos!==null?ve:{ln:ke.ln,pos:ke.pos};if(!(!w(ke.line[ke.pos])||ve.pos===null||ke.ln===ve.ln&&ke.pos+1===ve.pos))return ve;ke.line!==""&&!d(ke.line[ke.pos])&&(be=!1,ve={ln:ke.ln,pos:ke.pos}),W(Q,ke)}var Oe=Q.getLine(ve.ln);ve.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!d(Oe[Re])){ve.pos=Re;break}return ve}for(var Y={ln:T.line,pos:T.ch};A>0;)F<0?Y=K(y,Y.ln,Y.pos,F):Y=H(y,Y.ln,Y.pos,F),A--;return new De(Y.ln,Y.pos)}function $n(y,T,A,F){var W=T,H,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[A],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[A],re=y.getLine(W.line).charAt(W.ch),ae=re===Q?1:0;if(H=y.scanForBracket(new De(W.line,W.ch+ae),-1,void 0,{bracketRegex:Y}),K=y.scanForBracket(new De(W.line,W.ch+ae),1,void 0,{bracketRegex:Y}),!H||!K)return null;if(H=H.pos,K=K.pos,H.line==K.line&&H.ch>K.ch||H.line>K.line){var we=H;H=K,K=we}return F?K.ch+=1:H.ch+=1,{start:H,end:K}}function dr(y,T,A,F){var W=Ue(T),H=y.getLine(W.line),K=H.split(""),Y,Q,re,ae,we=K.indexOf(A);if(W.ch<we)W.ch=we;else if(we<W.ch&&K[W.ch]==A){var ke=/string/.test(y.getTokenTypeAt(me(T,0,1))),ve=/string/.test(y.getTokenTypeAt(T)),be=ke&&!ve;be||(Q=W.ch,--W.ch)}if(K[W.ch]==A&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)K[re]==A&&(Y=re+1);if(Y&&!Q)for(re=Y,ae=K.length;re<ae&&!Q;re++)K[re]==A&&(Q=re);return!Y||!Q?{start:W,end:W}:(F&&(--Y,++Q),{start:new De(W.line,Y),end:new De(W.line,Q)})}function bi(){}function tn(y){var T=y.state.vim;return T.searchState_||(T.searchState_=new bi)}function Dn(y){return si(y,"/")}function xi(y){return eo(y,"/")}function si(y,T){var A=eo(y,T)||[];if(!A.length)return[];var F=[];if(A[0]===0){for(var W=0;W<A.length;W++)typeof A[W]=="number"&&F.push(y.substring(A[W]+1,A[W+1]));return F}}function eo(y,T){T||(T="/");for(var A=!1,F=[],W=0;W<y.length;W++){var H=y.charAt(W);!A&&H==T&&F.push(W),A=!A&&H=="\\"}return F}function To(y){for(var T="|(){",A="}",F=!1,W=[],H=-1;H<y.length;H++){var K=y.charAt(H)||"",Y=y.charAt(H+1)||"",Q=Y&&T.indexOf(Y)!=-1;F?((K!=="\\"||!Q)&&W.push(K),F=!1):K==="\\"?(F=!0,Y&&A.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(K)):(W.push(K),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Kr(y){for(var T=!1,A=[],F=-1;F<y.length;F++){var W=y.charAt(F)||"",H=y.charAt(F+1)||"";Bi[W+H]?(A.push(Bi[W+H]),F++):T?(A.push(W),T=!1):W==="\\"?(T=!0,i(H)||H==="$"?A.push("$"):H!=="/"&&H!=="\\"&&A.push("\\")):(W==="$"&&A.push("$"),A.push(W),H==="/"&&A.push("\\"))}return A.join("")}function Qo(y){for(var T=new We.StringStream(y),A=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)A.push(T.next());var F=!1;for(var W in xr)if(T.match(W,!0)){F=!0,A.push(xr[W]);break}F||A.push(T.next())}return A.join("")}function ai(y,T,A){var F=He.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var W=xi(y),H,K;if(!W.length)H=y;else{H=y.substring(0,W[0]);var Y=y.substring(W[0]);K=Y.indexOf("i")!=-1}if(!H)return null;S("pcre")||(H=To(H)),A&&(T=/^[^A-Z]*$/.test(H));var Q=new RegExp(H,T||K?"im":"m");return Q}function Or(y){typeof y=="string"&&(y=document.createElement(y));for(var T,A=1;A<arguments.length;A++)if(T=arguments[A])if(typeof T!="object"&&(T=document.createTextNode(T)),T.nodeType)y.appendChild(T);else for(var F in T)Object.prototype.hasOwnProperty.call(T,F)&&(F[0]==="$"?y.style[F.slice(1)]=T[F]:y.setAttribute(F,T[F]));return y}function Nt(y,T){var A=Or("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);y.openNotification?y.openNotification(A,{bottom:!0,duration:5e3}):alert(A.innerText)}function Jo(y,T){return Or("div",{$display:"flex"},Or("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,Or("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&Or("span",{$color:"#888"},T))}function he(y,T){if(Gr.length){T.value||(T.value=""),Sn=T;return}var A=Jo(T.prefix,T.desc);if(y.openDialog)y.openDialog(A,T.onClose,{onKeyDown:T.onKeyDown,onKeyUp:T.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:T.value});else{var F="";typeof T.prefix!="string"&&T.prefix&&(F+=T.prefix.textContent),T.desc&&(F+=" "+T.desc),T.onClose(prompt(F,""))}}function ze(y,T){if(y instanceof RegExp&&T instanceof RegExp){for(var A=["global","multiline","ignoreCase","source"],F=0;F<A.length;F++){var W=A[F];if(y[W]!==T[W])return!1}return!0}return!1}function Ne(y,T,A,F){if(T){var W=tn(y),H=ai(T,!!A,!!F);if(H)return an(y,H),ze(H,W.getQuery())||W.setQuery(H),H}}function dt(y){if(y.source.charAt(0)=="^")var T=!0;return{token:function(A){if(T&&!A.sol()){A.skipToEnd();return}var F=A.match(y,!1);if(F)return F[0].length==0?(A.next(),"searching"):!A.sol()&&(A.backUp(1),!y.exec(A.next()+F[0]))?(A.next(),null):(A.match(y),"searching");for(;!A.eol()&&(A.next(),!A.match(y,!1)););},query:y}}function an(y,T){clearTimeout(Cr);var A=tn(y);A.highlightTimeout=Cr,Cr=setTimeout(function(){if(y.state.vim){var F=tn(y);F.highlightTimeout=null;var W=F.getOverlay();(!W||T!=W.query)&&(W&&y.removeOverlay(W),W=dt(T),y.addOverlay(W),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(T))),F.setOverlay(W))}},50)}function Dt(y,T,A,F){return F===void 0&&(F=1),y.operation(function(){for(var W=y.getCursor(),H=y.getSearchCursor(A,W),K=0;K<F;K++){var Y=H.find(T);if(K==0&&Y&&ct(H.from(),W)){var Q=T?H.from():H.to();Y=H.find(T),Y&&!Y[0]&&ct(H.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=H.find(T))}if(!Y&&(H=y.getSearchCursor(A,T?new De(y.lastLine()):new De(y.firstLine(),0)),!H.find(T)))return}return H.from()})}function Bn(y,T,A,F,W){return F===void 0&&(F=1),y.operation(function(){var H=y.getCursor(),K=y.getSearchCursor(A,H),Y=K.find(!T);!W.visualMode&&Y&&ct(K.from(),H)&&K.find(!T);for(var Q=0;Q<F;Q++)if(Y=K.find(T),!Y&&(K=y.getSearchCursor(A,T?new De(y.lastLine()):new De(y.firstLine(),0)),!K.find(T)))return;return[K.from(),K.to()]})}function rr(y){var T=tn(y);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),y.removeOverlay(tn(y).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function br(y,T,A){return typeof y!="number"&&(y=y.line),T instanceof Array?x(y,T):typeof A=="number"?y>=T&&y<=A:y==T}function li(y){var T=y.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function nn(y,T,A){if(A=="'"||A=="`")return He.jumpList.find(y,-1)||new De(0,0);if(A==".")return Ni(y);var F=T.marks[A];return F&&F.find()}function Ni(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var T=y.doc.history.done,A=T.length;A--;)if(T[A].changes)return Ue(T[A].changes[0].to)}function fo(y,T,A,F,W,H,K,Y,Q){function re(){y.operation(function(){for(;!Oe;)ae(),ke();ve()})}function ae(){var Ze=y.getRange(H.from(),H.to()),tt=Ze.replace(K,Y),Cn=H.to().line;H.replace(tt),Ke=H.to().line,W+=Ke-Cn,st=Ke<Cn}function we(){var Ze=Re&&Ue(H.to()),tt=H.findNext();return tt&&!tt[0]&&Ze&&ct(H.from(),Ze)&&(tt=H.findNext()),tt}function ke(){for(;we()&&br(H.from(),F,W);)if(!(!A&&H.from().line==Ke&&!st)){y.scrollIntoView(H.from(),30),y.setSelection(H.from(),H.to()),Re=H.from(),Oe=!1;return}Oe=!0}function ve(Ze){if(Ze&&Ze(),y.focus(),Re){y.setCursor(Re);var tt=y.state.vim;tt.exMode=!1,tt.lastHPos=tt.lastHSPos=Re.ch}Q&&Q()}function be(Ze,tt,Cn){We.e_stop(Ze);var at=B(Ze);switch(at){case"y":ae(),ke();break;case"n":ke();break;case"a":var Tn=Q;Q=void 0,y.operation(re),Q=Tn;break;case"l":ae();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(Cn)}return Oe&&ve(Cn),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ke,st;if(ke(),Oe){Nt(y,"No matches for "+K.source);return}if(!T){re(),Q&&Q();return}he(y,{prefix:Or("span","replace with ",Or("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function ci(y,T){var A=y.state.vim,F=He.macroModeState,W=He.registerController.getRegister("."),H=F.isPlaying,K=F.lastInsertModeChanges;H||(y.off("change",Mo),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=null,We.off(y.getInputField(),"keydown",Ps)),!H&&A.insertModeRepeat>1&&(wa(y,A,A.insertModeRepeat-1,!0),A.lastEditInputState.repeatOverride=A.insertModeRepeat),delete A.insertModeRepeat,A.insertMode=!1,T||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),W.setText(K.changes.join("")),We.signal(y,"vim-mode-change",{mode:"normal"}),F.isRecording&&pr(F)}function es(y){Fn.unshift(y)}function Ns(y,T,A,F,W){var H={keys:y,type:T};H[T]=A,H[T+"Args"]=F;for(var K in W)H[K]=W[K];es(H)}function Ds(y,T,A,F){var W=He.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&$r.processCommand(y,W.keyBuffer[0]),A.isPlaying=!1;return}var H=W.keyBuffer,K=0;A.isPlaying=!0,A.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var Q=H[Y],re,ae;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),ae=re[0],Q=Q.substring(re.index+ae.length),yt.handleKey(y,ae,"macro"),T.insertMode){var we=W.insertModeChanges[K++].changes;He.macroModeState.lastInsertModeChanges.changes=we,os(y,we,1),ci(y)}A.isPlaying=!1}function ts(y,T){if(!y.isPlaying){var A=y.latestRegister,F=He.registerController.getRegister(A);F&&F.pushText(T)}}function pr(y){if(!y.isPlaying){var T=y.latestRegister,A=He.registerController.getRegister(T);A&&A.pushInsertModeChanges&&A.pushInsertModeChanges(y.lastInsertModeChanges)}}function Fs(y,T){if(!y.isPlaying){var A=y.latestRegister,F=He.registerController.getRegister(A);F&&F.pushSearchQuery&&F.pushSearchQuery(T)}}function Mo(y,T){var A=He.macroModeState,F=A.lastInsertModeChanges;if(!A.isPlaying)for(var W=y.state.vim;T;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var H=y.listSelections().length;H>1&&(F.ignoreCount=H);var K=T.text.join(`
1405
+ `);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),K)if(y.state.overwrite&&!/\n/.test(K))F.changes.push([K]);else{if(K.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<K.length&&(F.changes.push([K,re]),K="")}}K&&F.changes.push(K)}}T=T.next}}function ns(y){var T=y.state.vim;if(T.insertMode){var A=He.macroModeState;if(A.isPlaying)return;var F=A.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||rs(y,T)}function rs(y,T,A){var F=y.getCursor("anchor"),W=y.getCursor("head");if(T.visualMode&&!y.somethingSelected()?wn(y,!1):!T.visualMode&&!T.insertMode&&y.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,We.signal(y,"vim-mode-change",{mode:"visual"})),T.visualMode){var H=et(W,F)?0:-1,K=et(W,F)?-1:0;W=me(W,0,H),F=me(F,0,K),T.sel={anchor:F,head:W},Zt(y,T,"<",ht(W,F)),Zt(y,T,">",qt(W,F))}else!T.insertMode&&!A&&(T.lastHPos=y.getCursor().ch)}function go(y,T){this.keyName=y,this.key=T.key,this.ctrlKey=T.ctrlKey,this.altKey=T.altKey,this.metaKey=T.metaKey,this.shiftKey=T.shiftKey}function Ps(y){var T=He.macroModeState,A=T.lastInsertModeChanges,F=We.keyName?We.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(A.maybeReset&&(A.changes=[],A.maybeReset=!1),A.changes.push(new go(F,y)))}function wa(y,T,A,F){function W(){Y?Hn.processAction(y,T,T.lastEditActionCommand):Hn.evalInput(y,T)}function H(ae){if(K.lastInsertModeChanges.changes.length>0){ae=T.lastEditActionCommand?ae:1;var we=K.lastInsertModeChanges;os(y,we.changes,ae)}}var K=He.macroModeState;K.isPlaying=!0;var Y=!!T.lastEditActionCommand,Q=T.inputState;if(T.inputState=T.lastEditInputState,Y&&T.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<A;re++)W(),H(1);else F||W(),H(A);T.inputState=Q,T.insertMode&&!F&&ci(y),K.isPlaying=!1}function is(y,T){We.lookupKey(T,"vim-insert",function(A){return typeof A=="string"?We.commands[A](y):A(y),!0})}function os(y,T,A){var F=y.getCursor("head"),W=He.macroModeState.lastInsertModeChanges.visualBlock;W&&(ur(y,F,W+1),A=y.listSelections().length,y.setCursor(F));for(var H=0;H<A;H++){W&&y.setCursor(me(F,H,0));for(var K=0;K<T.length;K++){var Y=T[K];if(Y instanceof go)is(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=me(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}W&&y.setCursor(me(F,0,1))}function Ws(y,T,A,F){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Nr[T]||T;var W="";if(A.ctrlKey&&(W+="C-"),A.altKey&&(W+="A-"),(W||T.length>1)&&A.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&T.length==1){if(Yn.keymap&&T in Yn.keymap)(Yn.remapCtrl!==!1||!W)&&(T=Yn.keymap[T]);else if(T.charCodeAt(0)>255){var H=A.code&&A.code.slice(-1)||"";A.shiftKey||(H=H.toLowerCase()),H&&(T=H)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function ss(y){var T=new y.constructor;return Object.keys(y).forEach(function(A){if(A!="insertEnd"){var F=y[A];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=ss(F)),T[A]=F}}),y.sel&&(T.sel={head:y.sel.head&&Ue(y.sel.head),anchor:y.sel.anchor&&Ue(y.sel.anchor)}),T}function Eo(y,T,A){var F=!1,W=yt.maybeInitVimState_(y),H=W.visualBlock||W.wasInVisualBlock,K=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!K?W.wasInVisualBlock=!1:K&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&K)y.ace.exitMultiSelectMode();else if(H||!K||y.ace.inVirtualSelectionMode)F=yt.handleKey(y,T,A);else{var Y=ss(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ae=y.ace.selection;y.state.vim.lastHPos=ae.$desiredColumn==null?ae.lead.column:ae.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var we=y.getCursor("head"),ke=y.getCursor("anchor"),ve=et(we,ke)?0:-1,be=et(we,ke)?-1:0;we=me(we,0,ve),ke=me(ke,0,be),y.state.vim.sel.head=we,y.state.vim.sel.anchor=ke,F=Ai(y,T,A),ae.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=ss(Y)),re++}),y.curOp.cursorActivity&&!F&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return F&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&rs(y,W,!0),F}function Di(y,T){T.off("beforeEndOperation",Di);var A=T.state.cm.vimCmd;A&&T.execCommand(A.exec?A:A.name,A.args),T.curOp=T.prevOp}var fr=e("../range").Range,mo=e("../lib/event_emitter").EventEmitter,to=e("../lib/dom"),ba=e("../lib/oop"),ul=e("../lib/keys"),Io=e("../lib/event"),no=e("../search").Search,Lo=e("../lib/useragent"),as=e("../search_highlight").SearchHighlight,Ro=e("../commands/multi_select_commands"),xa=e("../mode/text").Mode.prototype.tokenRe,vo=e("../ext/hardwrap").hardWrap;e("../multi_select");var We=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};We.Pos=function(y,T){if(!(this instanceof De))return new De(y,T);this.line=y,this.ch=T},We.defineOption=function(y,T,A){},We.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1406
+ `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},We.keyMap={},We.addClass=We.rmClass=function(){},We.e_stop=We.e_preventDefault=Io.stopEvent,We.keyName=function(y){var T=ul[y.keyCode]||y.key||"";return T.length==1&&(T=T.toUpperCase()),T=Io.getModifierString(y).replace(/(^|-)\w/g,function(A){return A.toUpperCase()})+T,T},We.keyMap.default=function(y){return function(T){var A=T.ace.commands.commandKeyBinding[y.toLowerCase()];return A&&T.ace.execCommand(A)!==!1}},We.lookupKey=function y(T,A,F){A||(A="default"),typeof A=="string"&&(A=We.keyMap[A]||We.keyMap.default);var W=typeof A=="function"?A(T):A[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&F(W))return"handled";if(A.fallthrough){if(!Array.isArray(A.fallthrough))return y(T,A.fallthrough,F);for(var H=0;H<A.fallthrough.length;H++){var K=y(T,A.fallthrough[H],F);if(K)return K}}},We.findMatchingTag=function(y,T){return y.findMatchingTag(T)},We.findEnclosingTag=function(y,T){},We.signal=function(y,T,A){return y._signal(T,A)},We.on=Io.addListener,We.off=Io.removeListener,We.isWordChar=function(y){return y<""?/^\w$/.test(y):(xa.lastIndex=0,xa.test(y))},(function(){ba.implement(We.prototype,mo),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(A){this.$lineHandleChanges&&this.$lineHandleChanges.push(A);var F={text:A.action[0]=="i"?A.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=F:W.lastChange=W.change=F,this.$updateMarkers(A)},this.onSelectionChange=function(){var A=this.curOp=this.curOp||{};A.cursorActivityHandlers||(A.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Ro.keyboardHandler)},this.operation=function(A,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return A();if((F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=F;var K=A();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!H.cursorActivity&&!H.lastChange&&W&&(this.ace.prevOp=W)),(F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),K},this.onBeforeEndOperation=function(){var A=this.curOp;A&&(A.change&&this.signal("change",A.change,A),A&&A.cursorActivity&&this.signal("cursorActivity",null,A),this.curOp=null)},this.signal=function(A,F,W){var H=W?W[A+"Handlers"]:(this._eventRegistry||{})[A];if(H){H=H.slice();for(var K=0;K<H.length;K++)H[K](this,F)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(A,F){typeof A=="object"&&(F=A.ch,A=A.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:A,column:F}),this.ace.selection.moveTo(A,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(A){var F=this.ace.selection,W=A=="anchor"?F.isEmpty()?F.lead:F.anchor:A=="head"||!A?F.lead:F.getRange()[A];return v(W)},this.listSelections=function(A){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.map(function(W){return{anchor:this.clipPos(v(W.cursor==W.end?W.start:W.end)),head:this.clipPos(v(W.cursor))}},this)},this.setSelections=function(A,F){var W=this.ace.multiSelect,H=A.map(function(re){var ae=g(re.anchor),we=g(re.head),ke=fr.comparePoints(ae,we)<0?new fr.fromPoints(ae,we):new fr.fromPoints(we,ae);return ke.cursor=fr.comparePoints(ke.start,we)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}F?H[F]&&H.push(H.splice(F,1)[0]):H=H.reverse(),W.toSingleRange(H[0].clone());for(var K=this.ace.session,Y=0;Y<H.length;Y++){var Q=K.$clipRangeToDocument(H[Y]);W.addRange(Q)}},this.setSelection=function(A,F,W){var H=this.ace.selection;H.moveTo(A.line,A.ch),H.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(A){return!this.ace.selection.isEmpty()},this.clipPos=function(A){var F=this.ace.session.$clipPositionToDocument(A.line,A.ch);return v(F)},this.foldCode=function(A){this.ace.session.$toggleFoldWidget(A.line,{})},this.markText=function(A){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(A){var F=A.action=="insert",W=A.start,H=A.end,K=(H.row-W.row)*(F?1:-1),Y=(H.column-W.column)*(F?1:-1);F&&(H=W);for(var Q in this.marks){var re=this.marks[Q],ae=fr.comparePoints(re,W);if(!(ae<0)){if(ae===0&&F)if(!re.$insertRight)ae=1;else{if(re.bias!=1){re.bias=-1;continue}ae=1}var we=F?ae:fr.comparePoints(re,H);if(we>0){re.row+=K,re.column+=re.row==H.row?Y:0;continue}!F&&we<=0&&(re.row=W.row,re.column=W.column,we===0&&(re.bias=1))}}};var y=function(A,F,W,H){this.cm=A,this.id=F,this.row=W,this.column=H,A.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return v(this)},this.setBookmark=function(A,F){var W=new y(this,this.$uid++,A.line,A.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(A,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,A)}},this.findPosV=function(A,F,W,H){if(W=="page"){var K=this.ace.renderer,Y=K.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(A.line,A.ch);H!=null&&(Q.column=H),Q.row+=F,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return v(re)}debugger},this.charCoords=function(A,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(A.line,A.ch);return{left:W.column,top:W.row}}if(F=="local"){var H=this.ace.renderer,W=this.ace.session.documentToScreenPosition(A.line,A.ch),K=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,Q=K*W.row;return{left:W.column*Y,top:Q,bottom:Q+K}}},this.coordsChar=function(A,F){var W=this.ace.renderer;if(F=="local"){var H=Math.max(0,Math.floor(A.top/W.lineHeight)),K=Math.max(0,Math.floor(A.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(H,K);return v(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(A,F,W){var H=!1,K=!1;A instanceof RegExp&&!A.global&&(H=!A.ignoreCase,A=A.source,K=!0),A=="\\n"&&(A=`
1407
+ `,K=!1);var Y=new no;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,ae=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(we){Y.setOptions({needle:A,caseSensitive:H,wrap:!1,backwards:we,regExp:K,start:ae||Q});var ke=Y.find(re.ace.session);return ae=ke,ae&&[!ae.isEmpty()]},from:function(){return ae&&v(ae.start)},to:function(){return ae&&v(ae.end)},replace:function(we){ae&&(ae.end=re.ace.session.doc.replace(ae,we))}}},this.scrollTo=function(A,F){var W=this.ace.renderer,H=W.layerConfig,K=H.maxHeight;K-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,K))),A!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(A,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(A,F){if(A){var W=this.ace.renderer,H={top:0,bottom:F};W.scrollCursorIntoView(g(A),W.lineHeight*2/W.$size.scrollerHeight,H)}},this.getLine=function(A){return this.ace.session.getLine(A)},this.getRange=function(A,F){return this.ace.session.getTextRange(new fr(A.line,A.ch,F.line,F.ch))},this.replaceRange=function(A,F,W){W||(W=F);var H=new fr(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,A)},this.replaceSelection=this.replaceSelections=function(A){var F=Array.isArray(A)&&A,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?A[0]||"":A);return}W.inVirtualSelectionMode=!0;var H=W.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var K=H.length;K--;)this.ace.session.replace(H[K],F?A[K]||"":A);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(A){return this.getRange(A.anchor,A.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var T={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(A,F){switch(this.state[A]=F,A){case"indentWithTabs":A=T[A],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:A=T[A]}A&&this.ace.setOption(A,F)},this.getOption=function(A){var F,W=T[A];switch(W&&(F=this.ace.getOption(W)),A){case"indentWithTabs":return A=T[A],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F:this.state[A]},this.toggleOverwrite=function(A){return this.state.overwrite=A,this.ace.setOverwrite(A)},this.addOverlay=function(A){if(!this.$searchHighlight||!this.$searchHighlight.session){var F=new as(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(K){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(K){var Y=K.start.row;Y==K.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var H=new RegExp(A.query.source,"gmi");this.$searchHighlight=A.highlight=F,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(A){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var A=this.ace.renderer,F=A.layerConfig;return{left:A.scrollLeft,top:A.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(A){return this.ace.setValue(A,-1)},this.getTokenTypeAt=function(A){var F=this.ace.session.getTokenAt(A.line,A.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(A){var F=this.ace.session.findMatchingBracket(g(A));return{to:F&&v(F)}},this.findMatchingTag=function(A){var F=this.ace.session.getMatchingTags(g(A));if(F)return{open:{from:v(F.openTag.start),to:v(F.openTag.end)},close:{from:v(F.closeTag.start),to:v(F.closeTag.end)}}},this.indentLine=function(A,F){F===!0?this.ace.session.indentRows(A,A," "):F===!1&&this.ace.session.outdentRows(new fr(A,0,A,0))},this.indexFromPos=function(A){return this.ace.session.doc.positionToIndex(g(A))},this.posFromIndex=function(A){return v(this.ace.session.doc.indexToPosition(A))},this.focus=function(A){return this.ace.textInput.focus()},this.blur=function(A){return this.ace.blur()},this.defaultTextHeight=function(A){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(A,F,W,H){var K=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(K.slice(1,2),g(A),Y);else{var Q=this.ace.session.$findOpeningBracket(K.slice(-2,-1),{row:A.line,column:A.ch+1},Y);!Q&&H.bracketRegex&&H.bracketRegex.test(this.getLine(A.line)[A.ch-1])&&(Q={row:A.line,column:A.ch-1})}return Q&&{pos:v(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(A){if(We.commands.hasOwnProperty(A))return We.commands[A](this);if(A=="indentAuto")return this.ace.execCommand("autoindent");console.log(A+" is not implemented")},this.getLineNumber=function(A){var F=this.$lineHandleChanges;if(!F)return null;for(var W=A.row,H=0;H<F.length;H++){var K=F[H];if(K.start.row!=K.end.row){if(K.action[0]=="i")K.start.row<W&&(W+=K.end.row-K.start.row);else if(K.start.row<W){if(W<K.end.row||W==K.end.row&&K.start.column>0)return null;W-=K.end.row-K.start.row}}}return W},this.getLineHandle=function(A){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(A),row:A}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var A=this.ace.session.$undoManager;if(A&&A.$lastDelta)return v(A.$lastDelta.end)}}).call(We.prototype);var Ca=We.StringStream=function(y,T){this.pos=this.start=0,this.string=y,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ca.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var T=this.string.charAt(this.pos);if(typeof y=="string")var A=T==y;else var A=T&&(y.test?y.test(T):y(T));if(A)return++this.pos,T},eatWhile:function(y){for(var T=this.pos;this.eat(y););return this.pos>T},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var T=this.string.indexOf(y,this.pos);if(T>-1)return this.pos=T,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,T,A){if(typeof y!="string"){var F=this.string.slice(this.pos).match(y);return F&&F.index>0?null:(F&&T!==!1&&(this.pos+=F[0].length),F)}var W=function(K){return A?K.toLowerCase():K},H=this.string.substr(this.pos,y.length);if(W(H)==W(y))return T!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,T){this.lineStart+=y;try{return T()}finally{this.lineStart-=y}}},We.defineExtension=function(y,T){We.prototype[y]=T},to.importCssString(`.normal-mode .ace_cursor{
1408
+ border: none;
1409
+ background-color: rgba(255,0,0,0.5);
1410
+ }
1411
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1412
+ background-color: transparent;
1413
+ border: 1px solid red;
1414
+ opacity: 0.7
1415
+ }
1416
+ .ace_dialog {
1417
+ position: absolute;
1418
+ left: 0; right: 0;
1419
+ background: inherit;
1420
+ z-index: 15;
1421
+ padding: .1em .8em;
1422
+ overflow: hidden;
1423
+ color: inherit;
1424
+ }
1425
+ .ace_dialog-top {
1426
+ border-bottom: 1px solid #444;
1427
+ top: 0;
1428
+ }
1429
+ .ace_dialog-bottom {
1430
+ border-top: 1px solid #444;
1431
+ bottom: 0;
1432
+ }
1433
+ .ace_dialog input {
1434
+ border: none;
1435
+ outline: none;
1436
+ background: transparent;
1437
+ width: 20em;
1438
+ color: inherit;
1439
+ font-family: monospace;
1440
+ }`,"vimMode",!1),function(){function y(A,F,W){var H=A.ace.container,K;return K=H.appendChild(document.createElement("div")),W?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof F=="string"?K.innerHTML=F:K.appendChild(F),K}function T(A,F){A.state.currentNotificationClose&&A.state.currentNotificationClose(),A.state.currentNotificationClose=F}We.defineExtension("openDialog",function(A,F,W){function H(we){if(typeof we=="string")re.value=we;else{if(Y||we&&we.type=="blur"&&document.activeElement===re)return;Q.state.dialog==K&&(Q.state.dialog=null,Q.focus()),Y=!0,K.remove(),W.onClose&&W.onClose(K);var ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),T(this,null);var K=y(this,A,W.bottom),Y=!1,Q=this;this.state.dialog=K;var re=K.getElementsByTagName("input")[0],ae;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&We.on(re,"input",function(we){W.onInput(we,re.value,H)}),W.onKeyUp&&We.on(re,"keyup",function(we){W.onKeyUp(we,re.value,H)}),We.on(re,"keydown",function(we){W&&W.onKeyDown&&W.onKeyDown(we,re.value,H)||(we.keyCode==13&&F(re.value),(we.keyCode==27||W.closeOnEnter!==!1&&we.keyCode==13)&&(We.e_stop(we),H()))}),W.closeOnBlur!==!1&&We.on(re,"blur",H),re.focus()):(ae=K.getElementsByTagName("button")[0])&&(We.on(ae,"click",function(){H(),Q.focus()}),W.closeOnBlur!==!1&&We.on(ae,"blur",H),ae.focus()),H}}),We.defineExtension("openNotification",function(A,F){function W(){K||(K=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){T(this,W);var H=y(this,A,F&&F.bottom),K=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return We.on(H,"click",function(re){We.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var De=We.Pos,Fn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Oo=Fn.length,Ci=[{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"}],Yn=O(""),ka=/[\d]/,No=[We.isWordChar,function(y){return y&&!We.isWordChar(y)&&!/\s/.test(y)}],Fi=[function(y){return/\S/.test(y)}],yo=["<",">"],rn=["-",'"',".",":","_","/","+"],Qt=/^\w$/,on;try{on=new RegExp("^[\\p{Lu}]$","u")}catch{on=/^[A-Z]$/}var jt={};I("filetype",void 0,"string",["ft"],function(y,T){if(T!==void 0){if(y===void 0){var A=T.getOption("mode");return A=="null"?"":A}var A=y==""?"null":y;T.setOption("mode",A)}}),I("textwidth",80,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var A=T.getOption("textwidth");return A}var F=Math.round(y);F>1&&T.setOption("textwidth",F)}});var Pi=function(){function y(Q,re,ae){function we(Oe){var Re=++W%F,Ke=Y[Re];Ke&&Ke.clear(),Y[Re]=Q.setBookmark(Oe)}var ke=W%F,ve=Y[ke];if(ve){var be=ve.find();be&&!ct(be,re)&&we(re)}else we(re);we(ae),H=W,K=W-F+1,K<0&&(K=0)}function T(Q,re){W+=re,W>H?W=H:W<K&&(W=K);var ae=Y[(F+W)%F];if(ae&&!ae.find()){var we=re>0?1:-1,ke,ve=Q.getCursor();do if(W+=we,ae=Y[(F+W)%F],ae&&(ke=ae.find())&&!ct(ve,ke))break;while(W<H&&W>K)}return ae}function A(Q,re){var ae=W,we=T(Q,re);return W=ae,we&&we.find()}var F=100,W=-1,H=0,K=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:A,move:T}},zn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,T){var A=He.registerController.getRegister(T);if(A){if(A.clear(),this.latestRegister=T,y.openDialog){var F=Or("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var He,xn,yt={enterVimMode:h,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return He},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:go,map:function(y,T,A){$r.map(y,T,A)},unmap:function(y,T){return $r.unmap(y,T)},noremap:function(y,T,A){$r.map(y,T,A,!0)},mapclear:function(y){var T=Fn.length,A=Oo,F=Fn.slice(0,T-A);if(Fn=Fn.slice(T-A),y)for(var W=F.length-1;W>=0;W--){var H=F[W];if(y!==H.context)if(H.context)this._mapCommand(H);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==y){var Q={};for(var re in H)Q[re]=H[re];Q.context=K[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:B,setOption:$,getOption:S,defineOption:I,defineEx:function(y,T,A){if(!T)T=y;else if(y.indexOf(T)!==0)throw new Error('(Vim.defineEx) "'+T+'" is not a prefix of "'+y+'", command not registered');Bs[y]=A,$r.commandMap_[T]={name:y,shortName:T,type:"api"}},handleKey:function(y,T,A){var F=this.findKey(y,T,A);if(typeof F=="function")return F()},multiSelectHandleKey:Eo,findKey:function(y,T,A){function F(){var re=He.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),k(y),!0;A!="mapping"&&ts(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)wn(y);else{if(!Y.insertMode)return;ci(y)}return k(y),!0}}function H(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),ae=T.length==1,we=Hn.matchCommand(re,Fn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(we.type=="none")return k(y),!1;if(we.type=="partial"){if(we.expectLiteralNext&&(Y.expectLiteralNext=!0),xn&&window.clearTimeout(xn),xn=ae&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&k(y)},S("insertModeEscKeysTimeout")),ae){var ve=y.listSelections();(!ke||ke.removed.length!=ve.length)&&(ke=Y.inputState.changeQueue=new D),ke.inserted+=T;for(var be=0;be<ve.length;be++){var Oe=ht(ve[be].anchor,ve[be].head),Re=qt(ve[be].anchor,ve[be].head),Ke=y.getRange(Oe,y.state.overwrite?me(Re,0,1):Re);ke.removed[be]=(ke.removed[be]||"")+Ke}}return!ae}if(Y.expectLiteralNext=!1,xn&&window.clearTimeout(xn),we.command&&ke){for(var ve=y.listSelections(),be=0;be<ve.length;be++){var st=ve[be].head;y.replaceRange(ke.removed[be]||"",me(st,0,-ke.inserted.length),st,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return we.command||k(y),we.command}function K(){if(F()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ae=/^(\d*)(.*)$/.exec(re);if(!ae)return k(y),!1;var we=Y.visualMode?"visual":"normal",ke=ae[2]||ae[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var ve=Hn.matchCommand(ke,Fn,Y.inputState,we);return ve.type=="none"?(k(y),!1):ve.type=="partial"?(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ve.type=="clear"?(k(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ae=/^(\d*)(.*)$/.exec(re),ae[1]&&ae[1]!="0"&&Y.inputState.pushRepeatDigit(ae[1]),ve.command)}var Y=R(y),Q;return Y.insertMode?Q=H():Q=K(),Q===!1?!Y.insertMode&&T.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?E(y,Q.toKeys,Q):Hn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,R(y),yt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,T){$r.processCommand(y,T)},defineMotion:ee,defineAction:le,defineOperator:te,mapCommand:Ns,_mapCommand:es,defineRegister:U,exitVisualMode:wn,exitInsertMode:ci},Gr=[],pn=!1,Sn,ir={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},qr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Wi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(ir)).forEach(function(y){Wi[(ir[y]||"").toLowerCase()]=Wi[y.toLowerCase()]=y}),I("langmap",void 0,"string",["lmap"],function(y,T){if(y===void 0)return Yn.string;P(y)}),_.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},_.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},z.prototype={setText:function(y,T,A){this.keyBuffer=[y||""],this.linewise=!!T,this.blockwise=!!A},pushText:function(y,T){T&&(this.linewise||this.keyBuffer.push(`
1441
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(zn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(y,T,A,F,W){if(y!=="_"){F&&A.charAt(A.length-1)!==`
1442
+ `&&(A+=`
1443
+ `);var H=this.isValidRegister(y)?this.getRegister(y):null;if(!H){switch(T){case"yank":this.registers[0]=new z(A,F,W);break;case"delete":case"change":A.indexOf(`
1444
+ `)==-1?this.registers["-"]=new z(A,F):(this.shiftNumericRegisters_(),this.registers[1]=new z(A,F))}this.unnamedRegister.setText(A,F,W);return}var K=l(y);K?H.pushText(A,F):H.setText(A,F,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(A),this.unnamedRegister.setText(H.toString(),F)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new z),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,rn)||Qt.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},X.prototype={nextMatch:function(y,T){var A=this.historyBuffer,F=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+F;T?W>=0:W<A.length;W+=F)for(var H=A[W],K=0;K<=H.length;K++)if(this.initialPrefix==H.substring(0,K))return this.iterator=W,H;if(W>=A.length)return this.iterator=A.length,this.initialPrefix;if(W<0)return y},pushInput:function(y){var T=this.historyBuffer.indexOf(y);T>-1&&this.historyBuffer.splice(T,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Hn={matchCommand:function(y,T,A,F){var W=_e(y,T,F,A);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var H,K=0;K<W.full.length;K++){var Y=W.full[K];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var Q=Me(y);if(!Q||Q.length>1)return{type:"clear"};A.selectedCharacter=Q}return{type:"full",command:H}},processCommand:function(y,T,A){switch(T.inputState.repeatOverride=A.repeatOverride,A.type){case"motion":this.processMotion(y,T,A);break;case"operator":this.processOperator(y,T,A);break;case"operatorMotion":this.processOperatorMotion(y,T,A);break;case"action":this.processAction(y,T,A);break;case"search":this.processSearch(y,T,A);break;case"ex":case"keyToEx":this.processEx(y,T,A);break}},processMotion:function(y,T,A){T.inputState.motion=A.motion,T.inputState.motionArgs=ue(A.motionArgs),this.evalInput(y,T)},processOperator:function(y,T,A){var F=T.inputState;if(F.operator){if(F.operator==A.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,T);return}k(y)}F.operator=A.operator,F.operatorArgs=ue(A.operatorArgs),A.keys.length>1&&(F.operatorShortcut=A.keys),A.exitVisualBlock&&(T.visualBlock=!1,On(y)),T.visualMode&&this.evalInput(y,T)},processOperatorMotion:function(y,T,A){var F=T.visualMode,W=ue(A.operatorMotionArgs);W&&F&&W.visualLine&&(T.visualLine=!0),this.processOperator(y,T,A),F||this.processMotion(y,T,A)},processAction:function(y,T,A){var F=T.inputState,W=F.getRepeat(),H=!!W,K=ue(A.actionArgs)||{};F.selectedCharacter&&(K.selectedCharacter=F.selectedCharacter),A.operator&&this.processOperator(y,T,A),A.motion&&this.processMotion(y,T,A),(A.motion||A.operator)&&this.evalInput(y,T),K.repeat=W||1,K.repeatIsExplicit=H,K.registerName=F.registerName,k(y),T.lastMotion=null,A.isEdit&&this.recordLastEdit(T,F,A),jn[A.action](y,K,T)},processSearch:function(y,T,A){function F(Re,Ke,st){He.searchHistoryController.pushInput(Re),He.searchHistoryController.reset();try{Ne(y,Re,Ke,st)}catch{Nt(y,"Invalid regex: "+Re),k(y);return}Hn.processMotion(y,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:A.searchArgs.toJumplist}})}function W(Re){F(Re,!0,!0);var Ke=He.macroModeState;Ke.isRecording&&Fs(Ke,Re)}function H(Re,Ke,st){var Ze=B(Re),tt,Cn;Ze=="<Up>"||Ze=="<Down>"?(tt=Ze=="<Up>",Cn=Re.target?Re.target.selectionEnd:0,Ke=He.searchHistoryController.nextMatch(Ke,tt)||"",st(Ke),Cn&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(Cn,Re.target.value.length))):Ze&&Ze!="<Left>"&&Ze!="<Right>"&&He.searchHistoryController.reset();var at;try{at=Ne(y,Ke,!0,!0)}catch{}at?y.scrollIntoView(Dt(y,!Y,at),30):(rr(y),y.scrollTo(we.left,we.top))}function K(Re,Ke,st){var Ze=B(Re);Ze=="<Esc>"||Ze=="<C-c>"||Ze=="<C-[>"||Ze=="<BS>"&&Ke==""?(He.searchHistoryController.pushInput(Ke),He.searchHistoryController.reset(),Ne(y,ae),rr(y),y.scrollTo(we.left,we.top),We.e_stop(Re),k(y),st(),y.focus()):Ze=="<Up>"||Ze=="<Down>"?We.e_stop(Re):Ze=="<C-u>"&&(We.e_stop(Re),st(""))}if(y.getSearchCursor){var Y=A.searchArgs.forward,Q=A.searchArgs.wholeWordOnly;tn(y).setReversed(!Y);var re=Y?"/":"?",ae=tn(y).getQuery(),we=y.getScrollInfo();switch(A.searchArgs.querySrc){case"prompt":var ke=He.macroModeState;if(ke.isPlaying){var Oe=ke.replaySearchQueries.shift();F(Oe,!0,!1)}else he(y,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:K});break;case"wordUnderCursor":var ve=bn(y,{noSymbol:!0}),be=!0;if(ve||(ve=bn(y,{noSymbol:!1}),be=!1),!ve){Nt(y,"No word under cursor"),k(y);return}var Oe=y.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=yn(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(ve.start),F(Oe,!0,!1)}}},processEx:function(y,T,A){function F(H){He.exCommandHistoryController.pushInput(H),He.exCommandHistoryController.reset(),$r.processCommand(y,H),y.state.vim&&k(y)}function W(H,K,Y){var Q=B(H),re,ae;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&K=="")&&(He.exCommandHistoryController.pushInput(K),He.exCommandHistoryController.reset(),We.e_stop(H),k(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(We.e_stop(H),re=Q=="<Up>",ae=H.target?H.target.selectionEnd:0,K=He.exCommandHistoryController.nextMatch(K,re)||"",Y(K),ae&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(ae,H.target.value.length))):Q=="<C-u>"?(We.e_stop(H),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}A.type=="keyToEx"?$r.processCommand(y,A.exArgs.input):T.visualMode?he(y,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):he(y,{onClose:F,prefix:":",onKeyDown:W})},evalInput:function(y,T){var A=T.inputState,F=A.motion,W=A.motionArgs||{},H=A.operator,K=A.operatorArgs||{},Y=A.registerName,Q=T.sel,re=Ue(T.visualMode?se(y,Q.head):y.getCursor("head")),ae=Ue(T.visualMode?se(y,Q.anchor):y.getCursor("anchor")),we=Ue(re),ke=Ue(ae),ve,be,Oe;if(H&&this.recordLastEdit(T,A),A.repeatOverride!==void 0?Oe=A.repeatOverride:Oe=A.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),A.selectedCharacter&&(W.selectedCharacter=K.selectedCharacter=A.selectedCharacter),W.repeat=Oe,k(y),F){var Re=ui[F](y,re,W,T,A);if(T.lastMotion=ui[F],!Re)return;if(W.toJumplist){!H&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ke=He.jumpList,st=Ke.cachedCursor;st?(jr(y,st,Re),delete Ke.cachedCursor):jr(y,re,Re)}Re instanceof Array?(be=Re[0],ve=Re[1]):ve=Re,ve||(ve=Ue(re)),T.visualMode?((!T.visualBlock||ve.ch!==1/0)&&(ve=se(y,ve,we)),be&&(be=se(y,be)),be=be||ke,Q.anchor=be,Q.head=ve,On(y),Zt(y,T,"<",et(be,ve)?be:ve),Zt(y,T,">",et(be,ve)?ve:be)):H||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ve=se(y,ve,we),y.setCursor(ve.line,ve.ch))}if(H){if(K.lastSel){be=ke;var Ze=K.lastSel,tt=Math.abs(Ze.head.line-Ze.anchor.line),Cn=Math.abs(Ze.head.ch-Ze.anchor.ch);Ze.visualLine?ve=new De(ke.line+tt,ke.ch):Ze.visualBlock?ve=new De(ke.line+tt,ke.ch+Cn):Ze.head.line==Ze.anchor.line?ve=new De(ke.line,ke.ch+Cn):ve=new De(ke.line+tt,ke.ch),T.visualMode=!0,T.visualLine=Ze.visualLine,T.visualBlock=Ze.visualBlock,Q=T.sel={anchor:be,head:ve},On(y)}else T.visualMode&&(K.lastSel={anchor:Ue(Q.anchor),head:Ue(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var at,Tn,bt,_t,or;if(T.visualMode){at=ht(Q.head,Q.anchor),Tn=qt(Q.head,Q.anchor),bt=T.visualLine||K.linewise,_t=T.visualBlock?"block":bt?"line":"char";var kr=b(y,at,Tn);if(or=wr(y,{anchor:kr.start,head:kr.end},_t),bt){var Mn=or.ranges;if(_t=="block")for(var V=0;V<Mn.length;V++)Mn[V].head.ch=Vt(y,Mn[V].head.line);else _t=="line"&&(Mn[0].head=new De(Mn[0].head.line+1,0))}}else{if(at=Ue(be||ke),Tn=Ue(ve||we),et(Tn,at)){var Z=at;at=Tn,Tn=Z}bt=W.linewise||K.linewise,bt?Nn(y,at,Tn):W.forward&&_n(y,at,Tn),_t="char";var ie=!W.inclusive||bt,kr=b(y,at,Tn);or=wr(y,{anchor:kr.start,head:kr.end},_t,ie)}y.setSelections(or.ranges,or.primary),T.lastMotion=null,K.repeat=Oe,K.registerName=Y,K.linewise=bt;var oe=ls[H](y,K,or.ranges,ke,ve);T.visualMode&&wn(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,T,A){var F=He.macroModeState;F.isPlaying||(y.lastEditInputState=T,y.lastEditActionCommand=A,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},ui={moveToTopLine:function(y,T,A){var F=li(y).top+A.repeat-1;return new De(F,Ot(y.getLine(F)))},moveToMiddleLine:function(y){var T=li(y),A=Math.floor((T.top+T.bottom)*.5);return new De(A,Ot(y.getLine(A)))},moveToBottomLine:function(y,T,A){var F=li(y).bottom-A.repeat+1;return new De(F,Ot(y.getLine(F)))},expandToLine:function(y,T,A){var F=T;return new De(F.line+A.repeat-1,1/0)},findNext:function(y,T,A){var F=tn(y),W=F.getQuery();if(W){var H=!A.forward;return H=F.isReversed()?!H:H,an(y,W),Dt(y,H,W,A.repeat)}},findAndSelectNextInclusive:function(y,T,A,F,W){var H=tn(y),K=H.getQuery();if(K){var Y=!A.forward;Y=H.isReversed()?!Y:Y;var Q=Bn(y,Y,K,A.repeat,F);if(Q){if(W.operator)return Q;var re=Q[0],ae=new De(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,We.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var we=F.sel.anchor;if(we)return H.isReversed()?A.forward?[we,re]:[we,ae]:A.forward?[we,ae]:[we,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,We.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ae,re]:[re,ae]}}},goToMark:function(y,T,A,F){var W=nn(y,F,A.selectedCharacter);return W?A.linewise?{line:W.line,ch:Ot(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,T,A,F){if(F.visualBlock&&A.sameLine){var W=F.sel;return[se(y,new De(W.anchor.line,W.head.ch)),se(y,new De(W.head.line,W.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(y,T,A,F){for(var W=T,H=0;H<A.repeat;H++){var K=W;for(var Y in F.marks)if(u(Y)){var Q=F.marks[Y].find(),re=A.forward?et(Q,K):et(K,Q);if(!re&&!(A.linewise&&Q.line==K.line)){var ae=ct(K,W),we=A.forward?hn(K,Q,W):hn(W,Q,K);(ae||we)&&(W=Q)}}}return A.linewise&&(W=new De(W.line,Ot(y.getLine(W.line)))),W},moveByCharacters:function(y,T,A){var F=T,W=A.repeat,H=A.forward?F.ch+W:F.ch-W;return new De(F.line,H)},moveByLines:function(y,T,A,F){var W=T,H=W.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=F.lastHPos;break;default:F.lastHPos=H}var K=A.repeat+(A.repeatOffset||0),Y=A.forward?W.line+K:W.line-K,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(y,T,A,F);if(Y>re&&W.line==re)return Ur(y,T,A,F,!0);var ae=y.ace.session.getFoldLine(Y);return ae&&(A.forward?Y>ae.start.row&&(Y=ae.end.row+1):Y=ae.start.row),A.toFirstChar&&(H=Ot(y.getLine(Y)),F.lastHPos=H),F.lastHSPos=y.charCoords(new De(Y,H),"div").left,new De(Y,H)},moveByDisplayLines:function(y,T,A,F){var W=T;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=y.charCoords(W,"div").left}var H=A.repeat,Q=y.findPosV(W,A.forward?H:-H,"line",F.lastHSPos);if(Q.hitSide)if(A.forward)var K=y.charCoords(Q,"div"),Y={top:K.top+8,left:F.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=F.lastHSPos,Q=y.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(y,T,A){var F=T,W=A.repeat;return y.findPosV(F,A.forward?W:-W,"page")},moveByParagraph:function(y,T,A){var F=A.forward?1:-1;return _o(y,T,A.repeat,F)},moveBySentence:function(y,T,A){var F=A.forward?1:-1;return Vr(y,T,A.repeat,F)},moveByScroll:function(y,T,A,F){var W=y.getScrollInfo(),H=null,K=A.repeat;K||(K=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(T,"local");if(A.repeat=K,H=ui.moveByDisplayLines(y,T,A,F),!H)return null;var Q=y.charCoords(H,"local");return y.scrollTo(null,W.top+Q.top-Y.top),H},moveByWords:function(y,T,A){return hr(y,T,A.repeat,!!A.forward,!!A.wordEnd,!!A.bigWord)},moveTillCharacter:function(y,T,A){var F=A.repeat,W=po(y,F,A.forward,A.selectedCharacter,T),H=A.forward?-1:1;return wi(H,A),W?(W.ch+=H,W):null},moveToCharacter:function(y,T,A){var F=A.repeat;return wi(0,A),po(y,F,A.forward,A.selectedCharacter,T)||T},moveToSymbol:function(y,T,A){var F=A.repeat;return Rr(y,F,A.forward,A.selectedCharacter)||T},moveToColumn:function(y,T,A,F){var W=A.repeat;return F.lastHPos=W-1,F.lastHSPos=y.charCoords(T,"div").left,Os(y,W)},moveToEol:function(y,T,A,F){return Ur(y,T,A,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,T){var A=T;return new De(A.line,Ot(y.getLine(A.line)))},moveToMatchedSymbol:function(y,T){for(var A=T,F=A.line,W=A.ch,H=y.getLine(F),K;W<H.length;W++)if(K=H.charAt(W),K&&c(K)){var Y=y.getTokenTypeAt(new De(F,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<H.length){var Q=/[<>]/.test(H[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(F,W+1),{bracketRegex:Q});return re.to}return A},moveToStartOfLine:function(y,T){return new De(T.line,0)},moveToLineOrEdgeOfDocument:function(y,T,A){var F=A.forward?y.lastLine():y.firstLine();return A.repeatIsExplicit&&(F=A.repeat-y.getOption("firstLineNumber")),new De(F,Ot(y.getLine(F)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var T=y.getCursor();return T.sticky=="before"&&T.ch--,T},textObjectManipulation:function(y,T,A,F){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},K=A.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!A.textObjectInner,Q,re;if(W[K]){if(re=!0,Q=$n(y,T,K,Y),!Q){var ae=y.getSearchCursor(new RegExp("\\"+K,"g"),T);ae.find()&&(Q=$n(y,ae.from(),K,Y))}}else if(H[K])re=!0,Q=dr(y,T,K,Y);else if(K==="W"||K==="w")for(var we=A.repeat||1;we-- >0;){var ke=bn(y,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(K==="p")if(Q=_o(y,T,A.repeat,0,Y),A.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var ve=F.inputState.operatorArgs;ve&&(ve.linewise=!0),Q.end.line--}else if(K==="t")Q=yi(y,T,Y);else if(K==="s"){var be=y.getLine(T.line);T.ch>0&&w(be[T.ch])&&(T.ch-=1);var Oe=$o(y,T,A.repeat,1,Y),Re=$o(y,T,A.repeat,-1,Y);d(y.getLine(Re.line)[Re.ch])&&d(y.getLine(Oe.line)[Oe.ch-1])&&(Re={line:Re.line,ch:Re.ch+1}),Q={start:Re,end:Oe}}return Q?y.state.vim.visualMode?dn(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,T,A){var F=He.lastCharacterSearch,W=A.repeat,H=A.forward===F.forward,K=(F.increment?1:0)*(H?-1:1);y.moveH(-K,"char"),A.inclusive=!!H;var Y=po(y,W,H,F.selectedCharacter);return Y?(Y.ch+=K,Y):(y.moveH(K,"char"),T)}},ls={change:function(y,T,A){var F,W,H=y.state.vim,K=A[0].anchor,Y=A[0].head;if(H.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(K,Y),W=y.getSelection(),y.replaceSelection(""),F=K;else{W=y.getSelection();var Q=de("",A.length);y.replaceSelections(Q),F=ht(A[0].head,A[0].anchor)}else{W=y.getRange(K,Y);var re=H.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var ae=/\s+$/.exec(W);ae&&re.motionArgs&&re.motionArgs.forward&&(Y=me(Y,0,-ae[0].length),W=W.slice(0,-ae[0].length))}T.linewise&&(K=new De(K.line,Ot(y.getLine(K.line))),Y.line>K.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",K,Y),F=K}He.registerController.pushText(T.registerName,"change",W,T.linewise,A.length>1),jn.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,T,A){var F,W,H=y.state.vim;if(H.visualBlock){W=y.getSelection();var K=de("",A.length);y.replaceSelections(K),F=ht(A[0].head,A[0].anchor)}else{var Y=A[0].anchor,Q=A[0].head;T.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,Vt(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,T.linewise&&(F=ui.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText(T.registerName,"delete",W,T.linewise,H.visualBlock),se(y,F)},indent:function(y,T,A){var F=y.state.vim,W=F.visualMode?T.repeat:1;if(F.visualBlock){for(var H=y.getOption("tabSize"),K=y.getOption("indentWithTabs")?" ":" ".repeat(H),Y,Q=A.length-1;Q>=0;Q--)if(Y=ht(A[Q].anchor,A[Q].head),T.indentRight)y.replaceRange(K.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),ae=0,we=0;we<W;we++){var ke=re[Y.ch+ae];if(ke==" ")ae++;else{if(ke!=" ")break;ae++;for(var ve=1;ve<K.length&&(ke=re[Y.ch+ae],ke===" ");ve++)ae++}}y.replaceRange("",Y,me(Y,0,ae))}return Y}if(y.indentMore)for(var we=0;we<W;we++)T.indentRight?y.indentMore():y.indentLess();else{var be=A[0].anchor.line,Oe=F.visualBlock?A[A.length-1].anchor.line:A[0].head.line;T.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var we=0;we<W;we++)y.indentLine(Q,T.indentRight)}return ui.moveToFirstNonWhiteSpaceCharacter(y,A[0].anchor)},indentAuto:function(y,T,A){return y.execCommand("indentAuto"),ui.moveToFirstNonWhiteSpaceCharacter(y,A[0].anchor)},hardWrap:function(y,T,A,F,W){if(y.hardWrap){var H=A[0].anchor.line,K=A[0].head.line;T.linewise&&K--;var Y=y.hardWrap({from:H,to:K});return Y>H&&T.linewise&&Y--,T.keepCursor?F:new De(Y,0)}},changeCase:function(y,T,A,F,W){for(var H=y.getSelections(),K=[],Y=T.toLower,Q=0;Q<H.length;Q++){var re=H[Q],ae="";if(Y===!0)ae=re.toLowerCase();else if(Y===!1)ae=re.toUpperCase();else for(var we=0;we<re.length;we++){var ke=re.charAt(we);ae+=l(ke)?ke.toLowerCase():ke.toUpperCase()}K.push(ae)}return y.replaceSelections(K),T.shouldMoveCursor?W:!y.state.vim.visualMode&&T.linewise&&A[0].anchor.line+1==A[0].head.line?ui.moveToFirstNonWhiteSpaceCharacter(y,F):T.linewise?F:ht(A[0].anchor,A[0].head)},yank:function(y,T,A,F){var W=y.state.vim,H=y.getSelection(),K=W.visualMode?ht(W.sel.anchor,W.sel.head,A[0].head,A[0].anchor):F;return He.registerController.pushText(T.registerName,"yank",H,T.linewise,W.visualBlock),K}},jn={jumpListWalk:function(y,T,A){if(!A.visualMode){var F=T.repeat,W=T.forward,H=He.jumpList,K=H.move(y,W?F:-F),Y=K?K.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,T,A){if(!A.visualMode){var F=T.repeat||1,W=y.defaultTextHeight(),H=y.getScrollInfo().top,K=W*F,Y=T.forward?H+K:H-K,Q=Ue(y.getCursor()),re=y.charCoords(Q,"local");if(T.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var ae=Y+y.getScrollInfo().clientHeight;ae<re.bottom?(Q.line-=(re.bottom-ae)/W,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,T){var A=y.getCursor().line,F=y.charCoords(new De(A,0),"local"),W=y.getScrollInfo().clientHeight,H=F.top;switch(T.position){case"center":H=F.bottom-W/2;break;case"bottom":var K=new De(A,y.getLine(A).length-1),Y=y.charCoords(K,"local"),Q=Y.bottom-H;H=H-W+Q}y.scrollTo(null,H)},replayMacro:function(y,T,A){var F=T.selectedCharacter,W=T.repeat,H=He.macroModeState;for(F=="@"?F=H.latestRegister:H.latestRegister=F;W--;)Ds(y,A,H,F)},enterMacroRecordMode:function(y,T){var A=He.macroModeState,F=T.selectedCharacter;He.registerController.isValidRegister(F)&&A.enterMacroRecordMode(y,F)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),We.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),We.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,T,A){if(!y.getOption("readOnly")){A.insertMode=!0,A.insertModeRepeat=T&&T.repeat||1;var F=T?T.insertAt:null,W=A.sel,H=T.head||y.getCursor("head"),K=y.listSelections().length;if(F=="eol")H=new De(H.line,Vt(y,H.line));else if(F=="bol")H=new De(H.line,0);else if(F=="charAfter"){var Y=b(y,H,me(H,0,1));H=Y.end}else if(F=="firstNonBlank"){var Y=b(y,H,ui.moveToFirstNonWhiteSpaceCharacter(y,H));H=Y.end}else if(F=="startOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(H=new De(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?H=W.head:H=new De(W.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(H=new De(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?H=me(W.head,0,1):H=new De(W.anchor.line,0)}else if(F=="inplace"){if(A.visualMode)return}else F=="lastEdit"&&(H=Ni(y)||H);y.setOption("disableInput",!1),T&&T.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),We.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),We.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",Mo),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=y.setBookmark(H,{insertLeft:!0}),We.on(y.getInputField(),"keydown",Ps)),A.visualMode&&wn(y),ur(y,H,K)}},toggleVisualMode:function(y,T,A){var F=T.repeat,W=y.getCursor(),H;if(A.visualMode)A.visualLine^T.linewise||A.visualBlock^T.blockwise?(A.visualLine=!!T.linewise,A.visualBlock=!!T.blockwise,We.signal(y,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),On(y)):wn(y);else{A.visualMode=!0,A.visualLine=!!T.linewise,A.visualBlock=!!T.blockwise,H=se(y,new De(W.line,W.ch+F-1));var K=b(y,W,H);A.sel={anchor:K.start,head:K.end},We.signal(y,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),On(y),Zt(y,A,"<",ht(W,H)),Zt(y,A,">",qt(W,H))}},reselectLastSelection:function(y,T,A){var F=A.lastSelection;if(A.visualMode&&Rt(y,A),F){var W=F.anchorMark.find(),H=F.headMark.find();if(!W||!H)return;A.sel={anchor:W,head:H},A.visualMode=!0,A.visualLine=F.visualLine,A.visualBlock=F.visualBlock,On(y),Zt(y,A,"<",ht(W,H)),Zt(y,A,">",qt(W,H)),We.signal(y,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""})}},joinLines:function(y,T,A){var F,W;if(A.visualMode){if(F=y.getCursor("anchor"),W=y.getCursor("head"),et(W,F)){var H=W;W=F,F=H}W.ch=Vt(y,W.line)-1}else{var K=Math.max(T.repeat,2);F=y.getCursor(),W=se(y,new De(F.line+K-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Vt(y,F.line);var re="",ae=0;if(!T.keepSpaces){var we=y.getLine(F.line+1);ae=we.search(/\S/),ae==-1?ae=we.length:re=" "}y.replaceRange(re,new De(F.line,Y),new De(F.line+1,ae))}var ke=se(y,new De(F.line,Y));A.visualMode&&wn(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,T,A){A.insertMode=!0;var F=Ue(y.getCursor());if(F.line===y.firstLine()&&!T.after)y.replaceRange(`
1445
+ `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{F.line=T.after?F.line:F.line-1,F.ch=Vt(y,F.line),y.setCursor(F);var W=We.commands.newlineAndIndentContinueComment||We.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:T.repeat},A)},paste:function(y,T,A){var F=this,W=He.registerController.getRegister(T.registerName),H=function(){var K=W.toString();F.continuePaste(y,T,A,K,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(K){F.continuePaste(y,T,A,K,W)},function(){H()}):H()},continuePaste:function(y,T,A,F,W){var H=Ue(y.getCursor());if(F){if(T.matchIndent){var K=y.getOption("tabSize"),Y=function(Mn){var V=Mn.split(" ").length-1,Z=Mn.split(" ").length-1;return V*K+Z*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),ae=F.replace(/\n$/,""),we=F!==ae,ke=Y(F.match(/^\s*/)[0]),F=ae.replace(/^\s*/gm,function(Mn){var V=re+(Y(Mn)-ke);if(V<0)return"";if(y.getOption("indentWithTabs")){var Z=Math.floor(V/K);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});F+=we?`
1446
+ `:""}if(T.repeat>1)var F=Array(T.repeat+1).join(F);var ve=W.linewise,be=W.blockwise;if(be){F=F.split(`
1447
+ `),ve&&F.pop();for(var Oe=0;Oe<F.length;Oe++)F[Oe]=F[Oe]==""?" ":F[Oe];H.ch+=T.after?1:0,H.ch=Math.min(Vt(y,H.line),H.ch)}else ve?A.visualMode?F=A.visualLine?F.slice(0,-1):`
1448
+ `+F.slice(0,F.length-1)+`
1449
+ `:T.after?(F=`
1450
+ `+F.slice(0,F.length-1),H.ch=Vt(y,H.line)):H.ch=0:H.ch+=T.after?1:0;var Re;if(A.visualMode){A.lastPastedText=F;var Ke,st=je(y,A),Ze=st[0],tt=st[1],Cn=y.getSelection(),at=y.listSelections(),Tn=new Array(at.length).join("1").split("1");A.lastSelection&&(Ke=A.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(Cn),be?(y.replaceSelections(Tn),tt=new De(Ze.line+F.length-1,Ze.ch),y.setCursor(Ze),tr(y,tt),y.replaceSelections(F),Re=Ze):A.visualBlock?(y.replaceSelections(Tn),y.setCursor(Ze),y.replaceRange(F,Ze,Ze),Re=Ze):(y.replaceRange(F,Ze,tt),Re=y.posFromIndex(y.indexFromPos(Ze)+F.length-1)),Ke&&(A.lastSelection.headMark=y.setBookmark(Ke)),ve&&(Re.ch=0)}else if(be){y.setCursor(H);for(var Oe=0;Oe<F.length;Oe++){var bt=H.line+Oe;bt>y.lastLine()&&y.replaceRange(`
1451
+ `,new De(bt,0));var _t=Vt(y,bt);_t<H.ch&&Rn(y,bt,H.ch)}y.setCursor(H),tr(y,new De(H.line+F.length-1,H.ch)),y.replaceSelections(F),Re=H}else if(y.replaceRange(F,H),ve){var bt=T.after?H.line+1:H.line;Re=new De(bt,Ot(y.getLine(bt)))}else Re=Ue(H),/\n/.test(F)||(Re.ch+=F.length-(T.after?1:0));A.visualMode&&wn(y,!1),y.setCursor(Re)}},undo:function(y,T){y.operation(function(){Xe(y,We.commands.undo,T.repeat)(),y.setCursor(se(y,y.getCursor("start")))})},redo:function(y,T){Xe(y,We.commands.redo,T.repeat)()},setRegister:function(y,T,A){A.inputState.registerName=T.selectedCharacter},insertRegister:function(y,T,A){var F=T.selectedCharacter,W=He.registerController.getRegister(F),H=W&&W.toString();H&&y.replaceSelection(H)},oneNormalCommand:function(y,T,A){ci(y,!0),A.insertModeReturn=!0,We.on(y,"vim-command-done",function F(){A.visualMode||(A.insertModeReturn&&(A.insertModeReturn=!1,A.insertMode||jn.enterInsertMode(y,{},A)),We.off(y,"vim-command-done",F))})},setMark:function(y,T,A){var F=T.selectedCharacter;Zt(y,A,F,y.getCursor())},replace:function(y,T,A){var F=T.selectedCharacter,W=y.getCursor(),H,K,Y=y.listSelections();if(A.visualMode)W=y.getCursor("start"),K=y.getCursor("end");else{var Q=y.getLine(W.line);H=W.ch+T.repeat,H>Q.length&&(H=Q.length),K=new De(W.line,H)}var re=b(y,W,K);if(W=re.start,K=re.end,F==`
1452
+ `)A.visualMode||y.replaceRange("",W,K),(We.commands.newlineAndIndentContinueComment||We.commands.newlineAndIndent)(y);else{var ae=y.getRange(W,K);if(ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/[^\n]/g,F),A.visualBlock){var we=new Array(y.getOption("tabSize")+1).join(" ");ae=y.getSelection(),ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/\t/g,we).replace(/[^\n]/g,F).split(`
1453
+ `),y.replaceSelections(ae)}else y.replaceRange(ae,W,K);A.visualMode?(W=et(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),wn(y,!1)):y.setCursor(me(K,0,-1))}},incrementNumberToken:function(y,T){for(var A=y.getCursor(),F=y.getLine(A.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,K,Y,Q;(H=W.exec(F))!==null&&(K=H.index,Y=K+H[0].length,!(A.ch<Y)););if(!(!T.backtrack&&Y<=A.ch)&&H){var re=H[2]||H[4],ae=H[3]||H[5],we=T.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(H[1]+ae,ke)+we*T.repeat;Q=ve.toString(ke);var be=re?new Array(ae.length-Q.length+1+H[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new De(A.line,K),Re=new De(A.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new De(A.line,K+Q.length-1))}},repeatLastEdit:function(y,T,A){var F=A.lastEditInputState;if(F){var W=T.repeat;W&&T.repeatIsExplicit?A.lastEditInputState.repeatOverride=W:W=A.lastEditInputState.repeatOverride||W,wa(y,A,W,!1)}},indent:function(y,T){y.indentLine(y.getCursor().line,T.indentRight)},exitInsertMode:ci},ki={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Si={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var T=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,T}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var T=y.lineText.match(/^#(\w+)/)[1];if(T==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(T==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(T==="else"&&y.depth===0)return!0}return!1}}};I("pcre",!0,"boolean"),bi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Bi={"\\n":`
1454
+ `,"\\r":"\r","\\t":" "},xr={"\\/":"/","\\\\":"\\","\\n":`
1455
+ `,"\\r":"\r","\\t":" ","\\&":"&"},Cr=0,_r=function(){this.buildCommandMap_()};_r.prototype={processCommand:function(y,T,A){var F=this;y.operation(function(){y.curOp.isVimOp=!0,F._processCommand(y,T,A)})},_processCommand:function(y,T,A){var F=y.state.vim,W=He.registerController.getRegister(":"),H=W.toString(),K=new We.StringStream(T);W.setText(T);var Y=A||{};Y.input=T;try{this.parseInput_(y,K,Y)}catch(ae){throw Nt(y,ae.toString()),ae}F.visualMode&&wn(y);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&W.setText(H),this.parseCommandArgs_(K,Y,Q),Q.type=="exToKey"){E(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Nt(y,'Not an editor command ":'+T+'"');return}try{Bs[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(ae){throw Nt(y,ae.toString()),ae}},parseInput_:function(y,T,A){if(T.eatWhile(":"),T.eat("%")?(A.line=y.firstLine(),A.lineEnd=y.lastLine()):(A.line=this.parseLineSpec_(y,T),A.line!==void 0&&T.eat(",")&&(A.lineEnd=this.parseLineSpec_(y,T))),A.line==null)if(y.state.vim.visualMode){var F=nn(y,y.state.vim,"<");A.selectionLine=F&&F.line,F=nn(y,y.state.vim,">"),A.selectionLineEnd=F&&F.line}else A.selectionLine=y.getCursor().line;else A.selectionLine=A.line,A.selectionLineEnd=A.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?A.commandName=W[1]:A.commandName=T.match(/.*/)[0],A},parseLineSpec_:function(y,T){var A=T.match(/^(\d+)/);if(A)return parseInt(A[1],10)-1;switch(T.next()){case".":return this.parseLineSpecOffset_(T,y.getCursor().line);case"$":return this.parseLineSpecOffset_(T,y.lastLine());case"'":var F=T.next(),W=nn(y,y.state.vim,F);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_(T,W.line);case"-":case"+":return T.backUp(1),this.parseLineSpecOffset_(T,y.getCursor().line);default:return T.backUp(1),void 0}},parseLineSpecOffset_:function(y,T){var A=y.match(/^([+-])?(\d+)/);if(A){var F=parseInt(A[2],10);A[1]=="-"?T-=F:T+=F}return T},parseCommandArgs_:function(y,T,A){if(!y.eol()){T.argString=y.match(/.*/)[0];var F=A.argDelimiter||/\s+/,W=yr(T.argString).split(F);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(y){for(var T=y.length;T>0;T--){var A=y.substring(0,T);if(this.commandMap_[A]){var F=this.commandMap_[A];if(F.name.indexOf(y)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Ci.length;y++){var T=Ci[y],A=T.shortName||T.name;this.commandMap_[A]=T}},map:function(y,T,A,F){if(y!=":"&&y.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var W=y.substring(1);T!=":"&&T.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:T.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:T,user:!0}}else{var H={keys:y,type:"keyToKey",toKeys:T,noremap:!!F};A&&(H.context=A),Fn.unshift(H)}},unmap:function(y,T){if(y!=":"&&y.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var A=y.substring(1);if(this.commandMap_[A]&&this.commandMap_[A].user)return delete this.commandMap_[A],!0}else for(var F=y,W=0;W<Fn.length;W++)if(F==Fn[W].keys&&Fn[W].context===T)return Fn.splice(W,1),!0}};var Bs={colorscheme:function(y,T){if(!T.args||T.args.length<1){Nt(y,y.getOption("theme"));return}y.setOption("theme",T.args[0])},map:function(y,T,A,F){var W=T.args;if(!W||W.length<2){y&&Nt(y,"Invalid mapping: "+T.input);return}$r.map(W[0],W[1],A,F)},imap:function(y,T){this.map(y,T,"insert")},nmap:function(y,T){this.map(y,T,"normal")},vmap:function(y,T){this.map(y,T,"visual")},omap:function(y,T){this.map(y,T,"operatorPending")},noremap:function(y,T){this.map(y,T,void 0,!0)},inoremap:function(y,T){this.map(y,T,"insert",!0)},nnoremap:function(y,T){this.map(y,T,"normal",!0)},vnoremap:function(y,T){this.map(y,T,"visual",!0)},onoremap:function(y,T){this.map(y,T,"operatorPending",!0)},unmap:function(y,T,A){var F=T.args;(!F||F.length<1||!$r.unmap(F[0],A))&&y&&Nt(y,"No such mapping: "+T.input)},mapclear:function(y,T){yt.mapclear()},imapclear:function(y,T){yt.mapclear("insert")},nmapclear:function(y,T){yt.mapclear("normal")},vmapclear:function(y,T){yt.mapclear("visual")},omapclear:function(y,T){yt.mapclear("operatorPending")},move:function(y,T){Hn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:T.line+1})},set:function(y,T){var A=T.args,F=T.setCfg||{};if(!A||A.length<1){y&&Nt(y,"Invalid mapping: "+T.input);return}var W=A[0].split("="),H=W[0],K=W[1],Y=!1,Q=!1;if(H.charAt(H.length-1)=="?"){if(K)throw Error("Trailing characters: "+T.argString);H=H.substring(0,H.length-1),Y=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),Q=!0);K===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),K=!1);var re=jt[H]&&jt[H].type=="boolean";if(re&&(Q?K=!S(H,y,F):K==null&&(K=!0)),!re&&K===void 0||Y){var ae=S(H,y,F);ae instanceof Error?Nt(y,ae.message):ae===!0||ae===!1?Nt(y," "+(ae?"":"no")+H):Nt(y," "+H+"="+ae)}else{var we=$(H,K,y,F);we instanceof Error&&Nt(y,we.message)}},setlocal:function(y,T){T.setCfg={scope:"local"},this.set(y,T)},setglobal:function(y,T){T.setCfg={scope:"global"},this.set(y,T)},registers:function(y,T){var A=T.args,F=He.registerController.registers,W=`----------Registers----------
1456
+
1457
+ `;if(A){var H;A=A.join("");for(var K=0;K<A.length;K++)if(H=A.charAt(K),!!He.registerController.isValidRegister(H)){var Y=F[H]||new z;W+='"'+H+" "+Y.toString()+`
1458
+ `}}else for(var H in F){var Q=F[H].toString();Q.length&&(W+='"'+H+" "+Q+`
1459
+ `)}Nt(y,W)},sort:function(y,T){function A(){if(T.argString){var bt=new We.StringStream(T.argString);if(bt.eat("!")&&(H=!0),bt.eol())return;if(!bt.eatSpace())return"Invalid arguments";var _t=bt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!_t&&!bt.eol())return"Invalid arguments";if(_t[1]){K=_t[1].indexOf("i")!=-1,Y=_t[1].indexOf("u")!=-1;var or=_t[1].indexOf("d")!=-1||_t[1].indexOf("n")!=-1&&1,kr=_t[1].indexOf("x")!=-1&&1,Mn=_t[1].indexOf("o")!=-1&&1;if(or+kr+Mn>1)return"Invalid arguments";Q=or&&"decimal"||kr&&"hex"||Mn&&"octal"}_t[2]&&(re=new RegExp(_t[2].substr(1,_t[2].length-2),K?"i":""))}}function F(bt,_t){if(H){var or;or=bt,bt=_t,_t=or}K&&(bt=bt.toLowerCase(),_t=_t.toLowerCase());var kr=Q&&Re.exec(bt),Mn=Q&&Re.exec(_t);return kr?(kr=parseInt((kr[1]+kr[2]).toLowerCase(),Ke),Mn=parseInt((Mn[1]+Mn[2]).toLowerCase(),Ke),kr-Mn):bt<_t?-1:1}function W(bt,_t){if(H){var or;or=bt,bt=_t,_t=or}return K&&(bt[0]=bt[0].toLowerCase(),_t[0]=_t[0].toLowerCase()),bt[0]<_t[0]?-1:1}var H,K,Y,Q,re,ae=A();if(ae){Nt(y,ae+": "+T.argString);return}var we=T.line||y.firstLine(),ke=T.lineEnd||T.line||y.lastLine();if(we!=ke){var ve=new De(we,0),be=new De(ke,Vt(y,ke)),Oe=y.getRange(ve,be).split(`
1460
+ `),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ke=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Ze=[];if(Q||re)for(var tt=0;tt<Oe.length;tt++){var Cn=re?Oe[tt].match(re):null;Cn&&Cn[0]!=""?st.push(Cn):!re&&Re.exec(Oe[tt])?st.push(Oe[tt]):Ze.push(Oe[tt])}else Ze=Oe;if(st.sort(re?W:F),re)for(var tt=0;tt<st.length;tt++)st[tt]=st[tt].input;else Q||Ze.sort(F);if(Oe=H?st.concat(Ze):Ze.concat(st),Y){var at=Oe,Tn;Oe=[];for(var tt=0;tt<at.length;tt++)at[tt]!=Tn&&Oe.push(at[tt]),Tn=at[tt]}y.replaceRange(Oe.join(`
1461
+ `),ve,be)}},vglobal:function(y,T){this.global(y,T)},normal:function(y,T){var A=T.argString;if(A&&A[0]=="!"&&(A=A.slice(1),pn=!0),A=A.trimStart(),!A){Nt(y,"Argument is required.");return}var F=T.line;if(typeof F=="number")for(var W=isNaN(T.lineEnd)?F:T.lineEnd,H=F;H<=W;H++)y.setCursor(H,0),E(y,T.argString.trimStart()),y.state.vim.insertMode&&ci(y,!0);else E(y,T.argString.trimStart()),y.state.vim.insertMode&&ci(y,!0)},global:function(y,T){var A=T.argString;if(!A){Nt(y,"Regular Expression missing from global");return}var F=T.commandName[0]==="v";A[0]==="!"&&T.commandName[0]==="g"&&(F=!0,A=A.slice(1));var W=T.line!==void 0?T.line:y.firstLine(),H=T.lineEnd||T.line||y.lastLine(),K=Dn(A),Y=A,Q;if(K.length&&(Y=K[0],Q=K.slice(1,K.length).join("/")),Y)try{Ne(y,Y,!0,!0)}catch{Nt(y,"Invalid regex: "+Y);return}for(var re=tn(y).getQuery(),ae=[],we=W;we<=H;we++){var ke=y.getLine(we),ve=re.test(ke);ve!==F&&ae.push(Q?y.getLineHandle(we):ke)}if(!Q){Nt(y,ae.join(`
1462
+ `));return}var be=0,Oe=function(){if(be<ae.length){var Re=ae[be++],Ke=y.getLineNumber(Re);if(Ke==null){Oe();return}var st=Ke+1+Q;$r.processCommand(y,st,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,T){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var A=T.argString,F=A?si(A,A[0]):[],W,H="",K,Y,Q,re=!1,ae=!1;if(F.length)W=F[0],S("pcre")&&W!==""&&(W=new RegExp(W).source),H=F[1],H!==void 0&&(S("pcre")?H=Qo(H.replace(/([^\\])&/g,"$1$$&")):H=Kr(H),He.lastSubstituteReplacePart=H),K=F[2]?F[2].split(" "):[];else if(A&&A.length){Nt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],Q=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(ae=!0),S("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{Ne(y,W,!0,!0)}catch{Nt(y,"Invalid regex: "+W);return}if(H=H||He.lastSubstituteReplacePart,H===void 0){Nt(y,"No previous substitute regular expression");return}var we=tn(y),ke=we.getQuery(),ve=T.line!==void 0?T.line:y.getCursor().line,be=T.lineEnd||ve;ve==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(ve=be,be=ve+Q-1);var Oe=se(y,new De(ve,0)),Re=y.getSearchCursor(ke,Oe);fo(y,re,ae,ve,be,Re,ke,H,T.callback)},startinsert:function(y,T){E(y,T.argString=="!"?"A":"i",{})},redo:We.commands.redo,undo:We.commands.undo,write:function(y){We.commands.save?We.commands.save(y):y.save&&y.save()},nohlsearch:function(y){rr(y)},yank:function(y){var T=Ue(y.getCursor()),A=T.line,F=y.getLine(A);He.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,T){var A=T.selectionLine,F=isNaN(T.selectionLineEnd)?A:T.selectionLineEnd;ls.delete(y,{linewise:!0},[{anchor:new De(A,0),head:new De(F+1,0)}])},join:function(y,T){var A=T.selectionLine,F=isNaN(T.selectionLineEnd)?A:T.selectionLineEnd;y.setCursor(new De(A,0)),jn.joinLines(y,{repeat:F-A},y.state.vim)},delmarks:function(y,T){if(!T.argString||!yr(T.argString)){Nt(y,"Argument required");return}for(var A=y.state.vim,F=new We.StringStream(yr(T.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+T.argString.substring(W));return}var H=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+T.argString.substring(W));return}var K=H,Y=F.next();if(!(u(K)&&u(Y)||l(K)&&l(Y))){Nt(y,"Invalid argument: "+K+"-");return}var Q=K.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Nt(y,"Invalid argument: "+T.argString.substring(W));return}for(var ae=0;ae<=re-Q;ae++){var we=String.fromCharCode(Q+ae);delete A.marks[we]}}else delete A.marks[H]}}},$r=new _r;I("insertModeEscKeysTimeout",200,"number"),We.Vim=yt;var Nr={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"},Ai=yt.handleKey.bind(yt);yt.handleKey=function(y,T,A){return y.operation(function(){return Ai(y,T,A)},!0)},N(),r.CodeMirror=We;var _i=yt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,T,A,F,W){var H=this.state.vim||{},K=A.characterWidth,Y=A.lineHeight,Q=T.top,re=T.left;if(!H.insertMode){var ae=F.cursor?fr.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!ae&&re>K&&(re-=K)}!H.insertMode&&H.status&&(Y/=2,Q+=Y),to.translate(y,re,Q),to.setStyle(y.style,"width",K+"px"),to.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var T=y.state.cm,A=_i(T);if(!A.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,T,A,F,W){var H=y.editor,K=H.state.cm,Y=_i(K);if(F!=-1){if(Y.insertMode||(T==-1?(A.charCodeAt(0)>255&&y.inputKey&&(A=y.inputKey,A&&y.inputHash==4&&(A=A.toUpperCase())),y.inputChar=A):T==4||T==0?y.inputKey==A&&y.inputHash==T&&y.inputChar?(A=y.inputChar,T=-1):(y.inputChar=null,y.inputKey=A,y.inputHash=T):y.inputChar=y.inputKey=null),K.state.overwrite&&Y.insertMode&&A=="backspace"&&T==0)return{command:"gotoleft"};if(A=="c"&&T==1&&!Lo.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():K.operation(function(){wn(K)})}),{command:"null",passEvent:!0};if(A=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var Q=tn(K),re=Q.getOverlay();re&&K.removeOverlay(re)}if(T==-1||T&1||T===0&&A.length>1){var ae=Y.insertMode,we=Ws(T,A,W||{},Y);Y.status==null&&(Y.status="");var ke=Eo(K,we,"user");return Y=_i(K),ke&&Y.status!=null?Y.status+=we:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!ke&&(T!=-1||ae)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function T(){var F=_i(A).insertMode;A.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var A=new We(y);y.state.cm=A,y.$vimModeHandler=this,h(A),_i(A).status=null,A.on("vim-command-done",function(){A.virtualSelectionMode()||(_i(A).status=null,A.ace._signal("changeStatus"),A.ace.session.markUndoGroup())}),A.on("changeStatus",function(){A.ace.renderer.updateCursor(),A.ace._signal("changeStatus")}),A.on("vim-mode-change",function(){A.virtualSelectionMode()||(T(),A._signal("changeStatus"))}),T(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(A)},detach:function(y){var T=y.state.cm;f(T),T.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var T=y.state.cm,A=_i(T);if(A.insertMode)return"INSERT";var F="";return A.visualMode&&(F+="VISUAL",A.visualLine&&(F+=" LINE"),A.visualBlock&&(F+=" BLOCK")),A.status&&(F+=(F?" ":"")+A.status),F}},yt.defineOption({name:"wrap",set:function(y,T){T&&T.ace.setOption("wrap",y)},type:"boolean"},!1),yt.defineEx("write","w",function(){console.log(":write is not implemented")}),Fn.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"}}),Fn.push({keys:"gq",type:"operator",operator:"hardWrap"}),yt.defineOperator("hardWrap",function(y,T,A,F,W){var H=A[0].anchor.line,K=A[0].head.line;return T.linewise&&K--,vo(y.ace,{startRow:H,endRow:K}),De(K,0)}),I("textwidth",void 0,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var A=T.ace.getOption("printMarginColumn");return A}var F=Math.round(y);F>1&&T.ace.setOption("printMarginColumn",F)}}),jn.aceCommand=function(y,T,A){y.vimCmd=T,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Di):Di(null,y.ace)},jn.fold=function(y,T,A){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},Oo=Fn.length,r.handler.defaultKeymap=Fn,r.handler.actions=jn,r.Vim=yt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(kg)),kg.exports}bk();var Ag={},_g;function xk(){return _g||(_g=1,function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(b){return p(v(b),arguments)}function r(b,h){return e.apply(null,[b].concat(h||[]))}function p(b,h){var f=1,s=b.length,a,u="",c,i,l,d,w,x,I,$;for(c=0;c<s;c++)if(typeof b[c]=="string")u+=b[c];else if(typeof b[c]=="object"){if(l=b[c],l.keys)for(a=h[f],i=0;i<l.keys.length;i++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[i],l.keys[i-1]));a=a[l.keys[i]]}else l.param_no?a=h[l.param_no]:a=h[f++];if(t.not_type.test(l.type)&&t.not_primitive.test(l.type)&&a instanceof Function&&(a=a()),t.numeric_arg.test(l.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(t.number.test(l.type)&&(I=a>=0),l.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,l.width?parseInt(l.width):0);break;case"e":a=l.precision?parseFloat(a).toExponential(l.precision):parseFloat(a).toExponential();break;case"f":a=l.precision?parseFloat(a).toFixed(l.precision):parseFloat(a);break;case"g":a=l.precision?String(Number(a.toPrecision(l.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=l.precision?a.substring(0,l.precision):a;break;case"t":a=String(!!a),a=l.precision?a.substring(0,l.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=l.precision?a.substring(0,l.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=l.precision?a.substring(0,l.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}t.json.test(l.type)?u+=a:(t.number.test(l.type)&&(!I||l.sign)?($=I?"+":"-",a=a.toString().replace(t.sign,"")):$="",w=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",x=l.width-($+a).length,d=l.width&&x>0?w.repeat(x):"",u+=l.align?$+a+d:w==="0"?$+d+a:d+$+a)}return u}var g=Object.create(null);function v(b){if(g[b])return g[b];for(var h=b,f,s=[],a=0;h;){if((f=t.text.exec(h))!==null)s.push(f[0]);else if((f=t.modulo.exec(h))!==null)s.push("%");else if((f=t.placeholder.exec(h))!==null){if(f[2]){a|=1;var u=[],c=f[2],i=[];if((i=t.key.exec(c))!==null)for(u.push(i[1]);(c=c.substring(i[0].length))!=="";)if((i=t.key_access.exec(c))!==null)u.push(i[1]);else if((i=t.index_access.exec(c))!==null)u.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.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");h=h.substring(f[0].length)}return g[b]=s}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()}(Ag)),Ag}xk();var Gl={exports:{}};/**
1463
+ * @license
1464
+ * Lodash <https://lodash.com/>
1465
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1466
+ * Released under MIT license <https://lodash.com/license>
1467
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1468
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1469
+ */var Ck=Gl.exports,$g;function kk(){return $g||($g=1,function(n,t){(function(){var e,r="4.17.21",p=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,s="__lodash_placeholder__",a=1,u=2,c=4,i=1,l=2,d=1,w=2,x=4,I=8,$=16,S=32,C=64,R=128,N=256,L=512,E=30,B="...",P=800,O=16,_=1,k=2,D=3,z=1/0,U=9007199254740991,q=17976931348623157e292,X=NaN,ee=4294967295,de=ee-1,te=ee>>>1,le=[["ary",R],["bind",d],["bindKey",w],["curry",I],["curryRight",$],["flip",L],["partial",S],["partialRight",C],["rearg",N]],se="[object Arguments]",ue="[object Array]",me="[object AsyncFunction]",_e="[object Boolean]",Te="[object Date]",Me="[object DOMException]",Xe="[object Error]",Ue="[object Function]",ct="[object GeneratorFunction]",et="[object Map]",ht="[object Number]",qt="[object Null]",hn="[object Object]",Vt="[object Promise]",yr="[object Proxy]",yn="[object RegExp]",Rn="[object Set]",tr="[object String]",ur="[object Symbol]",pt="[object Undefined]",je="[object WeakMap]",Rt="[object WeakSet]",dn="[object ArrayBuffer]",On="[object DataView]",wr="[object Float32Array]",nr="[object Float64Array]",wn="[object Int8Array]",_n="[object Int16Array]",Nn="[object Int32Array]",Ot="[object Uint8Array]",bn="[object Uint8ClampedArray]",yi="[object Uint16Array]",jr="[object Uint32Array]",wi=/\b__p \+= '';/g,Rr=/\b(__p \+=) '' \+/g,oi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hr=/&(?:amp|lt|gt|quot|#39);/g,Ur=/[&<>"']/g,po=RegExp(hr.source),Os=RegExp(Ur.source),Zt=/<%-([\s\S]+?)%>/g,Oi=/<%([\s\S]+?)%>/g,_o=/<%=([\s\S]+?)%>/g,$o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vr=/^\w*$/,$n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dr=/[\\^$.*+?()[\]{}|]/g,bi=RegExp(dr.source),tn=/^\s+/,Dn=/\s/,xi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,si=/\{\n\/\* \[wrapped with (.+)\] \*/,eo=/,? & /,To=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kr=/[()=,{}\[\]\/\s]/,Qo=/\\(\\)?/g,ai=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Or=/\w*$/,Nt=/^[-+]0x[0-9a-f]+$/i,Jo=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,ze=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,dt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,an=/($^)/,Dt=/['\n\r\u2028\u2029\\]/g,Bn="\\ud800-\\udfff",rr="\\u0300-\\u036f",br="\\ufe20-\\ufe2f",li="\\u20d0-\\u20ff",nn=rr+br+li,Ni="\\u2700-\\u27bf",fo="a-z\\xdf-\\xf6\\xf8-\\xff",ci="\\xac\\xb1\\xd7\\xf7",es="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ns="\\u2000-\\u206f",Ds=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ts="A-Z\\xc0-\\xd6\\xd8-\\xde",pr="\\ufe0e\\ufe0f",Fs=ci+es+Ns+Ds,Mo="['’]",ns="["+Bn+"]",rs="["+Fs+"]",go="["+nn+"]",Ps="\\d+",wa="["+Ni+"]",is="["+fo+"]",os="[^"+Bn+Fs+Ps+Ni+fo+ts+"]",Ws="\\ud83c[\\udffb-\\udfff]",ss="(?:"+go+"|"+Ws+")",Eo="[^"+Bn+"]",Di="(?:\\ud83c[\\udde6-\\uddff]){2}",fr="[\\ud800-\\udbff][\\udc00-\\udfff]",mo="["+ts+"]",to="\\u200d",ba="(?:"+is+"|"+os+")",ul="(?:"+mo+"|"+os+")",Io="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Lo=ss+"?",as="["+pr+"]?",Ro="(?:"+to+"(?:"+[Eo,Di,fr].join("|")+")"+as+Lo+")*",xa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",We=as+Lo+Ro,Ca="(?:"+[wa,Di,fr].join("|")+")"+We,De="(?:"+[Eo+go+"?",go,Di,fr,ns].join("|")+")",Fn=RegExp(Mo,"g"),Oo=RegExp(go,"g"),Ci=RegExp(Ws+"(?="+Ws+")|"+De+We,"g"),Yn=RegExp([mo+"?"+is+"+"+Io+"(?="+[rs,mo,"$"].join("|")+")",ul+"+"+no+"(?="+[rs,mo+ba,"$"].join("|")+")",mo+"?"+ba+"+"+Io,mo+"+"+no,vo,xa,Ps,Ca].join("|"),"g"),ka=RegExp("["+to+Bn+nn+pr+"]"),No=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fi=["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"],yo=-1,rn={};rn[wr]=rn[nr]=rn[wn]=rn[_n]=rn[Nn]=rn[Ot]=rn[bn]=rn[yi]=rn[jr]=!0,rn[se]=rn[ue]=rn[dn]=rn[_e]=rn[On]=rn[Te]=rn[Xe]=rn[Ue]=rn[et]=rn[ht]=rn[hn]=rn[yn]=rn[Rn]=rn[tr]=rn[je]=!1;var Qt={};Qt[se]=Qt[ue]=Qt[dn]=Qt[On]=Qt[_e]=Qt[Te]=Qt[wr]=Qt[nr]=Qt[wn]=Qt[_n]=Qt[Nn]=Qt[et]=Qt[ht]=Qt[hn]=Qt[yn]=Qt[Rn]=Qt[tr]=Qt[ur]=Qt[Ot]=Qt[bn]=Qt[yi]=Qt[jr]=!0,Qt[Xe]=Qt[Ue]=Qt[je]=!1;var on={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},zn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,xn=parseInt,yt=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo,Gr=typeof self=="object"&&self&&self.Object===Object&&self,pn=yt||Gr||Function("return this")(),Sn=t&&!t.nodeType&&t,ir=Sn&&!0&&n&&!n.nodeType&&n,qr=ir&&ir.exports===Sn,Wi=qr&&yt.process,Hn=function(){try{var fe=ir&&ir.require&&ir.require("util").types;return fe||Wi&&Wi.binding&&Wi.binding("util")}catch{}}(),ui=Hn&&Hn.isArrayBuffer,ls=Hn&&Hn.isDate,jn=Hn&&Hn.isMap,ki=Hn&&Hn.isRegExp,Si=Hn&&Hn.isSet,Bi=Hn&&Hn.isTypedArray;function xr(fe,$e,Ce){switch(Ce.length){case 0:return fe.call($e);case 1:return fe.call($e,Ce[0]);case 2:return fe.call($e,Ce[0],Ce[1]);case 3:return fe.call($e,Ce[0],Ce[1],Ce[2])}return fe.apply($e,Ce)}function Cr(fe,$e,Ce,Ve){for(var lt=-1,$t=fe==null?0:fe.length;++lt<$t;){var Yt=fe[lt];$e(Ve,Yt,Ce(Yt),fe)}return Ve}function _r(fe,$e){for(var Ce=-1,Ve=fe==null?0:fe.length;++Ce<Ve&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function Bs(fe,$e){for(var Ce=fe==null?0:fe.length;Ce--&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function $r(fe,$e){for(var Ce=-1,Ve=fe==null?0:fe.length;++Ce<Ve;)if(!$e(fe[Ce],Ce,fe))return!1;return!0}function Nr(fe,$e){for(var Ce=-1,Ve=fe==null?0:fe.length,lt=0,$t=[];++Ce<Ve;){var Yt=fe[Ce];$e(Yt,Ce,fe)&&($t[lt++]=Yt)}return $t}function Ai(fe,$e){var Ce=fe==null?0:fe.length;return!!Ce&&ae(fe,$e,0)>-1}function _i(fe,$e,Ce){for(var Ve=-1,lt=fe==null?0:fe.length;++Ve<lt;)if(Ce($e,fe[Ve]))return!0;return!1}function y(fe,$e){for(var Ce=-1,Ve=fe==null?0:fe.length,lt=Array(Ve);++Ce<Ve;)lt[Ce]=$e(fe[Ce],Ce,fe);return lt}function T(fe,$e){for(var Ce=-1,Ve=$e.length,lt=fe.length;++Ce<Ve;)fe[lt+Ce]=$e[Ce];return fe}function A(fe,$e,Ce,Ve){var lt=-1,$t=fe==null?0:fe.length;for(Ve&&$t&&(Ce=fe[++lt]);++lt<$t;)Ce=$e(Ce,fe[lt],lt,fe);return Ce}function F(fe,$e,Ce,Ve){var lt=fe==null?0:fe.length;for(Ve&&lt&&(Ce=fe[--lt]);lt--;)Ce=$e(Ce,fe[lt],lt,fe);return Ce}function W(fe,$e){for(var Ce=-1,Ve=fe==null?0:fe.length;++Ce<Ve;)if($e(fe[Ce],Ce,fe))return!0;return!1}var H=be("length");function K(fe){return fe.split("")}function Y(fe){return fe.match(To)||[]}function Q(fe,$e,Ce){var Ve;return Ce(fe,function(lt,$t,Yt){if($e(lt,$t,Yt))return Ve=$t,!1}),Ve}function re(fe,$e,Ce,Ve){for(var lt=fe.length,$t=Ce+(Ve?1:-1);Ve?$t--:++$t<lt;)if($e(fe[$t],$t,fe))return $t;return-1}function ae(fe,$e,Ce){return $e===$e?Qe(fe,$e,Ce):re(fe,ke,Ce)}function we(fe,$e,Ce,Ve){for(var lt=Ce-1,$t=fe.length;++lt<$t;)if(Ve(fe[lt],$e))return lt;return-1}function ke(fe){return fe!==fe}function ve(fe,$e){var Ce=fe==null?0:fe.length;return Ce?st(fe,$e)/Ce:X}function be(fe){return function($e){return $e==null?e:$e[fe]}}function Oe(fe){return function($e){return fe==null?e:fe[$e]}}function Re(fe,$e,Ce,Ve,lt){return lt(fe,function($t,Yt,Et){Ce=Ve?(Ve=!1,$t):$e(Ce,$t,Yt,Et)}),Ce}function Ke(fe,$e){var Ce=fe.length;for(fe.sort($e);Ce--;)fe[Ce]=fe[Ce].value;return fe}function st(fe,$e){for(var Ce,Ve=-1,lt=fe.length;++Ve<lt;){var $t=$e(fe[Ve]);$t!==e&&(Ce=Ce===e?$t:Ce+$t)}return Ce}function Ze(fe,$e){for(var Ce=-1,Ve=Array(fe);++Ce<fe;)Ve[Ce]=$e(Ce);return Ve}function tt(fe,$e){return y($e,function(Ce){return[Ce,fe[Ce]]})}function Cn(fe){return fe&&fe.slice(0,Ft(fe)+1).replace(tn,"")}function at(fe){return function($e){return fe($e)}}function Tn(fe,$e){return y($e,function(Ce){return fe[Ce]})}function bt(fe,$e){return fe.has($e)}function _t(fe,$e){for(var Ce=-1,Ve=fe.length;++Ce<Ve&&ae($e,fe[Ce],0)>-1;);return Ce}function or(fe,$e){for(var Ce=fe.length;Ce--&&ae($e,fe[Ce],0)>-1;);return Ce}function kr(fe,$e){for(var Ce=fe.length,Ve=0;Ce--;)fe[Ce]===$e&&++Ve;return Ve}var Mn=Oe(on),V=Oe(jt);function Z(fe){return"\\"+zn[fe]}function ie(fe,$e){return fe==null?e:fe[$e]}function oe(fe){return ka.test(fe)}function ge(fe){return No.test(fe)}function xe(fe){for(var $e,Ce=[];!($e=fe.next()).done;)Ce.push($e.value);return Ce}function Ee(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ve,lt){Ce[++$e]=[lt,Ve]}),Ce}function Pe(fe,$e){return function(Ce){return fe($e(Ce))}}function Be(fe,$e){for(var Ce=-1,Ve=fe.length,lt=0,$t=[];++Ce<Ve;){var Yt=fe[Ce];(Yt===$e||Yt===s)&&(fe[Ce]=s,$t[lt++]=Ce)}return $t}function Ge(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ve){Ce[++$e]=Ve}),Ce}function Ye(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ve){Ce[++$e]=[Ve,Ve]}),Ce}function Qe(fe,$e,Ce){for(var Ve=Ce-1,lt=fe.length;++Ve<lt;)if(fe[Ve]===$e)return Ve;return-1}function wt(fe,$e,Ce){for(var Ve=Ce+1;Ve--;)if(fe[Ve]===$e)return Ve;return Ve}function Wt(fe){return oe(fe)?rt(fe):H(fe)}function xt(fe){return oe(fe)?vn(fe):K(fe)}function Ft(fe){for(var $e=fe.length;$e--&&Dn.test(fe.charAt($e)););return $e}var ft=Oe(Pi);function rt(fe){for(var $e=Ci.lastIndex=0;Ci.test(fe);)++$e;return $e}function vn(fe){return fe.match(Ci)||[]}function En(fe){return fe.match(Yn)||[]}var sr=function fe($e){$e=$e==null?pn:Kt.defaults(pn.Object(),$e,Kt.pick(pn,Fi));var Ce=$e.Array,Ve=$e.Date,lt=$e.Error,$t=$e.Function,Yt=$e.Math,Et=$e.Object,Yr=$e.RegExp,zi=$e.String,fn=$e.TypeError,Sr=Ce.prototype,Do=$t.prototype,Un=Et.prototype,zs=$e["__core-js_shared__"],Ec=Do.toString,un=Un.hasOwnProperty,BE=0,vw=function(){var o=/[^.]+$/.exec(zs&&zs.keys&&zs.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ic=Un.toString,zE=Ec.call(Et),HE=pn._,jE=Yr("^"+Ec.call(un).replace(dr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lc=qr?$e.Buffer:e,cs=$e.Symbol,Rc=$e.Uint8Array,yw=Lc?Lc.allocUnsafe:e,Oc=Pe(Et.getPrototypeOf,Et),ww=Et.create,bw=Un.propertyIsEnumerable,Nc=Sr.splice,xw=cs?cs.isConcatSpreadable:e,hl=cs?cs.iterator:e,Hs=cs?cs.toStringTag:e,Dc=function(){try{var o=Gs(Et,"defineProperty");return o({},"",{}),o}catch{}}(),UE=$e.clearTimeout!==pn.clearTimeout&&$e.clearTimeout,VE=Ve&&Ve.now!==pn.Date.now&&Ve.now,KE=$e.setTimeout!==pn.setTimeout&&$e.setTimeout,Fc=Yt.ceil,Pc=Yt.floor,Md=Et.getOwnPropertySymbols,GE=Lc?Lc.isBuffer:e,Cw=$e.isFinite,qE=Sr.join,YE=Pe(Et.keys,Et),gr=Yt.max,Dr=Yt.min,XE=Ve.now,ZE=$e.parseInt,kw=Yt.random,QE=Sr.reverse,Ed=Gs($e,"DataView"),dl=Gs($e,"Map"),Id=Gs($e,"Promise"),Sa=Gs($e,"Set"),pl=Gs($e,"WeakMap"),fl=Gs(Et,"create"),Wc=pl&&new pl,Aa={},JE=qs(Ed),eI=qs(dl),tI=qs(Id),nI=qs(Sa),rI=qs(pl),Bc=cs?cs.prototype:e,gl=Bc?Bc.valueOf:e,Sw=Bc?Bc.toString:e;function J(o){if(Vn(o)&&!kt(o)&&!(o instanceof Ut)){if(o instanceof Hi)return o;if(un.call(o,"__wrapped__"))return Ab(o)}return new Hi(o)}var _a=function(){function o(){}return function(m){if(!Pn(m))return{};if(ww)return ww(m);o.prototype=m;var M=new o;return o.prototype=e,M}}();function zc(){}function Hi(o,m){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!m,this.__index__=0,this.__values__=e}J.templateSettings={escape:Zt,evaluate:Oi,interpolate:_o,variable:"",imports:{_:J}},J.prototype=zc.prototype,J.prototype.constructor=J,Hi.prototype=_a(zc.prototype),Hi.prototype.constructor=Hi;function Ut(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function iI(){var o=new Ut(this.__wrapped__);return o.__actions__=hi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=hi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=hi(this.__views__),o}function oI(){if(this.__filtered__){var o=new Ut(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function sI(){var o=this.__wrapped__.value(),m=this.__dir__,M=kt(o),j=m<0,G=M?o.length:0,ne=yL(0,G,this.__views__),ce=ne.start,pe=ne.end,ye=pe-ce,Ie=j?pe:ce-1,Le=this.__iteratees__,Fe=Le.length,qe=0,nt=Dr(ye,this.__takeCount__);if(!M||!j&&G==ye&&nt==ye)return qw(o,this.__actions__);var mt=[];e:for(;ye--&&qe<nt;){Ie+=m;for(var It=-1,vt=o[Ie];++It<Fe;){var zt=Le[It],Gt=zt.iteratee,Mi=zt.type,Qr=Gt(vt);if(Mi==k)vt=Qr;else if(!Qr){if(Mi==_)continue e;break e}}mt[qe++]=vt}return mt}Ut.prototype=_a(zc.prototype),Ut.prototype.constructor=Ut;function js(o){var m=-1,M=o==null?0:o.length;for(this.clear();++m<M;){var j=o[m];this.set(j[0],j[1])}}function aI(){this.__data__=fl?fl(null):{},this.size=0}function lI(o){var m=this.has(o)&&delete this.__data__[o];return this.size-=m?1:0,m}function cI(o){var m=this.__data__;if(fl){var M=m[o];return M===h?e:M}return un.call(m,o)?m[o]:e}function uI(o){var m=this.__data__;return fl?m[o]!==e:un.call(m,o)}function hI(o,m){var M=this.__data__;return this.size+=this.has(o)?0:1,M[o]=fl&&m===e?h:m,this}js.prototype.clear=aI,js.prototype.delete=lI,js.prototype.get=cI,js.prototype.has=uI,js.prototype.set=hI;function Fo(o){var m=-1,M=o==null?0:o.length;for(this.clear();++m<M;){var j=o[m];this.set(j[0],j[1])}}function dI(){this.__data__=[],this.size=0}function pI(o){var m=this.__data__,M=Hc(m,o);if(M<0)return!1;var j=m.length-1;return M==j?m.pop():Nc.call(m,M,1),--this.size,!0}function fI(o){var m=this.__data__,M=Hc(m,o);return M<0?e:m[M][1]}function gI(o){return Hc(this.__data__,o)>-1}function mI(o,m){var M=this.__data__,j=Hc(M,o);return j<0?(++this.size,M.push([o,m])):M[j][1]=m,this}Fo.prototype.clear=dI,Fo.prototype.delete=pI,Fo.prototype.get=fI,Fo.prototype.has=gI,Fo.prototype.set=mI;function Po(o){var m=-1,M=o==null?0:o.length;for(this.clear();++m<M;){var j=o[m];this.set(j[0],j[1])}}function vI(){this.size=0,this.__data__={hash:new js,map:new(dl||Fo),string:new js}}function yI(o){var m=eu(this,o).delete(o);return this.size-=m?1:0,m}function wI(o){return eu(this,o).get(o)}function bI(o){return eu(this,o).has(o)}function xI(o,m){var M=eu(this,o),j=M.size;return M.set(o,m),this.size+=M.size==j?0:1,this}Po.prototype.clear=vI,Po.prototype.delete=yI,Po.prototype.get=wI,Po.prototype.has=bI,Po.prototype.set=xI;function Us(o){var m=-1,M=o==null?0:o.length;for(this.__data__=new Po;++m<M;)this.add(o[m])}function CI(o){return this.__data__.set(o,h),this}function kI(o){return this.__data__.has(o)}Us.prototype.add=Us.prototype.push=CI,Us.prototype.has=kI;function ro(o){var m=this.__data__=new Fo(o);this.size=m.size}function SI(){this.__data__=new Fo,this.size=0}function AI(o){var m=this.__data__,M=m.delete(o);return this.size=m.size,M}function _I(o){return this.__data__.get(o)}function $I(o){return this.__data__.has(o)}function TI(o,m){var M=this.__data__;if(M instanceof Fo){var j=M.__data__;if(!dl||j.length<p-1)return j.push([o,m]),this.size=++M.size,this;M=this.__data__=new Po(j)}return M.set(o,m),this.size=M.size,this}ro.prototype.clear=SI,ro.prototype.delete=AI,ro.prototype.get=_I,ro.prototype.has=$I,ro.prototype.set=TI;function Aw(o,m){var M=kt(o),j=!M&&Ys(o),G=!M&&!j&&fs(o),ne=!M&&!j&&!G&&Ea(o),ce=M||j||G||ne,pe=ce?Ze(o.length,zi):[],ye=pe.length;for(var Ie in o)(m||un.call(o,Ie))&&!(ce&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ne&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Ho(Ie,ye)))&&pe.push(Ie);return pe}function _w(o){var m=o.length;return m?o[Hd(0,m-1)]:e}function MI(o,m){return tu(hi(o),Vs(m,0,o.length))}function EI(o){return tu(hi(o))}function Ld(o,m,M){(M!==e&&!io(o[m],M)||M===e&&!(m in o))&&Wo(o,m,M)}function ml(o,m,M){var j=o[m];(!(un.call(o,m)&&io(j,M))||M===e&&!(m in o))&&Wo(o,m,M)}function Hc(o,m){for(var M=o.length;M--;)if(io(o[M][0],m))return M;return-1}function II(o,m,M,j){return us(o,function(G,ne,ce){m(j,G,M(G),ce)}),j}function $w(o,m){return o&&bo(m,Ar(m),o)}function LI(o,m){return o&&bo(m,pi(m),o)}function Wo(o,m,M){m=="__proto__"&&Dc?Dc(o,m,{configurable:!0,enumerable:!0,value:M,writable:!0}):o[m]=M}function Rd(o,m){for(var M=-1,j=m.length,G=Ce(j),ne=o==null;++M<j;)G[M]=ne?e:pp(o,m[M]);return G}function Vs(o,m,M){return o===o&&(M!==e&&(o=o<=M?o:M),m!==e&&(o=o>=m?o:m)),o}function ji(o,m,M,j,G,ne){var ce,pe=m&a,ye=m&u,Ie=m&c;if(M&&(ce=G?M(o,j,G,ne):M(o)),ce!==e)return ce;if(!Pn(o))return o;var Le=kt(o);if(Le){if(ce=bL(o),!pe)return hi(o,ce)}else{var Fe=Fr(o),qe=Fe==Ue||Fe==ct;if(fs(o))return Zw(o,pe);if(Fe==hn||Fe==se||qe&&!G){if(ce=ye||qe?{}:mb(o),!pe)return ye?cL(o,LI(ce,o)):lL(o,$w(ce,o))}else{if(!Qt[Fe])return G?o:{};ce=xL(o,Fe,pe)}}ne||(ne=new ro);var nt=ne.get(o);if(nt)return nt;ne.set(o,ce),Vb(o)?o.forEach(function(vt){ce.add(ji(vt,m,M,vt,o,ne))}):jb(o)&&o.forEach(function(vt,zt){ce.set(zt,ji(vt,m,M,zt,o,ne))});var mt=Ie?ye?Jd:Qd:ye?pi:Ar,It=Le?e:mt(o);return _r(It||o,function(vt,zt){It&&(zt=vt,vt=o[zt]),ml(ce,zt,ji(vt,m,M,zt,o,ne))}),ce}function RI(o){var m=Ar(o);return function(M){return Tw(M,o,m)}}function Tw(o,m,M){var j=M.length;if(o==null)return!j;for(o=Et(o);j--;){var G=M[j],ne=m[G],ce=o[G];if(ce===e&&!(G in o)||!ne(ce))return!1}return!0}function Mw(o,m,M){if(typeof o!="function")throw new fn(v);return kl(function(){o.apply(e,M)},m)}function vl(o,m,M,j){var G=-1,ne=Ai,ce=!0,pe=o.length,ye=[],Ie=m.length;if(!pe)return ye;M&&(m=y(m,at(M))),j?(ne=_i,ce=!1):m.length>=p&&(ne=bt,ce=!1,m=new Us(m));e:for(;++G<pe;){var Le=o[G],Fe=M==null?Le:M(Le);if(Le=j||Le!==0?Le:0,ce&&Fe===Fe){for(var qe=Ie;qe--;)if(m[qe]===Fe)continue e;ye.push(Le)}else ne(m,Fe,j)||ye.push(Le)}return ye}var us=nb(wo),Ew=nb(Nd,!0);function OI(o,m){var M=!0;return us(o,function(j,G,ne){return M=!!m(j,G,ne),M}),M}function jc(o,m,M){for(var j=-1,G=o.length;++j<G;){var ne=o[j],ce=m(ne);if(ce!=null&&(pe===e?ce===ce&&!Ti(ce):M(ce,pe)))var pe=ce,ye=ne}return ye}function NI(o,m,M,j){var G=o.length;for(M=Mt(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:Mt(j),j<0&&(j+=G),j=M>j?0:Gb(j);M<j;)o[M++]=m;return o}function Iw(o,m){var M=[];return us(o,function(j,G,ne){m(j,G,ne)&&M.push(j)}),M}function Tr(o,m,M,j,G){var ne=-1,ce=o.length;for(M||(M=kL),G||(G=[]);++ne<ce;){var pe=o[ne];m>0&&M(pe)?m>1?Tr(pe,m-1,M,j,G):T(G,pe):j||(G[G.length]=pe)}return G}var Od=rb(),Lw=rb(!0);function wo(o,m){return o&&Od(o,m,Ar)}function Nd(o,m){return o&&Lw(o,m,Ar)}function Uc(o,m){return Nr(m,function(M){return jo(o[M])})}function Ks(o,m){m=ds(m,o);for(var M=0,j=m.length;o!=null&&M<j;)o=o[xo(m[M++])];return M&&M==j?o:e}function Rw(o,m,M){var j=m(o);return kt(o)?j:T(j,M(o))}function Xr(o){return o==null?o===e?pt:qt:Hs&&Hs in Et(o)?vL(o):EL(o)}function Dd(o,m){return o>m}function DI(o,m){return o!=null&&un.call(o,m)}function FI(o,m){return o!=null&&m in Et(o)}function PI(o,m,M){return o>=Dr(m,M)&&o<gr(m,M)}function Fd(o,m,M){for(var j=M?_i:Ai,G=o[0].length,ne=o.length,ce=ne,pe=Ce(ne),ye=1/0,Ie=[];ce--;){var Le=o[ce];ce&&m&&(Le=y(Le,at(m))),ye=Dr(Le.length,ye),pe[ce]=!M&&(m||G>=120&&Le.length>=120)?new Us(ce&&Le):e}Le=o[0];var Fe=-1,qe=pe[0];e:for(;++Fe<G&&Ie.length<ye;){var nt=Le[Fe],mt=m?m(nt):nt;if(nt=M||nt!==0?nt:0,!(qe?bt(qe,mt):j(Ie,mt,M))){for(ce=ne;--ce;){var It=pe[ce];if(!(It?bt(It,mt):j(o[ce],mt,M)))continue e}qe&&qe.push(mt),Ie.push(nt)}}return Ie}function WI(o,m,M,j){return wo(o,function(G,ne,ce){m(j,M(G),ne,ce)}),j}function yl(o,m,M){m=ds(m,o),o=bb(o,m);var j=o==null?o:o[xo(Vi(m))];return j==null?e:xr(j,o,M)}function Ow(o){return Vn(o)&&Xr(o)==se}function BI(o){return Vn(o)&&Xr(o)==dn}function zI(o){return Vn(o)&&Xr(o)==Te}function wl(o,m,M,j,G){return o===m?!0:o==null||m==null||!Vn(o)&&!Vn(m)?o!==o&&m!==m:HI(o,m,M,j,wl,G)}function HI(o,m,M,j,G,ne){var ce=kt(o),pe=kt(m),ye=ce?ue:Fr(o),Ie=pe?ue:Fr(m);ye=ye==se?hn:ye,Ie=Ie==se?hn:Ie;var Le=ye==hn,Fe=Ie==hn,qe=ye==Ie;if(qe&&fs(o)){if(!fs(m))return!1;ce=!0,Le=!1}if(qe&&!Le)return ne||(ne=new ro),ce||Ea(o)?pb(o,m,M,j,G,ne):gL(o,m,ye,M,j,G,ne);if(!(M&i)){var nt=Le&&un.call(o,"__wrapped__"),mt=Fe&&un.call(m,"__wrapped__");if(nt||mt){var It=nt?o.value():o,vt=mt?m.value():m;return ne||(ne=new ro),G(It,vt,M,j,ne)}}return qe?(ne||(ne=new ro),mL(o,m,M,j,G,ne)):!1}function jI(o){return Vn(o)&&Fr(o)==et}function Pd(o,m,M,j){var G=M.length,ne=G,ce=!j;if(o==null)return!ne;for(o=Et(o);G--;){var pe=M[G];if(ce&&pe[2]?pe[1]!==o[pe[0]]:!(pe[0]in o))return!1}for(;++G<ne;){pe=M[G];var ye=pe[0],Ie=o[ye],Le=pe[1];if(ce&&pe[2]){if(Ie===e&&!(ye in o))return!1}else{var Fe=new ro;if(j)var qe=j(Ie,Le,ye,o,m,Fe);if(!(qe===e?wl(Le,Ie,i|l,j,Fe):qe))return!1}}return!0}function Nw(o){if(!Pn(o)||AL(o))return!1;var m=jo(o)?jE:he;return m.test(qs(o))}function UI(o){return Vn(o)&&Xr(o)==yn}function VI(o){return Vn(o)&&Fr(o)==Rn}function KI(o){return Vn(o)&&au(o.length)&&!!rn[Xr(o)]}function Dw(o){return typeof o=="function"?o:o==null?fi:typeof o=="object"?kt(o)?Ww(o[0],o[1]):Pw(o):i0(o)}function Wd(o){if(!Cl(o))return YE(o);var m=[];for(var M in Et(o))un.call(o,M)&&M!="constructor"&&m.push(M);return m}function GI(o){if(!Pn(o))return ML(o);var m=Cl(o),M=[];for(var j in o)j=="constructor"&&(m||!un.call(o,j))||M.push(j);return M}function Bd(o,m){return o<m}function Fw(o,m){var M=-1,j=di(o)?Ce(o.length):[];return us(o,function(G,ne,ce){j[++M]=m(G,ne,ce)}),j}function Pw(o){var m=tp(o);return m.length==1&&m[0][2]?yb(m[0][0],m[0][1]):function(M){return M===o||Pd(M,o,m)}}function Ww(o,m){return rp(o)&&vb(m)?yb(xo(o),m):function(M){var j=pp(M,o);return j===e&&j===m?fp(M,o):wl(m,j,i|l)}}function Vc(o,m,M,j,G){o!==m&&Od(m,function(ne,ce){if(G||(G=new ro),Pn(ne))qI(o,m,ce,M,Vc,j,G);else{var pe=j?j(op(o,ce),ne,ce+"",o,m,G):e;pe===e&&(pe=ne),Ld(o,ce,pe)}},pi)}function qI(o,m,M,j,G,ne,ce){var pe=op(o,M),ye=op(m,M),Ie=ce.get(ye);if(Ie){Ld(o,M,Ie);return}var Le=ne?ne(pe,ye,M+"",o,m,ce):e,Fe=Le===e;if(Fe){var qe=kt(ye),nt=!qe&&fs(ye),mt=!qe&&!nt&&Ea(ye);Le=ye,qe||nt||mt?kt(pe)?Le=pe:Xn(pe)?Le=hi(pe):nt?(Fe=!1,Le=Zw(ye,!0)):mt?(Fe=!1,Le=Qw(ye,!0)):Le=[]:Sl(ye)||Ys(ye)?(Le=pe,Ys(pe)?Le=qb(pe):(!Pn(pe)||jo(pe))&&(Le=mb(ye))):Fe=!1}Fe&&(ce.set(ye,Le),G(Le,ye,j,ne,ce),ce.delete(ye)),Ld(o,M,Le)}function Bw(o,m){var M=o.length;if(M)return m+=m<0?M:0,Ho(m,M)?o[m]:e}function zw(o,m,M){m.length?m=y(m,function(ne){return kt(ne)?function(ce){return Ks(ce,ne.length===1?ne[0]:ne)}:ne}):m=[fi];var j=-1;m=y(m,at(gt()));var G=Fw(o,function(ne,ce,pe){var ye=y(m,function(Ie){return Ie(ne)});return{criteria:ye,index:++j,value:ne}});return Ke(G,function(ne,ce){return aL(ne,ce,M)})}function YI(o,m){return Hw(o,m,function(M,j){return fp(o,j)})}function Hw(o,m,M){for(var j=-1,G=m.length,ne={};++j<G;){var ce=m[j],pe=Ks(o,ce);M(pe,ce)&&bl(ne,ds(ce,o),pe)}return ne}function XI(o){return function(m){return Ks(m,o)}}function zd(o,m,M,j){var G=j?we:ae,ne=-1,ce=m.length,pe=o;for(o===m&&(m=hi(m)),M&&(pe=y(o,at(M)));++ne<ce;)for(var ye=0,Ie=m[ne],Le=M?M(Ie):Ie;(ye=G(pe,Le,ye,j))>-1;)pe!==o&&Nc.call(pe,ye,1),Nc.call(o,ye,1);return o}function jw(o,m){for(var M=o?m.length:0,j=M-1;M--;){var G=m[M];if(M==j||G!==ne){var ne=G;Ho(G)?Nc.call(o,G,1):Vd(o,G)}}return o}function Hd(o,m){return o+Pc(kw()*(m-o+1))}function ZI(o,m,M,j){for(var G=-1,ne=gr(Fc((m-o)/(M||1)),0),ce=Ce(ne);ne--;)ce[j?ne:++G]=o,o+=M;return ce}function jd(o,m){var M="";if(!o||m<1||m>U)return M;do m%2&&(M+=o),m=Pc(m/2),m&&(o+=o);while(m);return M}function Pt(o,m){return sp(wb(o,m,fi),o+"")}function QI(o){return _w(Ia(o))}function JI(o,m){var M=Ia(o);return tu(M,Vs(m,0,M.length))}function bl(o,m,M,j){if(!Pn(o))return o;m=ds(m,o);for(var G=-1,ne=m.length,ce=ne-1,pe=o;pe!=null&&++G<ne;){var ye=xo(m[G]),Ie=M;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return o;if(G!=ce){var Le=pe[ye];Ie=j?j(Le,ye,pe):e,Ie===e&&(Ie=Pn(Le)?Le:Ho(m[G+1])?[]:{})}ml(pe,ye,Ie),pe=pe[ye]}return o}var Uw=Wc?function(o,m){return Wc.set(o,m),o}:fi,eL=Dc?function(o,m){return Dc(o,"toString",{configurable:!0,enumerable:!1,value:mp(m),writable:!0})}:fi;function tL(o){return tu(Ia(o))}function Ui(o,m,M){var j=-1,G=o.length;m<0&&(m=-m>G?0:G+m),M=M>G?G:M,M<0&&(M+=G),G=m>M?0:M-m>>>0,m>>>=0;for(var ne=Ce(G);++j<G;)ne[j]=o[j+m];return ne}function nL(o,m){var M;return us(o,function(j,G,ne){return M=m(j,G,ne),!M}),!!M}function Kc(o,m,M){var j=0,G=o==null?j:o.length;if(typeof m=="number"&&m===m&&G<=te){for(;j<G;){var ne=j+G>>>1,ce=o[ne];ce!==null&&!Ti(ce)&&(M?ce<=m:ce<m)?j=ne+1:G=ne}return G}return Ud(o,m,fi,M)}function Ud(o,m,M,j){var G=0,ne=o==null?0:o.length;if(ne===0)return 0;m=M(m);for(var ce=m!==m,pe=m===null,ye=Ti(m),Ie=m===e;G<ne;){var Le=Pc((G+ne)/2),Fe=M(o[Le]),qe=Fe!==e,nt=Fe===null,mt=Fe===Fe,It=Ti(Fe);if(ce)var vt=j||mt;else Ie?vt=mt&&(j||qe):pe?vt=mt&&qe&&(j||!nt):ye?vt=mt&&qe&&!nt&&(j||!It):nt||It?vt=!1:vt=j?Fe<=m:Fe<m;vt?G=Le+1:ne=Le}return Dr(ne,de)}function Vw(o,m){for(var M=-1,j=o.length,G=0,ne=[];++M<j;){var ce=o[M],pe=m?m(ce):ce;if(!M||!io(pe,ye)){var ye=pe;ne[G++]=ce===0?0:ce}}return ne}function Kw(o){return typeof o=="number"?o:Ti(o)?X:+o}function $i(o){if(typeof o=="string")return o;if(kt(o))return y(o,$i)+"";if(Ti(o))return Sw?Sw.call(o):"";var m=o+"";return m=="0"&&1/o==-z?"-0":m}function hs(o,m,M){var j=-1,G=Ai,ne=o.length,ce=!0,pe=[],ye=pe;if(M)ce=!1,G=_i;else if(ne>=p){var Ie=m?null:pL(o);if(Ie)return Ge(Ie);ce=!1,G=bt,ye=new Us}else ye=m?[]:pe;e:for(;++j<ne;){var Le=o[j],Fe=m?m(Le):Le;if(Le=M||Le!==0?Le:0,ce&&Fe===Fe){for(var qe=ye.length;qe--;)if(ye[qe]===Fe)continue e;m&&ye.push(Fe),pe.push(Le)}else G(ye,Fe,M)||(ye!==pe&&ye.push(Fe),pe.push(Le))}return pe}function Vd(o,m){return m=ds(m,o),o=bb(o,m),o==null||delete o[xo(Vi(m))]}function Gw(o,m,M,j){return bl(o,m,M(Ks(o,m)),j)}function Gc(o,m,M,j){for(var G=o.length,ne=j?G:-1;(j?ne--:++ne<G)&&m(o[ne],ne,o););return M?Ui(o,j?0:ne,j?ne+1:G):Ui(o,j?ne+1:0,j?G:ne)}function qw(o,m){var M=o;return M instanceof Ut&&(M=M.value()),A(m,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function Kd(o,m,M){var j=o.length;if(j<2)return j?hs(o[0]):[];for(var G=-1,ne=Ce(j);++G<j;)for(var ce=o[G],pe=-1;++pe<j;)pe!=G&&(ne[G]=vl(ne[G]||ce,o[pe],m,M));return hs(Tr(ne,1),m,M)}function Yw(o,m,M){for(var j=-1,G=o.length,ne=m.length,ce={};++j<G;){var pe=j<ne?m[j]:e;M(ce,o[j],pe)}return ce}function Gd(o){return Xn(o)?o:[]}function qd(o){return typeof o=="function"?o:fi}function ds(o,m){return kt(o)?o:rp(o,m)?[o]:Sb(ln(o))}var rL=Pt;function ps(o,m,M){var j=o.length;return M=M===e?j:M,!m&&M>=j?o:Ui(o,m,M)}var Xw=UE||function(o){return pn.clearTimeout(o)};function Zw(o,m){if(m)return o.slice();var M=o.length,j=yw?yw(M):new o.constructor(M);return o.copy(j),j}function Yd(o){var m=new o.constructor(o.byteLength);return new Rc(m).set(new Rc(o)),m}function iL(o,m){var M=m?Yd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.byteLength)}function oL(o){var m=new o.constructor(o.source,Or.exec(o));return m.lastIndex=o.lastIndex,m}function sL(o){return gl?Et(gl.call(o)):{}}function Qw(o,m){var M=m?Yd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.length)}function Jw(o,m){if(o!==m){var M=o!==e,j=o===null,G=o===o,ne=Ti(o),ce=m!==e,pe=m===null,ye=m===m,Ie=Ti(m);if(!pe&&!Ie&&!ne&&o>m||ne&&ce&&ye&&!pe&&!Ie||j&&ce&&ye||!M&&ye||!G)return 1;if(!j&&!ne&&!Ie&&o<m||Ie&&M&&G&&!j&&!ne||pe&&M&&G||!ce&&G||!ye)return-1}return 0}function aL(o,m,M){for(var j=-1,G=o.criteria,ne=m.criteria,ce=G.length,pe=M.length;++j<ce;){var ye=Jw(G[j],ne[j]);if(ye){if(j>=pe)return ye;var Ie=M[j];return ye*(Ie=="desc"?-1:1)}}return o.index-m.index}function eb(o,m,M,j){for(var G=-1,ne=o.length,ce=M.length,pe=-1,ye=m.length,Ie=gr(ne-ce,0),Le=Ce(ye+Ie),Fe=!j;++pe<ye;)Le[pe]=m[pe];for(;++G<ce;)(Fe||G<ne)&&(Le[M[G]]=o[G]);for(;Ie--;)Le[pe++]=o[G++];return Le}function tb(o,m,M,j){for(var G=-1,ne=o.length,ce=-1,pe=M.length,ye=-1,Ie=m.length,Le=gr(ne-pe,0),Fe=Ce(Le+Ie),qe=!j;++G<Le;)Fe[G]=o[G];for(var nt=G;++ye<Ie;)Fe[nt+ye]=m[ye];for(;++ce<pe;)(qe||G<ne)&&(Fe[nt+M[ce]]=o[G++]);return Fe}function hi(o,m){var M=-1,j=o.length;for(m||(m=Ce(j));++M<j;)m[M]=o[M];return m}function bo(o,m,M,j){var G=!M;M||(M={});for(var ne=-1,ce=m.length;++ne<ce;){var pe=m[ne],ye=j?j(M[pe],o[pe],pe,M,o):e;ye===e&&(ye=o[pe]),G?Wo(M,pe,ye):ml(M,pe,ye)}return M}function lL(o,m){return bo(o,np(o),m)}function cL(o,m){return bo(o,fb(o),m)}function qc(o,m){return function(M,j){var G=kt(M)?Cr:II,ne=m?m():{};return G(M,o,gt(j,2),ne)}}function $a(o){return Pt(function(m,M){var j=-1,G=M.length,ne=G>1?M[G-1]:e,ce=G>2?M[2]:e;for(ne=o.length>3&&typeof ne=="function"?(G--,ne):e,ce&&Zr(M[0],M[1],ce)&&(ne=G<3?e:ne,G=1),m=Et(m);++j<G;){var pe=M[j];pe&&o(m,pe,j,ne)}return m})}function nb(o,m){return function(M,j){if(M==null)return M;if(!di(M))return o(M,j);for(var G=M.length,ne=m?G:-1,ce=Et(M);(m?ne--:++ne<G)&&j(ce[ne],ne,ce)!==!1;);return M}}function rb(o){return function(m,M,j){for(var G=-1,ne=Et(m),ce=j(m),pe=ce.length;pe--;){var ye=ce[o?pe:++G];if(M(ne[ye],ye,ne)===!1)break}return m}}function uL(o,m,M){var j=m&d,G=xl(o);function ne(){var ce=this&&this!==pn&&this instanceof ne?G:o;return ce.apply(j?M:this,arguments)}return ne}function ib(o){return function(m){m=ln(m);var M=oe(m)?xt(m):e,j=M?M[0]:m.charAt(0),G=M?ps(M,1).join(""):m.slice(1);return j[o]()+G}}function Ta(o){return function(m){return A(n0(t0(m).replace(Fn,"")),o,"")}}function xl(o){return function(){var m=arguments;switch(m.length){case 0:return new o;case 1:return new o(m[0]);case 2:return new o(m[0],m[1]);case 3:return new o(m[0],m[1],m[2]);case 4:return new o(m[0],m[1],m[2],m[3]);case 5:return new o(m[0],m[1],m[2],m[3],m[4]);case 6:return new o(m[0],m[1],m[2],m[3],m[4],m[5]);case 7:return new o(m[0],m[1],m[2],m[3],m[4],m[5],m[6])}var M=_a(o.prototype),j=o.apply(M,m);return Pn(j)?j:M}}function hL(o,m,M){var j=xl(o);function G(){for(var ne=arguments.length,ce=Ce(ne),pe=ne,ye=Ma(G);pe--;)ce[pe]=arguments[pe];var Ie=ne<3&&ce[0]!==ye&&ce[ne-1]!==ye?[]:Be(ce,ye);if(ne-=Ie.length,ne<M)return cb(o,m,Yc,G.placeholder,e,ce,Ie,e,e,M-ne);var Le=this&&this!==pn&&this instanceof G?j:o;return xr(Le,this,ce)}return G}function ob(o){return function(m,M,j){var G=Et(m);if(!di(m)){var ne=gt(M,3);m=Ar(m),M=function(pe){return ne(G[pe],pe,G)}}var ce=o(m,M,j);return ce>-1?G[ne?m[ce]:ce]:e}}function sb(o){return zo(function(m){var M=m.length,j=M,G=Hi.prototype.thru;for(o&&m.reverse();j--;){var ne=m[j];if(typeof ne!="function")throw new fn(v);if(G&&!ce&&Jc(ne)=="wrapper")var ce=new Hi([],!0)}for(j=ce?j:M;++j<M;){ne=m[j];var pe=Jc(ne),ye=pe=="wrapper"?ep(ne):e;ye&&ip(ye[0])&&ye[1]==(R|I|S|N)&&!ye[4].length&&ye[9]==1?ce=ce[Jc(ye[0])].apply(ce,ye[3]):ce=ne.length==1&&ip(ne)?ce[pe]():ce.thru(ne)}return function(){var Ie=arguments,Le=Ie[0];if(ce&&Ie.length==1&&kt(Le))return ce.plant(Le).value();for(var Fe=0,qe=M?m[Fe].apply(this,Ie):Le;++Fe<M;)qe=m[Fe].call(this,qe);return qe}})}function Yc(o,m,M,j,G,ne,ce,pe,ye,Ie){var Le=m&R,Fe=m&d,qe=m&w,nt=m&(I|$),mt=m&L,It=qe?e:xl(o);function vt(){for(var zt=arguments.length,Gt=Ce(zt),Mi=zt;Mi--;)Gt[Mi]=arguments[Mi];if(nt)var Qr=Ma(vt),Ei=kr(Gt,Qr);if(j&&(Gt=eb(Gt,j,G,nt)),ne&&(Gt=tb(Gt,ne,ce,nt)),zt-=Ei,nt&&zt<Ie){var Zn=Be(Gt,Qr);return cb(o,m,Yc,vt.placeholder,M,Gt,Zn,pe,ye,Ie-zt)}var oo=Fe?M:this,Vo=qe?oo[o]:o;return zt=Gt.length,pe?Gt=IL(Gt,pe):mt&&zt>1&&Gt.reverse(),Le&&ye<zt&&(Gt.length=ye),this&&this!==pn&&this instanceof vt&&(Vo=It||xl(Vo)),Vo.apply(oo,Gt)}return vt}function ab(o,m){return function(M,j){return WI(M,o,m(j),{})}}function Xc(o,m){return function(M,j){var G;if(M===e&&j===e)return m;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=$i(M),j=$i(j)):(M=Kw(M),j=Kw(j)),G=o(M,j)}return G}}function Xd(o){return zo(function(m){return m=y(m,at(gt())),Pt(function(M){var j=this;return o(m,function(G){return xr(G,j,M)})})})}function Zc(o,m){m=m===e?" ":$i(m);var M=m.length;if(M<2)return M?jd(m,o):m;var j=jd(m,Fc(o/Wt(m)));return oe(m)?ps(xt(j),0,o).join(""):j.slice(0,o)}function dL(o,m,M,j){var G=m&d,ne=xl(o);function ce(){for(var pe=-1,ye=arguments.length,Ie=-1,Le=j.length,Fe=Ce(Le+ye),qe=this&&this!==pn&&this instanceof ce?ne:o;++Ie<Le;)Fe[Ie]=j[Ie];for(;ye--;)Fe[Ie++]=arguments[++pe];return xr(qe,G?M:this,Fe)}return ce}function lb(o){return function(m,M,j){return j&&typeof j!="number"&&Zr(m,M,j)&&(M=j=e),m=Uo(m),M===e?(M=m,m=0):M=Uo(M),j=j===e?m<M?1:-1:Uo(j),ZI(m,M,j,o)}}function Qc(o){return function(m,M){return typeof m=="string"&&typeof M=="string"||(m=Ki(m),M=Ki(M)),o(m,M)}}function cb(o,m,M,j,G,ne,ce,pe,ye,Ie){var Le=m&I,Fe=Le?ce:e,qe=Le?e:ce,nt=Le?ne:e,mt=Le?e:ne;m|=Le?S:C,m&=~(Le?C:S),m&x||(m&=-4);var It=[o,m,G,nt,Fe,mt,qe,pe,ye,Ie],vt=M.apply(e,It);return ip(o)&&xb(vt,It),vt.placeholder=j,Cb(vt,o,m)}function Zd(o){var m=Yt[o];return function(M,j){if(M=Ki(M),j=j==null?0:Dr(Mt(j),292),j&&Cw(M)){var G=(ln(M)+"e").split("e"),ne=m(G[0]+"e"+(+G[1]+j));return G=(ln(ne)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return m(M)}}var pL=Sa&&1/Ge(new Sa([,-0]))[1]==z?function(o){return new Sa(o)}:wp;function ub(o){return function(m){var M=Fr(m);return M==et?Ee(m):M==Rn?Ye(m):tt(m,o(m))}}function Bo(o,m,M,j,G,ne,ce,pe){var ye=m&w;if(!ye&&typeof o!="function")throw new fn(v);var Ie=j?j.length:0;if(Ie||(m&=-97,j=G=e),ce=ce===e?ce:gr(Mt(ce),0),pe=pe===e?pe:Mt(pe),Ie-=G?G.length:0,m&C){var Le=j,Fe=G;j=G=e}var qe=ye?e:ep(o),nt=[o,m,M,j,G,Le,Fe,ne,ce,pe];if(qe&&TL(nt,qe),o=nt[0],m=nt[1],M=nt[2],j=nt[3],G=nt[4],pe=nt[9]=nt[9]===e?ye?0:o.length:gr(nt[9]-Ie,0),!pe&&m&(I|$)&&(m&=-25),!m||m==d)var mt=uL(o,m,M);else m==I||m==$?mt=hL(o,m,pe):(m==S||m==(d|S))&&!G.length?mt=dL(o,m,M,j):mt=Yc.apply(e,nt);var It=qe?Uw:xb;return Cb(It(mt,nt),o,m)}function hb(o,m,M,j){return o===e||io(o,Un[M])&&!un.call(j,M)?m:o}function db(o,m,M,j,G,ne){return Pn(o)&&Pn(m)&&(ne.set(m,o),Vc(o,m,e,db,ne),ne.delete(m)),o}function fL(o){return Sl(o)?e:o}function pb(o,m,M,j,G,ne){var ce=M&i,pe=o.length,ye=m.length;if(pe!=ye&&!(ce&&ye>pe))return!1;var Ie=ne.get(o),Le=ne.get(m);if(Ie&&Le)return Ie==m&&Le==o;var Fe=-1,qe=!0,nt=M&l?new Us:e;for(ne.set(o,m),ne.set(m,o);++Fe<pe;){var mt=o[Fe],It=m[Fe];if(j)var vt=ce?j(It,mt,Fe,m,o,ne):j(mt,It,Fe,o,m,ne);if(vt!==e){if(vt)continue;qe=!1;break}if(nt){if(!W(m,function(zt,Gt){if(!bt(nt,Gt)&&(mt===zt||G(mt,zt,M,j,ne)))return nt.push(Gt)})){qe=!1;break}}else if(!(mt===It||G(mt,It,M,j,ne))){qe=!1;break}}return ne.delete(o),ne.delete(m),qe}function gL(o,m,M,j,G,ne,ce){switch(M){case On:if(o.byteLength!=m.byteLength||o.byteOffset!=m.byteOffset)return!1;o=o.buffer,m=m.buffer;case dn:return!(o.byteLength!=m.byteLength||!ne(new Rc(o),new Rc(m)));case _e:case Te:case ht:return io(+o,+m);case Xe:return o.name==m.name&&o.message==m.message;case yn:case tr:return o==m+"";case et:var pe=Ee;case Rn:var ye=j&i;if(pe||(pe=Ge),o.size!=m.size&&!ye)return!1;var Ie=ce.get(o);if(Ie)return Ie==m;j|=l,ce.set(o,m);var Le=pb(pe(o),pe(m),j,G,ne,ce);return ce.delete(o),Le;case ur:if(gl)return gl.call(o)==gl.call(m)}return!1}function mL(o,m,M,j,G,ne){var ce=M&i,pe=Qd(o),ye=pe.length,Ie=Qd(m),Le=Ie.length;if(ye!=Le&&!ce)return!1;for(var Fe=ye;Fe--;){var qe=pe[Fe];if(!(ce?qe in m:un.call(m,qe)))return!1}var nt=ne.get(o),mt=ne.get(m);if(nt&&mt)return nt==m&&mt==o;var It=!0;ne.set(o,m),ne.set(m,o);for(var vt=ce;++Fe<ye;){qe=pe[Fe];var zt=o[qe],Gt=m[qe];if(j)var Mi=ce?j(Gt,zt,qe,m,o,ne):j(zt,Gt,qe,o,m,ne);if(!(Mi===e?zt===Gt||G(zt,Gt,M,j,ne):Mi)){It=!1;break}vt||(vt=qe=="constructor")}if(It&&!vt){var Qr=o.constructor,Ei=m.constructor;Qr!=Ei&&"constructor"in o&&"constructor"in m&&!(typeof Qr=="function"&&Qr instanceof Qr&&typeof Ei=="function"&&Ei instanceof Ei)&&(It=!1)}return ne.delete(o),ne.delete(m),It}function zo(o){return sp(wb(o,e,Tb),o+"")}function Qd(o){return Rw(o,Ar,np)}function Jd(o){return Rw(o,pi,fb)}var ep=Wc?function(o){return Wc.get(o)}:wp;function Jc(o){for(var m=o.name+"",M=Aa[m],j=un.call(Aa,m)?M.length:0;j--;){var G=M[j],ne=G.func;if(ne==null||ne==o)return G.name}return m}function Ma(o){var m=un.call(J,"placeholder")?J:o;return m.placeholder}function gt(){var o=J.iteratee||vp;return o=o===vp?Dw:o,arguments.length?o(arguments[0],arguments[1]):o}function eu(o,m){var M=o.__data__;return SL(m)?M[typeof m=="string"?"string":"hash"]:M.map}function tp(o){for(var m=Ar(o),M=m.length;M--;){var j=m[M],G=o[j];m[M]=[j,G,vb(G)]}return m}function Gs(o,m){var M=ie(o,m);return Nw(M)?M:e}function vL(o){var m=un.call(o,Hs),M=o[Hs];try{o[Hs]=e;var j=!0}catch{}var G=Ic.call(o);return j&&(m?o[Hs]=M:delete o[Hs]),G}var np=Md?function(o){return o==null?[]:(o=Et(o),Nr(Md(o),function(m){return bw.call(o,m)}))}:bp,fb=Md?function(o){for(var m=[];o;)T(m,np(o)),o=Oc(o);return m}:bp,Fr=Xr;(Ed&&Fr(new Ed(new ArrayBuffer(1)))!=On||dl&&Fr(new dl)!=et||Id&&Fr(Id.resolve())!=Vt||Sa&&Fr(new Sa)!=Rn||pl&&Fr(new pl)!=je)&&(Fr=function(o){var m=Xr(o),M=m==hn?o.constructor:e,j=M?qs(M):"";if(j)switch(j){case JE:return On;case eI:return et;case tI:return Vt;case nI:return Rn;case rI:return je}return m});function yL(o,m,M){for(var j=-1,G=M.length;++j<G;){var ne=M[j],ce=ne.size;switch(ne.type){case"drop":o+=ce;break;case"dropRight":m-=ce;break;case"take":m=Dr(m,o+ce);break;case"takeRight":o=gr(o,m-ce);break}}return{start:o,end:m}}function wL(o){var m=o.match(si);return m?m[1].split(eo):[]}function gb(o,m,M){m=ds(m,o);for(var j=-1,G=m.length,ne=!1;++j<G;){var ce=xo(m[j]);if(!(ne=o!=null&&M(o,ce)))break;o=o[ce]}return ne||++j!=G?ne:(G=o==null?0:o.length,!!G&&au(G)&&Ho(ce,G)&&(kt(o)||Ys(o)))}function bL(o){var m=o.length,M=new o.constructor(m);return m&&typeof o[0]=="string"&&un.call(o,"index")&&(M.index=o.index,M.input=o.input),M}function mb(o){return typeof o.constructor=="function"&&!Cl(o)?_a(Oc(o)):{}}function xL(o,m,M){var j=o.constructor;switch(m){case dn:return Yd(o);case _e:case Te:return new j(+o);case On:return iL(o,M);case wr:case nr:case wn:case _n:case Nn:case Ot:case bn:case yi:case jr:return Qw(o,M);case et:return new j;case ht:case tr:return new j(o);case yn:return oL(o);case Rn:return new j;case ur:return sL(o)}}function CL(o,m){var M=m.length;if(!M)return o;var j=M-1;return m[j]=(M>1?"& ":"")+m[j],m=m.join(M>2?", ":" "),o.replace(xi,`{
1470
+ /* [wrapped with `+m+`] */
1471
+ `)}function kL(o){return kt(o)||Ys(o)||!!(xw&&o&&o[xw])}function Ho(o,m){var M=typeof o;return m=m??U,!!m&&(M=="number"||M!="symbol"&&Ne.test(o))&&o>-1&&o%1==0&&o<m}function Zr(o,m,M){if(!Pn(M))return!1;var j=typeof m;return(j=="number"?di(M)&&Ho(m,M.length):j=="string"&&m in M)?io(M[m],o):!1}function rp(o,m){if(kt(o))return!1;var M=typeof o;return M=="number"||M=="symbol"||M=="boolean"||o==null||Ti(o)?!0:Vr.test(o)||!$o.test(o)||m!=null&&o in Et(m)}function SL(o){var m=typeof o;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?o!=="__proto__":o===null}function ip(o){var m=Jc(o),M=J[m];if(typeof M!="function"||!(m in Ut.prototype))return!1;if(o===M)return!0;var j=ep(M);return!!j&&o===j[0]}function AL(o){return!!vw&&vw in o}var _L=zs?jo:xp;function Cl(o){var m=o&&o.constructor,M=typeof m=="function"&&m.prototype||Un;return o===M}function vb(o){return o===o&&!Pn(o)}function yb(o,m){return function(M){return M==null?!1:M[o]===m&&(m!==e||o in Et(M))}}function $L(o){var m=ou(o,function(j){return M.size===f&&M.clear(),j}),M=m.cache;return m}function TL(o,m){var M=o[1],j=m[1],G=M|j,ne=G<(d|w|R),ce=j==R&&M==I||j==R&&M==N&&o[7].length<=m[8]||j==(R|N)&&m[7].length<=m[8]&&M==I;if(!(ne||ce))return o;j&d&&(o[2]=m[2],G|=M&d?0:x);var pe=m[3];if(pe){var ye=o[3];o[3]=ye?eb(ye,pe,m[4]):pe,o[4]=ye?Be(o[3],s):m[4]}return pe=m[5],pe&&(ye=o[5],o[5]=ye?tb(ye,pe,m[6]):pe,o[6]=ye?Be(o[5],s):m[6]),pe=m[7],pe&&(o[7]=pe),j&R&&(o[8]=o[8]==null?m[8]:Dr(o[8],m[8])),o[9]==null&&(o[9]=m[9]),o[0]=m[0],o[1]=G,o}function ML(o){var m=[];if(o!=null)for(var M in Et(o))m.push(M);return m}function EL(o){return Ic.call(o)}function wb(o,m,M){return m=gr(m===e?o.length-1:m,0),function(){for(var j=arguments,G=-1,ne=gr(j.length-m,0),ce=Ce(ne);++G<ne;)ce[G]=j[m+G];G=-1;for(var pe=Ce(m+1);++G<m;)pe[G]=j[G];return pe[m]=M(ce),xr(o,this,pe)}}function bb(o,m){return m.length<2?o:Ks(o,Ui(m,0,-1))}function IL(o,m){for(var M=o.length,j=Dr(m.length,M),G=hi(o);j--;){var ne=m[j];o[j]=Ho(ne,M)?G[ne]:e}return o}function op(o,m){if(!(m==="constructor"&&typeof o[m]=="function")&&m!="__proto__")return o[m]}var xb=kb(Uw),kl=KE||function(o,m){return pn.setTimeout(o,m)},sp=kb(eL);function Cb(o,m,M){var j=m+"";return sp(o,CL(j,LL(wL(j),M)))}function kb(o){var m=0,M=0;return function(){var j=XE(),G=O-(j-M);if(M=j,G>0){if(++m>=P)return arguments[0]}else m=0;return o.apply(e,arguments)}}function tu(o,m){var M=-1,j=o.length,G=j-1;for(m=m===e?j:m;++M<m;){var ne=Hd(M,G),ce=o[ne];o[ne]=o[M],o[M]=ce}return o.length=m,o}var Sb=$L(function(o){var m=[];return o.charCodeAt(0)===46&&m.push(""),o.replace($n,function(M,j,G,ne){m.push(G?ne.replace(Qo,"$1"):j||M)}),m});function xo(o){if(typeof o=="string"||Ti(o))return o;var m=o+"";return m=="0"&&1/o==-z?"-0":m}function qs(o){if(o!=null){try{return Ec.call(o)}catch{}try{return o+""}catch{}}return""}function LL(o,m){return _r(le,function(M){var j="_."+M[0];m&M[1]&&!Ai(o,j)&&o.push(j)}),o.sort()}function Ab(o){if(o instanceof Ut)return o.clone();var m=new Hi(o.__wrapped__,o.__chain__);return m.__actions__=hi(o.__actions__),m.__index__=o.__index__,m.__values__=o.__values__,m}function RL(o,m,M){(M?Zr(o,m,M):m===e)?m=1:m=gr(Mt(m),0);var j=o==null?0:o.length;if(!j||m<1)return[];for(var G=0,ne=0,ce=Ce(Fc(j/m));G<j;)ce[ne++]=Ui(o,G,G+=m);return ce}function OL(o){for(var m=-1,M=o==null?0:o.length,j=0,G=[];++m<M;){var ne=o[m];ne&&(G[j++]=ne)}return G}function NL(){var o=arguments.length;if(!o)return[];for(var m=Ce(o-1),M=arguments[0],j=o;j--;)m[j-1]=arguments[j];return T(kt(M)?hi(M):[M],Tr(m,1))}var DL=Pt(function(o,m){return Xn(o)?vl(o,Tr(m,1,Xn,!0)):[]}),FL=Pt(function(o,m){var M=Vi(m);return Xn(M)&&(M=e),Xn(o)?vl(o,Tr(m,1,Xn,!0),gt(M,2)):[]}),PL=Pt(function(o,m){var M=Vi(m);return Xn(M)&&(M=e),Xn(o)?vl(o,Tr(m,1,Xn,!0),e,M):[]});function WL(o,m,M){var j=o==null?0:o.length;return j?(m=M||m===e?1:Mt(m),Ui(o,m<0?0:m,j)):[]}function BL(o,m,M){var j=o==null?0:o.length;return j?(m=M||m===e?1:Mt(m),m=j-m,Ui(o,0,m<0?0:m)):[]}function zL(o,m){return o&&o.length?Gc(o,gt(m,3),!0,!0):[]}function HL(o,m){return o&&o.length?Gc(o,gt(m,3),!0):[]}function jL(o,m,M,j){var G=o==null?0:o.length;return G?(M&&typeof M!="number"&&Zr(o,m,M)&&(M=0,j=G),NI(o,m,M,j)):[]}function _b(o,m,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:Mt(M);return G<0&&(G=gr(j+G,0)),re(o,gt(m,3),G)}function $b(o,m,M){var j=o==null?0:o.length;if(!j)return-1;var G=j-1;return M!==e&&(G=Mt(M),G=M<0?gr(j+G,0):Dr(G,j-1)),re(o,gt(m,3),G,!0)}function Tb(o){var m=o==null?0:o.length;return m?Tr(o,1):[]}function UL(o){var m=o==null?0:o.length;return m?Tr(o,z):[]}function VL(o,m){var M=o==null?0:o.length;return M?(m=m===e?1:Mt(m),Tr(o,m)):[]}function KL(o){for(var m=-1,M=o==null?0:o.length,j={};++m<M;){var G=o[m];j[G[0]]=G[1]}return j}function Mb(o){return o&&o.length?o[0]:e}function GL(o,m,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:Mt(M);return G<0&&(G=gr(j+G,0)),ae(o,m,G)}function qL(o){var m=o==null?0:o.length;return m?Ui(o,0,-1):[]}var YL=Pt(function(o){var m=y(o,Gd);return m.length&&m[0]===o[0]?Fd(m):[]}),XL=Pt(function(o){var m=Vi(o),M=y(o,Gd);return m===Vi(M)?m=e:M.pop(),M.length&&M[0]===o[0]?Fd(M,gt(m,2)):[]}),ZL=Pt(function(o){var m=Vi(o),M=y(o,Gd);return m=typeof m=="function"?m:e,m&&M.pop(),M.length&&M[0]===o[0]?Fd(M,e,m):[]});function QL(o,m){return o==null?"":qE.call(o,m)}function Vi(o){var m=o==null?0:o.length;return m?o[m-1]:e}function JL(o,m,M){var j=o==null?0:o.length;if(!j)return-1;var G=j;return M!==e&&(G=Mt(M),G=G<0?gr(j+G,0):Dr(G,j-1)),m===m?wt(o,m,G):re(o,ke,G,!0)}function eR(o,m){return o&&o.length?Bw(o,Mt(m)):e}var tR=Pt(Eb);function Eb(o,m){return o&&o.length&&m&&m.length?zd(o,m):o}function nR(o,m,M){return o&&o.length&&m&&m.length?zd(o,m,gt(M,2)):o}function rR(o,m,M){return o&&o.length&&m&&m.length?zd(o,m,e,M):o}var iR=zo(function(o,m){var M=o==null?0:o.length,j=Rd(o,m);return jw(o,y(m,function(G){return Ho(G,M)?+G:G}).sort(Jw)),j});function oR(o,m){var M=[];if(!(o&&o.length))return M;var j=-1,G=[],ne=o.length;for(m=gt(m,3);++j<ne;){var ce=o[j];m(ce,j,o)&&(M.push(ce),G.push(j))}return jw(o,G),M}function ap(o){return o==null?o:QE.call(o)}function sR(o,m,M){var j=o==null?0:o.length;return j?(M&&typeof M!="number"&&Zr(o,m,M)?(m=0,M=j):(m=m==null?0:Mt(m),M=M===e?j:Mt(M)),Ui(o,m,M)):[]}function aR(o,m){return Kc(o,m)}function lR(o,m,M){return Ud(o,m,gt(M,2))}function cR(o,m){var M=o==null?0:o.length;if(M){var j=Kc(o,m);if(j<M&&io(o[j],m))return j}return-1}function uR(o,m){return Kc(o,m,!0)}function hR(o,m,M){return Ud(o,m,gt(M,2),!0)}function dR(o,m){var M=o==null?0:o.length;if(M){var j=Kc(o,m,!0)-1;if(io(o[j],m))return j}return-1}function pR(o){return o&&o.length?Vw(o):[]}function fR(o,m){return o&&o.length?Vw(o,gt(m,2)):[]}function gR(o){var m=o==null?0:o.length;return m?Ui(o,1,m):[]}function mR(o,m,M){return o&&o.length?(m=M||m===e?1:Mt(m),Ui(o,0,m<0?0:m)):[]}function vR(o,m,M){var j=o==null?0:o.length;return j?(m=M||m===e?1:Mt(m),m=j-m,Ui(o,m<0?0:m,j)):[]}function yR(o,m){return o&&o.length?Gc(o,gt(m,3),!1,!0):[]}function wR(o,m){return o&&o.length?Gc(o,gt(m,3)):[]}var bR=Pt(function(o){return hs(Tr(o,1,Xn,!0))}),xR=Pt(function(o){var m=Vi(o);return Xn(m)&&(m=e),hs(Tr(o,1,Xn,!0),gt(m,2))}),CR=Pt(function(o){var m=Vi(o);return m=typeof m=="function"?m:e,hs(Tr(o,1,Xn,!0),e,m)});function kR(o){return o&&o.length?hs(o):[]}function SR(o,m){return o&&o.length?hs(o,gt(m,2)):[]}function AR(o,m){return m=typeof m=="function"?m:e,o&&o.length?hs(o,e,m):[]}function lp(o){if(!(o&&o.length))return[];var m=0;return o=Nr(o,function(M){if(Xn(M))return m=gr(M.length,m),!0}),Ze(m,function(M){return y(o,be(M))})}function Ib(o,m){if(!(o&&o.length))return[];var M=lp(o);return m==null?M:y(M,function(j){return xr(m,e,j)})}var _R=Pt(function(o,m){return Xn(o)?vl(o,m):[]}),$R=Pt(function(o){return Kd(Nr(o,Xn))}),TR=Pt(function(o){var m=Vi(o);return Xn(m)&&(m=e),Kd(Nr(o,Xn),gt(m,2))}),MR=Pt(function(o){var m=Vi(o);return m=typeof m=="function"?m:e,Kd(Nr(o,Xn),e,m)}),ER=Pt(lp);function IR(o,m){return Yw(o||[],m||[],ml)}function LR(o,m){return Yw(o||[],m||[],bl)}var RR=Pt(function(o){var m=o.length,M=m>1?o[m-1]:e;return M=typeof M=="function"?(o.pop(),M):e,Ib(o,M)});function Lb(o){var m=J(o);return m.__chain__=!0,m}function OR(o,m){return m(o),o}function nu(o,m){return m(o)}var NR=zo(function(o){var m=o.length,M=m?o[0]:0,j=this.__wrapped__,G=function(ne){return Rd(ne,o)};return m>1||this.__actions__.length||!(j instanceof Ut)||!Ho(M)?this.thru(G):(j=j.slice(M,+M+(m?1:0)),j.__actions__.push({func:nu,args:[G],thisArg:e}),new Hi(j,this.__chain__).thru(function(ne){return m&&!ne.length&&ne.push(e),ne}))});function DR(){return Lb(this)}function FR(){return new Hi(this.value(),this.__chain__)}function PR(){this.__values__===e&&(this.__values__=Kb(this.value()));var o=this.__index__>=this.__values__.length,m=o?e:this.__values__[this.__index__++];return{done:o,value:m}}function WR(){return this}function BR(o){for(var m,M=this;M instanceof zc;){var j=Ab(M);j.__index__=0,j.__values__=e,m?G.__wrapped__=j:m=j;var G=j;M=M.__wrapped__}return G.__wrapped__=o,m}function zR(){var o=this.__wrapped__;if(o instanceof Ut){var m=o;return this.__actions__.length&&(m=new Ut(this)),m=m.reverse(),m.__actions__.push({func:nu,args:[ap],thisArg:e}),new Hi(m,this.__chain__)}return this.thru(ap)}function HR(){return qw(this.__wrapped__,this.__actions__)}var jR=qc(function(o,m,M){un.call(o,M)?++o[M]:Wo(o,M,1)});function UR(o,m,M){var j=kt(o)?$r:OI;return M&&Zr(o,m,M)&&(m=e),j(o,gt(m,3))}function VR(o,m){var M=kt(o)?Nr:Iw;return M(o,gt(m,3))}var KR=ob(_b),GR=ob($b);function qR(o,m){return Tr(ru(o,m),1)}function YR(o,m){return Tr(ru(o,m),z)}function XR(o,m,M){return M=M===e?1:Mt(M),Tr(ru(o,m),M)}function Rb(o,m){var M=kt(o)?_r:us;return M(o,gt(m,3))}function Ob(o,m){var M=kt(o)?Bs:Ew;return M(o,gt(m,3))}var ZR=qc(function(o,m,M){un.call(o,M)?o[M].push(m):Wo(o,M,[m])});function QR(o,m,M,j){o=di(o)?o:Ia(o),M=M&&!j?Mt(M):0;var G=o.length;return M<0&&(M=gr(G+M,0)),lu(o)?M<=G&&o.indexOf(m,M)>-1:!!G&&ae(o,m,M)>-1}var JR=Pt(function(o,m,M){var j=-1,G=typeof m=="function",ne=di(o)?Ce(o.length):[];return us(o,function(ce){ne[++j]=G?xr(m,ce,M):yl(ce,m,M)}),ne}),eO=qc(function(o,m,M){Wo(o,M,m)});function ru(o,m){var M=kt(o)?y:Fw;return M(o,gt(m,3))}function tO(o,m,M,j){return o==null?[]:(kt(m)||(m=m==null?[]:[m]),M=j?e:M,kt(M)||(M=M==null?[]:[M]),zw(o,m,M))}var nO=qc(function(o,m,M){o[M?0:1].push(m)},function(){return[[],[]]});function rO(o,m,M){var j=kt(o)?A:Re,G=arguments.length<3;return j(o,gt(m,4),M,G,us)}function iO(o,m,M){var j=kt(o)?F:Re,G=arguments.length<3;return j(o,gt(m,4),M,G,Ew)}function oO(o,m){var M=kt(o)?Nr:Iw;return M(o,su(gt(m,3)))}function sO(o){var m=kt(o)?_w:QI;return m(o)}function aO(o,m,M){(M?Zr(o,m,M):m===e)?m=1:m=Mt(m);var j=kt(o)?MI:JI;return j(o,m)}function lO(o){var m=kt(o)?EI:tL;return m(o)}function cO(o){if(o==null)return 0;if(di(o))return lu(o)?Wt(o):o.length;var m=Fr(o);return m==et||m==Rn?o.size:Wd(o).length}function uO(o,m,M){var j=kt(o)?W:nL;return M&&Zr(o,m,M)&&(m=e),j(o,gt(m,3))}var hO=Pt(function(o,m){if(o==null)return[];var M=m.length;return M>1&&Zr(o,m[0],m[1])?m=[]:M>2&&Zr(m[0],m[1],m[2])&&(m=[m[0]]),zw(o,Tr(m,1),[])}),iu=VE||function(){return pn.Date.now()};function dO(o,m){if(typeof m!="function")throw new fn(v);return o=Mt(o),function(){if(--o<1)return m.apply(this,arguments)}}function Nb(o,m,M){return m=M?e:m,m=o&&m==null?o.length:m,Bo(o,R,e,e,e,e,m)}function Db(o,m){var M;if(typeof m!="function")throw new fn(v);return o=Mt(o),function(){return--o>0&&(M=m.apply(this,arguments)),o<=1&&(m=e),M}}var cp=Pt(function(o,m,M){var j=d;if(M.length){var G=Be(M,Ma(cp));j|=S}return Bo(o,j,m,M,G)}),Fb=Pt(function(o,m,M){var j=d|w;if(M.length){var G=Be(M,Ma(Fb));j|=S}return Bo(m,j,o,M,G)});function Pb(o,m,M){m=M?e:m;var j=Bo(o,I,e,e,e,e,e,m);return j.placeholder=Pb.placeholder,j}function Wb(o,m,M){m=M?e:m;var j=Bo(o,$,e,e,e,e,e,m);return j.placeholder=Wb.placeholder,j}function Bb(o,m,M){var j,G,ne,ce,pe,ye,Ie=0,Le=!1,Fe=!1,qe=!0;if(typeof o!="function")throw new fn(v);m=Ki(m)||0,Pn(M)&&(Le=!!M.leading,Fe="maxWait"in M,ne=Fe?gr(Ki(M.maxWait)||0,m):ne,qe="trailing"in M?!!M.trailing:qe);function nt(Zn){var oo=j,Vo=G;return j=G=e,Ie=Zn,ce=o.apply(Vo,oo),ce}function mt(Zn){return Ie=Zn,pe=kl(zt,m),Le?nt(Zn):ce}function It(Zn){var oo=Zn-ye,Vo=Zn-Ie,o0=m-oo;return Fe?Dr(o0,ne-Vo):o0}function vt(Zn){var oo=Zn-ye,Vo=Zn-Ie;return ye===e||oo>=m||oo<0||Fe&&Vo>=ne}function zt(){var Zn=iu();if(vt(Zn))return Gt(Zn);pe=kl(zt,It(Zn))}function Gt(Zn){return pe=e,qe&&j?nt(Zn):(j=G=e,ce)}function Mi(){pe!==e&&Xw(pe),Ie=0,j=ye=G=pe=e}function Qr(){return pe===e?ce:Gt(iu())}function Ei(){var Zn=iu(),oo=vt(Zn);if(j=arguments,G=this,ye=Zn,oo){if(pe===e)return mt(ye);if(Fe)return Xw(pe),pe=kl(zt,m),nt(ye)}return pe===e&&(pe=kl(zt,m)),ce}return Ei.cancel=Mi,Ei.flush=Qr,Ei}var pO=Pt(function(o,m){return Mw(o,1,m)}),fO=Pt(function(o,m,M){return Mw(o,Ki(m)||0,M)});function gO(o){return Bo(o,L)}function ou(o,m){if(typeof o!="function"||m!=null&&typeof m!="function")throw new fn(v);var M=function(){var j=arguments,G=m?m.apply(this,j):j[0],ne=M.cache;if(ne.has(G))return ne.get(G);var ce=o.apply(this,j);return M.cache=ne.set(G,ce)||ne,ce};return M.cache=new(ou.Cache||Po),M}ou.Cache=Po;function su(o){if(typeof o!="function")throw new fn(v);return function(){var m=arguments;switch(m.length){case 0:return!o.call(this);case 1:return!o.call(this,m[0]);case 2:return!o.call(this,m[0],m[1]);case 3:return!o.call(this,m[0],m[1],m[2])}return!o.apply(this,m)}}function mO(o){return Db(2,o)}var vO=rL(function(o,m){m=m.length==1&&kt(m[0])?y(m[0],at(gt())):y(Tr(m,1),at(gt()));var M=m.length;return Pt(function(j){for(var G=-1,ne=Dr(j.length,M);++G<ne;)j[G]=m[G].call(this,j[G]);return xr(o,this,j)})}),up=Pt(function(o,m){var M=Be(m,Ma(up));return Bo(o,S,e,m,M)}),zb=Pt(function(o,m){var M=Be(m,Ma(zb));return Bo(o,C,e,m,M)}),yO=zo(function(o,m){return Bo(o,N,e,e,e,m)});function wO(o,m){if(typeof o!="function")throw new fn(v);return m=m===e?m:Mt(m),Pt(o,m)}function bO(o,m){if(typeof o!="function")throw new fn(v);return m=m==null?0:gr(Mt(m),0),Pt(function(M){var j=M[m],G=ps(M,0,m);return j&&T(G,j),xr(o,this,G)})}function xO(o,m,M){var j=!0,G=!0;if(typeof o!="function")throw new fn(v);return Pn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Bb(o,m,{leading:j,maxWait:m,trailing:G})}function CO(o){return Nb(o,1)}function kO(o,m){return up(qd(m),o)}function SO(){if(!arguments.length)return[];var o=arguments[0];return kt(o)?o:[o]}function AO(o){return ji(o,c)}function _O(o,m){return m=typeof m=="function"?m:e,ji(o,c,m)}function $O(o){return ji(o,a|c)}function TO(o,m){return m=typeof m=="function"?m:e,ji(o,a|c,m)}function MO(o,m){return m==null||Tw(o,m,Ar(m))}function io(o,m){return o===m||o!==o&&m!==m}var EO=Qc(Dd),IO=Qc(function(o,m){return o>=m}),Ys=Ow(function(){return arguments}())?Ow:function(o){return Vn(o)&&un.call(o,"callee")&&!bw.call(o,"callee")},kt=Ce.isArray,LO=ui?at(ui):BI;function di(o){return o!=null&&au(o.length)&&!jo(o)}function Xn(o){return Vn(o)&&di(o)}function RO(o){return o===!0||o===!1||Vn(o)&&Xr(o)==_e}var fs=GE||xp,OO=ls?at(ls):zI;function NO(o){return Vn(o)&&o.nodeType===1&&!Sl(o)}function DO(o){if(o==null)return!0;if(di(o)&&(kt(o)||typeof o=="string"||typeof o.splice=="function"||fs(o)||Ea(o)||Ys(o)))return!o.length;var m=Fr(o);if(m==et||m==Rn)return!o.size;if(Cl(o))return!Wd(o).length;for(var M in o)if(un.call(o,M))return!1;return!0}function FO(o,m){return wl(o,m)}function PO(o,m,M){M=typeof M=="function"?M:e;var j=M?M(o,m):e;return j===e?wl(o,m,e,M):!!j}function hp(o){if(!Vn(o))return!1;var m=Xr(o);return m==Xe||m==Me||typeof o.message=="string"&&typeof o.name=="string"&&!Sl(o)}function WO(o){return typeof o=="number"&&Cw(o)}function jo(o){if(!Pn(o))return!1;var m=Xr(o);return m==Ue||m==ct||m==me||m==yr}function Hb(o){return typeof o=="number"&&o==Mt(o)}function au(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function Pn(o){var m=typeof o;return o!=null&&(m=="object"||m=="function")}function Vn(o){return o!=null&&typeof o=="object"}var jb=jn?at(jn):jI;function BO(o,m){return o===m||Pd(o,m,tp(m))}function zO(o,m,M){return M=typeof M=="function"?M:e,Pd(o,m,tp(m),M)}function HO(o){return Ub(o)&&o!=+o}function jO(o){if(_L(o))throw new lt(g);return Nw(o)}function UO(o){return o===null}function VO(o){return o==null}function Ub(o){return typeof o=="number"||Vn(o)&&Xr(o)==ht}function Sl(o){if(!Vn(o)||Xr(o)!=hn)return!1;var m=Oc(o);if(m===null)return!0;var M=un.call(m,"constructor")&&m.constructor;return typeof M=="function"&&M instanceof M&&Ec.call(M)==zE}var dp=ki?at(ki):UI;function KO(o){return Hb(o)&&o>=-U&&o<=U}var Vb=Si?at(Si):VI;function lu(o){return typeof o=="string"||!kt(o)&&Vn(o)&&Xr(o)==tr}function Ti(o){return typeof o=="symbol"||Vn(o)&&Xr(o)==ur}var Ea=Bi?at(Bi):KI;function GO(o){return o===e}function qO(o){return Vn(o)&&Fr(o)==je}function YO(o){return Vn(o)&&Xr(o)==Rt}var XO=Qc(Bd),ZO=Qc(function(o,m){return o<=m});function Kb(o){if(!o)return[];if(di(o))return lu(o)?xt(o):hi(o);if(hl&&o[hl])return xe(o[hl]());var m=Fr(o),M=m==et?Ee:m==Rn?Ge:Ia;return M(o)}function Uo(o){if(!o)return o===0?o:0;if(o=Ki(o),o===z||o===-z){var m=o<0?-1:1;return m*q}return o===o?o:0}function Mt(o){var m=Uo(o),M=m%1;return m===m?M?m-M:m:0}function Gb(o){return o?Vs(Mt(o),0,ee):0}function Ki(o){if(typeof o=="number")return o;if(Ti(o))return X;if(Pn(o)){var m=typeof o.valueOf=="function"?o.valueOf():o;o=Pn(m)?m+"":m}if(typeof o!="string")return o===0?o:+o;o=Cn(o);var M=Jo.test(o);return M||ze.test(o)?xn(o.slice(2),M?2:8):Nt.test(o)?X:+o}function qb(o){return bo(o,pi(o))}function QO(o){return o?Vs(Mt(o),-U,U):o===0?o:0}function ln(o){return o==null?"":$i(o)}var JO=$a(function(o,m){if(Cl(m)||di(m)){bo(m,Ar(m),o);return}for(var M in m)un.call(m,M)&&ml(o,M,m[M])}),Yb=$a(function(o,m){bo(m,pi(m),o)}),cu=$a(function(o,m,M,j){bo(m,pi(m),o,j)}),e2=$a(function(o,m,M,j){bo(m,Ar(m),o,j)}),t2=zo(Rd);function n2(o,m){var M=_a(o);return m==null?M:$w(M,m)}var r2=Pt(function(o,m){o=Et(o);var M=-1,j=m.length,G=j>2?m[2]:e;for(G&&Zr(m[0],m[1],G)&&(j=1);++M<j;)for(var ne=m[M],ce=pi(ne),pe=-1,ye=ce.length;++pe<ye;){var Ie=ce[pe],Le=o[Ie];(Le===e||io(Le,Un[Ie])&&!un.call(o,Ie))&&(o[Ie]=ne[Ie])}return o}),i2=Pt(function(o){return o.push(e,db),xr(Xb,e,o)});function o2(o,m){return Q(o,gt(m,3),wo)}function s2(o,m){return Q(o,gt(m,3),Nd)}function a2(o,m){return o==null?o:Od(o,gt(m,3),pi)}function l2(o,m){return o==null?o:Lw(o,gt(m,3),pi)}function c2(o,m){return o&&wo(o,gt(m,3))}function u2(o,m){return o&&Nd(o,gt(m,3))}function h2(o){return o==null?[]:Uc(o,Ar(o))}function d2(o){return o==null?[]:Uc(o,pi(o))}function pp(o,m,M){var j=o==null?e:Ks(o,m);return j===e?M:j}function p2(o,m){return o!=null&&gb(o,m,DI)}function fp(o,m){return o!=null&&gb(o,m,FI)}var f2=ab(function(o,m,M){m!=null&&typeof m.toString!="function"&&(m=Ic.call(m)),o[m]=M},mp(fi)),g2=ab(function(o,m,M){m!=null&&typeof m.toString!="function"&&(m=Ic.call(m)),un.call(o,m)?o[m].push(M):o[m]=[M]},gt),m2=Pt(yl);function Ar(o){return di(o)?Aw(o):Wd(o)}function pi(o){return di(o)?Aw(o,!0):GI(o)}function v2(o,m){var M={};return m=gt(m,3),wo(o,function(j,G,ne){Wo(M,m(j,G,ne),j)}),M}function y2(o,m){var M={};return m=gt(m,3),wo(o,function(j,G,ne){Wo(M,G,m(j,G,ne))}),M}var w2=$a(function(o,m,M){Vc(o,m,M)}),Xb=$a(function(o,m,M,j){Vc(o,m,M,j)}),b2=zo(function(o,m){var M={};if(o==null)return M;var j=!1;m=y(m,function(ne){return ne=ds(ne,o),j||(j=ne.length>1),ne}),bo(o,Jd(o),M),j&&(M=ji(M,a|u|c,fL));for(var G=m.length;G--;)Vd(M,m[G]);return M});function x2(o,m){return Zb(o,su(gt(m)))}var C2=zo(function(o,m){return o==null?{}:YI(o,m)});function Zb(o,m){if(o==null)return{};var M=y(Jd(o),function(j){return[j]});return m=gt(m),Hw(o,M,function(j,G){return m(j,G[0])})}function k2(o,m,M){m=ds(m,o);var j=-1,G=m.length;for(G||(G=1,o=e);++j<G;){var ne=o==null?e:o[xo(m[j])];ne===e&&(j=G,ne=M),o=jo(ne)?ne.call(o):ne}return o}function S2(o,m,M){return o==null?o:bl(o,m,M)}function A2(o,m,M,j){return j=typeof j=="function"?j:e,o==null?o:bl(o,m,M,j)}var Qb=ub(Ar),Jb=ub(pi);function _2(o,m,M){var j=kt(o),G=j||fs(o)||Ea(o);if(m=gt(m,4),M==null){var ne=o&&o.constructor;G?M=j?new ne:[]:Pn(o)?M=jo(ne)?_a(Oc(o)):{}:M={}}return(G?_r:wo)(o,function(ce,pe,ye){return m(M,ce,pe,ye)}),M}function $2(o,m){return o==null?!0:Vd(o,m)}function T2(o,m,M){return o==null?o:Gw(o,m,qd(M))}function M2(o,m,M,j){return j=typeof j=="function"?j:e,o==null?o:Gw(o,m,qd(M),j)}function Ia(o){return o==null?[]:Tn(o,Ar(o))}function E2(o){return o==null?[]:Tn(o,pi(o))}function I2(o,m,M){return M===e&&(M=m,m=e),M!==e&&(M=Ki(M),M=M===M?M:0),m!==e&&(m=Ki(m),m=m===m?m:0),Vs(Ki(o),m,M)}function L2(o,m,M){return m=Uo(m),M===e?(M=m,m=0):M=Uo(M),o=Ki(o),PI(o,m,M)}function R2(o,m,M){if(M&&typeof M!="boolean"&&Zr(o,m,M)&&(m=M=e),M===e&&(typeof m=="boolean"?(M=m,m=e):typeof o=="boolean"&&(M=o,o=e)),o===e&&m===e?(o=0,m=1):(o=Uo(o),m===e?(m=o,o=0):m=Uo(m)),o>m){var j=o;o=m,m=j}if(M||o%1||m%1){var G=kw();return Dr(o+G*(m-o+He("1e-"+((G+"").length-1))),m)}return Hd(o,m)}var O2=Ta(function(o,m,M){return m=m.toLowerCase(),o+(M?e0(m):m)});function e0(o){return gp(ln(o).toLowerCase())}function t0(o){return o=ln(o),o&&o.replace(dt,Mn).replace(Oo,"")}function N2(o,m,M){o=ln(o),m=$i(m);var j=o.length;M=M===e?j:Vs(Mt(M),0,j);var G=M;return M-=m.length,M>=0&&o.slice(M,G)==m}function D2(o){return o=ln(o),o&&Os.test(o)?o.replace(Ur,V):o}function F2(o){return o=ln(o),o&&bi.test(o)?o.replace(dr,"\\$&"):o}var P2=Ta(function(o,m,M){return o+(M?"-":"")+m.toLowerCase()}),W2=Ta(function(o,m,M){return o+(M?" ":"")+m.toLowerCase()}),B2=ib("toLowerCase");function z2(o,m,M){o=ln(o),m=Mt(m);var j=m?Wt(o):0;if(!m||j>=m)return o;var G=(m-j)/2;return Zc(Pc(G),M)+o+Zc(Fc(G),M)}function H2(o,m,M){o=ln(o),m=Mt(m);var j=m?Wt(o):0;return m&&j<m?o+Zc(m-j,M):o}function j2(o,m,M){o=ln(o),m=Mt(m);var j=m?Wt(o):0;return m&&j<m?Zc(m-j,M)+o:o}function U2(o,m,M){return M||m==null?m=0:m&&(m=+m),ZE(ln(o).replace(tn,""),m||0)}function V2(o,m,M){return(M?Zr(o,m,M):m===e)?m=1:m=Mt(m),jd(ln(o),m)}function K2(){var o=arguments,m=ln(o[0]);return o.length<3?m:m.replace(o[1],o[2])}var G2=Ta(function(o,m,M){return o+(M?"_":"")+m.toLowerCase()});function q2(o,m,M){return M&&typeof M!="number"&&Zr(o,m,M)&&(m=M=e),M=M===e?ee:M>>>0,M?(o=ln(o),o&&(typeof m=="string"||m!=null&&!dp(m))&&(m=$i(m),!m&&oe(o))?ps(xt(o),0,M):o.split(m,M)):[]}var Y2=Ta(function(o,m,M){return o+(M?" ":"")+gp(m)});function X2(o,m,M){return o=ln(o),M=M==null?0:Vs(Mt(M),0,o.length),m=$i(m),o.slice(M,M+m.length)==m}function Z2(o,m,M){var j=J.templateSettings;M&&Zr(o,m,M)&&(m=e),o=ln(o),m=cu({},m,j,hb);var G=cu({},m.imports,j.imports,hb),ne=Ar(G),ce=Tn(G,ne),pe,ye,Ie=0,Le=m.interpolate||an,Fe="__p += '",qe=Yr((m.escape||an).source+"|"+Le.source+"|"+(Le===_o?ai:an).source+"|"+(m.evaluate||an).source+"|$","g"),nt="//# sourceURL="+(un.call(m,"sourceURL")?(m.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yo+"]")+`
1472
+ `;o.replace(qe,function(vt,zt,Gt,Mi,Qr,Ei){return Gt||(Gt=Mi),Fe+=o.slice(Ie,Ei).replace(Dt,Z),zt&&(pe=!0,Fe+=`' +
1473
+ __e(`+zt+`) +
1474
+ '`),Qr&&(ye=!0,Fe+=`';
1475
+ `+Qr+`;
1476
+ __p += '`),Gt&&(Fe+=`' +
1477
+ ((__t = (`+Gt+`)) == null ? '' : __t) +
1478
+ '`),Ie=Ei+vt.length,vt}),Fe+=`';
1479
+ `;var mt=un.call(m,"variable")&&m.variable;if(!mt)Fe=`with (obj) {
1480
+ `+Fe+`
1481
+ }
1482
+ `;else if(Kr.test(mt))throw new lt(b);Fe=(ye?Fe.replace(wi,""):Fe).replace(Rr,"$1").replace(oi,"$1;"),Fe="function("+(mt||"obj")+`) {
1483
+ `+(mt?"":`obj || (obj = {});
1484
+ `)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(ye?`, __j = Array.prototype.join;
1485
+ function print() { __p += __j.call(arguments, '') }
1486
+ `:`;
1487
+ `)+Fe+`return __p
1488
+ }`;var It=r0(function(){return $t(ne,nt+"return "+Fe).apply(e,ce)});if(It.source=Fe,hp(It))throw It;return It}function Q2(o){return ln(o).toLowerCase()}function J2(o){return ln(o).toUpperCase()}function eN(o,m,M){if(o=ln(o),o&&(M||m===e))return Cn(o);if(!o||!(m=$i(m)))return o;var j=xt(o),G=xt(m),ne=_t(j,G),ce=or(j,G)+1;return ps(j,ne,ce).join("")}function tN(o,m,M){if(o=ln(o),o&&(M||m===e))return o.slice(0,Ft(o)+1);if(!o||!(m=$i(m)))return o;var j=xt(o),G=or(j,xt(m))+1;return ps(j,0,G).join("")}function nN(o,m,M){if(o=ln(o),o&&(M||m===e))return o.replace(tn,"");if(!o||!(m=$i(m)))return o;var j=xt(o),G=_t(j,xt(m));return ps(j,G).join("")}function rN(o,m){var M=E,j=B;if(Pn(m)){var G="separator"in m?m.separator:G;M="length"in m?Mt(m.length):M,j="omission"in m?$i(m.omission):j}o=ln(o);var ne=o.length;if(oe(o)){var ce=xt(o);ne=ce.length}if(M>=ne)return o;var pe=M-Wt(j);if(pe<1)return j;var ye=ce?ps(ce,0,pe).join(""):o.slice(0,pe);if(G===e)return ye+j;if(ce&&(pe+=ye.length-pe),dp(G)){if(o.slice(pe).search(G)){var Ie,Le=ye;for(G.global||(G=Yr(G.source,ln(Or.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Le);)var Fe=Ie.index;ye=ye.slice(0,Fe===e?pe:Fe)}}else if(o.indexOf($i(G),pe)!=pe){var qe=ye.lastIndexOf(G);qe>-1&&(ye=ye.slice(0,qe))}return ye+j}function iN(o){return o=ln(o),o&&po.test(o)?o.replace(hr,ft):o}var oN=Ta(function(o,m,M){return o+(M?" ":"")+m.toUpperCase()}),gp=ib("toUpperCase");function n0(o,m,M){return o=ln(o),m=M?e:m,m===e?ge(o)?En(o):Y(o):o.match(m)||[]}var r0=Pt(function(o,m){try{return xr(o,e,m)}catch(M){return hp(M)?M:new lt(M)}}),sN=zo(function(o,m){return _r(m,function(M){M=xo(M),Wo(o,M,cp(o[M],o))}),o});function aN(o){var m=o==null?0:o.length,M=gt();return o=m?y(o,function(j){if(typeof j[1]!="function")throw new fn(v);return[M(j[0]),j[1]]}):[],Pt(function(j){for(var G=-1;++G<m;){var ne=o[G];if(xr(ne[0],this,j))return xr(ne[1],this,j)}})}function lN(o){return RI(ji(o,a))}function mp(o){return function(){return o}}function cN(o,m){return o==null||o!==o?m:o}var uN=sb(),hN=sb(!0);function fi(o){return o}function vp(o){return Dw(typeof o=="function"?o:ji(o,a))}function dN(o){return Pw(ji(o,a))}function pN(o,m){return Ww(o,ji(m,a))}var fN=Pt(function(o,m){return function(M){return yl(M,o,m)}}),gN=Pt(function(o,m){return function(M){return yl(o,M,m)}});function yp(o,m,M){var j=Ar(m),G=Uc(m,j);M==null&&!(Pn(m)&&(G.length||!j.length))&&(M=m,m=o,o=this,G=Uc(m,Ar(m)));var ne=!(Pn(M)&&"chain"in M)||!!M.chain,ce=jo(o);return _r(G,function(pe){var ye=m[pe];o[pe]=ye,ce&&(o.prototype[pe]=function(){var Ie=this.__chain__;if(ne||Ie){var Le=o(this.__wrapped__),Fe=Le.__actions__=hi(this.__actions__);return Fe.push({func:ye,args:arguments,thisArg:o}),Le.__chain__=Ie,Le}return ye.apply(o,T([this.value()],arguments))})}),o}function mN(){return pn._===this&&(pn._=HE),this}function wp(){}function vN(o){return o=Mt(o),Pt(function(m){return Bw(m,o)})}var yN=Xd(y),wN=Xd($r),bN=Xd(W);function i0(o){return rp(o)?be(xo(o)):XI(o)}function xN(o){return function(m){return o==null?e:Ks(o,m)}}var CN=lb(),kN=lb(!0);function bp(){return[]}function xp(){return!1}function SN(){return{}}function AN(){return""}function _N(){return!0}function $N(o,m){if(o=Mt(o),o<1||o>U)return[];var M=ee,j=Dr(o,ee);m=gt(m),o-=ee;for(var G=Ze(j,m);++M<o;)m(M);return G}function TN(o){return kt(o)?y(o,xo):Ti(o)?[o]:hi(Sb(ln(o)))}function MN(o){var m=++BE;return ln(o)+m}var EN=Xc(function(o,m){return o+m},0),IN=Zd("ceil"),LN=Xc(function(o,m){return o/m},1),RN=Zd("floor");function ON(o){return o&&o.length?jc(o,fi,Dd):e}function NN(o,m){return o&&o.length?jc(o,gt(m,2),Dd):e}function DN(o){return ve(o,fi)}function FN(o,m){return ve(o,gt(m,2))}function PN(o){return o&&o.length?jc(o,fi,Bd):e}function WN(o,m){return o&&o.length?jc(o,gt(m,2),Bd):e}var BN=Xc(function(o,m){return o*m},1),zN=Zd("round"),HN=Xc(function(o,m){return o-m},0);function jN(o){return o&&o.length?st(o,fi):0}function UN(o,m){return o&&o.length?st(o,gt(m,2)):0}return J.after=dO,J.ary=Nb,J.assign=JO,J.assignIn=Yb,J.assignInWith=cu,J.assignWith=e2,J.at=t2,J.before=Db,J.bind=cp,J.bindAll=sN,J.bindKey=Fb,J.castArray=SO,J.chain=Lb,J.chunk=RL,J.compact=OL,J.concat=NL,J.cond=aN,J.conforms=lN,J.constant=mp,J.countBy=jR,J.create=n2,J.curry=Pb,J.curryRight=Wb,J.debounce=Bb,J.defaults=r2,J.defaultsDeep=i2,J.defer=pO,J.delay=fO,J.difference=DL,J.differenceBy=FL,J.differenceWith=PL,J.drop=WL,J.dropRight=BL,J.dropRightWhile=zL,J.dropWhile=HL,J.fill=jL,J.filter=VR,J.flatMap=qR,J.flatMapDeep=YR,J.flatMapDepth=XR,J.flatten=Tb,J.flattenDeep=UL,J.flattenDepth=VL,J.flip=gO,J.flow=uN,J.flowRight=hN,J.fromPairs=KL,J.functions=h2,J.functionsIn=d2,J.groupBy=ZR,J.initial=qL,J.intersection=YL,J.intersectionBy=XL,J.intersectionWith=ZL,J.invert=f2,J.invertBy=g2,J.invokeMap=JR,J.iteratee=vp,J.keyBy=eO,J.keys=Ar,J.keysIn=pi,J.map=ru,J.mapKeys=v2,J.mapValues=y2,J.matches=dN,J.matchesProperty=pN,J.memoize=ou,J.merge=w2,J.mergeWith=Xb,J.method=fN,J.methodOf=gN,J.mixin=yp,J.negate=su,J.nthArg=vN,J.omit=b2,J.omitBy=x2,J.once=mO,J.orderBy=tO,J.over=yN,J.overArgs=vO,J.overEvery=wN,J.overSome=bN,J.partial=up,J.partialRight=zb,J.partition=nO,J.pick=C2,J.pickBy=Zb,J.property=i0,J.propertyOf=xN,J.pull=tR,J.pullAll=Eb,J.pullAllBy=nR,J.pullAllWith=rR,J.pullAt=iR,J.range=CN,J.rangeRight=kN,J.rearg=yO,J.reject=oO,J.remove=oR,J.rest=wO,J.reverse=ap,J.sampleSize=aO,J.set=S2,J.setWith=A2,J.shuffle=lO,J.slice=sR,J.sortBy=hO,J.sortedUniq=pR,J.sortedUniqBy=fR,J.split=q2,J.spread=bO,J.tail=gR,J.take=mR,J.takeRight=vR,J.takeRightWhile=yR,J.takeWhile=wR,J.tap=OR,J.throttle=xO,J.thru=nu,J.toArray=Kb,J.toPairs=Qb,J.toPairsIn=Jb,J.toPath=TN,J.toPlainObject=qb,J.transform=_2,J.unary=CO,J.union=bR,J.unionBy=xR,J.unionWith=CR,J.uniq=kR,J.uniqBy=SR,J.uniqWith=AR,J.unset=$2,J.unzip=lp,J.unzipWith=Ib,J.update=T2,J.updateWith=M2,J.values=Ia,J.valuesIn=E2,J.without=_R,J.words=n0,J.wrap=kO,J.xor=$R,J.xorBy=TR,J.xorWith=MR,J.zip=ER,J.zipObject=IR,J.zipObjectDeep=LR,J.zipWith=RR,J.entries=Qb,J.entriesIn=Jb,J.extend=Yb,J.extendWith=cu,yp(J,J),J.add=EN,J.attempt=r0,J.camelCase=O2,J.capitalize=e0,J.ceil=IN,J.clamp=I2,J.clone=AO,J.cloneDeep=$O,J.cloneDeepWith=TO,J.cloneWith=_O,J.conformsTo=MO,J.deburr=t0,J.defaultTo=cN,J.divide=LN,J.endsWith=N2,J.eq=io,J.escape=D2,J.escapeRegExp=F2,J.every=UR,J.find=KR,J.findIndex=_b,J.findKey=o2,J.findLast=GR,J.findLastIndex=$b,J.findLastKey=s2,J.floor=RN,J.forEach=Rb,J.forEachRight=Ob,J.forIn=a2,J.forInRight=l2,J.forOwn=c2,J.forOwnRight=u2,J.get=pp,J.gt=EO,J.gte=IO,J.has=p2,J.hasIn=fp,J.head=Mb,J.identity=fi,J.includes=QR,J.indexOf=GL,J.inRange=L2,J.invoke=m2,J.isArguments=Ys,J.isArray=kt,J.isArrayBuffer=LO,J.isArrayLike=di,J.isArrayLikeObject=Xn,J.isBoolean=RO,J.isBuffer=fs,J.isDate=OO,J.isElement=NO,J.isEmpty=DO,J.isEqual=FO,J.isEqualWith=PO,J.isError=hp,J.isFinite=WO,J.isFunction=jo,J.isInteger=Hb,J.isLength=au,J.isMap=jb,J.isMatch=BO,J.isMatchWith=zO,J.isNaN=HO,J.isNative=jO,J.isNil=VO,J.isNull=UO,J.isNumber=Ub,J.isObject=Pn,J.isObjectLike=Vn,J.isPlainObject=Sl,J.isRegExp=dp,J.isSafeInteger=KO,J.isSet=Vb,J.isString=lu,J.isSymbol=Ti,J.isTypedArray=Ea,J.isUndefined=GO,J.isWeakMap=qO,J.isWeakSet=YO,J.join=QL,J.kebabCase=P2,J.last=Vi,J.lastIndexOf=JL,J.lowerCase=W2,J.lowerFirst=B2,J.lt=XO,J.lte=ZO,J.max=ON,J.maxBy=NN,J.mean=DN,J.meanBy=FN,J.min=PN,J.minBy=WN,J.stubArray=bp,J.stubFalse=xp,J.stubObject=SN,J.stubString=AN,J.stubTrue=_N,J.multiply=BN,J.nth=eR,J.noConflict=mN,J.noop=wp,J.now=iu,J.pad=z2,J.padEnd=H2,J.padStart=j2,J.parseInt=U2,J.random=R2,J.reduce=rO,J.reduceRight=iO,J.repeat=V2,J.replace=K2,J.result=k2,J.round=zN,J.runInContext=fe,J.sample=sO,J.size=cO,J.snakeCase=G2,J.some=uO,J.sortedIndex=aR,J.sortedIndexBy=lR,J.sortedIndexOf=cR,J.sortedLastIndex=uR,J.sortedLastIndexBy=hR,J.sortedLastIndexOf=dR,J.startCase=Y2,J.startsWith=X2,J.subtract=HN,J.sum=jN,J.sumBy=UN,J.template=Z2,J.times=$N,J.toFinite=Uo,J.toInteger=Mt,J.toLength=Gb,J.toLower=Q2,J.toNumber=Ki,J.toSafeInteger=QO,J.toString=ln,J.toUpper=J2,J.trim=eN,J.trimEnd=tN,J.trimStart=nN,J.truncate=rN,J.unescape=iN,J.uniqueId=MN,J.upperCase=oN,J.upperFirst=gp,J.each=Rb,J.eachRight=Ob,J.first=Mb,yp(J,function(){var o={};return wo(J,function(m,M){un.call(J.prototype,M)||(o[M]=m)}),o}(),{chain:!1}),J.VERSION=r,_r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){J[o].placeholder=J}),_r(["drop","take"],function(o,m){Ut.prototype[o]=function(M){M=M===e?1:gr(Mt(M),0);var j=this.__filtered__&&!m?new Ut(this):this.clone();return j.__filtered__?j.__takeCount__=Dr(M,j.__takeCount__):j.__views__.push({size:Dr(M,ee),type:o+(j.__dir__<0?"Right":"")}),j},Ut.prototype[o+"Right"]=function(M){return this.reverse()[o](M).reverse()}}),_r(["filter","map","takeWhile"],function(o,m){var M=m+1,j=M==_||M==D;Ut.prototype[o]=function(G){var ne=this.clone();return ne.__iteratees__.push({iteratee:gt(G,3),type:M}),ne.__filtered__=ne.__filtered__||j,ne}}),_r(["head","last"],function(o,m){var M="take"+(m?"Right":"");Ut.prototype[o]=function(){return this[M](1).value()[0]}}),_r(["initial","tail"],function(o,m){var M="drop"+(m?"":"Right");Ut.prototype[o]=function(){return this.__filtered__?new Ut(this):this[M](1)}}),Ut.prototype.compact=function(){return this.filter(fi)},Ut.prototype.find=function(o){return this.filter(o).head()},Ut.prototype.findLast=function(o){return this.reverse().find(o)},Ut.prototype.invokeMap=Pt(function(o,m){return typeof o=="function"?new Ut(this):this.map(function(M){return yl(M,o,m)})}),Ut.prototype.reject=function(o){return this.filter(su(gt(o)))},Ut.prototype.slice=function(o,m){o=Mt(o);var M=this;return M.__filtered__&&(o>0||m<0)?new Ut(M):(o<0?M=M.takeRight(-o):o&&(M=M.drop(o)),m!==e&&(m=Mt(m),M=m<0?M.dropRight(-m):M.take(m-o)),M)},Ut.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ut.prototype.toArray=function(){return this.take(ee)},wo(Ut.prototype,function(o,m){var M=/^(?:filter|find|map|reject)|While$/.test(m),j=/^(?:head|last)$/.test(m),G=J[j?"take"+(m=="last"?"Right":""):m],ne=j||/^find/.test(m);G&&(J.prototype[m]=function(){var ce=this.__wrapped__,pe=j?[1]:arguments,ye=ce instanceof Ut,Ie=pe[0],Le=ye||kt(ce),Fe=function(zt){var Gt=G.apply(J,T([zt],pe));return j&&qe?Gt[0]:Gt};Le&&M&&typeof Ie=="function"&&Ie.length!=1&&(ye=Le=!1);var qe=this.__chain__,nt=!!this.__actions__.length,mt=ne&&!qe,It=ye&&!nt;if(!ne&&Le){ce=It?ce:new Ut(this);var vt=o.apply(ce,pe);return vt.__actions__.push({func:nu,args:[Fe],thisArg:e}),new Hi(vt,qe)}return mt&&It?o.apply(this,pe):(vt=this.thru(Fe),mt?j?vt.value()[0]:vt.value():vt)})}),_r(["pop","push","shift","sort","splice","unshift"],function(o){var m=Sr[o],M=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",j=/^(?:pop|shift)$/.test(o);J.prototype[o]=function(){var G=arguments;if(j&&!this.__chain__){var ne=this.value();return m.apply(kt(ne)?ne:[],G)}return this[M](function(ce){return m.apply(kt(ce)?ce:[],G)})}}),wo(Ut.prototype,function(o,m){var M=J[m];if(M){var j=M.name+"";un.call(Aa,j)||(Aa[j]=[]),Aa[j].push({name:m,func:M})}}),Aa[Yc(e,w).name]=[{name:"wrapper",func:e}],Ut.prototype.clone=iI,Ut.prototype.reverse=oI,Ut.prototype.value=sI,J.prototype.at=NR,J.prototype.chain=DR,J.prototype.commit=FR,J.prototype.next=PR,J.prototype.plant=BR,J.prototype.reverse=zR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=HR,J.prototype.first=J.prototype.head,hl&&(J.prototype[hl]=WR),J},Kt=sr();ir?((ir.exports=Kt)._=Kt,Sn._=Kt):pn._=Kt}).call(Ck)}(Gl,Gl.exports)),Gl.exports}var Sk=kk();mr("I",El(Sk)).debounce(function(){this.rebuildDisplayText()},300);var Tg={exports:{}},Mg;function Ak(){return Mg||(Mg=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Tg)),Tg.exports}Ak();const _k=!0,ar="u-",$k="uplot",Tk=ar+"hz",Mk=ar+"vt",Ek=ar+"title",Ik=ar+"wrap",Lk=ar+"under",Rk=ar+"over",Ok=ar+"axis",As=ar+"off",Nk=ar+"select",Dk=ar+"cursor-x",Fk=ar+"cursor-y",Pk=ar+"cursor-pt",Wk=ar+"legend",Bk=ar+"live",zk=ar+"inline",Hk=ar+"series",jk=ar+"marker",Eg=ar+"label",Uk=ar+"value",Ua="width",Va="height",Ka="top",Ig="bottom",oa="left",zu="right",Hu="#000",Lg=Hu+"0",ju="mousemove",Rg="mousedown",Uu="mouseup",Og="mouseenter",Ng="mouseleave",Dg="dblclick",Vk="resize",Kk="scroll",Fg="change",ql="dppxchange",Vu="--",sa=typeof window<"u",Ku=sa?document:null,aa=sa?window:null,Gk=sa?navigator:null;let Jt,Yl;function Gu(){let n=devicePixelRatio;Jt!=n&&(Jt=n,Yl&&Xu(Fg,Yl,Gu),Yl=matchMedia(`(min-resolution: ${Jt-.001}dppx) and (max-resolution: ${Jt+.001}dppx)`),_s(Fg,Yl,Gu),aa.dispatchEvent(new CustomEvent(ql)))}function gi(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function qu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function kn(n,t,e){n.style[t]=e+"px"}function Yi(n,t,e,r){let p=Ku.createElement(n);return t!=null&&gi(p,t),e!=null&&e.insertBefore(p,r),p}function Ii(n,t){return Yi("div",n,t)}const Pg=new WeakMap;function lo(n,t,e,r,p){let g="translate("+t+"px,"+e+"px)",v=Pg.get(n);g!=v&&(n.style.transform=g,Pg.set(n,g),t<0||e<0||t>r||e>p?gi(n,As):qu(n,As))}const Wg=new WeakMap;function Bg(n,t,e){let r=t+e,p=Wg.get(n);r!=p&&(Wg.set(n,r),n.style.background=t,n.style.borderColor=e)}const zg=new WeakMap;function Hg(n,t,e,r){let p=t+""+e,g=zg.get(n);p!=g&&(zg.set(n,p),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const Yu={passive:!0},qk={...Yu,capture:!0};function _s(n,t,e,r){t.addEventListener(n,e,r?qk:Yu)}function Xu(n,t,e,r){t.removeEventListener(n,e,Yu)}sa&&Gu();function Xi(n,t,e,r){let p;e=e||0,r=r||t.length-1;let g=r<=2147483647;for(;r-e>1;)p=g?e+r>>1:vi((e+r)/2),t[p]<n?e=p:r=p;return n-t[e]<=t[r]-n?e:r}function jg(n){return(t,e,r)=>{let p=-1,g=-1;for(let v=e;v<=r;v++)if(n(t[v])){p=v;break}for(let v=r;v>=e;v--)if(n(t[v])){g=v;break}return[p,g]}}const Ug=n=>n!=null,Vg=n=>n!=null&&n>0,Xl=jg(Ug),Yk=jg(Vg);function Xk(n,t,e,r=0,p=!1){let g=p?Yk:Xl,v=p?Vg:Ug;[t,e]=g(n,t,e);let b=n[t],h=n[t];if(t>-1)if(r==1)b=n[t],h=n[e];else if(r==-1)b=n[e],h=n[t];else for(let f=t;f<=e;f++){let s=n[f];v(s)&&(s<b?b=s:s>h&&(h=s))}return[b??gn,h??-gn]}function Zl(n,t,e,r){let p=qg(n),g=qg(t);n==t&&(p==-1?(n*=e,t/=e):(n/=e,t*=e));let v=e==10?ko:Yg,b=p==1?vi:Li,h=g==1?Li:vi,f=b(v(lr(n))),s=h(v(lr(t))),a=la(e,f),u=la(e,s);return e==10&&(f<0&&(a=mn(a,-f)),s<0&&(u=mn(u,-s))),r||e==2?(n=a*p,t=u*g):(n=nm(n,a),t=ec(t,u)),[n,t]}function Zu(n,t,e,r){let p=Zl(n,t,e,r);return n==0&&(p[0]=0),t==0&&(p[1]=0),p}const Qu=.1,Kg={mode:3,pad:Qu},Ga={pad:0,soft:null,mode:0},Zk={min:Ga,max:Ga};function Ql(n,t,e,r){return tc(e)?Gg(n,t,e):(Ga.pad=e,Ga.soft=r?0:null,Ga.mode=r?3:0,Gg(n,t,Zk))}function Xt(n,t){return n??t}function Qk(n,t,e){for(t=Xt(t,0),e=Xt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function Gg(n,t,e){let r=e.min,p=e.max,g=Xt(r.pad,0),v=Xt(p.pad,0),b=Xt(r.hard,-gn),h=Xt(p.hard,gn),f=Xt(r.soft,gn),s=Xt(p.soft,-gn),a=Xt(r.mode,0),u=Xt(p.mode,0),c=t-n,i=ko(c),l=Pr(lr(n),lr(t)),d=ko(l),w=lr(d-i);(c<1e-24||w>10)&&(c=0,(n==0||t==0)&&(c=1e-24,a==2&&f!=gn&&(g=0),u==2&&s!=-gn&&(v=0)));let x=c||l||1e3,I=ko(x),$=la(10,vi(I)),S=x*(c==0?n==0?.1:1:g),C=mn(nm(n-S,$/10),24),R=n>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:gn,N=Pr(b,C<R&&n>=R?R:Zi(R,C)),L=x*(c==0?t==0?.1:1:v),E=mn(ec(t+L,$/10),24),B=t<=s&&(u==1||u==3&&E>=s||u==2&&E<=s)?s:-gn,P=Zi(h,E>B&&t<=B?B:Pr(B,E));return N==P&&N==0&&(P=100),[N,P]}const Jk=new Intl.NumberFormat(sa?Gk.language:"en-US"),Ju=n=>Jk.format(n),mi=Math,Jl=mi.PI,lr=mi.abs,vi=mi.floor,cr=mi.round,Li=mi.ceil,Zi=mi.min,Pr=mi.max,la=mi.pow,qg=mi.sign,ko=mi.log10,Yg=mi.log2,eS=(n,t=1)=>mi.sinh(n)*t,eh=(n,t=1)=>mi.asinh(n/t),gn=1/0;function Xg(n){return(ko((n^n>>31)-(n>>31))|0)+1}function th(n,t,e){return Zi(Pr(n,t),e)}function Zg(n){return typeof n=="function"}function Ht(n){return Zg(n)?n:()=>n}const tS=()=>{},Qg=n=>n,Jg=(n,t)=>t,nS=n=>null,em=n=>!0,tm=(n,t)=>n==t,rS=/\.\d*?(?=9{6,}|0{6,})/gm,$s=n=>{if(im(n)||Xo.has(n))return n;const t=`${n}`,e=t.match(rS);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[p,g]=t.split("e");return+`${$s(p)}e${g}`}return mn(n,r)};function Ts(n,t){return $s(mn($s(n/t))*t)}function ec(n,t){return $s(Li($s(n/t))*t)}function nm(n,t){return $s(vi($s(n/t))*t)}function mn(n,t=0){if(im(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return cr(r)/e}const Xo=new Map;function rm(n){return((""+n).split(".")[1]||"").length}function qa(n,t,e,r){let p=[],g=r.map(rm);for(let v=t;v<e;v++){let b=lr(v),h=mn(la(n,v),b);for(let f=0;f<r.length;f++){let s=n==10?+`${r[f]}e${v}`:r[f]*h,a=(v>=0?0:b)+(v>=g[f]?0:g[f]),u=n==10?s:mn(s,a);p.push(u),Xo.set(u,a)}}return p}const Ya={},nh=[],ca=[null,null],Zo=Array.isArray,im=Number.isInteger,iS=n=>n===void 0;function om(n){return typeof n=="string"}function tc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function oS(n){return n!=null&&typeof n=="object"}const sS=Object.getPrototypeOf(Uint8Array),sm="__proto__";function ua(n,t=tc){let e;if(Zo(n)){let r=n.find(p=>p!=null);if(Zo(r)||t(r)){e=Array(n.length);for(let p=0;p<n.length;p++)e[p]=ua(n[p],t)}else e=n.slice()}else if(n instanceof sS)e=n.slice();else if(t(n)){e={};for(let r in n)r!=sm&&(e[r]=ua(n[r],t))}else e=n;return e}function Jn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let p in r)p!=sm&&(tc(n[p])?Jn(n[p],ua(r[p])):n[p]=ua(r[p]))}return n}const aS=0,lS=1,cS=2;function uS(n,t,e){for(let r=0,p,g=-1;r<t.length;r++){let v=t[r];if(v>g){for(p=v-1;p>=0&&n[p]==null;)n[p--]=null;for(p=v+1;p<e&&n[p]==null;)n[g=p++]=null}}}function hS(n,t){if(fS(n)){let v=n[0].slice();for(let b=1;b<n.length;b++)v.push(...n[b].slice(1));return gS(v[0])||(v=pS(v)),v}let e=new Set;for(let v=0;v<n.length;v++){let b=n[v][0],h=b.length;for(let f=0;f<h;f++)e.add(b[f])}let r=[Array.from(e).sort((v,b)=>v-b)],p=r[0].length,g=new Map;for(let v=0;v<p;v++)g.set(r[0][v],v);for(let v=0;v<n.length;v++){let b=n[v],h=b[0];for(let f=1;f<b.length;f++){let s=b[f],a=Array(p).fill(void 0),u=t?t[v][f]:lS,c=[];for(let i=0;i<s.length;i++){let l=s[i],d=g.get(h[i]);l===null?u!=aS&&(a[d]=l,u==cS&&c.push(d)):a[d]=l}uS(a,c,p),r.push(a)}}return r}const dS=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function pS(n){let t=n[0],e=t.length,r=Array(e);for(let g=0;g<r.length;g++)r[g]=g;r.sort((g,v)=>t[g]-t[v]);let p=[];for(let g=0;g<n.length;g++){let v=n[g],b=Array(e);for(let h=0;h<e;h++)b[h]=v[r[h]];p.push(b)}return p}function fS(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let p=n[r][0];if(p.length!=e)return!1;if(p!=t){for(let g=0;g<e;g++)if(p[g]!=t[g])return!1}}return!0}function gS(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,p=e-1;for(;r<=p&&n[r]==null;)r++;for(;p>=r&&n[p]==null;)p--;if(p<=r)return!0;const g=Pr(1,vi((p-r+1)/t));for(let v=n[r],b=r+g;b<=p;b+=g){const h=n[b];if(h!=null){if(h<=v)return!1;v=h}}return!0}const am=["January","February","March","April","May","June","July","August","September","October","November","December"],lm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function cm(n){return n.slice(0,3)}const mS=lm.map(cm),vS=am.map(cm),yS={MMMM:am,MMM:vS,WWWW:lm,WWW:mS};function Xa(n){return(n<10?"0":"")+n}function wS(n){return(n<10?"00":n<100?"0":"")+n}const bS={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>Xa(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>Xa(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>Xa(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>Xa(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>Xa(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>wS(n.getMilliseconds())};function rh(n,t){t=t||yS;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,p;for(;p=r.exec(n);)e.push(p[0][0]=="{"?bS[p[1]]:p[0]);return g=>{let v="";for(let b=0;b<e.length;b++)v+=typeof e[b]=="string"?e[b]:e[b](g,t);return v}}const xS=new Intl.DateTimeFormat().resolvedOptions().timeZone;function CS(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==xS?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const um=n=>n%1==0,nc=[1,2,2.5,5],kS=qa(10,-32,0,nc),hm=qa(10,0,32,nc),SS=hm.filter(um),Ms=kS.concat(hm),ih=`
1489
+ `,dm="{YYYY}",pm=ih+dm,fm="{M}/{D}",Za=ih+fm,rc=Za+"/{YY}",gm="{aa}",AS="{h}:{mm}",ha=AS+gm,mm=ih+ha,vm=":{ss}",sn=null;function ym(n){let t=n*1e3,e=t*60,r=e*60,p=r*24,g=p*30,v=p*365,b=(n==1?qa(10,0,3,nc).filter(um):qa(10,-3,0,nc)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,p,p*2,p*3,p*4,p*5,p*6,p*7,p*8,p*9,p*10,p*15,g,g*2,g*3,g*4,g*6,v,v*2,v*5,v*10,v*25,v*50,v*100]);const h=[[v,dm,sn,sn,sn,sn,sn,sn,1],[p*28,"{MMM}",pm,sn,sn,sn,sn,sn,1],[p,fm,pm,sn,sn,sn,sn,sn,1],[r,"{h}"+gm,rc,sn,Za,sn,sn,sn,1],[e,ha,rc,sn,Za,sn,sn,sn,1],[t,vm,rc+" "+ha,sn,Za+" "+ha,sn,mm,sn,1],[n,vm+".{fff}",rc+" "+ha,sn,Za+" "+ha,sn,mm,sn,1]];function f(s){return(a,u,c,i,l,d)=>{let w=[],x=l>=v,I=l>=g&&l<v,$=s(c),S=mn($*n,3),C=oh($.getFullYear(),x?0:$.getMonth(),I||x?1:$.getDate()),R=mn(C*n,3);if(I||x){let N=I?l/g:0,L=x?l/v:0,E=S==R?S:mn(oh(C.getFullYear()+L,C.getMonth()+N,1)*n,3),B=new Date(cr(E/n)),P=B.getFullYear(),O=B.getMonth();for(let _=0;E<=i;_++){let k=oh(P+L*_,O+N*_,1),D=k-s(mn(k*n,3));E=mn((+k+D)*n,3),E<=i&&w.push(E)}}else{let N=l>=p?p:l,L=vi(c)-vi(S),E=R+L+ec(S-R,N);w.push(E);let B=s(E),P=B.getHours()+B.getMinutes()/e+B.getSeconds()/r,O=l/r,_=a.axes[u]._space,k=d/_;for(;E=mn(E+l,n==1?0:3),!(E>i);)if(O>1){let D=vi(mn(P+O,6))%24,z=s(E).getHours()-D;z>1&&(z=-1),E-=z*r,P=(P+O)%24;let U=w[w.length-1];mn((E-U)/l,3)*k>=.7&&w.push(E)}else w.push(E)}return w}}return[b,h,f]}const[_S,$S,TS]=ym(1),[MS,ES,IS]=ym(.001);qa(2,-53,53,[1]);function wm(n,t){return n.map(e=>e.map((r,p)=>p==0||p==8||r==null?r:t(p==1||e[8]==0?r:e[1]+r)))}function bm(n,t){return(e,r,p,g,v)=>{let b=t.find(i=>v>=i[0])||t[t.length-1],h,f,s,a,u,c;return r.map(i=>{let l=n(i),d=l.getFullYear(),w=l.getMonth(),x=l.getDate(),I=l.getHours(),$=l.getMinutes(),S=l.getSeconds(),C=d!=h&&b[2]||w!=f&&b[3]||x!=s&&b[4]||I!=a&&b[5]||$!=u&&b[6]||S!=c&&b[7]||b[1];return h=d,f=w,s=x,a=I,u=$,c=S,C(l)})}}function LS(n,t){let e=rh(t);return(r,p,g,v,b)=>p.map(h=>e(n(h)))}function oh(n,t,e){return new Date(n,t,e)}function xm(n,t){return t(n)}const RS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Cm(n,t){return(e,r,p,g)=>g==null?Vu:t(n(r))}function OS(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function NS(n,t){return n.series[t].fill(n,t)}const DS={show:!0,live:!0,isolate:!1,mount:tS,markers:{show:!0,width:2,stroke:OS,fill:NS,dash:"solid"},idx:null,idxs:null,values:[]};function FS(n,t){let e=n.cursor.points,r=Ii(),p=e.size(n,t);kn(r,Ua,p),kn(r,Va,p);let g=p/-2;kn(r,"marginLeft",g),kn(r,"marginTop",g);let v=e.width(n,t,p);return v&&kn(r,"borderWidth",v),r}function PS(n,t){let e=n.series[t].points;return e._fill||e._stroke}function WS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function BS(n,t){return n.series[t].points.size}const sh=[0,0];function zS(n,t,e){return sh[0]=t,sh[1]=e,sh}function ic(n,t,e,r=!0){return p=>{p.button==0&&(!r||p.target==t)&&e(p)}}function ah(n,t,e,r=!0){return p=>{(!r||p.target==t)&&e(p)}}const HS={show:!0,x:!0,y:!0,lock:!1,move:zS,points:{one:!1,show:FS,size:BS,width:0,stroke:WS,fill:PS},bind:{mousedown:ic,mouseup:ic,click:ic,dblclick:ic,mousemove:ah,mouseleave:ah,mouseenter:ah},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,p)=>r-p,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},km={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},lh=Jn({},km,{filter:Jg}),Sm=Jn({},lh,{size:10}),Am=Jn({},km,{show:!1}),ch='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',_m="bold "+ch,$m=1.5,Tm={show:!0,scale:"x",stroke:Hu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:_m,side:2,grid:lh,ticks:Sm,border:Am,font:ch,lineGap:$m,rotate:0},jS="Value",US="Time",Mm={show:!0,scale:"x",auto:!1,sorted:1,min:gn,max:-gn,idxs:[]};function VS(n,t,e,r,p){return t.map(g=>g==null?"":Ju(g))}function KS(n,t,e,r,p,g,v){let b=[],h=Xo.get(p)||0;e=v?e:mn(ec(e,p),h);for(let f=e;f<=r;f=mn(f+p,h))b.push(Object.is(f,-0)?0:f);return b}function uh(n,t,e,r,p,g,v){const b=[],h=n.scales[n.axes[t].scale].log,f=h==10?ko:Yg,s=vi(f(e));p=la(h,s),h==10&&(p=Ms[Xi(p,Ms)]);let a=e,u=p*h;h==10&&(u=Ms[Xi(u,Ms)]);do b.push(a),a=a+p,h==10&&!Xo.has(a)&&(a=mn(a,Xo.get(p))),a>=u&&(p=a,u=p*h,h==10&&(u=Ms[Xi(u,Ms)]));while(a<=r);return b}function GS(n,t,e,r,p,g,v){let b=n.scales[n.axes[t].scale].asinh,h=r>b?uh(n,t,Pr(b,e),r,p):[b],f=r>=0&&e<=0?[0]:[];return(e<-b?uh(n,t,Pr(b,-r),-e,p):[b]).reverse().map(s=>-s).concat(f,h)}const Em=/./,qS=/[12357]/,YS=/[125]/,Im=/1/,hh=(n,t,e,r)=>n.map((p,g)=>t==4&&p==0||g%r==0&&e.test(p.toExponential()[p<0?1:0])?p:null);function XS(n,t,e,r,p){let g=n.axes[e],v=g.scale,b=n.scales[v],h=n.valToPos,f=g._space,s=h(10,v),a=h(9,v)-s>=f?Em:h(7,v)-s>=f?qS:h(5,v)-s>=f?YS:Im;if(a==Im){let u=lr(h(1,v)-s);if(u<f)return hh(t.slice().reverse(),b.distr,a,Li(f/u)).reverse()}return hh(t,b.distr,a,1)}function ZS(n,t,e,r,p){let g=n.axes[e],v=g.scale,b=g._space,h=n.valToPos,f=lr(h(1,v)-h(2,v));return f<b?hh(t.slice().reverse(),3,Em,Li(b/f)).reverse():t}function QS(n,t,e,r){return r==null?Vu:t==null?"":Ju(t)}const Lm={show:!0,scale:"y",stroke:Hu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:_m,side:3,grid:lh,ticks:Sm,border:Am,font:ch,lineGap:$m,rotate:0};function JS(n,t){let e=3+(n||1)*2;return mn(e*t,3)}function eA(n,t){let{scale:e,idxs:r}=n.series[0],p=n._data[0],g=n.valToPos(p[r[0]],e,!0),v=n.valToPos(p[r[1]],e,!0),b=lr(v-g),h=n.series[t],f=b/(h.points.space*Jt);return r[1]-r[0]<=f}const Rm={scale:null,auto:!0,sorted:0,min:gn,max:-gn},Om=(n,t,e,r,p)=>p,Nm={show:!0,auto:!0,sorted:0,gaps:Om,alpha:1,facets:[Jn({},Rm,{scale:"x"}),Jn({},Rm,{scale:"y"})]},Dm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Om,alpha:1,points:{show:eA,filter:null},values:null,min:gn,max:-gn,idxs:[],path:null,clip:null};function tA(n,t,e,r,p){return e/10}const Fm={time:_k,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},nA=Jn({},Fm,{time:!1,ori:1}),Pm={};function Wm(n,t){let e=Pm[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(p=>p!=r)},pub(r,p,g,v,b,h,f){for(let s=0;s<e.plots.length;s++)e.plots[s]!=p&&e.plots[s].pub(r,p,g,v,b,h,f)}},n!=null&&(Pm[n]=e)),e}const da=1,dh=2;function Es(n,t,e){const r=n.mode,p=n.series[t],g=r==2?n._data[t]:n._data,v=n.scales,b=n.bbox;let h=g[0],f=r==2?g[1]:g[t],s=r==2?v[p.facets[0].scale]:v[n.series[0].scale],a=r==2?v[p.facets[1].scale]:v[p.scale],u=b.left,c=b.top,i=b.width,l=b.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(p,h,f,s,a,d,w,u,c,i,l,sc,pa,lc,Hm,Um):e(p,h,f,s,a,w,d,c,u,l,i,ac,fa,gh,jm,Vm)}function ph(n,t){let e=0,r=0,p=Xt(n.bands,nh);for(let g=0;g<p.length;g++){let v=p[g];v.series[0]==t?e=v.dir:v.series[1]==t&&(v.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function rA(n,t,e,r,p){let g=n.mode,v=n.series[t],b=g==2?v.facets[1].scale:v.scale,h=n.scales[b];return p==-1?h.min:p==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function So(n,t,e,r,p,g){return Es(n,t,(v,b,h,f,s,a,u,c,i,l,d)=>{let w=v.pxRound;const x=f.dir*(f.ori==0?1:-1),I=f.ori==0?pa:fa;let $,S;x==1?($=e,S=r):($=r,S=e);let C=w(a(b[$],f,l,c)),R=w(u(h[$],s,d,i)),N=w(a(b[S],f,l,c)),L=w(u(g==1?s.max:s.min,s,d,i)),E=new Path2D(p);return I(E,N,L),I(E,C,L),I(E,C,R),E})}function oc(n,t,e,r,p,g){let v=null;if(n.length>0){v=new Path2D;const b=t==0?lc:gh;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let c=u[0]-h;c>0&&b(v,h,r,c,r+g),h=u[1]}}let f=e+p-h,s=10;f>0&&b(v,h,r-s/2,f,r+g+s)}return v}function iA(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function fh(n,t,e,r,p,g,v){let b=[],h=n.length;for(let f=p==1?e:r;f>=e&&f<=r;f+=p)if(t[f]===null){let s=f,a=f;if(p==1)for(;++f<=r&&t[f]===null;)a=f;else for(;--f>=e&&t[f]===null;)a=f;let u=g(n[s]),c=a==s?u:g(n[a]),i=s-p;u=v<=0&&i>=0&&i<h?g(n[i]):u;let l=a+p;c=v>=0&&l>=0&&l<h?g(n[l]):c,c>=u&&b.push([u,c])}return b}function Bm(n){return n==0?Qg:n==1?cr:t=>Ts(t,n)}function zm(n){let t=n==0?sc:ac,e=n==0?(p,g,v,b,h,f)=>{p.arcTo(g,v,b,h,f)}:(p,g,v,b,h,f)=>{p.arcTo(v,g,h,b,f)},r=n==0?(p,g,v,b,h)=>{p.rect(g,v,b,h)}:(p,g,v,b,h)=>{p.rect(v,g,h,b)};return(p,g,v,b,h,f=0,s=0)=>{f==0&&s==0?r(p,g,v,b,h):(f=Zi(f,b/2,h/2),s=Zi(s,b/2,h/2),t(p,g+f,v),e(p,g+b,v,g+b,v+h,f),e(p,g+b,v+h,g,v+h,s),e(p,g,v+h,g,v,s),e(p,g,v,g+b,v,f),p.closePath())}}const sc=(n,t,e)=>{n.moveTo(t,e)},ac=(n,t,e)=>{n.moveTo(e,t)},pa=(n,t,e)=>{n.lineTo(t,e)},fa=(n,t,e)=>{n.lineTo(e,t)},lc=zm(0),gh=zm(1),Hm=(n,t,e,r,p,g)=>{n.arc(t,e,r,p,g)},jm=(n,t,e,r,p,g)=>{n.arc(e,t,r,p,g)},Um=(n,t,e,r,p,g,v)=>{n.bezierCurveTo(t,e,r,p,g,v)},Vm=(n,t,e,r,p,g,v)=>{n.bezierCurveTo(e,t,p,r,v,g)};function Km(n){return(t,e,r,p,g)=>Es(t,e,(v,b,h,f,s,a,u,c,i,l,d)=>{let{pxRound:w,points:x}=v,I,$;f.ori==0?(I=sc,$=Hm):(I=ac,$=jm);const S=mn(x.width*Jt,3);let C=(x.size-x.width)/2*Jt,R=mn(C*2,3),N=new Path2D,L=new Path2D,{left:E,top:B,width:P,height:O}=t.bbox;lc(L,E-R,B-R,P+R*2,O+R*2);const _=k=>{if(h[k]!=null){let D=w(a(b[k],f,l,c)),z=w(u(h[k],s,d,i));I(N,D+C,z),$(N,D,z,C,0,Jl*2)}};if(g)g.forEach(_);else for(let k=r;k<=p;k++)_(k);return{stroke:S>0?N:null,fill:N,clip:L,flags:da|dh}})}function Gm(n){return(t,e,r,p,g,v)=>{r!=p&&(g!=r&&v!=r&&n(t,e,r),g!=p&&v!=p&&n(t,e,p),n(t,e,v))}}const oA=Gm(pa),sA=Gm(fa);function qm(n){const t=Xt(n==null?void 0:n.alignGaps,0);return(e,r,p,g)=>Es(e,r,(v,b,h,f,s,a,u,c,i,l,d)=>{[p,g]=Xl(h,p,g);let w=v.pxRound,x=P=>w(a(P,f,l,c)),I=P=>w(u(P,s,d,i)),$,S;f.ori==0?($=pa,S=oA):($=fa,S=sA);const C=f.dir*(f.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},N=R.stroke;let L=!1;if(g-p>=l*4){let P=de=>e.posToVal(de,f.key,!0),O=null,_=null,k,D,z,U=x(b[C==1?p:g]),q=x(b[p]),X=x(b[g]),ee=P(C==1?q+1:X-1);for(let de=C==1?p:g;de>=p&&de<=g;de+=C){let te=b[de],le=(C==1?te<ee:te>ee)?U:x(te),se=h[de];le==U?se!=null?(D=se,O==null?($(N,le,I(D)),k=O=_=D):D<O?O=D:D>_&&(_=D)):se===null&&(L=!0):(O!=null&&S(N,U,I(O),I(_),I(k),I(D)),se!=null?(D=se,$(N,le,I(D)),O=_=k=D):(O=_=null,se===null&&(L=!0)),U=le,ee=P(U+C))}O!=null&&O!=_&&z!=U&&S(N,U,I(O),I(_),I(k),I(D))}else for(let P=C==1?p:g;P>=p&&P<=g;P+=C){let O=h[P];O===null?L=!0:O!=null&&$(N,x(b[P]),I(O))}let[E,B]=ph(e,r);if(v.fill!=null||E!=0){let P=R.fill=new Path2D(N),O=v.fillTo(e,r,v.min,v.max,E),_=I(O),k=x(b[p]),D=x(b[g]);C==-1&&([D,k]=[k,D]),$(P,D,_),$(P,k,_)}if(!v.spanGaps){let P=[];L&&P.push(...fh(b,h,p,g,C,x,t)),R.gaps=P=v.gaps(e,r,p,g,P),R.clip=oc(P,f.ori,c,i,l,d)}return B!=0&&(R.band=B==2?[So(e,r,p,g,N,-1),So(e,r,p,g,N,1)]:So(e,r,p,g,N,B)),R})}function aA(n){const t=Xt(n.align,1),e=Xt(n.ascDesc,!1),r=Xt(n.alignGaps,0),p=Xt(n.extend,!1);return(g,v,b,h)=>Es(g,v,(f,s,a,u,c,i,l,d,w,x,I)=>{[b,h]=Xl(a,b,h);let $=f.pxRound,{left:S,width:C}=g.bbox,R=X=>$(i(X,u,x,d)),N=X=>$(l(X,c,I,w)),L=u.ori==0?pa:fa;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},B=E.stroke,P=u.dir*(u.ori==0?1:-1);let O=N(a[P==1?b:h]),_=R(s[P==1?b:h]),k=_,D=_;p&&t==-1&&(D=S,L(B,D,O)),L(B,_,O);for(let X=P==1?b:h;X>=b&&X<=h;X+=P){let ee=a[X];if(ee==null)continue;let de=R(s[X]),te=N(ee);t==1?L(B,de,O):L(B,k,te),L(B,de,te),O=te,k=de}let z=k;p&&t==1&&(z=S+C,L(B,z,O));let[U,q]=ph(g,v);if(f.fill!=null||U!=0){let X=E.fill=new Path2D(B),ee=f.fillTo(g,v,f.min,f.max,U),de=N(ee);L(X,z,de),L(X,D,de)}if(!f.spanGaps){let X=[];X.push(...fh(s,a,b,h,P,R,r));let ee=f.width*Jt/2,de=e||t==1?ee:-ee,te=e||t==-1?-ee:ee;X.forEach(le=>{le[0]+=de,le[1]+=te}),E.gaps=X=f.gaps(g,v,b,h,X),E.clip=oc(X,u.ori,d,w,x,I)}return q!=0&&(E.band=q==2?[So(g,v,b,h,B,-1),So(g,v,b,h,B,1)]:So(g,v,b,h,B,q)),E})}function Ym(n,t,e,r,p,g,v=gn){if(n.length>1){let b=null;for(let h=0,f=1/0;h<n.length;h++)if(t[h]!==void 0){if(b!=null){let s=lr(n[h]-n[b]);s<f&&(f=s,v=lr(e(n[h],r,p,g)-e(n[b],r,p,g)))}b=h}}return v}function lA(n){n=n||Ya;const t=Xt(n.size,[.6,gn,1]),e=n.align||0,r=n.gap||0;let p=n.radius;p=p==null?[0,0]:typeof p=="number"?[p,0]:p;const g=Ht(p),v=1-t[0],b=Xt(t[1],gn),h=Xt(t[2],1),f=Xt(n.disp,Ya),s=Xt(n.each,c=>{}),{fill:a,stroke:u}=f;return(c,i,l,d)=>Es(c,i,(w,x,I,$,S,C,R,N,L,E,B)=>{let P=w.pxRound,O=e,_=r*Jt,k=b*Jt,D=h*Jt,z,U;$.ori==0?[z,U]=g(c,i):[U,z]=g(c,i);const q=$.dir*($.ori==0?1:-1);let X=$.ori==0?lc:gh,ee=$.ori==0?s:(je,Rt,dn,On,wr,nr,wn)=>{s(je,Rt,dn,wr,On,wn,nr)},de=Xt(c.bands,nh).find(je=>je.series[0]==i),te=de!=null?de.dir:0,le=w.fillTo(c,i,w.min,w.max,te),se=P(R(le,S,B,L)),ue,me,_e,Te=E,Me=P(w.width*Jt),Xe=!1,Ue=null,ct=null,et=null,ht=null;a!=null&&(Me==0||u!=null)&&(Xe=!0,Ue=a.values(c,i,l,d),ct=new Map,new Set(Ue).forEach(je=>{je!=null&&ct.set(je,new Path2D)}),Me>0&&(et=u.values(c,i,l,d),ht=new Map,new Set(et).forEach(je=>{je!=null&&ht.set(je,new Path2D)})));let{x0:qt,size:hn}=f;if(qt!=null&&hn!=null){O=1,x=qt.values(c,i,l,d),qt.unit==2&&(x=x.map(Rt=>c.posToVal(N+Rt*E,$.key,!0)));let je=hn.values(c,i,l,d);hn.unit==2?me=je[0]*E:me=C(je[0],$,E,N)-C(0,$,E,N),Te=Ym(x,I,C,$,E,N,Te),_e=Te-me+_}else Te=Ym(x,I,C,$,E,N,Te),_e=Te*v+_,me=Te-_e;_e<1&&(_e=0),Me>=me/2&&(Me=0),_e<5&&(P=Qg);let Vt=_e>0,yr=Te-_e-(Vt?Me:0);me=P(th(yr,D,k)),ue=(O==0?me/2:O==q?0:me)-O*q*((O==0?_/2:0)+(Vt?Me/2:0));const yn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Rn=Xe?null:new Path2D;let tr=null;if(de!=null)tr=c.data[de.series[1]];else{let{y0:je,y1:Rt}=f;je!=null&&Rt!=null&&(I=Rt.values(c,i,l,d),tr=je.values(c,i,l,d))}let ur=z*me,pt=U*me;for(let je=q==1?l:d;je>=l&&je<=d;je+=q){let Rt=I[je];if(Rt==null)continue;if(tr!=null){let Ot=tr[je]??0;if(Rt-Ot==0)continue;se=R(Ot,S,B,L)}let dn=$.distr!=2||f!=null?x[je]:je,On=C(dn,$,E,N),wr=R(Xt(Rt,le),S,B,L),nr=P(On-ue),wn=P(Pr(wr,se)),_n=P(Zi(wr,se)),Nn=wn-_n;if(Rt!=null){let Ot=Rt<0?pt:ur,bn=Rt<0?ur:pt;Xe?(Me>0&&et[je]!=null&&X(ht.get(et[je]),nr,_n+vi(Me/2),me,Pr(0,Nn-Me),Ot,bn),Ue[je]!=null&&X(ct.get(Ue[je]),nr,_n+vi(Me/2),me,Pr(0,Nn-Me),Ot,bn)):X(Rn,nr,_n+vi(Me/2),me,Pr(0,Nn-Me),Ot,bn),ee(c,i,je,nr-Me/2,_n,me+Me,Nn)}}return Me>0?yn.stroke=Xe?ht:Rn:Xe||(yn._fill=w.width==0?w._fill:w._stroke??w._fill,yn.width=0),yn.fill=Xe?ct:Rn,yn})}function cA(n,t){const e=Xt(t==null?void 0:t.alignGaps,0);return(r,p,g,v)=>Es(r,p,(b,h,f,s,a,u,c,i,l,d,w)=>{[g,v]=Xl(f,g,v);let x=b.pxRound,I=z=>x(u(z,s,d,i)),$=z=>x(c(z,a,w,l)),S,C,R;s.ori==0?(S=sc,R=pa,C=Um):(S=ac,R=fa,C=Vm);const N=s.dir*(s.ori==0?1:-1);let L=I(h[N==1?g:v]),E=L,B=[],P=[];for(let z=N==1?g:v;z>=g&&z<=v;z+=N)if(f[z]!=null){let U=h[z],q=I(U);B.push(E=q),P.push($(f[z]))}const O={stroke:n(B,P,S,R,C,x),fill:null,clip:null,band:null,gaps:null,flags:da},_=O.stroke;let[k,D]=ph(r,p);if(b.fill!=null||k!=0){let z=O.fill=new Path2D(_),U=b.fillTo(r,p,b.min,b.max,k),q=$(U);R(z,E,q),R(z,L,q)}if(!b.spanGaps){let z=[];z.push(...fh(h,f,g,v,N,I,e)),O.gaps=z=b.gaps(r,p,g,v,z),O.clip=oc(z,s.ori,i,l,d,w)}return D!=0&&(O.band=D==2?[So(r,p,g,v,_,-1),So(r,p,g,v,_,1)]:So(r,p,g,v,_,D)),O})}function uA(n){return cA(hA,n)}function hA(n,t,e,r,p,g){const v=n.length;if(v<2)return null;const b=new Path2D;if(e(b,n[0],t[0]),v==2)r(b,n[1],t[1]);else{let h=Array(v),f=Array(v-1),s=Array(v-1),a=Array(v-1);for(let u=0;u<v-1;u++)s[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],f[u]=s[u]/a[u];h[0]=f[0];for(let u=1;u<v-1;u++)f[u]===0||f[u-1]===0||f[u-1]>0!=f[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/f[u-1]+(a[u]+2*a[u-1])/f[u]),isFinite(h[u])||(h[u]=0));h[v-1]=f[v-2];for(let u=0;u<v-1;u++)p(b,n[u]+a[u]/3,t[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-h[u+1]*a[u]/3,n[u+1],t[u+1])}return b}const mh=new Set;function Xm(){for(let n of mh)n.syncRect(!0)}sa&&(_s(Vk,aa,Xm),_s(Kk,aa,Xm,!0),_s(ql,aa,()=>{Ir.pxRatio=Jt}));const dA=qm(),pA=Km();function Zm(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((p,g)=>vh(p,g,t,e))}function fA(n,t){return n.map((e,r)=>r==0?{}:Jn({},t,e))}function vh(n,t,e,r){return Jn({},t==0?e:r,n)}function Qm(n,t,e){return t==null?ca:[t,e]}const gA=Qm;function mA(n,t,e){return t==null?ca:Ql(t,e,Qu,!0)}function Jm(n,t,e,r){return t==null?ca:Zl(t,e,n.scales[r].log,!1)}const vA=Jm;function ev(n,t,e,r){return t==null?ca:Zu(t,e,n.scales[r].log,!1)}const yA=ev;function wA(n,t,e,r,p){let g=Pr(Xg(n),Xg(t)),v=t-n,b=Xi(p/r*v,e);do{let h=e[b],f=r*h/v;if(f>=p&&g+(h<5?Xo.get(h):0)<=17)return[h,f]}while(++b<e.length);return[0,0]}function tv(n){let t,e;return n=n.replace(/(\d+)px/,(r,p)=>(t=cr((e=+p)*Jt))+"px"),[n,t,e]}function bA(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=mn(t[2]*Jt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Ir(n,t,e){const r={mode:Xt(n.mode,1)},p=r.mode;function g(V,Z,ie,oe){let ge=Z.valToPct(V);return oe+ie*(Z.dir==-1?1-ge:ge)}function v(V,Z,ie,oe){let ge=Z.valToPct(V);return oe+ie*(Z.dir==-1?ge:1-ge)}function b(V,Z,ie,oe){return Z.ori==0?g(V,Z,ie,oe):v(V,Z,ie,oe)}r.valToPosH=g,r.valToPosV=v;let h=!1;r.status=0;const f=r.root=Ii($k);if(n.id!=null&&(f.id=n.id),gi(f,n.class),n.title){let V=Ii(Ek,f);V.textContent=n.title}const s=Yi("canvas"),a=r.ctx=s.getContext("2d"),u=Ii(Ik,f);_s("click",u,V=>{V.target===i&&(on!=Fi||jt!=yo)&&zn.click(r,V)},!0);const c=r.under=Ii(Lk,u);u.appendChild(s);const i=r.over=Ii(Rk,u);n=ua(n);const l=+Xt(n.pxAlign,1),d=Bm(l);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,x=r.series=p==1?Zm(n.series||[],Mm,Dm,!1):fA(n.series||[null],Nm),I=r.axes=Zm(n.axes||[],Tm,Lm,!0),$=r.scales={},S=r.bands=n.bands||[];S.forEach(V=>{V.fill=Ht(V.fill||null),V.dir=Xt(V.dir,-1)});const C=p==2?x[1].facets[0].scale:x[0].scale,R={axes:Io,series:wa},N=(n.drawOrder||["axes","series"]).map(V=>R[V]);function L(V){const Z=V.distr==3?ie=>ko(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>eh(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=Z(ie),{_min:ge,_max:xe}=V,Ee=xe-ge;return(oe-ge)/Ee}}function E(V){let Z=$[V];if(Z==null){let ie=(n.scales||Ya)[V]||Ya;if(ie.from!=null){E(ie.from);let oe=Jn({},$[ie.from],ie,{key:V});oe.valToPct=L(oe),$[V]=oe}else{Z=$[V]=Jn({},V==C?Fm:nA,ie),Z.key=V;let oe=Z.time,ge=Z.range,xe=Zo(ge);if((V!=C||p==2&&!oe)&&(xe&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Kg:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Kg:{mode:1,hard:ge[1],soft:ge[1]}},xe=!1),!xe&&tc(ge))){let Ee=ge;ge=(Pe,Be,Ge)=>Be==null?ca:Ql(Be,Ge,Ee)}Z.range=Ht(ge||(oe?gA:V==C?Z.distr==3?vA:Z.distr==4?yA:Qm:Z.distr==3?Jm:Z.distr==4?ev:mA)),Z.auto=Ht(xe?!1:Z.auto),Z.clamp=Ht(Z.clamp||tA),Z._min=Z._max=null,Z.valToPct=L(Z)}}}E("x"),E("y"),p==1&&x.forEach(V=>{E(V.scale)}),I.forEach(V=>{E(V.scale)});for(let V in n.scales)E(V);const B=$[C],P=B.distr;let O,_;B.ori==0?(gi(f,Tk),O=g,_=v):(gi(f,Mk),O=v,_=g);const k={};for(let V in $){let Z=$[V];(Z.min!=null||Z.max!=null)&&(k[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const D=n.tzDate||(V=>new Date(cr(V/w))),z=n.fmtDate||rh,U=w==1?TS(D):IS(D),q=bm(D,wm(w==1?$S:ES,z)),X=Cm(D,xm(RS,z)),ee=[],de=r.legend=Jn({},DS,n.legend),te=r.cursor=Jn({},HS,{drag:{y:p==2}},n.cursor),le=de.show,se=te.show,ue=de.markers;de.idxs=ee,ue.width=Ht(ue.width),ue.dash=Ht(ue.dash),ue.stroke=Ht(ue.stroke),ue.fill=Ht(ue.fill);let me,_e,Te,Me=[],Xe=[],Ue,ct=!1,et={};if(de.live){const V=x[1]?x[1].values:null;ct=V!=null,Ue=ct?V(r,1,0):{_:0};for(let Z in Ue)et[Z]=Vu}if(le)if(me=Yi("table",Wk,f),Te=Yi("tbody",null,me),de.mount(r,me),ct){_e=Yi("thead",null,me,Te);let V=Yi("tr",null,_e);Yi("th",null,V);for(var ht in Ue)Yi("th",Eg,V).textContent=ht}else gi(me,zk),de.live&&gi(me,Bk);const qt={show:!0},hn={show:!1};function Vt(V,Z){if(Z==0&&(ct||!de.live||p==2))return ca;let ie=[],oe=Yi("tr",Hk,Te,Te.childNodes[Z]);gi(oe,V.class),V.show||gi(oe,As);let ge=Yi("th",null,oe);if(ue.show){let Pe=Ii(jk,ge);if(Z>0){let Be=ue.width(r,Z);Be&&(Pe.style.border=Be+"px "+ue.dash(r,Z)+" "+ue.stroke(r,Z)),Pe.style.background=ue.fill(r,Z)}}let xe=Ii(Eg,ge);V.label instanceof HTMLElement?xe.appendChild(V.label):xe.textContent=V.label,Z>0&&(ue.show||(xe.style.color=V.width>0?ue.stroke(r,Z):ue.fill(r,Z)),yn("click",ge,Pe=>{if(te._lock)return;Vr(Pe);let Be=x.indexOf(V);if((Pe.ctrlKey||Pe.metaKey)!=de.isolate){let Ge=x.some((Ye,Qe)=>Qe>0&&Qe!=Be&&Ye.show);x.forEach((Ye,Qe)=>{Qe>0&&qr(Qe,Ge?Qe==Be?qt:hn:qt,!0,at.setSeries)})}else qr(Be,{show:!V.show},!0,at.setSeries)},!1),bi&&yn(Og,ge,Pe=>{te._lock||(Vr(Pe),qr(x.indexOf(V),Bi,!0,at.setSeries))},!1));for(var Ee in Ue){let Pe=Yi("td",Uk,oe);Pe.textContent="--",ie.push(Pe)}return[oe,ie]}const yr=new Map;function yn(V,Z,ie,oe=!0){const ge=yr.get(Z)||{},xe=te.bind[V](r,Z,ie,oe);xe&&(_s(V,Z,ge[V]=xe),yr.set(Z,ge))}function Rn(V,Z,ie){const oe=yr.get(Z)||{};for(let ge in oe)(V==null||ge==V)&&(Xu(ge,Z,oe[ge]),delete oe[ge]);V==null&&yr.delete(Z)}let tr=0,ur=0,pt=0,je=0,Rt=0,dn=0,On=Rt,wr=dn,nr=pt,wn=je,_n=0,Nn=0,Ot=0,bn=0;r.bbox={};let yi=!1,jr=!1,wi=!1,Rr=!1,oi=!1,hr=!1;function Ur(V,Z,ie){(ie||V!=r.width||Z!=r.height)&&po(V,Z),no(!1),wi=!0,jr=!0,vo()}function po(V,Z){r.width=tr=pt=V,r.height=ur=je=Z,Rt=dn=0,_o(),$o();let ie=r.bbox;_n=ie.left=Ts(Rt*Jt,.5),Nn=ie.top=Ts(dn*Jt,.5),Ot=ie.width=Ts(pt*Jt,.5),bn=ie.height=Ts(je*Jt,.5)}const Os=3;function Zt(){let V=!1,Z=0;for(;!V;){Z++;let ie=ba(Z),oe=ul(Z);V=Z==Os||ie&&oe,V||(po(r.width,r.height),jr=!0)}}function Oi({width:V,height:Z}){Ur(V,Z)}r.setSize=Oi;function _o(){let V=!1,Z=!1,ie=!1,oe=!1;I.forEach((ge,xe)=>{if(ge.show&&ge._show){let{side:Ee,_size:Pe}=ge,Be=Ee%2,Ge=ge.label!=null?ge.labelSize:0,Ye=Pe+Ge;Ye>0&&(Be?(pt-=Ye,Ee==3?(Rt+=Ye,oe=!0):ie=!0):(je-=Ye,Ee==0?(dn+=Ye,V=!0):Z=!0))}}),ai[0]=V,ai[1]=ie,ai[2]=Z,ai[3]=oe,pt-=he[1]+he[3],Rt+=he[3],je-=he[2]+he[0],dn+=he[0]}function $o(){let V=Rt+pt,Z=dn+je,ie=Rt,oe=dn;function ge(xe,Ee){switch(xe){case 1:return V+=Ee,V-Ee;case 2:return Z+=Ee,Z-Ee;case 3:return ie-=Ee,ie+Ee;case 0:return oe-=Ee,oe+Ee}}I.forEach((xe,Ee)=>{if(xe.show&&xe._show){let Pe=xe.side;xe._pos=ge(Pe,xe._size),xe.label!=null&&(xe._lpos=ge(Pe,xe.labelSize))}})}if(te.dataIdx==null){let V=te.hover,Z=V.skip=new Set(V.skip??[]);Z.add(void 0);let ie=V.prox=Ht(V.prox),oe=V.bias??(V.bias=0);te.dataIdx=(ge,xe,Ee,Pe)=>{if(xe==0)return Ee;let Be=Ee,Ge=ie(ge,xe,Ee,Pe)??gn,Ye=Ge>=0&&Ge<gn,Qe=B.ori==0?pt:je,wt=te.left,Wt=t[0],xt=t[xe];if(Z.has(xt[Ee])){Be=null;let Ft=null,ft=null,rt;if(oe==0||oe==-1)for(rt=Ee;Ft==null&&rt-- >0;)Z.has(xt[rt])||(Ft=rt);if(oe==0||oe==1)for(rt=Ee;ft==null&&rt++<xt.length;)Z.has(xt[rt])||(ft=rt);if(Ft!=null||ft!=null)if(Ye){let vn=Ft==null?-1/0:O(Wt[Ft],B,Qe,0),En=ft==null?1/0:O(Wt[ft],B,Qe,0),sr=wt-vn,Kt=En-wt;sr<=Kt?sr<=Ge&&(Be=Ft):Kt<=Ge&&(Be=ft)}else Be=ft==null?Ft:Ft==null?ft:Ee-Ft<=ft-Ee?Ft:ft}else Ye&&lr(wt-O(Wt[Ee],B,Qe,0))>Ge&&(Be=null);return Be}}const Vr=V=>{te.event=V};te.idxs=ee,te._lock=!1;let $n=te.points;$n.show=Ht($n.show),$n.size=Ht($n.size),$n.stroke=Ht($n.stroke),$n.width=Ht($n.width),$n.fill=Ht($n.fill);const dr=r.focus=Jn({},n.focus||{alpha:.3},te.focus),bi=dr.prox>=0,tn=bi&&$n.one;let Dn=[],xi=[],si=[];function eo(V,Z){let ie=$n.show(r,Z);if(ie instanceof HTMLElement)return gi(ie,Pk),gi(ie,V.class),lo(ie,-10,-10,pt,je),i.insertBefore(ie,Dn[Z]),ie}function To(V,Z){if(p==1||Z>0){let ie=p==1&&$[V.scale].time,oe=V.value;V.value=ie?om(oe)?Cm(D,xm(oe,z)):oe||X:oe||QS,V.label=V.label||(ie?US:jS)}if(tn||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||dA||nS,V.fillTo=Ht(V.fillTo||rA),V.pxAlign=+Xt(V.pxAlign,l),V.pxRound=Bm(V.pxAlign),V.stroke=Ht(V.stroke||null),V.fill=Ht(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=JS(Pr(1,V.width),1),oe=V.points=Jn({},{size:ie,width:Pr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:pA,_stroke:null,_fill:null},V.points);oe.show=Ht(oe.show),oe.filter=Ht(oe.filter),oe.fill=Ht(oe.fill),oe.stroke=Ht(oe.stroke),oe.paths=Ht(oe.paths),oe.pxAlign=V.pxAlign}if(le){let ie=Vt(V,Z);Me.splice(Z,0,ie[0]),Xe.splice(Z,0,ie[1]),de.values.push(null)}if(se){ee.splice(Z,0,null);let ie=null;tn?Z==0&&(ie=eo(V,Z)):Z>0&&(ie=eo(V,Z)),Dn.splice(Z,0,ie),xi.splice(Z,0,0),si.splice(Z,0,0)}tt("addSeries",Z)}function Kr(V,Z){Z=Z??x.length,V=p==1?vh(V,Z,Mm,Dm):vh(V,Z,{},Nm),x.splice(Z,0,V),To(x[Z],Z)}r.addSeries=Kr;function Qo(V){if(x.splice(V,1),le){de.values.splice(V,1),Xe.splice(V,1);let Z=Me.splice(V,1)[0];Rn(null,Z.firstChild),Z.remove()}se&&(ee.splice(V,1),Dn.splice(V,1)[0].remove(),xi.splice(V,1),si.splice(V,1)),tt("delSeries",V)}r.delSeries=Qo;const ai=[!1,!1,!1,!1];function Or(V,Z){if(V._show=V.show,V.show){let ie=V.side%2,oe=$[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=$[V.scale]);let ge=oe.time;V.size=Ht(V.size),V.space=Ht(V.space),V.rotate=Ht(V.rotate),Zo(V.incrs)&&V.incrs.forEach(Ee=>{!Xo.has(Ee)&&Xo.set(Ee,rm(Ee))}),V.incrs=Ht(V.incrs||(oe.distr==2?SS:ge?w==1?_S:MS:Ms)),V.splits=Ht(V.splits||(ge&&oe.distr==1?U:oe.distr==3?uh:oe.distr==4?GS:KS)),V.stroke=Ht(V.stroke),V.grid.stroke=Ht(V.grid.stroke),V.ticks.stroke=Ht(V.ticks.stroke),V.border.stroke=Ht(V.border.stroke);let xe=V.values;V.values=Zo(xe)&&!Zo(xe[0])?Ht(xe):ge?Zo(xe)?bm(D,wm(xe,z)):om(xe)?LS(D,xe):xe||q:xe||VS,V.filter=Ht(V.filter||(oe.distr>=3&&oe.log==10?XS:oe.distr==3&&oe.log==2?ZS:Jg)),V.font=tv(V.font),V.labelFont=tv(V.labelFont),V._size=V.size(r,null,Z,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(ai[Z]=!0,V._el=Ii(Ok,u))}}function Nt(V,Z,ie,oe){let[ge,xe,Ee,Pe]=ie,Be=Z%2,Ge=0;return Be==0&&(Pe||xe)&&(Ge=Z==0&&!ge||Z==2&&!Ee?cr(Tm.size/3):0),Be==1&&(ge||Ee)&&(Ge=Z==1&&!xe||Z==3&&!Pe?cr(Lm.size/2):0),Ge}const Jo=r.padding=(n.padding||[Nt,Nt,Nt,Nt]).map(V=>Ht(Xt(V,Nt))),he=r._padding=Jo.map((V,Z)=>V(r,Z,ai,0));let ze,Ne=null,dt=null;const an=p==1?x[0].idxs:null;let Dt=null,Bn=!1;function rr(V,Z){if(t=V??[],r.data=r._data=t,p==2){ze=0;for(let ie=1;ie<x.length;ie++)ze+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Dt=t[0],ze=Dt.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(ze);for(let ge=0;ge<ze;ge++)oe[ge]=ge}r._data=t=ie}if(no(!0),tt("setData"),P==2&&(wi=!0),Z!==!1){let ie=B;ie.auto(r,Bn)?br():ir(C,ie.min,ie.max),Rr=Rr||te.left>=0,hr=!0,vo()}}r.setData=rr;function br(){Bn=!0;let V,Z;p==1&&(ze>0?(Ne=an[0]=0,dt=an[1]=ze-1,V=t[0][Ne],Z=t[0][dt],P==2?(V=Ne,Z=dt):V==Z&&(P==3?[V,Z]=Zl(V,V,B.log,!1):P==4?[V,Z]=Zu(V,V,B.log,!1):B.time?Z=V+cr(86400/w):[V,Z]=Ql(V,Z,Qu,!0))):(Ne=an[0]=V=null,dt=an[1]=Z=null)),ir(C,V,Z)}let li,nn,Ni,fo,ci,es,Ns,Ds,ts,pr;function Fs(V,Z,ie,oe,ge,xe){V??(V=Lg),ie??(ie=nh),oe??(oe="butt"),ge??(ge=Lg),xe??(xe="round"),V!=li&&(a.strokeStyle=li=V),ge!=nn&&(a.fillStyle=nn=ge),Z!=Ni&&(a.lineWidth=Ni=Z),xe!=ci&&(a.lineJoin=ci=xe),oe!=es&&(a.lineCap=es=oe),ie!=fo&&a.setLineDash(fo=ie)}function Mo(V,Z,ie,oe){Z!=nn&&(a.fillStyle=nn=Z),V!=Ns&&(a.font=Ns=V),ie!=Ds&&(a.textAlign=Ds=ie),oe!=ts&&(a.textBaseline=ts=oe)}function ns(V,Z,ie,oe,ge=0){if(oe.length>0&&V.auto(r,Bn)&&(Z==null||Z.min==null)){let xe=Xt(Ne,0),Ee=Xt(dt,oe.length-1),Pe=ie.min==null?Xk(oe,xe,Ee,ge,V.distr==3):[ie.min,ie.max];V.min=Zi(V.min,ie.min=Pe[0]),V.max=Pr(V.max,ie.max=Pe[1])}}const rs={min:null,max:null};function go(){for(let oe in $){let ge=$[oe];k[oe]==null&&(ge.min==null||k[C]!=null&&ge.auto(r,Bn))&&(k[oe]=rs)}for(let oe in $){let ge=$[oe];k[oe]==null&&ge.from!=null&&k[ge.from]!=null&&(k[oe]=rs)}k[C]!=null&&no(!0);let V={};for(let oe in k){let ge=k[oe];if(ge!=null){let xe=V[oe]=ua($[oe],oS);if(ge.min!=null)Jn(xe,ge);else if(oe!=C||p==2)if(ze==0&&xe.from==null){let Ee=xe.range(r,null,null,oe);xe.min=Ee[0],xe.max=Ee[1]}else xe.min=gn,xe.max=-gn}}if(ze>0){x.forEach((oe,ge)=>{if(p==1){let xe=oe.scale,Ee=k[xe];if(Ee==null)return;let Pe=V[xe];if(ge==0){let Be=Pe.range(r,Pe.min,Pe.max,xe);Pe.min=Be[0],Pe.max=Be[1],Ne=Xi(Pe.min,t[0]),dt=Xi(Pe.max,t[0]),dt-Ne>1&&(t[0][Ne]<Pe.min&&Ne++,t[0][dt]>Pe.max&&dt--),oe.min=Dt[Ne],oe.max=Dt[dt]}else oe.show&&oe.auto&&ns(Pe,Ee,oe,t[ge],oe.sorted);oe.idxs[0]=Ne,oe.idxs[1]=dt}else if(ge>0&&oe.show&&oe.auto){let[xe,Ee]=oe.facets,Pe=xe.scale,Be=Ee.scale,[Ge,Ye]=t[ge],Qe=V[Pe],wt=V[Be];Qe!=null&&ns(Qe,k[Pe],xe,Ge,xe.sorted),wt!=null&&ns(wt,k[Be],Ee,Ye,Ee.sorted),oe.min=Ee.min,oe.max=Ee.max}});for(let oe in V){let ge=V[oe],xe=k[oe];if(ge.from==null&&(xe==null||xe.min==null)){let Ee=ge.range(r,ge.min==gn?null:ge.min,ge.max==-gn?null:ge.max,oe);ge.min=Ee[0],ge.max=Ee[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let xe=V[ge.from];if(xe.min==null)ge.min=ge.max=null;else{let Ee=ge.range(r,xe.min,xe.max,oe);ge.min=Ee[0],ge.max=Ee[1]}}}let Z={},ie=!1;for(let oe in V){let ge=V[oe],xe=$[oe];if(xe.min!=ge.min||xe.max!=ge.max){xe.min=ge.min,xe.max=ge.max;let Ee=xe.distr;xe._min=Ee==3?ko(xe.min):Ee==4?eh(xe.min,xe.asinh):Ee==100?xe.fwd(xe.min):xe.min,xe._max=Ee==3?ko(xe.max):Ee==4?eh(xe.max,xe.asinh):Ee==100?xe.fwd(xe.max):xe.max,Z[oe]=ie=!0}}if(ie){x.forEach((oe,ge)=>{p==2?ge>0&&Z.y&&(oe._paths=null):Z[oe.scale]&&(oe._paths=null)});for(let oe in Z)wi=!0,tt("setScale",oe);se&&te.left>=0&&(Rr=hr=!0)}for(let oe in k)k[oe]=null}function Ps(V){let Z=th(Ne-1,0,ze-1),ie=th(dt+1,0,ze-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[ie]==null&&ie<ze-1;)ie++;return[Z,ie]}function wa(){if(ze>0){let V=x.some(Z=>Z._focus)&&pr!=dr.alpha;V&&(a.globalAlpha=pr=dr.alpha),x.forEach((Z,ie)=>{if(ie>0&&Z.show&&(is(ie,!1),is(ie,!0),Z._paths==null)){let oe=pr;pr!=Z.alpha&&(a.globalAlpha=pr=Z.alpha);let ge=p==2?[0,t[ie][0].length-1]:Ps(t[ie]);Z._paths=Z.paths(r,ie,ge[0],ge[1]),pr!=oe&&(a.globalAlpha=pr=oe)}}),x.forEach((Z,ie)=>{if(ie>0&&Z.show){let oe=pr;pr!=Z.alpha&&(a.globalAlpha=pr=Z.alpha),Z._paths!=null&&os(ie,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,xe=Z.points.show(r,ie,Ne,dt,ge),Ee=Z.points.filter(r,ie,xe,ge);(xe||Ee)&&(Z.points._paths=Z.points.paths(r,ie,Ne,dt,Ee),os(ie,!0))}pr!=oe&&(a.globalAlpha=pr=oe),tt("drawSeries",ie)}}),V&&(a.globalAlpha=pr=1)}}function is(V,Z){let ie=Z?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function os(V,Z){let ie=Z?x[V].points:x[V],{stroke:oe,fill:ge,clip:xe,flags:Ee,_stroke:Pe=ie._stroke,_fill:Be=ie._fill,_width:Ge=ie.width}=ie._paths;Ge=mn(Ge*Jt,3);let Ye=null,Qe=Ge%2/2;Z&&Be==null&&(Be=Ge>0?"#fff":Pe);let wt=ie.pxAlign==1&&Qe>0;if(wt&&a.translate(Qe,Qe),!Z){let Wt=_n-Ge/2,xt=Nn-Ge/2,Ft=Ot+Ge,ft=bn+Ge;Ye=new Path2D,Ye.rect(Wt,xt,Ft,ft)}Z?Eo(Pe,Ge,ie.dash,ie.cap,Be,oe,ge,Ee,xe):Ws(V,Pe,Ge,ie.dash,ie.cap,Be,oe,ge,Ee,Ye,xe),wt&&a.translate(-Qe,-Qe)}function Ws(V,Z,ie,oe,ge,xe,Ee,Pe,Be,Ge,Ye){let Qe=!1;Be!=0&&S.forEach((wt,Wt)=>{if(wt.series[0]==V){let xt=x[wt.series[1]],Ft=t[wt.series[1]],ft=(xt._paths||Ya).band;Zo(ft)&&(ft=wt.dir==1?ft[0]:ft[1]);let rt,vn=null;xt.show&&ft&&Qk(Ft,Ne,dt)?(vn=wt.fill(r,Wt)||xe,rt=xt._paths.clip):ft=null,Eo(Z,ie,oe,ge,vn,Ee,Pe,Be,Ge,Ye,rt,ft),Qe=!0}}),Qe||Eo(Z,ie,oe,ge,xe,Ee,Pe,Be,Ge,Ye)}const ss=da|dh;function Eo(V,Z,ie,oe,ge,xe,Ee,Pe,Be,Ge,Ye,Qe){Fs(V,Z,ie,oe,ge),(Be||Ge||Qe)&&(a.save(),Be&&a.clip(Be),Ge&&a.clip(Ge)),Qe?(Pe&ss)==ss?(a.clip(Qe),Ye&&a.clip(Ye),fr(ge,Ee),Di(V,xe,Z)):Pe&dh?(fr(ge,Ee),a.clip(Qe),Di(V,xe,Z)):Pe&da&&(a.save(),a.clip(Qe),Ye&&a.clip(Ye),fr(ge,Ee),a.restore(),Di(V,xe,Z)):(fr(ge,Ee),Di(V,xe,Z)),(Be||Ge||Qe)&&a.restore()}function Di(V,Z,ie){ie>0&&(Z instanceof Map?Z.forEach((oe,ge)=>{a.strokeStyle=li=ge,a.stroke(oe)}):Z!=null&&V&&a.stroke(Z))}function fr(V,Z){Z instanceof Map?Z.forEach((ie,oe)=>{a.fillStyle=nn=oe,a.fill(ie)}):Z!=null&&V&&a.fill(Z)}function mo(V,Z,ie,oe){let ge=I[V],xe;if(oe<=0)xe=[0,0];else{let Ee=ge._space=ge.space(r,V,Z,ie,oe),Pe=ge._incrs=ge.incrs(r,V,Z,ie,oe,Ee);xe=wA(Z,ie,Pe,oe,Ee)}return ge._found=xe}function to(V,Z,ie,oe,ge,xe,Ee,Pe,Be,Ge){let Ye=Ee%2/2;l==1&&a.translate(Ye,Ye),Fs(Pe,Ee,Be,Ge,Pe),a.beginPath();let Qe,wt,Wt,xt,Ft=ge+(oe==0||oe==3?-xe:xe);ie==0?(wt=ge,xt=Ft):(Qe=ge,Wt=Ft);for(let ft=0;ft<V.length;ft++)Z[ft]!=null&&(ie==0?Qe=Wt=V[ft]:wt=xt=V[ft],a.moveTo(Qe,wt),a.lineTo(Wt,xt));a.stroke(),l==1&&a.translate(-Ye,-Ye)}function ba(V){let Z=!0;return I.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(Z=!1,ie._show=!1,no(!1));return}else ie._show||(Z=!1,ie._show=!0,no(!1));let xe=ie.side,Ee=xe%2,{min:Pe,max:Be}=ge,[Ge,Ye]=mo(oe,Pe,Be,Ee==0?pt:je);if(Ye==0)return;let Qe=ge.distr==2,wt=ie._splits=ie.splits(r,oe,Pe,Be,Ge,Ye,Qe),Wt=ge.distr==2?wt.map(rt=>Dt[rt]):wt,xt=ge.distr==2?Dt[wt[1]]-Dt[wt[0]]:Ge,Ft=ie._values=ie.values(r,ie.filter(r,Wt,oe,Ye,xt),oe,Ye,xt);ie._rotate=xe==2?ie.rotate(r,Ft,oe,Ye):0;let ft=ie._size;ie._size=Li(ie.size(r,Ft,oe,V)),ft!=null&&ie._size!=ft&&(Z=!1)}),Z}function ul(V){let Z=!0;return Jo.forEach((ie,oe)=>{let ge=ie(r,oe,ai,V);ge!=he[oe]&&(Z=!1),he[oe]=ge}),Z}function Io(){for(let V=0;V<I.length;V++){let Z=I[V];if(!Z.show||!Z._show)continue;let ie=Z.side,oe=ie%2,ge,xe,Ee=Z.stroke(r,V),Pe=ie==0||ie==3?-1:1,[Be,Ge]=Z._found;if(Z.label!=null){let fn=Z.labelGap*Pe,Sr=cr((Z._lpos+fn)*Jt);Mo(Z.labelFont[0],Ee,"center",ie==2?Ka:Ig),a.save(),oe==1?(ge=xe=0,a.translate(Sr,cr(Nn+bn/2)),a.rotate((ie==3?-Jl:Jl)/2)):(ge=cr(_n+Ot/2),xe=Sr);let Do=Zg(Z.label)?Z.label(r,V,Be,Ge):Z.label;a.fillText(Do,ge,xe),a.restore()}if(Ge==0)continue;let Ye=$[Z.scale],Qe=oe==0?Ot:bn,wt=oe==0?_n:Nn,Wt=Z._splits,xt=Ye.distr==2?Wt.map(fn=>Dt[fn]):Wt,Ft=Ye.distr==2?Dt[Wt[1]]-Dt[Wt[0]]:Be,ft=Z.ticks,rt=Z.border,vn=ft.show?ft.size:0,En=cr(vn*Jt),sr=cr((Z.alignTo==2?Z._size-vn-Z.gap:Z.gap)*Jt),Kt=Z._rotate*-Jl/180,fe=d(Z._pos*Jt),$e=(En+sr)*Pe,Ce=fe+$e;xe=oe==0?Ce:0,ge=oe==1?Ce:0;let Ve=Z.font[0],lt=Z.align==1?oa:Z.align==2?zu:Kt>0?oa:Kt<0?zu:oe==0?"center":ie==3?zu:oa,$t=Kt||oe==1?"middle":ie==2?Ka:Ig;Mo(Ve,Ee,lt,$t);let Yt=Z.font[1]*Z.lineGap,Et=Wt.map(fn=>d(b(fn,Ye,Qe,wt))),Yr=Z._values;for(let fn=0;fn<Yr.length;fn++){let Sr=Yr[fn];if(Sr!=null){oe==0?ge=Et[fn]:xe=Et[fn],Sr=""+Sr;let Do=Sr.indexOf(`
1490
+ `)==-1?[Sr]:Sr.split(/\n/gm);for(let Un=0;Un<Do.length;Un++){let zs=Do[Un];Kt?(a.save(),a.translate(ge,xe+Un*Yt),a.rotate(Kt),a.fillText(zs,0,0),a.restore()):a.fillText(zs,ge,xe+Un*Yt)}}}ft.show&&to(Et,ft.filter(r,xt,V,Ge,Ft),oe,ie,fe,En,mn(ft.width*Jt,3),ft.stroke(r,V),ft.dash,ft.cap);let zi=Z.grid;zi.show&&to(Et,zi.filter(r,xt,V,Ge,Ft),oe,oe==0?2:1,oe==0?Nn:_n,oe==0?bn:Ot,mn(zi.width*Jt,3),zi.stroke(r,V),zi.dash,zi.cap),rt.show&&to([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nn:_n,oe==1?bn:Ot,mn(rt.width*Jt,3),rt.stroke(r,V),rt.dash,rt.cap)}tt("drawAxes")}function no(V){x.forEach((Z,ie)=>{ie>0&&(Z._paths=null,V&&(p==1?(Z.min=null,Z.max=null):Z.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Lo=!1,as=!1,Ro=[];function xa(){as=!1;for(let V=0;V<Ro.length;V++)tt(...Ro[V]);Ro.length=0}function vo(){Lo||(dS(Ca),Lo=!0)}function We(V,Z=!1){Lo=!0,as=Z,V(r),Ca(),Z&&Ro.length>0&&queueMicrotask(xa)}r.batch=We;function Ca(){if(yi&&(go(),yi=!1),wi&&(Zt(),wi=!1),jr){if(kn(c,oa,Rt),kn(c,Ka,dn),kn(c,Ua,pt),kn(c,Va,je),kn(i,oa,Rt),kn(i,Ka,dn),kn(i,Ua,pt),kn(i,Va,je),kn(u,Ua,tr),kn(u,Va,ur),s.width=cr(tr*Jt),s.height=cr(ur*Jt),I.forEach(({_el:V,_show:Z,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(Z){let xe=ge===3||ge===0?ie:0,Ee=ge%2==1;kn(V,Ee?"left":"top",oe-xe),kn(V,Ee?"width":"height",ie),kn(V,Ee?"top":"left",Ee?dn:Rt),kn(V,Ee?"height":"width",Ee?je:pt),qu(V,As)}else gi(V,As)}),li=nn=Ni=ci=es=Ns=Ds=ts=fo=null,pr=1,W(!0),Rt!=On||dn!=wr||pt!=nr||je!=wn){no(!1);let V=pt/nr,Z=je/wn;if(se&&!Rr&&te.left>=0){te.left*=V,te.top*=Z,Ci&&lo(Ci,cr(te.left),0,pt,je),Yn&&lo(Yn,0,cr(te.top),pt,je);for(let ie=0;ie<Dn.length;ie++){let oe=Dn[ie];oe!=null&&(xi[ie]*=V,si[ie]*=Z,lo(oe,Li(xi[ie]),Li(si[ie]),pt,je))}}if(yt.show&&!oi&&yt.left>=0&&yt.width>0){yt.left*=V,yt.width*=V,yt.top*=Z,yt.height*=Z;for(let ie in Y)kn(Gr,ie,yt[ie])}On=Rt,wr=dn,nr=pt,wn=je}tt("setSize"),jr=!1}tr>0&&ur>0&&(a.clearRect(0,0,s.width,s.height),tt("drawClear"),N.forEach(V=>V()),tt("draw")),yt.show&&oi&&(pn(yt),oi=!1),se&&Rr&&(A(null,!0,!1),Rr=!1),de.show&&de.live&&hr&&(y(),hr=!1),h||(h=!0,r.status=1,tt("ready")),Bn=!1,Lo=!1}r.redraw=(V,Z)=>{wi=Z||!1,V!==!1?ir(C,B.min,B.max):vo()};function De(V,Z){let ie=$[V];if(ie.from==null){if(ze==0){let oe=ie.range(r,Z.min,Z.max,V);Z.min=oe[0],Z.max=oe[1]}if(Z.min>Z.max){let oe=Z.min;Z.min=Z.max,Z.max=oe}if(ze>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&ie.distr==2&&ze>0&&(Z.min=Xi(Z.min,t[0]),Z.max=Xi(Z.max,t[0]),Z.min==Z.max&&Z.max++),k[V]=Z,yi=!0,vo()}}r.setScale=De;let Fn,Oo,Ci,Yn,ka,No,Fi,yo,rn,Qt,on,jt,Pi=!1;const zn=te.drag;let He=zn.x,xn=zn.y;se&&(te.x&&(Fn=Ii(Dk,i)),te.y&&(Oo=Ii(Fk,i)),B.ori==0?(Ci=Fn,Yn=Oo):(Ci=Oo,Yn=Fn),on=te.left,jt=te.top);const yt=r.select=Jn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Gr=yt.show?Ii(Nk,yt.over?i:c):null;function pn(V,Z){if(yt.show){for(let ie in V)yt[ie]=V[ie],ie in Y&&kn(Gr,ie,V[ie]);Z!==!1&&tt("setSelect")}}r.setSelect=pn;function Sn(V){if(x[V].show)le&&qu(Me[V],As);else if(le&&gi(Me[V],As),se){let Z=tn?Dn[0]:Dn[V];Z!=null&&lo(Z,-10,-10,pt,je)}}function ir(V,Z,ie){De(V,{min:Z,max:ie})}function qr(V,Z,ie,oe){Z.focus!=null&&xr(V),Z.show!=null&&x.forEach((ge,xe)=>{xe>0&&(V==xe||V==null)&&(ge.show=Z.show,Sn(xe),p==2?(ir(ge.facets[0].scale,null,null),ir(ge.facets[1].scale,null,null)):ir(ge.scale,null,null),vo())}),ie!==!1&&tt("setSeries",V,Z),oe&&_t("setSeries",r,V,Z)}r.setSeries=qr;function Wi(V,Z){Jn(S[V],Z)}function Hn(V,Z){V.fill=Ht(V.fill||null),V.dir=Xt(V.dir,-1),Z=Z??S.length,S.splice(Z,0,V)}function ui(V){V==null?S.length=0:S.splice(V,1)}r.addBand=Hn,r.setBand=Wi,r.delBand=ui;function ls(V,Z){x[V].alpha=Z,se&&Dn[V]!=null&&(Dn[V].style.opacity=Z),le&&Me[V]&&(Me[V].style.opacity=Z)}let jn,ki,Si;const Bi={focus:!0};function xr(V){if(V!=Si){let Z=V==null,ie=dr.alpha!=1;x.forEach((oe,ge)=>{if(p==1||ge>0){let xe=Z||ge==0||ge==V;oe._focus=Z?null:xe,ie&&ls(ge,xe?1:dr.alpha)}}),Si=V,ie&&vo()}}le&&bi&&yn(Ng,me,V=>{te._lock||(Vr(V),Si!=null&&qr(null,Bi,!0,at.setSeries))});function Cr(V,Z,ie){let oe=$[Z];ie&&(V=V/Jt-(oe.ori==1?dn:Rt));let ge=pt;oe.ori==1&&(ge=je,V=ge-V),oe.dir==-1&&(V=ge-V);let xe=oe._min,Ee=oe._max,Pe=V/ge,Be=xe+(Ee-xe)*Pe,Ge=oe.distr;return Ge==3?la(10,Be):Ge==4?eS(Be,oe.asinh):Ge==100?oe.bwd(Be):Be}function _r(V,Z){let ie=Cr(V,C,Z);return Xi(ie,t[0],Ne,dt)}r.valToIdx=V=>Xi(V,t[0]),r.posToIdx=_r,r.posToVal=Cr,r.valToPos=(V,Z,ie)=>$[Z].ori==0?g(V,$[Z],ie?Ot:pt,ie?_n:0):v(V,$[Z],ie?bn:je,ie?Nn:0),r.setCursor=(V,Z,ie)=>{on=V.left,jt=V.top,A(null,Z,ie)};function Bs(V,Z){kn(Gr,oa,yt.left=V),kn(Gr,Ua,yt.width=Z)}function $r(V,Z){kn(Gr,Ka,yt.top=V),kn(Gr,Va,yt.height=Z)}let Nr=B.ori==0?Bs:$r,Ai=B.ori==1?Bs:$r;function _i(){if(le&&de.live)for(let V=p==2?1:0;V<x.length;V++){if(V==0&&ct)continue;let Z=de.values[V],ie=0;for(let oe in Z)Xe[V][ie++].firstChild.nodeValue=Z[oe]}}function y(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{ee[oe]=ie}):iS(V.idx)||ee.fill(V.idx),de.idx=ee[0]),le&&de.live){for(let ie=0;ie<x.length;ie++)(ie>0||p==1&&!ct)&&T(ie,ee[ie]);_i()}hr=!1,Z!==!1&&tt("setLegend")}r.setLegend=y;function T(V,Z){let ie=x[V],oe=V==0&&P==2?Dt:t[V],ge;ct?ge=ie.values(r,V,Z)??et:(ge=ie.value(r,Z==null?null:oe[Z],V,Z),ge=ge==null?et:{_:ge}),de.values[V]=ge}function A(V,Z,ie){rn=on,Qt=jt,[on,jt]=te.move(r,on,jt),te.left=on,te.top=jt,se&&(Ci&&lo(Ci,cr(on),0,pt,je),Yn&&lo(Yn,0,cr(jt),pt,je));let oe,ge=Ne>dt;jn=gn,ki=null;let xe=B.ori==0?pt:je,Ee=B.ori==1?pt:je;if(on<0||ze==0||ge){oe=te.idx=null;for(let Pe=0;Pe<x.length;Pe++){let Be=Dn[Pe];Be!=null&&lo(Be,-10,-10,pt,je)}bi&&qr(null,Bi,!0,V==null&&at.setSeries),de.live&&(ee.fill(oe),hr=!0)}else{let Pe,Be,Ge;p==1&&(Pe=B.ori==0?on:jt,Be=Cr(Pe,C),oe=te.idx=Xi(Be,t[0],Ne,dt),Ge=O(t[0][oe],B,xe,0));let Ye=-10,Qe=-10,wt=0,Wt=0,xt=!0,Ft="",ft="";for(let rt=p==2?1:0;rt<x.length;rt++){let vn=x[rt],En=ee[rt],sr=En==null?null:p==1?t[rt][En]:t[rt][1][En],Kt=te.dataIdx(r,rt,oe,Be),fe=Kt==null?null:p==1?t[rt][Kt]:t[rt][1][Kt];if(hr=hr||fe!=sr||Kt!=En,ee[rt]=Kt,rt>0&&vn.show){let $e=Kt==null?-10:Kt==oe?Ge:O(p==1?t[0][Kt]:t[rt][0][Kt],B,xe,0),Ce=fe==null?-10:_(fe,p==1?$[vn.scale]:$[vn.facets[1].scale],Ee,0);if(bi&&fe!=null){let Ve=B.ori==1?on:jt,lt=lr(dr.dist(r,rt,Kt,Ce,Ve));if(lt<jn){let $t=dr.bias;if($t!=0){let Yt=Cr(Ve,vn.scale),Et=fe>=0?1:-1,Yr=Yt>=0?1:-1;Yr==Et&&(Yr==1?$t==1?fe>=Yt:fe<=Yt:$t==1?fe<=Yt:fe>=Yt)&&(jn=lt,ki=rt)}else jn=lt,ki=rt}}if(hr||tn){let Ve,lt;B.ori==0?(Ve=$e,lt=Ce):(Ve=Ce,lt=$e);let $t,Yt,Et,Yr,zi,fn,Sr=!0,Do=$n.bbox;if(Do!=null){Sr=!1;let Un=Do(r,rt);Et=Un.left,Yr=Un.top,$t=Un.width,Yt=Un.height}else Et=Ve,Yr=lt,$t=Yt=$n.size(r,rt);if(fn=$n.fill(r,rt),zi=$n.stroke(r,rt),tn)rt==ki&&jn<=dr.prox&&(Ye=Et,Qe=Yr,wt=$t,Wt=Yt,xt=Sr,Ft=fn,ft=zi);else{let Un=Dn[rt];Un!=null&&(xi[rt]=Et,si[rt]=Yr,Hg(Un,$t,Yt,Sr),Bg(Un,fn,zi),lo(Un,Li(Et),Li(Yr),pt,je))}}}}if(tn){let rt=dr.prox,vn=Si==null?jn<=rt:jn>rt||ki!=Si;if(hr||vn){let En=Dn[0];En!=null&&(xi[0]=Ye,si[0]=Qe,Hg(En,wt,Wt,xt),Bg(En,Ft,ft),lo(En,Li(Ye),Li(Qe),pt,je))}}}if(yt.show&&Pi)if(V!=null){let[Pe,Be]=at.scales,[Ge,Ye]=at.match,[Qe,wt]=V.cursor.sync.scales,Wt=V.cursor.drag;if(He=Wt._x,xn=Wt._y,He||xn){let{left:xt,top:Ft,width:ft,height:rt}=V.select,vn=V.scales[Qe].ori,En=V.posToVal,sr,Kt,fe,$e,Ce,Ve=Pe!=null&&Ge(Pe,Qe),lt=Be!=null&&Ye(Be,wt);Ve&&He?(vn==0?(sr=xt,Kt=ft):(sr=Ft,Kt=rt),fe=$[Pe],$e=O(En(sr,Qe),fe,xe,0),Ce=O(En(sr+Kt,Qe),fe,xe,0),Nr(Zi($e,Ce),lr(Ce-$e))):Nr(0,xe),lt&&xn?(vn==1?(sr=xt,Kt=ft):(sr=Ft,Kt=rt),fe=$[Be],$e=_(En(sr,wt),fe,Ee,0),Ce=_(En(sr+Kt,wt),fe,Ee,0),Ai(Zi($e,Ce),lr(Ce-$e))):Ai(0,Ee)}else Q()}else{let Pe=lr(rn-ka),Be=lr(Qt-No);if(B.ori==1){let wt=Pe;Pe=Be,Be=wt}He=zn.x&&Pe>=zn.dist,xn=zn.y&&Be>=zn.dist;let Ge=zn.uni;Ge!=null?He&&xn&&(He=Pe>=Ge,xn=Be>=Ge,!He&&!xn&&(Be>Pe?xn=!0:He=!0)):zn.x&&zn.y&&(He||xn)&&(He=xn=!0);let Ye,Qe;He&&(B.ori==0?(Ye=Fi,Qe=on):(Ye=yo,Qe=jt),Nr(Zi(Ye,Qe),lr(Qe-Ye)),xn||Ai(0,Ee)),xn&&(B.ori==1?(Ye=Fi,Qe=on):(Ye=yo,Qe=jt),Ai(Zi(Ye,Qe),lr(Qe-Ye)),He||Nr(0,xe)),!He&&!xn&&(Nr(0,0),Ai(0,0))}if(zn._x=He,zn._y=xn,V==null){if(ie){if(Tn!=null){let[Pe,Be]=at.scales;at.values[0]=Pe!=null?Cr(B.ori==0?on:jt,Pe):null,at.values[1]=Be!=null?Cr(B.ori==1?on:jt,Be):null}_t(ju,r,on,jt,pt,je,oe)}if(bi){let Pe=ie&&at.setSeries,Be=dr.prox;Si==null?jn<=Be&&qr(ki,Bi,!0,Pe):jn>Be?qr(null,Bi,!0,Pe):ki!=Si&&qr(ki,Bi,!0,Pe)}}hr&&(de.idx=oe,y()),Z!==!1&&tt("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&W(!1),F}});function W(V=!1){V?F=null:(F=i.getBoundingClientRect(),tt("syncRect",F))}function H(V,Z,ie,oe,ge,xe,Ee){te._lock||Pi&&V!=null&&V.movementX==0&&V.movementY==0||(K(V,Z,ie,oe,ge,xe,Ee,!1,V!=null),V!=null?A(null,!0,!0):A(Z,!0,!1))}function K(V,Z,ie,oe,ge,xe,Ee,Pe,Be){if(F==null&&W(!1),Vr(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){on=-10,jt=-10;return}let[Ge,Ye]=at.scales,Qe=Z.cursor.sync,[wt,Wt]=Qe.values,[xt,Ft]=Qe.scales,[ft,rt]=at.match,vn=Z.axes[0].side%2==1,En=B.ori==0?pt:je,sr=B.ori==1?pt:je,Kt=vn?xe:ge,fe=vn?ge:xe,$e=vn?oe:ie,Ce=vn?ie:oe;if(xt!=null?ie=ft(Ge,xt)?b(wt,$[Ge],En,0):-10:ie=En*($e/Kt),Ft!=null?oe=rt(Ye,Ft)?b(Wt,$[Ye],sr,0):-10:oe=sr*(Ce/fe),B.ori==1){let Ve=ie;ie=oe,oe=Ve}}Be&&(Z==null||Z.cursor.event.type==ju)&&((ie<=1||ie>=pt-1)&&(ie=Ts(ie,pt)),(oe<=1||oe>=je-1)&&(oe=Ts(oe,je))),Pe?(ka=ie,No=oe,[Fi,yo]=te.move(r,ie,oe)):(on=ie,jt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){pn(Y,!1)}let re,ae,we,ke;function ve(V,Z,ie,oe,ge,xe,Ee){Pi=!0,He=xn=zn._x=zn._y=!1,K(V,Z,ie,oe,ge,xe,Ee,!0,!1),V!=null&&(yn(Uu,Ku,be,!1),_t(Rg,r,Fi,yo,pt,je,null));let{left:Pe,top:Be,width:Ge,height:Ye}=yt;re=Pe,ae=Be,we=Ge,ke=Ye}function be(V,Z,ie,oe,ge,xe,Ee){Pi=zn._x=zn._y=!1,K(V,Z,ie,oe,ge,xe,Ee,!1,!0);let{left:Pe,top:Be,width:Ge,height:Ye}=yt,Qe=Ge>0||Ye>0,wt=re!=Pe||ae!=Be||we!=Ge||ke!=Ye;if(Qe&&wt&&pn(yt),zn.setScale&&Qe&&wt){let Wt=Pe,xt=Ge,Ft=Be,ft=Ye;if(B.ori==1&&(Wt=Be,xt=Ye,Ft=Pe,ft=Ge),He&&ir(C,Cr(Wt,C),Cr(Wt+xt,C)),xn)for(let rt in $){let vn=$[rt];rt!=C&&vn.from==null&&vn.min!=gn&&ir(rt,Cr(Ft+ft,rt),Cr(Ft,rt))}Q()}else te.lock&&(te._lock=!te._lock,A(Z,!0,V!=null));V!=null&&(Rn(Uu,Ku),_t(Uu,r,on,jt,pt,je,null))}function Oe(V,Z,ie,oe,ge,xe,Ee){if(te._lock)return;Vr(V);let Pe=Pi;if(Pi){let Be=!0,Ge=!0,Ye=10,Qe,wt;B.ori==0?(Qe=He,wt=xn):(Qe=xn,wt=He),Qe&&wt&&(Be=on<=Ye||on>=pt-Ye,Ge=jt<=Ye||jt>=je-Ye),Qe&&Be&&(on=on<Fi?0:pt),wt&&Ge&&(jt=jt<yo?0:je),A(null,!0,!0),Pi=!1}on=-10,jt=-10,ee.fill(null),A(null,!0,!0),Pe&&(Pi=Pe)}function Re(V,Z,ie,oe,ge,xe,Ee){te._lock||(Vr(V),br(),Q(),V!=null&&_t(Dg,r,on,jt,pt,je,null))}function Ke(){I.forEach(bA),Ur(r.width,r.height,!0)}_s(ql,aa,Ke);const st={};st.mousedown=ve,st.mousemove=H,st.mouseup=be,st.dblclick=Re,st.setSeries=(V,Z,ie,oe)=>{let ge=at.match[2];ie=ge(r,Z,ie),ie!=-1&&qr(ie,oe,!0,!1)},se&&(yn(Rg,i,ve),yn(ju,i,H),yn(Og,i,V=>{Vr(V),W(!1)}),yn(Ng,i,Oe),yn(Dg,i,Re),mh.add(r),r.syncRect=W);const Ze=r.hooks=n.hooks||{};function tt(V,Z,ie){as?Ro.push([V,Z,ie]):V in Ze&&Ze[V].forEach(oe=>{oe.call(null,r,Z,ie)})}(n.plugins||[]).forEach(V=>{for(let Z in V.hooks)Ze[Z]=(Ze[Z]||[]).concat(V.hooks[Z])});const Cn=(V,Z,ie)=>ie,at=Jn({key:null,setSeries:!1,filters:{pub:em,sub:em},scales:[C,x[1]?x[1].scale:null],match:[tm,tm,Cn],values:[null,null]},te.sync);at.match.length==2&&at.match.push(Cn),te.sync=at;const Tn=at.key,bt=Wm(Tn);function _t(V,Z,ie,oe,ge,xe,Ee){at.filters.pub(V,Z,ie,oe,ge,xe,Ee)&&bt.pub(V,Z,ie,oe,ge,xe,Ee)}bt.sub(r);function or(V,Z,ie,oe,ge,xe,Ee){at.filters.sub(V,Z,ie,oe,ge,xe,Ee)&&st[V](null,Z,ie,oe,ge,xe,Ee)}r.pub=or;function kr(){bt.unsub(r),mh.delete(r),yr.clear(),Xu(ql,aa,Ke),f.remove(),me==null||me.remove(),tt("destroy")}r.destroy=kr;function Mn(){tt("init",n,t),rr(t||n.data,!1),k[C]?De(C,k[C]):br(),oi=yt.show&&(yt.width>0||yt.height>0),Rr=hr=!0,Ur(n.width,n.height)}return x.forEach(To),I.forEach(Or),e?e instanceof HTMLElement?(e.appendChild(f),Mn()):e(r,Mn):Mn(),r}Ir.assign=Jn,Ir.fmtNum=Ju,Ir.rangeNum=Ql,Ir.rangeLog=Zl,Ir.rangeAsinh=Zu,Ir.orient=Es,Ir.pxRatio=Jt,Ir.join=hS,Ir.fmtDate=rh,Ir.tzDate=CS,Ir.sync=Wm;{Ir.addGap=iA,Ir.clipGaps=oc;let n=Ir.paths={points:Km};n.linear=qm,n.stepped=aA,n.bars=lA,n.spline=uA}var nv,rv;function xA(){return rv||(rv=1,nv=function(n,t,e,r,p){var g,v;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(p===void 0)p=n.length-1;else if(p=p|0,p<r||p>=n.length)throw new RangeError("invalid upper bound");for(;r<=p;)if(g=r+(p-r>>>1),v=+e(n[g],t,g,n),v<0)r=g+1;else if(v>0)p=g-1;else return g;return~r}),nv}var CA=xA();const dD=mr("H",El(CA));var yh,iv;function kA(){if(iv)return yh;iv=1;function n(t,e,r){var p=-1,g=t.length;e<0&&(e=-e>g?0:g+e),r=r>g?g:r,r<0&&(r+=g),g=e>r?0:r-e>>>0,e>>>=0;for(var v=Array(g);++p<g;)v[p]=t[p+e];return v}return yh=n,yh}var wh,ov;function SA(){if(ov)return wh;ov=1;var n=kA();function t(e,r,p){var g=e.length;return p=p===void 0?g:p,!r&&p>=g?e:n(e,r,p)}return wh=t,wh}var bh,sv;function av(){if(sv)return bh;sv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",p=t+e+r,g="\\ufe0e\\ufe0f",v="\\u200d",b=RegExp("["+v+n+p+g+"]");function h(f){return b.test(f)}return bh=h,bh}var xh,lv;function AA(){if(lv)return xh;lv=1;function n(t){return t.split("")}return xh=n,xh}var Ch,cv;function _A(){if(cv)return Ch;cv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",p=t+e+r,g="\\ufe0e\\ufe0f",v="["+n+"]",b="["+p+"]",h="\\ud83c[\\udffb-\\udfff]",f="(?:"+b+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",i=f+"?",l="["+g+"]?",d="(?:"+c+"(?:"+[s,a,u].join("|")+")"+l+i+")*",w=l+i+d,x="(?:"+[s+b+"?",b,a,u,v].join("|")+")",I=RegExp(h+"(?="+h+")|"+x+w,"g");function $(S){return S.match(I)||[]}return Ch=$,Ch}var kh,uv;function $A(){if(uv)return kh;uv=1;var n=AA(),t=av(),e=_A();function r(p){return t(p)?e(p):n(p)}return kh=r,kh}var Sh,hv;function TA(){if(hv)return Sh;hv=1;var n=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo;return Sh=n,Sh}var Ah,dv;function MA(){if(dv)return Ah;dv=1;var n=TA(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Ah=e,Ah}var _h,pv;function $h(){if(pv)return _h;pv=1;var n=MA(),t=n.Symbol;return _h=t,_h}var Th,fv;function EA(){if(fv)return Th;fv=1;function n(t,e){for(var r=-1,p=t==null?0:t.length,g=Array(p);++r<p;)g[r]=e(t[r],r,t);return g}return Th=n,Th}var Mh,gv;function IA(){if(gv)return Mh;gv=1;var n=Array.isArray;return Mh=n,Mh}var Eh,mv;function LA(){if(mv)return Eh;mv=1;var n=$h(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,p=n?n.toStringTag:void 0;function g(v){var b=e.call(v,p),h=v[p];try{v[p]=void 0;var f=!0}catch{}var s=r.call(v);return f&&(b?v[p]=h:delete v[p]),s}return Eh=g,Eh}var Ih,vv;function RA(){if(vv)return Ih;vv=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return Ih=e,Ih}var Lh,yv;function OA(){if(yv)return Lh;yv=1;var n=$h(),t=LA(),e=RA(),r="[object Null]",p="[object Undefined]",g=n?n.toStringTag:void 0;function v(b){return b==null?b===void 0?p:r:g&&g in Object(b)?t(b):e(b)}return Lh=v,Lh}var Rh,wv;function NA(){if(wv)return Rh;wv=1;function n(t){return t!=null&&typeof t=="object"}return Rh=n,Rh}var Oh,bv;function DA(){if(bv)return Oh;bv=1;var n=OA(),t=NA(),e="[object Symbol]";function r(p){return typeof p=="symbol"||t(p)&&n(p)==e}return Oh=r,Oh}var Nh,xv;function FA(){if(xv)return Nh;xv=1;var n=$h(),t=EA(),e=IA(),r=DA(),p=n?n.prototype:void 0,g=p?p.toString:void 0;function v(b){if(typeof b=="string")return b;if(e(b))return t(b,v)+"";if(r(b))return g?g.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Nh=v,Nh}var Dh,Cv;function cc(){if(Cv)return Dh;Cv=1;var n=FA();function t(e){return e==null?"":n(e)}return Dh=t,Dh}var Fh,kv;function PA(){if(kv)return Fh;kv=1;var n=SA(),t=av(),e=$A(),r=cc();function p(g){return function(v){v=r(v);var b=t(v)?e(v):void 0,h=b?b[0]:v.charAt(0),f=b?n(b,1).join(""):v.slice(1);return h[g]()+f}}return Fh=p,Fh}var Ph,Sv;function Av(){if(Sv)return Ph;Sv=1;var n=PA(),t=n("toUpperCase");return Ph=t,Ph}var WA=Av();const BA=El(WA);var Wh,_v;function zA(){if(_v)return Wh;_v=1;var n=cc(),t=Av();function e(r){return t(n(r).toLowerCase())}return Wh=e,Wh}var Bh,$v;function HA(){if($v)return Bh;$v=1;function n(t,e,r,p){var g=-1,v=t==null?0:t.length;for(p&&v&&(r=t[++g]);++g<v;)r=e(r,t[g],g,t);return r}return Bh=n,Bh}var zh,Tv;function jA(){if(Tv)return zh;Tv=1;function n(t){return function(e){return t==null?void 0:t[e]}}return zh=n,zh}var Hh,Mv;function UA(){if(Mv)return Hh;Mv=1;var n=jA(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return Hh=e,Hh}var jh,Ev;function VA(){if(Ev)return jh;Ev=1;var n=UA(),t=cc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",p="\\ufe20-\\ufe2f",g="\\u20d0-\\u20ff",v=r+p+g,b="["+v+"]",h=RegExp(b,"g");function f(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return jh=f,jh}var Uh,Iv;function KA(){if(Iv)return Uh;Iv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Uh=t,Uh}var Vh,Lv;function GA(){if(Lv)return Vh;Lv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return Vh=t,Vh}var Kh,Rv;function qA(){if(Rv)return Kh;Rv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",p=t+e+r,g="\\u2700-\\u27bf",v="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",c=b+h+f+s,i="['’]",l="["+c+"]",d="["+p+"]",w="\\d+",x="["+g+"]",I="["+v+"]",$="[^"+n+c+w+g+v+a+"]",S="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+S+")",R="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",B="\\u200d",P="(?:"+I+"|"+$+")",O="(?:"+E+"|"+$+")",_="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",k="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",z="["+u+"]?",U="(?:"+B+"(?:"+[R,N,L].join("|")+")"+z+D+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",X="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ee=z+D+U,de="(?:"+[x,N,L].join("|")+")"+ee,te=RegExp([E+"?"+I+"+"+_+"(?="+[l,E,"$"].join("|")+")",O+"+"+k+"(?="+[l,E+P,"$"].join("|")+")",E+"?"+P+"+"+_,E+"+"+k,X,q,w,de].join("|"),"g");function le(se){return se.match(te)||[]}return Kh=le,Kh}var Gh,Ov;function YA(){if(Ov)return Gh;Ov=1;var n=KA(),t=GA(),e=cc(),r=qA();function p(g,v,b){return g=e(g),v=b?void 0:v,v===void 0?t(g)?r(g):n(g):g.match(v)||[]}return Gh=p,Gh}var qh,Nv;function XA(){if(Nv)return qh;Nv=1;var n=HA(),t=VA(),e=YA(),r="['’]",p=RegExp(r,"g");function g(v){return function(b){return n(e(t(b).replace(p,"")),v,"")}}return qh=g,qh}var Yh,Dv;function ZA(){if(Dv)return Yh;Dv=1;var n=zA(),t=XA(),e=t(function(r,p,g){return p=p.toLowerCase(),r+(g?n(p):p)});return Yh=e,Yh}var QA=ZA();const JA=El(QA),e_=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-DLfNWDzN-9f22143029331cd19814.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-CoRsUxHG-ef5979f195a7bba15989.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-BmHSFvOq-adeabc2bc42306e0069d.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-C3ZWRjZZ-47e7119bd5f986e8020a.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-CL-XzPF4-729a1d701303535b92ae.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-D8Y9DgVE-62c0d75607abacf6f533.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-DHSGK_tD-472b7d2d1344cb4fa5ec.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-Btt_fQfC-9fbc089f74ab0c77f910.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-BF_8RTjv-a3f31df63709982b6a55.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-scbwaujI-81507b1b078d4373ceb8.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-gRvm_-TT-4e96a34c4e48cdff3fe0.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-CljziRek-13b3fbfceeef5b81174f.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-BOabI_jE-dfd034d5ec1334a60685.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-BLXNYFiY-5aec7a684038d6b9a587.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-BTqLCtLS-34aadef664a0629b4126.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-CfMtj7H8-c4cc362cface50953111.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-CLYx8qbg-6263e0bf4bdfd2b8be7b.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-AY2M01qP-14f17bc562bcc9872ccd.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-2MEKvq_C-cc7c76d38397e306f366.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-DgpOPA7q-d5a43d9f38bf4c7cb41e.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-UKKUl7k5-2223d07d2d9fd9ef6e33.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-DhuQH5Io-8d3e52222eef3850d4e2.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-SO9zqcNN-6ea8822eccbed42b22ba.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-DWoM5AJ5-29de721891c2eaceca53.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-D3vnkvQZ-e029cc70a17088e3bcdf.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-DO0T-Jot-d899fc5423075f625866.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-B6BbNFnk-50a709498132a21bff06.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-CxfL-H9C-1bdd54650c839ddf4cfe.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-BT5k9mHv-e48a4da90647314a1f05.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-DUbmxh4p-3fb471825f274ff0386a.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-DexAc2UB-ed0709619ba7bcb4a3b2.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-D1RwHb_V-d8fe61068d2f939f324c.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-ClOmoV50-80df89ffda098f7902a8.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-CBUoEYKp-83d2d3d29206c1b51080.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-hsHkmY-_-fb5460ed4f3f3df3f5f4.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-CXrKtxOo-1927c18030a1a268987d.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-CsogVU9c-5f47208858ac1deec7b5.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-CO6CEkxP-483e8946921056cd1ef7.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-DrxUclws-1154c0fffdf466530990.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-DN9C38cg-18b7ec0d01fbd5c13d38.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-5uQTfLMP-14b1333f12a7f042994c.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-B0DCULnu-d32bac1b2da69af0ec0a.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-BOkZQgtf-73057d5763bd7a477415.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-Cis0Xkea-4b240e77380985a38575.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-CLcqC2Qk-1bb1939085b18e1e5385.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-CTp83eZ--e82c17e5c954e05d4b34.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-uucd-zsX-36f33490179bf41320ea.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-C2n38ti5-c44179f232be07919fa4.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget--HTv9ddk-4b31e558a0e54bcace8b.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-CPNVZaUM-770ffb858d634a70c03b.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-Cp0cb6V8-278432e1c816d8e1110d.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-Bk1RFjks-f56c3be93a9009bac95a.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-C0HIBYh2-2538bcc938061227fa4f.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-BTT90uyX-6d3a25fd197315f5a929.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-CcQw_XK9-38396768a7fa88b0c46c.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-CNtFQv3R-36781b9075eda748d7ef.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-Yxmz1SnU-152a8814d9c32983ea0f.js"),void 0)}),t_=Object.entries(e_).reduce((n,[t,e])=>{t=t.split("/").pop();const r=BA(JA(t.replace(/\.\w+$/,"")));return{...n,[r]:kp(e)}},{}),pD=mr("z",{components:t_});function Fv(n,t){return function(){return n.apply(t,arguments)}}const{toString:n_}=Object.prototype,{getPrototypeOf:Xh}=Object,{iterator:uc,toStringTag:Pv}=Symbol,hc=(n=>t=>{const e=n_.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Qi=n=>(n=n.toLowerCase(),t=>hc(t)===n),dc=n=>t=>typeof t===n,{isArray:ga}=Array,ma=dc("undefined");function Qa(n){return n!==null&&!ma(n)&&n.constructor!==null&&!ma(n.constructor)&&ri(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Wv=Qi("ArrayBuffer");function r_(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Wv(n.buffer),t}const i_=dc("string"),ri=dc("function"),Bv=dc("number"),Ja=n=>n!==null&&typeof n=="object",o_=n=>n===!0||n===!1,pc=n=>{if(hc(n)!=="object")return!1;const t=Xh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Pv in n)&&!(uc in n)},s_=n=>{if(!Ja(n)||Qa(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},a_=Qi("Date"),l_=Qi("File"),c_=Qi("Blob"),u_=Qi("FileList"),h_=n=>Ja(n)&&ri(n.pipe),d_=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||ri(n.append)&&((t=hc(n))==="formdata"||t==="object"&&ri(n.toString)&&n.toString()==="[object FormData]"))},p_=Qi("URLSearchParams"),[f_,g_,m_,v_]=["ReadableStream","Request","Response","Headers"].map(Qi),y_=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function el(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,p;if(typeof n!="object"&&(n=[n]),ga(n))for(r=0,p=n.length;r<p;r++)t.call(null,n[r],r,n);else{if(Qa(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),v=g.length;let b;for(r=0;r<v;r++)b=g[r],t.call(null,n[b],b,n)}}function zv(n,t){if(Qa(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,p;for(;r-- >0;)if(p=e[r],t===p.toLowerCase())return p;return null}const Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hv=n=>!ma(n)&&n!==Is;function Zh(){const{caseless:n,skipUndefined:t}=Hv(this)&&this||{},e={},r=(p,g)=>{const v=n&&zv(e,g)||g;pc(e[v])&&pc(p)?e[v]=Zh(e[v],p):pc(p)?e[v]=Zh({},p):ga(p)?e[v]=p.slice():(!t||!ma(p))&&(e[v]=p)};for(let p=0,g=arguments.length;p<g;p++)arguments[p]&&el(arguments[p],r);return e}const w_=(n,t,e,{allOwnKeys:r}={})=>(el(t,(p,g)=>{e&&ri(p)?n[g]=Fv(p,e):n[g]=p},{allOwnKeys:r}),n),b_=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),x_=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},C_=(n,t,e,r)=>{let p,g,v;const b={};if(t=t||{},n==null)return t;do{for(p=Object.getOwnPropertyNames(n),g=p.length;g-- >0;)v=p[g],(!r||r(v,n,t))&&!b[v]&&(t[v]=n[v],b[v]=!0);n=e!==!1&&Xh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},k_=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},S_=n=>{if(!n)return null;if(ga(n))return n;let t=n.length;if(!Bv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},A_=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Xh(Uint8Array)),__=(n,t)=>{const e=(n&&n[uc]).call(n);let r;for(;(r=e.next())&&!r.done;){const p=r.value;t.call(n,p[0],p[1])}},$_=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},T_=Qi("HTMLFormElement"),M_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),jv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),E_=Qi("RegExp"),Uv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};el(e,(p,g)=>{let v;(v=t(p,g,n))!==!1&&(r[g]=v||p)}),Object.defineProperties(n,r)},I_=n=>{Uv(n,(t,e)=>{if(ri(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(ri(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},L_=(n,t)=>{const e={},r=p=>{p.forEach(g=>{e[g]=!0})};return ga(n)?r(n):r(String(n).split(t)),e},R_=()=>{},O_=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function N_(n){return!!(n&&ri(n.append)&&n[Pv]==="FormData"&&n[uc])}const D_=n=>{const t=new Array(10),e=(r,p)=>{if(Ja(r)){if(t.indexOf(r)>=0)return;if(Qa(r))return r;if(!("toJSON"in r)){t[p]=r;const g=ga(r)?[]:{};return el(r,(v,b)=>{const h=e(v,p+1);!ma(h)&&(g[b]=h)}),t[p]=void 0,g}}return r};return e(n,0)},F_=Qi("AsyncFunction"),P_=n=>n&&(Ja(n)||ri(n))&&ri(n.then)&&ri(n.catch),Vv=((n,t)=>n?setImmediate:t?((e,r)=>(Is.addEventListener("message",({source:p,data:g})=>{p===Is&&g===e&&r.length&&r.shift()()},!1),p=>{r.push(p),Is.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ri(Is.postMessage)),W_=typeof queueMicrotask<"u"?queueMicrotask.bind(Is):typeof process<"u"&&process.nextTick||Vv,B_=n=>n!=null&&ri(n[uc]),Ae={isArray:ga,isArrayBuffer:Wv,isBuffer:Qa,isFormData:d_,isArrayBufferView:r_,isString:i_,isNumber:Bv,isBoolean:o_,isObject:Ja,isPlainObject:pc,isEmptyObject:s_,isReadableStream:f_,isRequest:g_,isResponse:m_,isHeaders:v_,isUndefined:ma,isDate:a_,isFile:l_,isBlob:c_,isRegExp:E_,isFunction:ri,isStream:h_,isURLSearchParams:p_,isTypedArray:A_,isFileList:u_,forEach:el,merge:Zh,extend:w_,trim:y_,stripBOM:b_,inherits:x_,toFlatObject:C_,kindOf:hc,kindOfTest:Qi,endsWith:k_,toArray:S_,forEachEntry:__,matchAll:$_,isHTMLForm:T_,hasOwnProperty:jv,hasOwnProp:jv,reduceDescriptors:Uv,freezeMethods:I_,toObjectSet:L_,toCamelCase:M_,noop:R_,toFiniteNumber:O_,findKey:zv,global:Is,isContextDefined:Hv,isSpecCompliantForm:N_,toJSONObject:D_,isAsyncFn:F_,isThenable:P_,setImmediate:Vv,asap:W_,isIterable:B_};function At(n,t,e,r,p){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),p&&(this.response=p,this.status=p.status?p.status:null)}Ae.inherits(At,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Kv=At.prototype,Gv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Gv[n]={value:n}}),Object.defineProperties(At,Gv),Object.defineProperty(Kv,"isAxiosError",{value:!0}),At.from=(n,t,e,r,p,g)=>{const v=Object.create(Kv);Ae.toFlatObject(n,v,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=t==null&&n?n.code:t;return At.call(v,b,h,e,r,p),n&&v.cause==null&&Object.defineProperty(v,"cause",{value:n,configurable:!0}),v.name=n&&n.name||"Error",g&&Object.assign(v,g),v};const z_=null;function Qh(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function qv(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function Yv(n,t,e){return n?n.concat(t).map(function(r,p){return r=qv(r),!e&&p?"["+r+"]":r}).join(e?".":""):t}function H_(n){return Ae.isArray(n)&&!n.some(Qh)}const j_=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function fc(n,t,e){if(!Ae.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,i){return!Ae.isUndefined(i[c])});const r=e.metaTokens,p=e.visitor||f,g=e.dots,v=e.indexes,b=(e.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(t);if(!Ae.isFunction(p))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Ae.isDate(c))return c.toISOString();if(Ae.isBoolean(c))return c.toString();if(!b&&Ae.isBlob(c))throw new At("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(c)||Ae.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function f(c,i,l){let d=c;if(c&&!l&&typeof c=="object"){if(Ae.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Ae.isArray(c)&&H_(c)||(Ae.isFileList(c)||Ae.endsWith(i,"[]"))&&(d=Ae.toArray(c)))return i=qv(i),d.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&t.append(v===!0?Yv([i],x,g):v===null?i:i+"[]",h(w))}),!1}return Qh(c)?!0:(t.append(Yv(l,i,g),h(c)),!1)}const s=[],a=Object.assign(j_,{defaultVisitor:f,convertValue:h,isVisitable:Qh});function u(c,i){if(!Ae.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(c),Ae.forEach(c,function(l,d){(!(Ae.isUndefined(l)||l===null)&&p.call(t,l,Ae.isString(d)?d.trim():d,i,a))===!0&&u(l,i?i.concat(d):[d])}),s.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Xv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Jh(n,t){this._pairs=[],n&&fc(n,this,t)}const Zv=Jh.prototype;Zv.append=function(n,t){this._pairs.push([n,t])},Zv.toString=function(n){const t=n?function(e){return n.call(this,e,Xv)}:Xv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function U_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Qv(n,t,e){if(!t)return n;const r=e&&e.encode||U_;Ae.isFunction(e)&&(e={serialize:e});const p=e&&e.serialize;let g;if(p?g=p(t,e):g=Ae.isURLSearchParams(t)?t.toString():new Jh(t,e).toString(r),g){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}let Jv=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ae.forEach(this.handlers,function(e){e!==null&&t(e)})}};const ey={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},V_=typeof URLSearchParams<"u"?URLSearchParams:Jh,K_=typeof FormData<"u"?FormData:null,G_=typeof Blob<"u"?Blob:null,q_={isBrowser:!0,classes:{URLSearchParams:V_,FormData:K_,Blob:G_},protocols:["http","https","file","blob","url","data"]},ed=typeof window<"u"&&typeof document<"u",td=typeof navigator=="object"&&navigator||void 0,Y_=ed&&(!td||["ReactNative","NativeScript","NS"].indexOf(td.product)<0),X_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z_=ed&&window.location.href||"http://localhost",Q_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ed,hasStandardBrowserEnv:Y_,hasStandardBrowserWebWorkerEnv:X_,navigator:td,origin:Z_},Symbol.toStringTag,{value:"Module"})),Lr={...Q_,...q_};function J_(n,t){return fc(n,new Lr.classes.URLSearchParams,{visitor:function(e,r,p,g){return Lr.isNode&&Ae.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function e$(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t$(n){const t={},e=Object.keys(n);let r;const p=e.length;let g;for(r=0;r<p;r++)g=e[r],t[g]=n[g];return t}function ty(n){function t(e,r,p,g){let v=e[g++];if(v==="__proto__")return!0;const b=Number.isFinite(+v),h=g>=e.length;return v=!v&&Ae.isArray(p)?p.length:v,h?(Ae.hasOwnProp(p,v)?p[v]=[p[v],r]:p[v]=r,!b):((!p[v]||!Ae.isObject(p[v]))&&(p[v]=[]),t(e,r,p[v],g)&&Ae.isArray(p[v])&&(p[v]=t$(p[v])),!b)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const e={};return Ae.forEachEntry(n,(r,p)=>{t(e$(r),p,e,0)}),e}return null}function n$(n,t,e){if(Ae.isString(n))try{return(t||JSON.parse)(n),Ae.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const tl={transitional:ey,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,p=Ae.isObject(n);if(p&&Ae.isHTMLForm(n)&&(n=new FormData(n)),Ae.isFormData(n))return r?JSON.stringify(ty(n)):n;if(Ae.isArrayBuffer(n)||Ae.isBuffer(n)||Ae.isStream(n)||Ae.isFile(n)||Ae.isBlob(n)||Ae.isReadableStream(n))return n;if(Ae.isArrayBufferView(n))return n.buffer;if(Ae.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(p){if(e.indexOf("application/x-www-form-urlencoded")>-1)return J_(n,this.formSerializer).toString();if((g=Ae.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return fc(g?{"files[]":n}:n,v&&new v,this.formSerializer)}}return p||r?(t.setContentType("application/json",!1),n$(n)):n}],transformResponse:[function(n){const t=this.transitional||tl.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(n)||Ae.isReadableStream(n))return n;if(n&&Ae.isString(n)&&(e&&!this.responseType||r)){const p=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(g){if(p)throw g.name==="SyntaxError"?At.from(g,At.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lr.classes.FormData,Blob:Lr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],n=>{tl.headers[n]={}});const r$=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),i$=n=>{const t={};let e,r,p;return n&&n.split(`
1491
+ `).forEach(function(g){p=g.indexOf(":"),e=g.substring(0,p).trim().toLowerCase(),r=g.substring(p+1).trim(),!(!e||t[e]&&r$[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},ny=Symbol("internals");function nl(n){return n&&String(n).trim().toLowerCase()}function gc(n){return n===!1||n==null?n:Ae.isArray(n)?n.map(gc):String(n)}function o$(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const s$=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function nd(n,t,e,r,p){if(Ae.isFunction(r))return r.call(this,t,e);if(p&&(t=e),!!Ae.isString(t)){if(Ae.isString(r))return t.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(t)}}function a$(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function l$(n,t){const e=Ae.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(p,g,v){return this[r].call(this,t,p,g,v)},configurable:!0})})}let ii=class{constructor(t){t&&this.set(t)}set(t,e,r){const p=this;function g(b,h,f){const s=nl(h);if(!s)throw new Error("header name must be a non-empty string");const a=Ae.findKey(p,s);(!a||p[a]===void 0||f===!0||f===void 0&&p[a]!==!1)&&(p[a||h]=gc(b))}const v=(b,h)=>Ae.forEach(b,(f,s)=>g(f,s,h));if(Ae.isPlainObject(t)||t instanceof this.constructor)v(t,e);else if(Ae.isString(t)&&(t=t.trim())&&!s$(t))v(i$(t),e);else if(Ae.isObject(t)&&Ae.isIterable(t)){let b={},h,f;for(const s of t){if(!Ae.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[f=s[0]]=(h=b[f])?Ae.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}v(b,e)}else t!=null&&g(e,t,r);return this}get(t,e){if(t=nl(t),t){const r=Ae.findKey(this,t);if(r){const p=this[r];if(!e)return p;if(e===!0)return o$(p);if(Ae.isFunction(e))return e.call(this,p,r);if(Ae.isRegExp(e))return e.exec(p);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=nl(t),t){const r=Ae.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||nd(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let p=!1;function g(v){if(v=nl(v),v){const b=Ae.findKey(r,v);b&&(!e||nd(r,r[b],b,e))&&(delete r[b],p=!0)}}return Ae.isArray(t)?t.forEach(g):g(t),p}clear(t){const e=Object.keys(this);let r=e.length,p=!1;for(;r--;){const g=e[r];(!t||nd(this,this[g],g,t,!0))&&(delete this[g],p=!0)}return p}normalize(t){const e=this,r={};return Ae.forEach(this,(p,g)=>{const v=Ae.findKey(r,g);if(v){e[v]=gc(p),delete e[g];return}const b=t?a$(g):String(g).trim();b!==g&&delete e[g],e[b]=gc(p),r[b]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ae.forEach(this,(r,p)=>{r!=null&&r!==!1&&(e[p]=t&&Ae.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1492
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(p=>r.set(p)),r}static accessor(t){const e=(this[ny]=this[ny]={accessors:{}}).accessors,r=this.prototype;function p(g){const v=nl(g);e[v]||(l$(r,g),e[v]=!0)}return Ae.isArray(t)?t.forEach(p):p(t),this}};ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(ii.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ae.freezeMethods(ii);function rd(n,t){const e=this||tl,r=t||e,p=ii.from(r.headers);let g=r.data;return Ae.forEach(n,function(v){g=v.call(e,g,p.normalize(),t?t.status:void 0)}),p.normalize(),g}function ry(n){return!!(n&&n.__CANCEL__)}function va(n,t,e){At.call(this,n??"canceled",At.ERR_CANCELED,t,e),this.name="CanceledError"}Ae.inherits(va,At,{__CANCEL__:!0});function iy(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new At("Request failed with status code "+e.status,[At.ERR_BAD_REQUEST,At.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function c$(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function u$(n,t){n=n||10;const e=new Array(n),r=new Array(n);let p=0,g=0,v;return t=t!==void 0?t:1e3,function(b){const h=Date.now(),f=r[g];v||(v=h),e[p]=b,r[p]=h;let s=g,a=0;for(;s!==p;)a+=e[s++],s=s%n;if(p=(p+1)%n,p===g&&(g=(g+1)%n),h-v<t)return;const u=f&&h-f;return u?Math.round(a*1e3/u):void 0}}function h$(n,t){let e=0,r=1e3/t,p,g;const v=(b,h=Date.now())=>{e=h,p=null,g&&(clearTimeout(g),g=null),n(...b)};return[(...b)=>{const h=Date.now(),f=h-e;f>=r?v(b,h):(p=b,g||(g=setTimeout(()=>{g=null,v(p)},r-f)))},()=>p&&v(p)]}const mc=(n,t,e=3)=>{let r=0;const p=u$(50,250);return h$(g=>{const v=g.loaded,b=g.lengthComputable?g.total:void 0,h=v-r,f=p(h),s=v<=b;r=v;const a={loaded:v,total:b,progress:b?v/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&s?(b-v)/f:void 0,event:g,lengthComputable:b!=null,[t?"download":"upload"]:!0};n(a)},e)},oy=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},sy=n=>(...t)=>Ae.asap(()=>n(...t)),d$=Lr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Lr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Lr.origin),Lr.navigator&&/(msie|trident)/i.test(Lr.navigator.userAgent)):()=>!0,p$=Lr.hasStandardBrowserEnv?{write(n,t,e,r,p,g){const v=[n+"="+encodeURIComponent(t)];Ae.isNumber(e)&&v.push("expires="+new Date(e).toGMTString()),Ae.isString(r)&&v.push("path="+r),Ae.isString(p)&&v.push("domain="+p),g===!0&&v.push("secure"),document.cookie=v.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function f$(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function g$(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ay(n,t,e){let r=!f$(t);return n&&(r||e==!1)?g$(n,t):t}const ly=n=>n instanceof ii?{...n}:n;function Ls(n,t){t=t||{};const e={};function r(f,s,a,u){return Ae.isPlainObject(f)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:u},f,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function p(f,s,a,u){if(Ae.isUndefined(s)){if(!Ae.isUndefined(f))return r(void 0,f,a,u)}else return r(f,s,a,u)}function g(f,s){if(!Ae.isUndefined(s))return r(void 0,s)}function v(f,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(f))return r(void 0,f)}else return r(void 0,s)}function b(f,s,a){if(a in t)return r(f,s);if(a in n)return r(void 0,f)}const h={url:g,method:g,data:g,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:b,headers:(f,s,a)=>p(ly(f),ly(s),a,!0)};return Ae.forEach(Object.keys({...n,...t}),function(f){const s=h[f]||p,a=s(n[f],t[f],f);Ae.isUndefined(a)&&s!==b||(e[f]=a)}),e}const cy=n=>{const t=Ls({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:p,xsrfCookieName:g,headers:v,auth:b}=t;if(t.headers=v=ii.from(v),t.url=Qv(ay(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&v.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Ae.isFormData(e)){if(Lr.hasStandardBrowserEnv||Lr.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if(Ae.isFunction(e.getHeaders)){const h=e.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&v.set(s,a)})}}if(Lr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(t)),r||r!==!1&&d$(t.url))){const h=p&&g&&p$.read(g);h&&v.set(p,h)}return t},m$=typeof XMLHttpRequest<"u",v$=m$&&function(n){return new Promise(function(t,e){const r=cy(n);let p=r.data;const g=ii.from(r.headers).normalize();let{responseType:v,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const x=ii.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),I={data:!v||v==="text"||v==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:n,request:l};iy(function($){t($),i()},function($){e($),i()},I),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new At("Request aborted",At.ECONNABORTED,n,l)),l=null)},l.onerror=function(x){const I=x&&x.message?x.message:"Network Error",$=new At(I,At.ERR_NETWORK,n,l);$.event=x||null,e($),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||ey;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new At(x,I.clarifyTimeoutError?At.ETIMEDOUT:At.ECONNABORTED,n,l)),l=null},p===void 0&&g.setContentType(null),"setRequestHeader"in l&&Ae.forEach(g.toJSON(),function(x,I){l.setRequestHeader(I,x)}),Ae.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),v&&v!=="json"&&(l.responseType=r.responseType),h&&([a,c]=mc(h,!0),l.addEventListener("progress",a)),b&&l.upload&&([s,u]=mc(b),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new va(null,n,l):x),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=c$(r.url);if(w&&Lr.protocols.indexOf(w)===-1){e(new At("Unsupported protocol "+w+":",At.ERR_BAD_REQUEST,n));return}l.send(p||null)})},y$=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,p;const g=function(f){if(!p){p=!0,b();const s=f instanceof Error?f:this.reason;r.abort(s instanceof At?s:new va(s instanceof Error?s.message:s))}};let v=t&&setTimeout(()=>{v=null,g(new At(`timeout ${t} of ms exceeded`,At.ETIMEDOUT))},t);const b=()=>{n&&(v&&clearTimeout(v),v=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(g):f.removeEventListener("abort",g)}),n=null)};n.forEach(f=>f.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(b),h}},w$=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,p;for(;r<e;)p=r+t,yield n.slice(r,p),r=p},b$=async function*(n,t){for await(const e of x$(n))yield*w$(e,t)},x$=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},uy=(n,t,e,r)=>{const p=b$(n,t);let g=0,v,b=h=>{v||(v=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:s}=await p.next();if(f){b(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),p.return()}},{highWaterMark:2})},hy=64*1024,{isFunction:vc}=Ae,dy=(({fetch:n,Request:t,Response:e})=>({fetch:n,Request:t,Response:e}))(Ae.global),{ReadableStream:py,TextEncoder:fy}=Ae.global,gy=(n,...t)=>{try{return!!n(...t)}catch{return!1}},C$=n=>{const{fetch:t,Request:e,Response:r}=Object.assign({},dy,n),p=vc(t),g=vc(e),v=vc(r);if(!p)return!1;const b=p&&vc(py),h=p&&(typeof fy=="function"?(i=>l=>i.encode(l))(new fy):async i=>new Uint8Array(await new e(i).arrayBuffer())),f=g&&b&&gy(()=>{let i=!1;const l=new e(Lr.origin,{body:new py,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!l}),s=v&&b&&gy(()=>Ae.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(l,d)=>{let w=l&&l[i];if(w)return w.call(l);throw new At(`Response type '${i}' is not supported`,At.ERR_NOT_SUPPORT,d)})});const u=async i=>{if(i==null)return 0;if(Ae.isBlob(i))return i.size;if(Ae.isSpecCompliantForm(i))return(await new e(Lr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(i)||Ae.isArrayBuffer(i))return i.byteLength;if(Ae.isURLSearchParams(i)&&(i=i+""),Ae.isString(i))return(await h(i)).byteLength},c=async(i,l)=>Ae.toFiniteNumber(i.getContentLength())??u(l);return async i=>{let{url:l,method:d,data:w,signal:x,cancelToken:I,timeout:$,onDownloadProgress:S,onUploadProgress:C,responseType:R,headers:N,withCredentials:L="same-origin",fetchOptions:E}=cy(i);R=R?(R+"").toLowerCase():"text";let B=y$([x,I&&I.toAbortSignal()],$),P=null;const O=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let _;try{if(C&&f&&d!=="get"&&d!=="head"&&(_=await c(N,w))!==0){let X=new e(l,{method:"POST",body:w,duplex:"half"}),ee;if(Ae.isFormData(w)&&(ee=X.headers.get("content-type"))&&N.setContentType(ee),X.body){const[de,te]=oy(_,mc(sy(C)));w=uy(X.body,hy,de,te)}}Ae.isString(L)||(L=L?"include":"omit");const k=g&&"credentials"in e.prototype,D={...E,signal:B,method:d.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:k?L:void 0};P=g&&new e(l,D);let z=await(g?t(P,E):t(l,D));const U=s&&(R==="stream"||R==="response");if(s&&(S||U&&O)){const X={};["status","statusText","headers"].forEach(le=>{X[le]=z[le]});const ee=Ae.toFiniteNumber(z.headers.get("content-length")),[de,te]=S&&oy(ee,mc(sy(S),!0))||[];z=new r(uy(z.body,hy,de,()=>{te&&te(),O&&O()}),X)}R=R||"text";let q=await a[Ae.findKey(a,R)||"text"](z,i);return!U&&O&&O(),await new Promise((X,ee)=>{iy(X,ee,{data:q,headers:ii.from(z.headers),status:z.status,statusText:z.statusText,config:i,request:P})})}catch(k){throw O&&O(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new At("Network Error",At.ERR_NETWORK,i,P),{cause:k.cause||k}):At.from(k,k&&k.code,i,P)}}},k$=new Map,my=n=>{let t=Ae.merge.call({skipUndefined:!0},dy,n?n.env:null);const{fetch:e,Request:r,Response:p}=t,g=[r,p,e];let v=g.length,b=v,h,f,s=k$;for(;b--;)h=g[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:C$(t)),s=f;return f};my();const id={http:z_,xhr:v$,fetch:{get:my}};Ae.forEach(id,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const vy=n=>`- ${n}`,S$=n=>Ae.isFunction(n)||n===null||n===!1,yy={getAdapter:(n,t)=>{n=Ae.isArray(n)?n:[n];const{length:e}=n;let r,p;const g={};for(let v=0;v<e;v++){r=n[v];let b;if(p=r,!S$(r)&&(p=id[(b=String(r)).toLowerCase()],p===void 0))throw new At(`Unknown adapter '${b}'`);if(p&&(Ae.isFunction(p)||(p=p.get(t))))break;g[b||"#"+v]=p}if(!p){const v=Object.entries(g).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=e?v.length>1?`since :
1493
+ `+v.map(vy).join(`
1494
+ `):" "+vy(v[0]):"as no adapter specified";throw new At("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return p},adapters:id};function od(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new va(null,n)}function wy(n){return od(n),n.headers=ii.from(n.headers),n.data=rd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),yy.getAdapter(n.adapter||tl.adapter,n)(n).then(function(t){return od(n),t.data=rd.call(n,n.transformResponse,t),t.headers=ii.from(t.headers),t},function(t){return ry(t)||(od(n),t&&t.response&&(t.response.data=rd.call(n,n.transformResponse,t.response),t.response.headers=ii.from(t.response.headers))),Promise.reject(t)})}const by="1.12.0",yc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{yc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const xy={};yc.transitional=function(n,t,e){function r(p,g){return"[Axios v"+by+"] Transitional option '"+p+"'"+g+(e?". "+e:"")}return(p,g,v)=>{if(n===!1)throw new At(r(g," has been removed"+(t?" in "+t:"")),At.ERR_DEPRECATED);return t&&!xy[g]&&(xy[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(p,g,v):!0}},yc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function A$(n,t,e){if(typeof n!="object")throw new At("options must be an object",At.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let p=r.length;for(;p-- >0;){const g=r[p],v=t[g];if(v){const b=n[g],h=b===void 0||v(b,g,n);if(h!==!0)throw new At("option "+g+" must be "+h,At.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new At("Unknown option "+g,At.ERR_BAD_OPTION)}}const wc={assertOptions:A$,validators:yc},co=wc.validators;let Rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Jv,response:new Jv}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let p={};Error.captureStackTrace?Error.captureStackTrace(p):p=new Error;const g=p.stack?p.stack.replace(/^.+\n/,""):"";try{r.stack?g&&!String(r.stack).endsWith(g.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1495
+ `+g):r.stack=g}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ls(this.defaults,e);const{transitional:r,paramsSerializer:p,headers:g}=e;r!==void 0&&wc.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),p!=null&&(Ae.isFunction(p)?e.paramsSerializer={serialize:p}:wc.assertOptions(p,{encode:co.function,serialize:co.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),wc.assertOptions(e,{baseUrl:co.spelling("baseURL"),withXsrfToken:co.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let v=g&&Ae.merge(g.common,g[e.method]);g&&Ae.forEach(["delete","get","head","post","put","patch","common"],i=>{delete g[i]}),e.headers=ii.concat(v,g);const b=[];let h=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(e)===!1||(h=h&&i.synchronous,b.unshift(i.fulfilled,i.rejected))});const f=[];this.interceptors.response.forEach(function(i){f.push(i.fulfilled,i.rejected)});let s,a=0,u;if(!h){const i=[wy.bind(this),void 0];for(i.unshift(...b),i.push(...f),u=i.length,s=Promise.resolve(e);a<u;)s=s.then(i[a++],i[a++]);return s}u=b.length;let c=e;for(a=0;a<u;){const i=b[a++],l=b[a++];try{c=i(c)}catch(d){l.call(this,d);break}}try{s=wy.call(this,c)}catch(i){return Promise.reject(i)}for(a=0,u=f.length;a<u;)s=s.then(f[a++],f[a++]);return s}getUri(t){t=Ls(this.defaults,t);const e=ay(t.baseURL,t.url,t.allowAbsoluteUrls);return Qv(e,t.params,t.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){Rs.prototype[n]=function(t,e){return this.request(Ls(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function t(e){return function(r,p,g){return this.request(Ls(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:p}))}}Rs.prototype[n]=t(),Rs.prototype[n+"Form"]=t(!0)});let _$=class a0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(p){e=p});const r=this;this.promise.then(p=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](p);r._listeners=null}),this.promise.then=p=>{let g;const v=new Promise(b=>{r.subscribe(b),g=b}).then(p);return v.cancel=function(){r.unsubscribe(g)},v},t(function(p,g,v){r.reason||(r.reason=new va(p,g,v),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new a0(function(e){t=e}),cancel:t}}};function $$(n){return function(t){return n.apply(null,t)}}function T$(n){return Ae.isObject(n)&&n.isAxiosError===!0}const sd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sd).forEach(([n,t])=>{sd[t]=n});function Cy(n){const t=new Rs(n),e=Fv(Rs.prototype.request,t);return Ae.extend(e,Rs.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Cy(Ls(n,r))},e}const er=mr("w",Cy(tl));er.Axios=Rs,er.CanceledError=va,er.CancelToken=_$,er.isCancel=ry,er.VERSION=by,er.toFormData=fc,er.AxiosError=At,er.Cancel=er.CanceledError,er.all=function(n){return Promise.all(n)},er.spread=$$,er.isAxiosError=T$,er.mergeConfig=Ls,er.AxiosHeaders=ii,er.formToJSON=n=>ty(Ae.isHTMLForm(n)?new FormData(n):n),er.getAdapter=yy.getAdapter,er.HttpStatusCode=sd,er.default=er;const{Axios:fD,AxiosError:gD,CanceledError:mD,isCancel:vD,CancelToken:yD,VERSION:wD,all:bD,Cancel:xD,isAxiosError:CD,spread:kD,toFormData:SD,AxiosHeaders:AD,HttpStatusCode:_D,formToJSON:$D,getAdapter:TD,mergeConfig:MD}=er;function ky(){return Object.assign({},Qs())}function M$(n,t,e){const r=An(n,void 0);return r.setTime(r.getTime()+t*Tl),r}function E$(n,t){const e=()=>Qn(void 0,NaN),r=O$(n);let p;if(r.date){const h=N$(r.date,2);p=D$(h.restDateString,h.year)}if(!p||isNaN(+p))return e();const g=+p;let v=0,b;if(r.time&&(v=F$(r.time),isNaN(v)))return e();if(r.timezone){if(b=P$(r.timezone),isNaN(b))return e()}else{const h=new Date(g+v),f=An(0,void 0);return f.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),f.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),f}return An(g+v+b,void 0)}const bc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},I$=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,L$=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,R$=/^([+-])(\d{2})(?::?(\d{2}))?$/;function O$(n){const t={},e=n.split(bc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],bc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(bc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const p=bc.timezone.exec(r);p?(t.time=r.replace(p[1],""),t.timezone=p[1]):t.time=r}return t}function N$(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const p=r[1]?parseInt(r[1]):null,g=r[2]?parseInt(r[2]):null;return{year:g===null?p:g*100,restDateString:n.slice((r[1]||r[2]).length)}}function D$(n,t){if(t===null)return new Date(NaN);const e=n.match(I$);if(!e)return new Date(NaN);const r=!!e[4],p=rl(e[1]),g=rl(e[2])-1,v=rl(e[3]),b=rl(e[4]),h=rl(e[5])-1;if(r)return j$(t,b,h)?W$(t,b,h):new Date(NaN);{const f=new Date(0);return!z$(t,g,v)||!H$(t,p)?new Date(NaN):(f.setUTCFullYear(t,g,Math.max(p,v)),f)}}function rl(n){return n?parseInt(n):1}function F$(n){const t=n.match(L$);if(!t)return NaN;const e=ad(t[1]),r=ad(t[2]),p=ad(t[3]);return U$(e,r,p)?e*gu+r*Tl+p*1e3:NaN}function ad(n){return n&&parseFloat(n.replace(",","."))||0}function P$(n){if(n==="Z")return 0;const t=n.match(R$);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),p=t[3]&&parseInt(t[3])||0;return V$(r,p)?e*(r*gu+p*Tl):NaN}function W$(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const p=r.getUTCDay()||7,g=(t-1)*7+e+1-p;return r.setUTCDate(r.getUTCDate()+g),r}const B$=[31,null,31,30,31,30,31,31,30,31,30,31];function Sy(n){return n%400===0||n%4===0&&n%100!==0}function z$(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(B$[t]||(Sy(n)?29:28))}function H$(n,t){return t>=1&&t<=(Sy(n)?366:365)}function j$(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function U$(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function V$(n,t){return t>=0&&t<=59}function K$(n,t,e){return M$(n,-t)}function Ay(n,t,e){const r=ky(),p=Y$(n,e.timeZone,e.locale??r.locale);return"formatToParts"in p?G$(p,t):q$(p,t)}function G$(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function q$(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function Y$(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function X$(n,t){const e=tT(t);return"formatToParts"in e?Q$(e,n):J$(e,n)}const Z$={year:0,month:1,day:2,hour:3,minute:4,second:5};function Q$(n,t){try{const e=n.formatToParts(t),r=[];for(let p=0;p<e.length;p++){const g=Z$[e[p].type];g!==void 0&&(r[g]=parseInt(e[p].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function J$(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const ld={},_y=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),eT=_y==="06/25/2014, 00:00:00"||_y==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function tT(n){return ld[n]||(ld[n]=eT?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),ld[n]}function $y(n,t,e,r,p,g,v){const b=new Date(0);return b.setUTCFullYear(n,t,e),b.setUTCHours(r,p,g,v),b}const Ty=36e5,nT=6e4,cd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ud(n,t,e){if(!n)return 0;let r=cd.timezoneZ.exec(n);if(r)return 0;let p,g;if(r=cd.timezoneHH.exec(n),r)return p=parseInt(r[1],10),My(p)?-(p*Ty):NaN;if(r=cd.timezoneHHMM.exec(n),r){p=parseInt(r[2],10);const v=parseInt(r[3],10);return My(p,v)?(g=Math.abs(p)*Ty+v*nT,r[1]==="+"?-g:g):NaN}if(oT(n)){t=new Date(t||Date.now());const v=e?t:rT(t),b=hd(v,n);return-(e?b:iT(t,b,n))}return NaN}function rT(n){return $y(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function hd(n,t){const e=X$(n,t),r=$y(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let p=n.getTime();const g=p%1e3;return p-=g>=0?g:1e3+g,r-p}function iT(n,t,e){let r=n.getTime()-t;const p=hd(new Date(r),e);if(t===p)return t;r-=p-t;const g=hd(new Date(r),e);return p===g?p:Math.max(p,g)}function My(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Ey={};function oT(n){if(Ey[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Ey[n]=!0,!0}catch{return!1}}const sT=60*1e3,aT={X:function(n,t,e){const r=dd(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Iy(r);case"XXXX":case"XX":return ya(r);case"XXXXX":case"XXX":default:return ya(r,":")}},x:function(n,t,e){const r=dd(e.timeZone,n);switch(t){case"x":return Iy(r);case"xxxx":case"xx":return ya(r);case"xxxxx":case"xxx":default:return ya(r,":")}},O:function(n,t,e){const r=dd(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+lT(r,":");case"OOOO":default:return"GMT"+ya(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Ay("short",n,e);case"zzzz":default:return Ay("long",n,e)}}};function dd(n,t){const e=n?ud(n,t,!0)/sT:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function xc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ya(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),p=xc(Math.floor(r/60),2),g=xc(Math.floor(r%60),2);return e+p+t+g}function Iy(n,t){return n%60===0?(n>0?"-":"+")+xc(Math.abs(n)/60,2):ya(n,t)}function lT(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),p=Math.floor(r/60),g=r%60;return g===0?e+String(p):e+String(p)+t+xc(g,2)}function Ly(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const cT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pd=36e5,Ry=6e4,uT=2,Wr={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:cT};function Oy(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?uT:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=hT(n),{year:p,restDateString:g}=dT(r.date,e),v=pT(g,p);if(v===null||isNaN(v.getTime()))return new Date(NaN);if(v){const b=v.getTime();let h=0,f;if(r.time&&(h=fT(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(f=ud(r.timeZone||t.timeZone,new Date(b+h)),isNaN(f))return new Date(NaN)}else f=Ly(new Date(b+h)),f=Ly(new Date(b+h+f));return new Date(b+h+f)}else return new Date(NaN)}function hT(n){const t={};let e=Wr.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Wr.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const p=Wr.timeZone.exec(r);p?(t.time=r.replace(p[1],""),t.timeZone=p[1].trim()):t.time=r}return t}function dT(n,t){if(n){const e=Wr.YYY[t],r=Wr.YYYYY[t];let p=Wr.YYYY.exec(n)||r.exec(n);if(p){const g=p[1];return{year:parseInt(g,10),restDateString:n.slice(g.length)}}if(p=Wr.YY.exec(n)||e.exec(n),p){const g=p[1];return{year:parseInt(g,10)*100,restDateString:n.slice(g.length)}}}return{year:null}}function pT(n,t){if(t===null)return null;let e,r,p;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let g=Wr.MM.exec(n);if(g)return e=new Date(0),r=parseInt(g[1],10)-1,Fy(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(g=Wr.DDD.exec(n),g){e=new Date(0);const v=parseInt(g[1],10);return vT(t,v)?(e.setUTCFullYear(t,0,v),e):new Date(NaN)}if(g=Wr.MMDD.exec(n),g){e=new Date(0),r=parseInt(g[1],10)-1;const v=parseInt(g[2],10);return Fy(t,r,v)?(e.setUTCFullYear(t,r,v),e):new Date(NaN)}if(g=Wr.Www.exec(n),g)return p=parseInt(g[1],10)-1,Py(p)?Ny(t,p):new Date(NaN);if(g=Wr.WwwD.exec(n),g){p=parseInt(g[1],10)-1;const v=parseInt(g[2],10)-1;return Py(p,v)?Ny(t,p,v):new Date(NaN)}return null}function fT(n){let t,e,r=Wr.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),fd(t)?t%24*pd:NaN;if(r=Wr.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),fd(t,e)?t%24*pd+e*Ry:NaN;if(r=Wr.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const p=parseFloat(r[3].replace(",","."));return fd(t,e,p)?t%24*pd+e*Ry+p*1e3:NaN}return null}function Ny(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const p=r.getUTCDay()||7,g=t*7+e+1-p;return r.setUTCDate(r.getUTCDate()+g),r}const gT=[31,28,31,30,31,30,31,31,30,31,30,31],mT=[31,29,31,30,31,30,31,31,30,31,30,31];function Dy(n){return n%400===0||n%4===0&&n%100!==0}function Fy(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=Dy(n);if(r&&e>mT[t]||!r&&e>gT[t])return!1}return!0}function vT(n,t){if(t<1)return!1;const e=Dy(n);return!(e&&t>366||!e&&t>365)}function Py(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function fd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const yT=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function wT(n,t,e={}){t=String(t);const r=t.match(yT);if(r){const p=Oy(e.originalDate||n,e);t=r.reduce(function(g,v){if(v[0]==="'")return g;const b=g.indexOf(v),h=g[b-1]==="'",f=g.replace(v,"'"+aT[v[0]](p,v,e)+"'");return h?f.substring(0,b-1)+f.substring(b+1):f},t)}return ys(n,t,e)}function bT(n,t,e){n=Oy(n,e);const r=ud(t,n,!0),p=new Date(n.getTime()-r),g=new Date(0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}function Cc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},wT(bT(n,t,{timeZone:r.timeZone}),e,r)}const kc="yyyy-MM-dd",Wy="HH:mm:ss.SSS",By="HH:mm:ss",Sc=`${kc} ${Wy}`,zy=`${kc} ${By}`,ED=mr("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return ys(!t||t==="local"?K$(n,n.getTimezoneOffset()):n,Sc)},formatDateTime(n,t){return!t||t==="local"?ys(n,Sc):Cc(n,t,Sc)},formatDateTimeHMS(n,t){return!t||t==="local"?ys(n,zy):Cc(n,t,zy)},formatDate:function(n,t){return!t||t==="local"?ys(n,kc):Cc(n,this.timeZone,kc)},formatTime:function(n,t,e=Wy){return!t||t==="local"?ys(n,e):Cc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,By)},formatTimestamp(n,t){return this.formatDateTime(E$(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}});var xT=Object.defineProperty,CT=(n,t,e)=>t in n?xT(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>CT(n,typeof t!="symbol"?t+"":t,e);function gd(n,t,e){const r=An(n,e==null?void 0:e.in);return isNaN(t)?Qn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function kT(n,t){const e=An(n,void 0).getDay();return e===0?7:e}function ST(n,t){const e=AT(t)?new t(0):Qn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function AT(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const _T=10;let Hy=class{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}},$T=class extends Hy{constructor(t,e,r,p,g){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=p,g&&(this.subPriority=g)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}};class TT extends Hy{constructor(t,e){super(),Je(this,"priority",_T),Je(this,"subPriority",-1),this.context=t||(r=>Qn(e,r))}set(t,e){return e.timestampIsSet?t:Qn(t,ST(t,this.context))}}class en{run(t,e,r,p){const g=this.parse(t,e,r,p);return g?{setter:new $T(g.value,this.validate,this.set,this.priority,this.subPriority),rest:g.rest}:null}validate(t,e,r){return!0}}class MT extends en{constructor(){super(...arguments),Je(this,"priority",140),Je(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const Gn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},uo={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function qn(n,t){return n&&{value:t(n.value),rest:n.rest}}function Ln(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function ho(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,p=e[2]?parseInt(e[2],10):0,g=e[3]?parseInt(e[3],10):0,v=e[5]?parseInt(e[5],10):0;return{value:r*(p*gu+g*Tl+v*A0),rest:t.slice(e[0].length)}}function jy(n){return Ln(Gn.anyDigitsSigned,n)}function Wn(n,t){switch(n){case 1:return Ln(Gn.singleDigit,t);case 2:return Ln(Gn.twoDigits,t);case 3:return Ln(Gn.threeDigits,t);case 4:return Ln(Gn.fourDigits,t);default:return Ln(new RegExp("^\\d{1,"+n+"}"),t)}}function Uy(n,t){switch(n){case 1:return Ln(Gn.singleDigitSigned,t);case 2:return Ln(Gn.twoDigitsSigned,t);case 3:return Ln(Gn.threeDigitsSigned,t);case 4:return Ln(Gn.fourDigitsSigned,t);default:return Ln(new RegExp("^-?\\d{1,"+n+"}"),t)}}function md(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Vy(n,t){const e=t>0,r=e?t:1-t;let p;if(r<=50)p=n||100;else{const g=r+50,v=Math.trunc(g/100)*100,b=n>=g%100;p=n+v-(b?100:0)}return e?p:1-p}function Ky(n){return n%400===0||n%4===0&&n%100!==0}let ET=class extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const p=g=>({year:g,isTwoDigitYear:e==="yy"});switch(e){case"y":return qn(Wn(4,t),p);case"yo":return qn(r.ordinalNumber(t,{unit:"year"}),p);default:return qn(Wn(e.length,t),p)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const p=t.getFullYear();if(r.isTwoDigitYear){const v=Vy(r.year,p);return t.setFullYear(v,0,1),t.setHours(0,0,0,0),t}const g=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(g,0,1),t.setHours(0,0,0,0),t}},IT=class extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const p=g=>({year:g,isTwoDigitYear:e==="YY"});switch(e){case"Y":return qn(Wn(4,t),p);case"Yo":return qn(r.ordinalNumber(t,{unit:"year"}),p);default:return qn(Wn(e.length,t),p)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,p){const g=vu(t,p);if(r.isTwoDigitYear){const b=Vy(r.year,g);return t.setFullYear(b,0,p.firstWeekContainsDate),t.setHours(0,0,0,0),Go(t,p)}const v=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(v,0,p.firstWeekContainsDate),t.setHours(0,0,0,0),Go(t,p)}};class LT extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Uy(e==="R"?4:e.length,t)}set(t,e,r){const p=Qn(t,0);return p.setFullYear(r,0,4),p.setHours(0,0,0,0),Js(p)}}let RT=class extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Uy(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}};class OT extends en{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return Wn(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class NT extends en{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return Wn(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}let DT=class extends en{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const p=g=>g-1;switch(e){case"M":return qn(Ln(Gn.month,t),p);case"MM":return qn(Wn(2,t),p);case"Mo":return qn(r.ordinalNumber(t,{unit:"month"}),p);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}};class FT extends en{constructor(){super(...arguments),Je(this,"priority",110),Je(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const p=g=>g-1;switch(e){case"L":return qn(Ln(Gn.month,t),p);case"LL":return qn(Wn(2,t),p);case"Lo":return qn(r.ordinalNumber(t,{unit:"month"}),p);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function PT(n,t,e){const r=An(n,e==null?void 0:e.in),p=Gp(r,e)-t;return r.setDate(r.getDate()-p*7),An(r,e==null?void 0:e.in)}let WT=class extends en{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return Ln(Gn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Wn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,p){return Go(PT(t,r,p),p)}};function BT(n,t,e){const r=An(n,void 0),p=Kp(r)-t;return r.setDate(r.getDate()-p*7),r}class zT extends en{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return Ln(Gn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Wn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Js(BT(t,r))}}const HT=[31,28,31,30,31,30,31,31,30,31,30,31],jT=[31,29,31,30,31,30,31,31,30,31,30,31];class UT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return Ln(Gn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Wn(e.length,t)}}validate(t,e){const r=t.getFullYear(),p=Ky(r),g=t.getMonth();return p?e>=1&&e<=jT[g]:e>=1&&e<=HT[g]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}let VT=class extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return Ln(Gn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Wn(e.length,t)}}validate(t,e){const r=t.getFullYear();return Ky(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}};function vd(n,t,e){var r,p,g,v;const b=Qs(),h=(e==null?void 0:e.weekStartsOn)??((p=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:p.weekStartsOn)??b.weekStartsOn??((v=(g=b.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??0,f=An(n,e==null?void 0:e.in),s=f.getDay(),a=(t%7+7)%7,u=7-h,c=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return gd(f,c,e)}class KT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,p){return t=vd(t,r,p),t.setHours(0,0,0,0),t}}class GT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,p){const g=v=>{const b=Math.floor((v-1)/7)*7;return(v+p.weekStartsOn+6)%7+b};switch(e){case"e":case"ee":return qn(Wn(e.length,t),g);case"eo":return qn(r.ordinalNumber(t,{unit:"day"}),g);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,p){return t=vd(t,r,p),t.setHours(0,0,0,0),t}}let qT=class extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,p){const g=v=>{const b=Math.floor((v-1)/7)*7;return(v+p.weekStartsOn+6)%7+b};switch(e){case"c":case"cc":return qn(Wn(e.length,t),g);case"co":return qn(r.ordinalNumber(t,{unit:"day"}),g);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,p){return t=vd(t,r,p),t.setHours(0,0,0,0),t}};function YT(n,t,e){const r=An(n,void 0),p=kT(r),g=t-p;return gd(r,g,e)}class XT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const p=g=>g===0?7:g;switch(e){case"i":case"ii":return Wn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return qn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),p);case"iiiii":return qn(r.day(t,{width:"narrow",context:"formatting"}),p);case"iiiiii":return qn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),p);case"iiii":default:return qn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),p)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=YT(t,r),t.setHours(0,0,0,0),t}}class ZT extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(md(r),0,0,0),t}}class QT extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(md(r),0,0,0),t}}let JT=class extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(md(r),0,0,0),t}};class eM extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return Ln(Gn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Wn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const p=t.getHours()>=12;return p&&r<12?t.setHours(r+12,0,0,0):!p&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class tM extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return Ln(Gn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Wn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class nM extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return Ln(Gn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Wn(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class rM extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return Ln(Gn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Wn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const p=r<=24?r%24:r;return t.setHours(p,0,0,0),t}}class iM extends en{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return Ln(Gn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Wn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class oM extends en{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return Ln(Gn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Wn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class sM extends en{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=p=>Math.trunc(p*Math.pow(10,-e.length+3));return qn(Wn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class aM extends en{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return ho(uo.basicOptionalMinutes,t);case"XX":return ho(uo.basic,t);case"XXXX":return ho(uo.basicOptionalSeconds,t);case"XXXXX":return ho(uo.extendedOptionalSeconds,t);case"XXX":default:return ho(uo.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Qn(t,t.getTime()-Ml(t)-r)}}class lM extends en{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return ho(uo.basicOptionalMinutes,t);case"xx":return ho(uo.basic,t);case"xxxx":return ho(uo.basicOptionalSeconds,t);case"xxxxx":return ho(uo.extendedOptionalSeconds,t);case"xxx":default:return ho(uo.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Qn(t,t.getTime()-Ml(t)-r)}}class cM extends en{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return jy(t)}set(t,e,r){return[Qn(t,r*1e3),{timestampIsSet:!0}]}}class uM extends en{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return jy(t)}set(t,e,r){return[Qn(t,r),{timestampIsSet:!0}]}}const hM={G:new MT,y:new ET,Y:new IT,R:new LT,u:new RT,Q:new OT,q:new NT,M:new DT,L:new FT,w:new WT,I:new zT,d:new UT,D:new VT,E:new KT,e:new GT,c:new qT,i:new XT,a:new ZT,b:new QT,B:new JT,h:new eM,H:new tM,K:new nM,k:new rM,m:new iM,s:new oM,S:new sM,X:new aM,x:new lM,t:new cM,T:new uM},dM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fM=/^'([^]*?)'?$/,gM=/''/g,mM=/\S/,vM=/[a-zA-Z]/;function yM(n,t,e,r){var p,g,v,b;const h=()=>Qn(e,NaN),f=ky(),s=f.locale??Vp,a=f.firstWeekContainsDate??((g=(p=f.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,u=f.weekStartsOn??((b=(v=f.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(!t)return n?h():An(e,void 0);const c={firstWeekContainsDate:a,weekStartsOn:u,locale:s},i=[new TT(void 0,e)],l=t.match(pM).map($=>{const S=$[0];if(S in yu){const C=yu[S];return C($,s.formatLong)}return $}).join("").match(dM),d=[];for(let $ of l){ef($)&&wu($,t,n),Jp($)&&wu($,t,n);const S=$[0],C=hM[S];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const L=d.find(E=>R.includes(E.token)||E.token===S);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);d.push({token:S,fullToken:$});const N=C.run(n,$,s.match,c);if(!N)return h();i.push(N.setter),n=N.rest}else{if(S.match(vM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if($==="''"?$="'":S==="'"&&($=wM($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&mM.test(n))return h();const w=i.map($=>$.priority).sort(($,S)=>S-$).filter(($,S,C)=>C.indexOf($)===S).map($=>i.filter(S=>S.priority===$).sort((S,C)=>C.subPriority-S.subPriority)).map($=>$[0]);let x=An(e,void 0);if(isNaN(+x))return h();const I={};for(const $ of w){if(!$.validate(x,c))return h();const S=$.set(x,I,c);Array.isArray(S)?(x=S[0],Object.assign(I,S[1])):x=S}return x}function wM(n){return n.match(fM)[1].replace(gM,"'")}const bM="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=",xM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return bM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=TM.indexOf(Gy[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,p=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*p}px;`,`background-size: ${e}px ${r}px;`,`height: ${p}px;`,`width: ${p}px;`,`padding-top: ${n-1}px;`].join("")}}};function CM(n,t,e,r,p,g){return In(),Jr("div",{style:La(g.iconStyle)},null,4)}const kM=Ko(xM,[["render",CM]]),SM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function AM(n,t,e,r,p,g){const v=Ct("rux-icon");return In(),so(v,{size:e.size,icon:e.icon,style:La(g.colorStyle)},null,8,["size","icon","style"])}const _M=Ko(SM,[["render",AM],["__scopeId","data-v-9af48e85"]]),Gy={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},yd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},$M=function(n){const t="#000000",e="#ffffff",r=yd[Gy[n]];if(r){const p=+`0x${r.slice(1,3)}`,g=+`0x${r.slice(3,5)}`,v=+`0x${r.slice(5,7)}`;if((p*299+g*587+v*114)/1e3>128)return t}return e},TM=Object.keys(yd),MM={astro:{component:n=>Xs(_M,{...n})},"astro-status":{component:n=>Xs(kM,{...n,status:n.icon})}},EM={extras:{component:n=>Xs(S0,{...n})}},ID=mr("p",{data:{configKey:"",dontSaveDefaultConfig:!1},methods:{loadDefaultConfig:function(){return localStorage[`${this.configKey}__default`]?JSON.parse(localStorage[`${this.configKey}__default`]):{}},saveDefaultConfig:function(n){this.dontSaveDefaultConfig!==!0&&(localStorage[`${this.configKey}__default`]=JSON.stringify(n))},openConfigBase:function(n,t=!1,e=null){new Ss().load_config(this.configKey,n).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:n}),e&&e(JSON.parse(r)),t||this.$route.fullPath.includes(n)||this.$router.push({query:{config:n}})):this.$notify.caution({title:"Unknown configuration",body:n})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${n}`,body:r})})},saveConfigBase:function(n,t){new Ss().save_config(this.configKey,n,JSON.stringify(t)).then(()=>{this.$notify.normal({title:"Saved configuration",body:n})}).catch(e=>{e&&this.$notify.serious({title:`Error saving configuration: ${n}`,body:e})})},resetConfigBase:function(){localStorage.removeItem(`${this.configKey}__default`);const n={...this.$route.query};delete n.config,this.$router.replace({query:n})}}}),IM={props:{configKey:String,modelValue:Boolean},data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},mounted(){let n=-1;new Ss().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(n),1),new Ss().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},LM={class:"mt-4 pa-3"},RM=["textContent"];function OM(n,t,e,r,p,g){const v=Ct("v-spacer"),b=Ct("v-toolbar"),h=Ct("v-text-field"),f=Ct("v-row"),s=Ct("v-btn"),a=Ct("v-data-table"),u=Ct("v-card-text"),c=Ct("v-card-actions"),i=Ct("v-card"),l=Ct("v-dialog");return In(),so(l,{modelValue:g.show,"onUpdate:modelValue":t[4]||(t[4]=d=>g.show=d),width:"600",onKeydown:uu(g.cancel,["esc"])},{default:Lt(()=>[ut(i,null,{default:Lt(()=>[vr("form",{onSubmit:t[3]||(t[3]=Zs((...d)=>g.success&&g.success(...d),["prevent"]))},[ut(b,{height:"24"},{default:Lt(()=>[ut(v),t[5]||(t[5]=vr("span",null,"Open Configuration",-1)),ut(v)]),_:1}),ut(u,null,{default:Lt(()=>[vr("div",LM,[ut(f,{dense:""},{default:Lt(()=>[ut(h,{modelValue:p.search,"onUpdate:modelValue":t[0]||(t[0]=d=>p.search=d),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ut(a,{modelValue:p.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=d=>p.selectedRows=d),"show-select":"","select-strategy":"single","item-value":"configId",search:p.search,headers:p.headers,items:p.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(d,w)=>g.selectRow(w))},{"item.actions":Lt(({item:d})=>[ut(s,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>g.deleteConfig(d)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ut(f,{dense:""},{default:Lt(()=>[_l(vr("span",{class:"ma-2 text-red",textContent:ei(g.error)},null,8,RM),[[$l,g.error]])]),_:1})])]),_:1}),ut(c,{class:"px-2"},{default:Lt(()=>[ut(v),ut(s,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:g.cancel},{default:Lt(()=>[...t[6]||(t[6]=[Mr(" Cancel ",-1)])]),_:1},8,["onClick"]),ut(s,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!g.error,onClick:Zs(g.success,["prevent"])},{default:Lt(()=>[...t[7]||(t[7]=[Mr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const LD=mr("g",Ko(IM,[["render",OM]])),NM={props:{configKey:String,modelValue:Boolean},data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.configName?null:"Config must have a name"},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{selectedItem:function(n){n&&(this.configName=n.config)}},mounted(){let n=-1;new Ss().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(n),1),new Ss().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},DM={class:"mt-4 pa-3"},FM=["textContent"];function PM(n,t,e,r,p,g){const v=Ct("v-spacer"),b=Ct("v-toolbar"),h=Ct("v-text-field"),f=Ct("v-row"),s=Ct("v-btn"),a=Ct("v-data-table"),u=Ct("v-card-text"),c=Ct("v-card-actions"),i=Ct("v-card"),l=Ct("v-dialog");return In(),so(l,{modelValue:g.show,"onUpdate:modelValue":t[5]||(t[5]=d=>g.show=d),width:"600",onKeydown:uu(g.cancel,["esc"])},{default:Lt(()=>[ut(i,null,{default:Lt(()=>[vr("form",{onSubmit:t[4]||(t[4]=Zs((...d)=>g.success&&g.success(...d),["prevent"]))},[ut(b,{height:"24"},{default:Lt(()=>[ut(v),t[6]||(t[6]=vr("span",null,"Save Configuration",-1)),ut(v)]),_:1}),ut(u,null,{default:Lt(()=>[vr("div",DM,[ut(f,{dense:""},{default:Lt(()=>[ut(h,{modelValue:p.search,"onUpdate:modelValue":t[0]||(t[0]=d=>p.search=d),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ut(a,{modelValue:p.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=d=>p.selectedRows=d),"show-select":"","select-strategy":"single","item-value":"configId",search:p.search,headers:p.headers,items:p.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(d,w)=>g.selectRow(w))},{"item.actions":Lt(({item:d})=>[ut(s,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>g.deleteConfig(d)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ut(f,{dense:""},{default:Lt(()=>[ut(h,{modelValue:p.configName,"onUpdate:modelValue":t[3]||(t[3]=d=>p.configName=d),"hide-details":"",autofocus:"",disabled:!!g.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),ut(f,{dense:""},{default:Lt(()=>[_l(vr("span",{class:"ma-2 text-red",textContent:ei(g.error)},null,8,FM),[[$l,g.error]])]),_:1})])]),_:1}),ut(c,{class:"px-2"},{default:Lt(()=>[ut(v),ut(s,{variant:"outlined",onClick:g.cancel},{default:Lt(()=>[...t[7]||(t[7]=[Mr(" Cancel ",-1)])]),_:1},8,["onClick"]),ut(s,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!g.error,onClick:Zs(g.success,["prevent"])},{default:Lt(()=>[...t[8]||(t[8]=[Mr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const RD=mr("a",Ko(NM,[["render",PM]])),WM=50,BM=2e3,qy="single-spa:app-change",zM={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(qy,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},BM)},unmounted(){window.removeEventListener(qy,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=pu().length>0,pu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},WM)}}},HM={class:"mx-1"},jM={key:1,class:"d-flex justify-center align-center"};function UM(n,t,e,r,p,g){const v=Ct("v-card-title"),b=Ct("v-card-text"),h=Ct("v-card"),f=Ct("v-progress-circular");return In(),Jr(Al,null,[p.show?(In(),so(h,{key:0},{default:Lt(()=>[ut(v,null,{default:Lt(()=>[...t[0]||(t[0]=[Mr(" 404 Not Found ",-1)])]),_:1}),ut(b,{class:"d-flex align-center mt-3"},{default:Lt(()=>[t[1]||(t[1]=Mr(" The requested URL ",-1)),vr("code",HM,ei(n.$route.fullPath),1),t[2]||(t[2]=Mr(" was not routable. ",-1)),t[3]||(t[3]=vr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Co("",!0),g.showSpinner?(In(),Jr("div",jM,[ut(f,{indeterminate:""})])):Co("",!0)],64)}const Yy=[{path:"/:target?/:packet?/:item?/",name:"TlmGrapher",component:()=>ot(()=>it.import("./TlmGrapher-10a49e380fbbb04770d6.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Ko(zM,[["render",UM]])}];Yy.forEach(Pp);const VM=Rp({history:Op(),routes:Yy});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Xy,setPrototypeOf:Zy,isFrozen:KM,getPrototypeOf:GM,getOwnPropertyDescriptor:qM}=Object;let{freeze:Br,seal:Ri,create:Qy}=Object,{apply:wd,construct:bd}=typeof Reflect<"u"&&Reflect;Br||(Br=function(n){return n}),Ri||(Ri=function(n){return n}),wd||(wd=function(n,t,e){return n.apply(t,e)}),bd||(bd=function(n,t){return new n(...t)});const Ac=Hr(Array.prototype.forEach),YM=Hr(Array.prototype.lastIndexOf),Jy=Hr(Array.prototype.pop),il=Hr(Array.prototype.push),XM=Hr(Array.prototype.splice),_c=Hr(String.prototype.toLowerCase),xd=Hr(String.prototype.toString),ew=Hr(String.prototype.match),ol=Hr(String.prototype.replace),ZM=Hr(String.prototype.indexOf),QM=Hr(String.prototype.trim),Ji=Hr(Object.prototype.hasOwnProperty),zr=Hr(RegExp.prototype.test),sl=JM(TypeError);function Hr(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),p=1;p<e;p++)r[p-1]=arguments[p];return wd(n,t,r)}}function JM(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return bd(n,e)}}function Bt(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_c;Zy&&Zy(n,null);let r=t.length;for(;r--;){let p=t[r];if(typeof p=="string"){const g=e(p);g!==p&&(KM(t)||(t[r]=g),p=g)}n[p]=!0}return n}function eE(n){for(let t=0;t<n.length;t++)Ji(n,t)||(n[t]=null);return n}function Ao(n){const t=Qy(null);for(const[e,r]of Xy(n))Ji(n,e)&&(Array.isArray(r)?t[e]=eE(r):r&&typeof r=="object"&&r.constructor===Object?t[e]=Ao(r):t[e]=r);return t}function al(n,t){for(;n!==null;){const r=qM(n,t);if(r){if(r.get)return Hr(r.get);if(typeof r.value=="function")return Hr(r.value)}n=GM(n)}function e(){return null}return e}const tw=Br(["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","section","select","shadow","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"]),Cd=Br(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),kd=Br(["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"]),tE=Br(["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"]),Sd=Br(["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"]),nE=Br(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nw=Br(["#text"]),rw=Br(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ad=Br(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iw=Br(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$c=Br(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rE=Ri(/\{\{[\w\W]*|[\w\W]*\}\}/gm),iE=Ri(/<%[\w\W]*|[\w\W]*%>/gm),oE=Ri(/\$\{[\w\W]*/gm),sE=Ri(/^data-[\-\w.\u00B7-\uFFFF]+$/),aE=Ri(/^aria-[\-\w]+$/),ow=Ri(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lE=Ri(/^(?:\w+script|data):/i),cE=Ri(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sw=Ri(/^html$/i),uE=Ri(/^[a-z][.\w]*(-[.\w]+)+$/i);var aw=Object.freeze({__proto__:null,ARIA_ATTR:aE,ATTR_WHITESPACE:cE,CUSTOM_ELEMENT:uE,DATA_ATTR:sE,DOCTYPE_NAME:sw,ERB_EXPR:iE,IS_ALLOWED_URI:ow,IS_SCRIPT_OR_DATA:lE,MUSTACHE_EXPR:rE,TMPLIT_EXPR:oE});const ll={element:1,text:3,progressingInstruction:7,comment:8,document:9},hE=function(){return typeof window>"u"?null:window},dE=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const p="dompurify"+(e?"#"+e:"");try{return n.createPolicy(p,{createHTML(g){return g},createScriptURL(g){return g}})}catch{return console.warn("TrustedTypes policy "+p+" could not be created."),null}},lw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hE();const t=he=>cw(he);if(t.version="3.2.6",t.removed=[],!n||!n.document||n.document.nodeType!==ll.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n;const r=e,p=r.currentScript,{DocumentFragment:g,HTMLTemplateElement:v,Node:b,Element:h,NodeFilter:f,NamedNodeMap:s=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:a,DOMParser:u,trustedTypes:c}=n,i=h.prototype,l=al(i,"cloneNode"),d=al(i,"remove"),w=al(i,"nextSibling"),x=al(i,"childNodes"),I=al(i,"parentNode");if(typeof v=="function"){const he=e.createElement("template");he.content&&he.content.ownerDocument&&(e=he.content.ownerDocument)}let $,S="";const{implementation:C,createNodeIterator:R,createDocumentFragment:N,getElementsByTagName:L}=e,{importNode:E}=r;let B=lw();t.isSupported=typeof Xy=="function"&&typeof I=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:O,TMPLIT_EXPR:_,DATA_ATTR:k,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:q}=aw;let{IS_ALLOWED_URI:X}=aw,ee=null;const de=Bt({},[...tw,...Cd,...kd,...Sd,...nw]);let te=null;const le=Bt({},[...rw,...Ad,...iw,...$c]);let se=Object.seal(Qy(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}})),ue=null,me=null,_e=!0,Te=!0,Me=!1,Xe=!0,Ue=!1,ct=!0,et=!1,ht=!1,qt=!1,hn=!1,Vt=!1,yr=!1,yn=!0,Rn=!1;const tr="user-content-";let ur=!0,pt=!1,je={},Rt=null;const dn=Bt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let On=null;const wr=Bt({},["audio","video","img","source","image","track"]);let nr=null;const wn=Bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_n="http://www.w3.org/1998/Math/MathML",Nn="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml";let bn=Ot,yi=!1,jr=null;const wi=Bt({},[_n,Nn,Ot],xd);let Rr=Bt({},["mi","mo","mn","ms","mtext"]),oi=Bt({},["annotation-xml"]);const hr=Bt({},["title","style","font","a","script"]);let Ur=null;const po=["application/xhtml+xml","text/html"],Os="text/html";let Zt=null,Oi=null;const _o=e.createElement("form"),$o=function(he){return he instanceof RegExp||he instanceof Function},Vr=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oi&&Oi===he)){if((!he||typeof he!="object")&&(he={}),he=Ao(he),Ur=po.indexOf(he.PARSER_MEDIA_TYPE)===-1?Os:he.PARSER_MEDIA_TYPE,Zt=Ur==="application/xhtml+xml"?xd:_c,ee=Ji(he,"ALLOWED_TAGS")?Bt({},he.ALLOWED_TAGS,Zt):de,te=Ji(he,"ALLOWED_ATTR")?Bt({},he.ALLOWED_ATTR,Zt):le,jr=Ji(he,"ALLOWED_NAMESPACES")?Bt({},he.ALLOWED_NAMESPACES,xd):wi,nr=Ji(he,"ADD_URI_SAFE_ATTR")?Bt(Ao(wn),he.ADD_URI_SAFE_ATTR,Zt):wn,On=Ji(he,"ADD_DATA_URI_TAGS")?Bt(Ao(wr),he.ADD_DATA_URI_TAGS,Zt):wr,Rt=Ji(he,"FORBID_CONTENTS")?Bt({},he.FORBID_CONTENTS,Zt):dn,ue=Ji(he,"FORBID_TAGS")?Bt({},he.FORBID_TAGS,Zt):Ao({}),me=Ji(he,"FORBID_ATTR")?Bt({},he.FORBID_ATTR,Zt):Ao({}),je=Ji(he,"USE_PROFILES")?he.USE_PROFILES:!1,_e=he.ALLOW_ARIA_ATTR!==!1,Te=he.ALLOW_DATA_ATTR!==!1,Me=he.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=he.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=he.SAFE_FOR_TEMPLATES||!1,ct=he.SAFE_FOR_XML!==!1,et=he.WHOLE_DOCUMENT||!1,hn=he.RETURN_DOM||!1,Vt=he.RETURN_DOM_FRAGMENT||!1,yr=he.RETURN_TRUSTED_TYPE||!1,qt=he.FORCE_BODY||!1,yn=he.SANITIZE_DOM!==!1,Rn=he.SANITIZE_NAMED_PROPS||!1,ur=he.KEEP_CONTENT!==!1,pt=he.IN_PLACE||!1,X=he.ALLOWED_URI_REGEXP||ow,bn=he.NAMESPACE||Ot,Rr=he.MATHML_TEXT_INTEGRATION_POINTS||Rr,oi=he.HTML_INTEGRATION_POINTS||oi,se=he.CUSTOM_ELEMENT_HANDLING||{},he.CUSTOM_ELEMENT_HANDLING&&$o(he.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=he.CUSTOM_ELEMENT_HANDLING.tagNameCheck),he.CUSTOM_ELEMENT_HANDLING&&$o(he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),he.CUSTOM_ELEMENT_HANDLING&&typeof he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(Te=!1),Vt&&(hn=!0),je&&(ee=Bt({},nw),te=[],je.html===!0&&(Bt(ee,tw),Bt(te,rw)),je.svg===!0&&(Bt(ee,Cd),Bt(te,Ad),Bt(te,$c)),je.svgFilters===!0&&(Bt(ee,kd),Bt(te,Ad),Bt(te,$c)),je.mathMl===!0&&(Bt(ee,Sd),Bt(te,iw),Bt(te,$c))),he.ADD_TAGS&&(ee===de&&(ee=Ao(ee)),Bt(ee,he.ADD_TAGS,Zt)),he.ADD_ATTR&&(te===le&&(te=Ao(te)),Bt(te,he.ADD_ATTR,Zt)),he.ADD_URI_SAFE_ATTR&&Bt(nr,he.ADD_URI_SAFE_ATTR,Zt),he.FORBID_CONTENTS&&(Rt===dn&&(Rt=Ao(Rt)),Bt(Rt,he.FORBID_CONTENTS,Zt)),ur&&(ee["#text"]=!0),et&&Bt(ee,["html","head","body"]),ee.table&&(Bt(ee,["tbody"]),delete ue.tbody),he.TRUSTED_TYPES_POLICY){if(typeof he.TRUSTED_TYPES_POLICY.createHTML!="function")throw sl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof he.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=he.TRUSTED_TYPES_POLICY,S=$.createHTML("")}else $===void 0&&($=dE(c,p)),$!==null&&typeof S=="string"&&(S=$.createHTML(""));Br&&Br(he),Oi=he}},$n=Bt({},[...Cd,...kd,...tE]),dr=Bt({},[...Sd,...nE]),bi=function(he){let ze=I(he);(!ze||!ze.tagName)&&(ze={namespaceURI:bn,tagName:"template"});const Ne=_c(he.tagName),dt=_c(ze.tagName);return jr[he.namespaceURI]?he.namespaceURI===Nn?ze.namespaceURI===Ot?Ne==="svg":ze.namespaceURI===_n?Ne==="svg"&&(dt==="annotation-xml"||Rr[dt]):!!$n[Ne]:he.namespaceURI===_n?ze.namespaceURI===Ot?Ne==="math":ze.namespaceURI===Nn?Ne==="math"&&oi[dt]:!!dr[Ne]:he.namespaceURI===Ot?ze.namespaceURI===Nn&&!oi[dt]||ze.namespaceURI===_n&&!Rr[dt]?!1:!dr[Ne]&&(hr[Ne]||!$n[Ne]):!!(Ur==="application/xhtml+xml"&&jr[he.namespaceURI]):!1},tn=function(he){il(t.removed,{element:he});try{I(he).removeChild(he)}catch{d(he)}},Dn=function(he,ze){try{il(t.removed,{attribute:ze.getAttributeNode(he),from:ze})}catch{il(t.removed,{attribute:null,from:ze})}if(ze.removeAttribute(he),he==="is")if(hn||Vt)try{tn(ze)}catch{}else try{ze.setAttribute(he,"")}catch{}},xi=function(he){let ze=null,Ne=null;if(qt)he="<remove></remove>"+he;else{const Dt=ew(he,/^[\r\n\t ]+/);Ne=Dt&&Dt[0]}Ur==="application/xhtml+xml"&&bn===Ot&&(he='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+he+"</body></html>");const dt=$?$.createHTML(he):he;if(bn===Ot)try{ze=new u().parseFromString(dt,Ur)}catch{}if(!ze||!ze.documentElement){ze=C.createDocument(bn,"template",null);try{ze.documentElement.innerHTML=yi?S:dt}catch{}}const an=ze.body||ze.documentElement;return he&&Ne&&an.insertBefore(e.createTextNode(Ne),an.childNodes[0]||null),bn===Ot?L.call(ze,et?"html":"body")[0]:et?ze.documentElement:an},si=function(he){return R.call(he.ownerDocument||he,he,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},eo=function(he){return he instanceof a&&(typeof he.nodeName!="string"||typeof he.textContent!="string"||typeof he.removeChild!="function"||!(he.attributes instanceof s)||typeof he.removeAttribute!="function"||typeof he.setAttribute!="function"||typeof he.namespaceURI!="string"||typeof he.insertBefore!="function"||typeof he.hasChildNodes!="function")},To=function(he){return typeof b=="function"&&he instanceof b};function Kr(he,ze,Ne){Ac(he,dt=>{dt.call(t,ze,Ne,Oi)})}const Qo=function(he){let ze=null;if(Kr(B.beforeSanitizeElements,he,null),eo(he))return tn(he),!0;const Ne=Zt(he.nodeName);if(Kr(B.uponSanitizeElement,he,{tagName:Ne,allowedTags:ee}),ct&&he.hasChildNodes()&&!To(he.firstElementChild)&&zr(/<[/\w!]/g,he.innerHTML)&&zr(/<[/\w!]/g,he.textContent)||he.nodeType===ll.progressingInstruction||ct&&he.nodeType===ll.comment&&zr(/<[/\w]/g,he.data))return tn(he),!0;if(!ee[Ne]||ue[Ne]){if(!ue[Ne]&&Or(Ne)&&(se.tagNameCheck instanceof RegExp&&zr(se.tagNameCheck,Ne)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ne)))return!1;if(ur&&!Rt[Ne]){const dt=I(he)||he.parentNode,an=x(he)||he.childNodes;if(an&&dt){const Dt=an.length;for(let Bn=Dt-1;Bn>=0;--Bn){const rr=l(an[Bn],!0);rr.__removalCount=(he.__removalCount||0)+1,dt.insertBefore(rr,w(he))}}}return tn(he),!0}return he instanceof h&&!bi(he)||(Ne==="noscript"||Ne==="noembed"||Ne==="noframes")&&zr(/<\/no(script|embed|frames)/i,he.innerHTML)?(tn(he),!0):(Ue&&he.nodeType===ll.text&&(ze=he.textContent,Ac([P,O,_],dt=>{ze=ol(ze,dt," ")}),he.textContent!==ze&&(il(t.removed,{element:he.cloneNode()}),he.textContent=ze)),Kr(B.afterSanitizeElements,he,null),!1)},ai=function(he,ze,Ne){if(yn&&(ze==="id"||ze==="name")&&(Ne in e||Ne in _o))return!1;if(!(Te&&!me[ze]&&zr(k,ze))&&!(_e&&zr(D,ze))){if(!te[ze]||me[ze]){if(!(Or(he)&&(se.tagNameCheck instanceof RegExp&&zr(se.tagNameCheck,he)||se.tagNameCheck instanceof Function&&se.tagNameCheck(he))&&(se.attributeNameCheck instanceof RegExp&&zr(se.attributeNameCheck,ze)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(ze))||ze==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&zr(se.tagNameCheck,Ne)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ne))))return!1}else if(!nr[ze]&&!zr(X,ol(Ne,U,""))&&!((ze==="src"||ze==="xlink:href"||ze==="href")&&he!=="script"&&ZM(Ne,"data:")===0&&On[he])&&!(Me&&!zr(z,ol(Ne,U,"")))&&Ne)return!1}return!0},Or=function(he){return he!=="annotation-xml"&&ew(he,q)},Nt=function(he){Kr(B.beforeSanitizeAttributes,he,null);const{attributes:ze}=he;if(!ze||eo(he))return;const Ne={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let dt=ze.length;for(;dt--;){const an=ze[dt],{name:Dt,namespaceURI:Bn,value:rr}=an,br=Zt(Dt),li=rr;let nn=Dt==="value"?li:QM(li);if(Ne.attrName=br,Ne.attrValue=nn,Ne.keepAttr=!0,Ne.forceKeepAttr=void 0,Kr(B.uponSanitizeAttribute,he,Ne),nn=Ne.attrValue,Rn&&(br==="id"||br==="name")&&(Dn(Dt,he),nn=tr+nn),ct&&zr(/((--!?|])>)|<\/(style|title)/i,nn)){Dn(Dt,he);continue}if(Ne.forceKeepAttr)continue;if(!Ne.keepAttr){Dn(Dt,he);continue}if(!Xe&&zr(/\/>/i,nn)){Dn(Dt,he);continue}Ue&&Ac([P,O,_],fo=>{nn=ol(nn,fo," ")});const Ni=Zt(he.nodeName);if(!ai(Ni,br,nn)){Dn(Dt,he);continue}if($&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!Bn)switch(c.getAttributeType(Ni,br)){case"TrustedHTML":{nn=$.createHTML(nn);break}case"TrustedScriptURL":{nn=$.createScriptURL(nn);break}}if(nn!==li)try{Bn?he.setAttributeNS(Bn,Dt,nn):he.setAttribute(Dt,nn),eo(he)?tn(he):Jy(t.removed)}catch{Dn(Dt,he)}}Kr(B.afterSanitizeAttributes,he,null)},Jo=function he(ze){let Ne=null;const dt=si(ze);for(Kr(B.beforeSanitizeShadowDOM,ze,null);Ne=dt.nextNode();)Kr(B.uponSanitizeShadowNode,Ne,null),Qo(Ne),Nt(Ne),Ne.content instanceof g&&he(Ne.content);Kr(B.afterSanitizeShadowDOM,ze,null)};return t.sanitize=function(he){let ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=null,dt=null,an=null,Dt=null;if(yi=!he,yi&&(he="<!-->"),typeof he!="string"&&!To(he))if(typeof he.toString=="function"){if(he=he.toString(),typeof he!="string")throw sl("dirty is not a string, aborting")}else throw sl("toString is not a function");if(!t.isSupported)return he;if(ht||Vr(ze),t.removed=[],typeof he=="string"&&(pt=!1),pt){if(he.nodeName){const br=Zt(he.nodeName);if(!ee[br]||ue[br])throw sl("root node is forbidden and cannot be sanitized in-place")}}else if(he instanceof b)Ne=xi("<!---->"),dt=Ne.ownerDocument.importNode(he,!0),dt.nodeType===ll.element&&dt.nodeName==="BODY"||dt.nodeName==="HTML"?Ne=dt:Ne.appendChild(dt);else{if(!hn&&!Ue&&!et&&he.indexOf("<")===-1)return $&&yr?$.createHTML(he):he;if(Ne=xi(he),!Ne)return hn?null:yr?S:""}Ne&&qt&&tn(Ne.firstChild);const Bn=si(pt?he:Ne);for(;an=Bn.nextNode();)Qo(an),Nt(an),an.content instanceof g&&Jo(an.content);if(pt)return he;if(hn){if(Vt)for(Dt=N.call(Ne.ownerDocument);Ne.firstChild;)Dt.appendChild(Ne.firstChild);else Dt=Ne;return(te.shadowroot||te.shadowrootmode)&&(Dt=E.call(r,Dt,!0)),Dt}let rr=et?Ne.outerHTML:Ne.innerHTML;return et&&ee["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&zr(sw,Ne.ownerDocument.doctype.name)&&(rr="<!DOCTYPE "+Ne.ownerDocument.doctype.name+`>
1496
+ `+rr),Ue&&Ac([P,O,_],br=>{rr=ol(rr,br," ")}),$&&yr?$.createHTML(rr):rr},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vr(he),ht=!0},t.clearConfig=function(){Oi=null,ht=!1},t.isValidAttribute=function(he,ze,Ne){Oi||Vr({});const dt=Zt(he),an=Zt(ze);return ai(dt,an,Ne)},t.addHook=function(he,ze){typeof ze=="function"&&il(B[he],ze)},t.removeHook=function(he,ze){if(ze!==void 0){const Ne=YM(B[he],ze);return Ne===-1?void 0:XM(B[he],Ne,1)[0]}return Jy(B[he])},t.removeHooks=function(he){B[he]=[]},t.removeAllHooks=function(){B=lw()},t}var pE=cw();const fE={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"}},gE={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return pE.sanitize(this.params.text)}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},mE=["innerHTML"],vE={key:2},yE={key:3,class:"validate mt-4"};function wE(n,t,e,r,p,g){const v=Ct("v-spacer"),b=Ct("v-toolbar"),h=Ct("v-icon"),f=Ct("v-text-field"),s=Ct("v-card-text"),a=Ct("v-btn"),u=Ct("v-card-actions"),c=Ct("v-card"),i=Ct("v-dialog"),l=Ct("v-app");return In(),so(l,null,{default:Lt(()=>[ut(i,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:Lt(()=>[ut(c,null,{default:Lt(()=>[ut(b,{height:"24"},{default:Lt(()=>[ut(v),vr("span",null,ei(n.params.title),1),ut(v)]),_:1}),ut(s,{class:"mt-4 pa-3"},{default:Lt(()=>[n.params.validateText?(In(),so(h,{key:0,class:"mr-2"},{default:Lt(()=>[...t[2]||(t[2]=[Mr(" mdi-alert ",-1)])]),_:1})):Co("",!0),n.params.html?(In(),Jr("span",{key:1,innerHTML:g.sanitizedText},null,8,mE)):(In(),Jr("span",vE,ei(g.sanitizedText),1)),n.params.validateText?(In(),Jr("div",yE,[Mr(" Enter "+ei(n.params.validateText)+" to confirm! ",1),ut(f,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Co("",!0)]),_:1}),ut(u,{class:"px-2"},{default:Lt(()=>[ut(v),n.params.cancelText?(In(),so(a,{key:0,variant:"outlined","data-test":g.dataTestCancel,onClick:g.cancel},{default:Lt(()=>[Mr(ei(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Co("",!0),ut(a,{variant:"flat",color:n.params.okClass,"data-test":g.dataTestOk,onClick:g.ok},{default:Lt(()=>[Mr(ei(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const bE=Ko(gE,[["render",wE],["__scopeId","data-v-36e9f721"]]);class xE{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(bE);t.use($d);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:p,validateText:g,cancelText:v,html:b}){return this.mount(),new Promise((h,f)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:p,validateText:g,cancelText:v,html:b},h,f)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:p="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:p,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:p="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:p,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:p="Cancel",okClass:g="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:g,validateText:r,cancelText:p,html:!1})}}const CE={install(n,t){const e=new xE;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},kE={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1497
+ --toast-bg-color:${yd[this.toastNotification.level]};
1498
+ --toast-fg-color:${$M(this.toastNotification.level)};
1499
+ `},contentStyle:function(){return`
1500
+ white-space: ${this.expanded?"normal":"nowrap"};
1501
+ overflow-x: ${this.expanded?"visible":"hidden"};
1502
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1503
+ `}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},SE={key:0,class:"text-subtitle-1 mr-1 notification-text"},AE={key:1,class:"text-body-2 notification-text"},_E={key:2,class:"text-body-2 notification-text"};function $E(n,t,e,r,p,g){const v=Ct("v-icon"),b=Ct("v-spacer"),h=Ct("v-btn"),f=Ct("v-sheet"),s=Ct("v-slide-y-transition");return In(),so(s,null,{default:Lt(()=>[_l(ut(f,{style:La(g.toastStyle),class:"toast-notification",onClick:g.expand},{default:Lt(()=>[ut(v,{class:"mr-1 notification-text"},{default:Lt(()=>[Mr(ei(g.toastNotificationIcon),1)]),_:1}),vr("div",{class:"toast-content",style:La(g.contentStyle)},[n.toastNotification.title?(In(),Jr("span",SE,[n.toastNotification.body||n.toastNotification.message?(In(),Jr(Al,{key:0},[Mr(ei(n.toastNotification.title)+": ",1)],64)):(In(),Jr(Al,{key:1},[Mr(ei(n.toastNotification.title),1)],64))])):Co("",!0),n.toastNotification.body?(In(),Jr("span",AE,ei(n.toastNotification.body),1)):Co("",!0),n.toastNotification.message?(In(),Jr("span",_E,ei(n.toastNotification.message),1)):Co("",!0)],4),ut(b),ut(h,{variant:"text",class:"notification-text",onClick:Zs(g.hide,["stop"])},{default:Lt(()=>[...t[0]||(t[0]=[Mr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[$l,n.showToast]])]),_:1})}const TE=Ko(kE,[["render",$E],["__scopeId","data-v-84833581"]]);class ME{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=du(TE);t.use($d);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:p,level:g,duration:v,type:b="alert",logToConsole:h=!1,saveToHistory:f=!0}){this.mount(),h&&console.log(p?`${g.toUpperCase()} - ${p}`:`${g.toUpperCase()} - ${e}: ${r}`),f&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:p,level:g}),this[t]({title:e,body:r,message:p,level:g,duration:v,type:b})}toast({title:t,body:e,message:r,level:p,duration:g,type:v}){this.$root.toast({title:t,body:e,message:r,level:p,type:v},g)}critical({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}caution({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}off({title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:p,duration:g,logToConsole:v,saveToHistory:b})}}const EE={install(n,t){const e=new ME(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},uw=100,hw=Np({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory(n,t){n.notifyHistory.length>=uw&&(n.notifyHistory.length=uw-1),n.notifyHistory.unshift(t)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,t){Object.assign(n.namedWidgets,t)},clearNamedWidget(n,t){delete n.namedWidgets[t]},playback(n,t){Object.assign(n.playback,t)}},modules:{}});function dw(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function IE(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function pw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const p in n)r[p]=n[p];for(const p in t){const g=n[p],v=t[p];if(dw(g)&&dw(v)){r[p]=pw(g,v,e);continue}if(e&&Array.isArray(g)&&Array.isArray(v)){r[p]=e(g,v);continue}r[p]=v}return r}function cl(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(cl.cache.has(n))return cl.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return cl.cache.set(n,t),t}cl.cache=new Map;function LE(n){Ap(`Vuetify: ${n}`)}function fw(n,t){return e=>Object.keys(n).reduce((r,p)=>{const g=typeof n[p]=="object"&&n[p]!=null&&!Array.isArray(n[p])?n[p]:{type:n[p]};return e&&p in e?r[p]={...g,default:e[p]}:r[p]=g,t&&!r[p].source&&(r[p].source=t),r},{})}function gw(n,t){const e=Ep();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function RE(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gw("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const _d=Symbol.for("vuetify:defaults");function mw(){const n=_p(_d);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function OE(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[cl(t)]<"u")}function NE(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mw();const r=gw("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const p=hu(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),g=new Proxy(n,{get(h,f){var s,a,u,c;const i=Reflect.get(h,f);if(f==="class"||f==="style")return[(s=p.value)==null?void 0:s[f],i].filter(w=>w!=null);if(OE(r.vnode,f))return i;const l=(a=p.value)==null?void 0:a[f];if(l!==void 0)return l;const d=(c=(u=e.value)==null?void 0:u.global)==null?void 0:c[f];return d!==void 0?d:i}}),v=$p();Tp(()=>{if(p.value){const h=Object.entries(p.value).filter(f=>{let[s]=f;return s.startsWith(s[0].toUpperCase())});v.value=h.length?Object.fromEntries(h):void 0}else v.value=void 0});function b(){const h=RE(_d,r);Ip(_d,hu(()=>v.value?pw((h==null?void 0:h.value)??{},v.value):h==null?void 0:h.value))}return{props:g,provideSubDefaults:b}}function Tc(n){if(n._setup=n._setup??n.setup,!n.name)return LE("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=fw(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return IE(e,t)},n.props._as=String,n.setup=function(e,r){const p=mw();if(!p.value)return n._setup(e,r);const{props:g,provideSubDefaults:v}=NE(e,e._as??n.name,p),b=n._setup(g,r);return v(),b}}return n}function DE(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?Tc:Sp)(t)}const FE=[String,Function,Object,Array],Mc=fw({icon:{type:FE},tag:{type:[String,Object,Function],required:!0}},"icon");DE()({name:"VComponentIcon",props:Mc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return ut(n.tag,null,{default:()=>{var p;return[n.icon?ut(r,null,null):(p=e.default)==null?void 0:p.call(e)]}})}}}),Tc({name:"VSvgIcon",inheritAttrs:!1,props:Mc(),setup(n,t){let{attrs:e}=t;return()=>ut(n.tag,Lp(e,{style:null}),{default:()=>[vr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?vr("path",{d:r[0],"fill-opacity":r[1]},null):vr("path",{d:r},null)):vr("path",{d:n.icon},null)])]})}}),Tc({name:"VLigatureIcon",props:Mc(),setup(n){return()=>ut(n.tag,null,{default:()=>[n.icon]})}});const PE=Tc({name:"VClassIcon",props:Mc(),setup(n){return()=>ut(n.tag,{class:Mp(n.icon)},null)}}),WE={component:n=>Xs(PE,{...n,class:"mdi"})},$d=Dp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:fE}},icons:{defaultSet:"mdi",sets:{mdi:WE,...MM,...EM}}}),Td=u0({createApp:du,appOptions:{render(){return Xs(y0,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(VM),n.use(hw),n.use($d),n.use(CE),n.use(EE,{store:hw})}}),ND=mr("e",Td.bootstrap),DD=mr("m",Td.mount),FD=mr("u",Td.unmount)}}});